diff --git a/src/dx/__init__.py b/src/dx/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/dx/settings.py b/src/dx/settings.py new file mode 100644 index 0000000..add55c3 --- /dev/null +++ b/src/dx/settings.py @@ -0,0 +1,47 @@ +from pathlib import Path +from configurations import Configuration + +BASE_DIR = Path(__file__).resolve().parent.parent + + +class Base(Configuration): + DEBUG = False + DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" + + INSTALLED_APPS = [ + "dx", + ] + + ROOT_URLCONF = "dx.urls" + + SECRET_KEY = "django-insecure-cbgvn=orgh$&6l-w91pp2=(b#hjwe1z&ijwiafgt(py1lq5i85" + + TEMPLATES = [ + { + "BACKEND": "django.template.backends.django.DjangoTemplates", + "DIRS": [BASE_DIR / "templates"], + "APP_DIRS": True, + }, + ] + + USE_TZ = True + + +class Dev(Base): + # Dangerous: disable host header validation + ALLOWED_HOSTS = ["*"] + + DATABASES = { + "default": { + "ENGINE": "django.db.backends.sqlite3", + "NAME": "db.sqlite3", + }, + } + + DEBUG = True + + INSTALLED_APPS = Base.INSTALLED_APPS + ["django_extensions"] + + +class Local(Dev): + pass diff --git a/src/dx/urls.py b/src/dx/urls.py new file mode 100644 index 0000000..637600f --- /dev/null +++ b/src/dx/urls.py @@ -0,0 +1 @@ +urlpatterns = [] diff --git a/src/manage.py b/src/manage.py new file mode 100755 index 0000000..22d839f --- /dev/null +++ b/src/manage.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" + +import os +import sys + + +def main(): + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dx.settings") + os.environ.setdefault("DJANGO_CONFIGURATION", "Base") + + from configurations.management import execute_from_command_line + + execute_from_command_line(sys.argv) + + +if __name__ == "__main__": + main()