In order to enable debugging for your Django app running in a Docker container, follow these steps using Visual Studio (Code):
- Add
ptvsd
to your requirements.txt file
ptvsd == 4.3.2
- To your
launch.json
, add this:
if(!(Get-Command git -ErrorAction SilentlyContinue)) { | |
$gitDir = "$env:LOCALAPPDATA\CustomGit" | |
if(Test-Path $gitDir) { Remove-Item -Path $gitDir -Recurse -Force } | |
New-Item -Path $gitDir -ItemType Directory | |
$gitLatestReleaseApi = (Invoke-WebRequest -UseBasicParsing https://api.github.com/repos/git-for-windows/git/releases/latest).Content | ConvertFrom-Json | |
$mingitObject = $gitLatestReleaseApi.assets ` | |
| Where-Object {$_.name -match "MinGit-[\d.]*?-64-bit.zip"} ` | |
| Select-Object browser_download_url |
import inspect | |
import sys | |
from datetime import datetime | |
from enum import EnumMeta | |
from typing import Any, Dict, List, Tuple, Union, _GenericAlias, get_type_hints | |
from pydantic import BaseModel | |
# Import your pydnatic models here | |
models = inspect.getmembers( |
from django.db import models | |
class Member(models.Model): | |
# RE: null vs blank | |
# | |
# NULL https://docs.djangoproject.com/en/1.10/ref/models/fields/#null | |
# Avoid using null on string-based fields such as CharField and TextField because | |
# empty string values will always be stored as empty strings, not as NULL. | |
# |
Copyright (c) 2015, Dorian Rudolph | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
using System; | |
using System.Net.WebSockets; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Coe.WebSocketWrapper | |
{ | |
public class WebSocketWrapper | |
{ |