├── .gitignore ├── MANIFEST.in ├── README.md ├── manage.py-tpl ├── media └── .gitkeep ├── project_name.sublime-project ├── setup.cfg ├── setup.py-tpl └── src └── project_name ├── __init__.py-tpl ├── apps └── __init__.py-tpl ├── conf ├── __init__.py-tpl ├── settings.py-tpl └── urls.py-tpl ├── locale └── .gitkeep ├── static └── .gitkeep ├── templates └── .gitkeep └── wsgi.py-tpl /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io/ 2 | 3 | ### Backup ### 4 | *.bak 5 | *.gho 6 | *.ori 7 | *.tmp 8 | 9 | ### Database ### 10 | *.db 11 | *.dbf 12 | *.sql 13 | *.sqlite3 14 | 15 | ### Django ### 16 | media/* 17 | !media/.gitkeep 18 | staticfiles/ 19 | 20 | ### Git ### 21 | # Created by git for backups. To disable backups in Git: 22 | # $ git config --global mergetool.keepBackup false 23 | *.orig 24 | 25 | # Created by git when using merge tools for conflicts 26 | *.BACKUP.* 27 | *.BASE.* 28 | *.LOCAL.* 29 | *.REMOTE.* 30 | *_BACKUP_*.txt 31 | *_BASE_*.txt 32 | *_LOCAL_*.txt 33 | *_REMOTE_*.txt 34 | 35 | ### Linux ### 36 | *~ 37 | 38 | # temporary files which can be created if a process still has a handle open of a deleted file 39 | .fuse_hidden* 40 | 41 | # Linux trash folder which might appear on any partition or disk 42 | .Trash-* 43 | 44 | # .nfs files are created when an open file is removed but is still being accessed 45 | .nfs* 46 | 47 | ### Logs ### 48 | *.log 49 | 50 | ### macOS ### 51 | # General 52 | .DS_Store 53 | .AppleDouble 54 | .LSOverride 55 | 56 | # Thumbnails 57 | ._* 58 | 59 | ### Node ### 60 | # Logs 61 | logs 62 | 63 | # Runtime data 64 | pids 65 | *.pid 66 | *.seed 67 | *.pid.lock 68 | 69 | # Directory for instrumented libs generated by jscoverage/JSCover 70 | lib-cov 71 | 72 | # Coverage directory used by tools like istanbul 73 | coverage 74 | 75 | # nyc test coverage 76 | .nyc_output 77 | 78 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 79 | .grunt 80 | 81 | # node-waf configuration 82 | .lock-wscript 83 | 84 | # Compiled binary addons (https://nodejs.org/api/addons.html) 85 | build/Release 86 | 87 | # Dependency directories 88 | node_modules/ 89 | jspm_packages/ 90 | 91 | # TypeScript v1 declaration files 92 | typings/ 93 | 94 | # Optional npm cache directory 95 | .npm 96 | 97 | # Optional eslint cache 98 | .eslintcache 99 | 100 | # Optional REPL history 101 | .node_repl_history 102 | 103 | # Output of 'npm pack' 104 | *.tgz 105 | 106 | # Yarn Integrity file 107 | .yarn-integrity 108 | 109 | # dotenv environment variables file 110 | .env 111 | 112 | # parcel-bundler cache (https://parceljs.org/) 113 | .cache 114 | 115 | # next.js build output 116 | .next 117 | 118 | # nuxt.js build output 119 | .nuxt 120 | 121 | # vuepress build output 122 | .vuepress/dist 123 | 124 | # Serverless directories 125 | .serverless 126 | 127 | # FuseBox cache 128 | .fusebox/ 129 | 130 | ### Python ### 131 | # Byte-compiled / optimized / DLL files 132 | __pycache__/ 133 | *.py[cod] 134 | *$py.class 135 | 136 | # C extensions 137 | *.so 138 | 139 | # Distribution / packaging 140 | *.egg-info/ 141 | .eggs/ 142 | build/ 143 | develop-eggs/ 144 | dist/ 145 | downloads/ 146 | eggs/ 147 | lib/ 148 | lib64/ 149 | parts/ 150 | sdist/ 151 | var/ 152 | wheels/ 153 | *.egg 154 | .installed.cfg 155 | .Python 156 | MANIFEST 157 | 158 | # Installer logs 159 | pip-delete-this-directory.txt 160 | pip-log.txt 161 | 162 | # Unit test / coverage reports 163 | .hypothesis/ 164 | .nox/ 165 | .pytest_cache/ 166 | .tox/ 167 | htmlcov/ 168 | *.cover 169 | .cache 170 | .coverage 171 | .coverage.* 172 | coverage.xml 173 | 174 | # Translations 175 | *.mo 176 | *.pot 177 | 178 | # Sphinx documentation 179 | docs/_build/ 180 | 181 | # Jupyter Notebook 182 | .ipynb_checkpoints 183 | 184 | # IPython 185 | profile_default/ 186 | ipython_config.py 187 | 188 | # celery beat schedule file 189 | celerybeat-schedule 190 | 191 | # Virtual environment 192 | .venv/ 193 | 194 | # mypy 195 | .mypy_cache/ 196 | .dmypy.json 197 | dmypy.json 198 | 199 | # Pyre type checker 200 | .pyre/ 201 | 202 | ### SublimeText ### 203 | # Cache files for Sublime Text 204 | *.tmlanguage.cache 205 | *.tmPreferences.cache 206 | *.stTheme.cache 207 | 208 | # Workspace files are user-specific 209 | *.sublime-workspace 210 | 211 | ### Vim ### 212 | # Swap 213 | [._]*.s[a-v][a-z] 214 | [._]*.sw[a-p] 215 | [._]s[a-rt-v][a-z] 216 | [._]ss[a-gi-z] 217 | [._]sw[a-p] 218 | 219 | # Session 220 | Session.vim 221 | 222 | # Temporary 223 | .netrwhist 224 | 225 | # Auto-generated tag files 226 | tags 227 | 228 | # Persistent undo 229 | [._]*.un~ 230 | 231 | ### VisualStudioCode ### 232 | .vscode/* 233 | !.vscode/settings.json 234 | !.vscode/tasks.json 235 | !.vscode/launch.json 236 | !.vscode/extensions.json 237 | 238 | ### VisualStudioCode Patch ### 239 | # Ignore all local history of files 240 | .history 241 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | graft src/{{ project_name }} 2 | prune media 3 | global-exclude *.py[co] 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | # Django Project Package Template 3 | 4 | This is a template for a [Django](https://www.djangoproject.com/) 2.x project. 5 | 6 | The project has a layout so that it can be build as a [wheel](https://github.com/pypa/wheel), one type of [Python packages](https://pypi.org/help/#packages). 7 | 8 | ## Features 9 | 10 | * `setup()` is configured using a [`setup.cfg` file](https://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files). 11 | * The version is defined in `{{ project_name }}.__version__`. 12 | * Source code is located in a `src` directory to prevent side effects. 13 | * All apps use the `{{ project_name }}.apps` namespace. 14 | * All configuration modules use the `{{ project_name }}.conf` namespace. 15 | * `{{ project_name }}.conf.settings` uses [`pathlib`](https://docs.python.org/3.7/library/pathlib.html) instead of `os` and `os.path`. 16 | * Many settings can be defined using environment variables and parsed with [envparse](https://github.com/rconradharris/envparse). 17 | * All templates, static files and locales will be included in the wheel. 18 | * All code follows the [Black](https://github.com/ambv/black) code style. 19 | * All docstrings follow [PEP 257](https://www.python.org/dev/peps/pep-0257/) conventions. 20 | * [Django Debug Toolbar](https://github.com/jazzband/django-debug-toolbar), [IPython](https://ipython.org/) and [check-manifest](https://github.com/mgedmin/check-manifest) are already added to the development dependencies. 21 | * A Sublime Text project configuration is already included. 22 | 23 | ## Usage 24 | 25 | Use the following [startproject](https://docs.djangoproject.com/en/stable/ref/django-admin/#django-admin-startproject) command to create a new project using this template: 26 | 27 | ```console 28 | python3 -m django startproject --extension=cfg,gitignore,gitkeep,in,md,sublime-project \ 29 | --template=https://github.com/keimlink/django-project-package-template/archive/master.zip \ 30 | name [directory] 31 | ``` 32 | 33 | _Tip: If you want to create the project in your current working directory use `.` as directory argument._ 34 | 35 | ## Testbed 36 | 37 | A testbed to quickly test the project template can be found in the separate [django-project-package-template-testbed](https://github.com/keimlink/django-project-package-template-testbed) repository. 38 | 39 | ## License 40 | 41 | Distributed under the [MIT License](https://opensource.org/licenses/MIT). 42 | 43 | Copyright 2018-2019 Markus Zapke-Gründemann 44 | 45 | _All text below the horizontal line is the template for the new project's README._ 46 | 47 | --- 48 | {% endcomment %}# {{ project_name|title }} 49 | 50 | Describe your project in one sentence. 51 | 52 | ## Quickstart 53 | 54 | Install the project and the development dependencies into a [virtual environment](https://docs.python.org/3.7/tutorial/venv.html): 55 | 56 | ```console 57 | python3 -m venv .venv 58 | source .venv/bin/activate 59 | python3 -m pip install --upgrade pip setuptools wheel 60 | python3 -m pip install --editable ".[dev]" 61 | ./manage.py migrate 62 | ./manage.py createsuperuser 63 | ./manage.py runserver 64 | ``` 65 | 66 | ## Starting a New App 67 | 68 | First create a new directory in the `apps` directory: 69 | 70 | ```console 71 | mkdir src/{{ project_name }}/apps/name 72 | ``` 73 | 74 | Then pass the path to the new directory to the [startapp](https://docs.djangoproject.com/en/{{ docs_version }}/ref/django-admin/#django-admin-startapp) command: 75 | 76 | ```console 77 | ./manage.py startapp name src/{{ project_name }}/apps/name 78 | ``` 79 | 80 | ## Deployment 81 | 82 | The following list describes only the absolute necessary steps to outline a deployment for a Django project wheel. For example a component to serve static files is missing - you could use [WhiteNoise](https://github.com/evansd/whitenoise/) to do this. 83 | 84 | Also see [How to use Django with Gunicorn](https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/gunicorn/) and [Deployment Checklist](https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/checklist/) for more information. 85 | 86 | 1. Add your favorite WSGI HTTP server, e.g. [Gunicorn](https://gunicorn.org/), to `install_requires` in `setup.cfg`. 87 | 2. [Check](https://github.com/mgedmin/check-manifest) if all files are included in the package: 88 | ```console 89 | check-manifest 90 | ``` 91 | 3. [Build](https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives) a [wheel](https://github.com/pypa/wheel) of the project. 92 | ```console 93 | ./setup.py bdist_wheel 94 | ``` 95 | 4. Copy the wheel file from the `dist` directory to the server to be deployed. 96 | 5. Create a minimal configuration on the server using environment variables. 97 | ```bash 98 | export DJANGO_SETTINGS_MODULE={{ project_name }}.conf.settings 99 | export DJANGO_ALLOWED_HOSTS=www.example.com 100 | export DJANGO_DEBUG=False 101 | ``` 102 | 6. Install the wheel and [collect the static files](https://docs.djangoproject.com/en/{{ docs_version }}/ref/contrib/staticfiles/#django-admin-collectstatic): 103 | ```console 104 | python3 -m pip install --find-links=/path/to/wheel_dir {{ project_name }} 105 | django-project collectstatic --no-input 106 | ``` 107 | 7. Start Gunicorn like this: 108 | ```console 109 | gunicorn {{ project_name }}.wsgi 110 | ``` 111 | -------------------------------------------------------------------------------- /manage.py-tpl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.conf.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError as exc: 10 | raise ImportError( 11 | "Couldn't import Django. Are you sure it's installed and " 12 | "available on your PYTHONPATH environment variable? Did you " 13 | "forget to activate a virtual environment?" 14 | ) from exc 15 | execute_from_command_line(sys.argv) 16 | -------------------------------------------------------------------------------- /media/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keimlink/django-project-package-template/f231c479a0e984d912a889b8e7871ca45f2d0985/media/.gitkeep -------------------------------------------------------------------------------- /project_name.sublime-project: -------------------------------------------------------------------------------- 1 | { 2 | "folders": 3 | [ 4 | { 5 | "path": ".", 6 | "folder_exclude_patterns": 7 | [ 8 | "*.egg-info", 9 | ".pytest_cache", 10 | ".venv", 11 | "__pycache__", 12 | "build", 13 | "dist", 14 | "htmlcov", 15 | "media" 16 | ], 17 | "file_exclude_patterns": 18 | [ 19 | "*.sqlite3", 20 | ".coverage" 21 | ] 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [check-manifest] 2 | ignore = 3 | *.sublime-project 4 | .git* 5 | .vscode/* 6 | manage.py 7 | 8 | [metadata] 9 | name = {{ project_name }} 10 | version = attr:{{ project_name }}.__version__ 11 | description = Describe your project in one sentence. 12 | long_description = file: README.md 13 | long_description_content_type = text/markdown 14 | author = {{ project_name }} team 15 | author_email = development@example.com 16 | url = https://www.example.com/ 17 | license = Other/Proprietary License 18 | # If you use a license file activate the line below. 19 | # license_file = LICENSE 20 | classifiers = 21 | Development Status :: 4 - Beta 22 | Environment :: Web Environment 23 | Framework :: Django :: {{ docs_version }} 24 | Intended Audience :: Developers 25 | License :: Other/Proprietary License 26 | Natural Language :: English 27 | Operating System :: OS Independent 28 | # Remove the line below if you want to publish your project on PyPI. 29 | Private :: Do Not Upload 30 | Programming Language :: JavaScript 31 | Programming Language :: Python :: 3 :: Only 32 | Programming Language :: Python :: 3.5 33 | Topic :: Internet :: WWW/HTTP 34 | Topic :: Internet :: WWW/HTTP :: Dynamic Content 35 | Topic :: Internet :: WWW/HTTP :: WSGI 36 | 37 | [options] 38 | zip_safe = False 39 | include_package_data = True 40 | package_dir= 41 | =src 42 | packages = find: 43 | install_requires = 44 | django=={{ django_version }} 45 | envparse==0.2.0 46 | python_requires = >=3.5 47 | 48 | [options.entry_points] 49 | console_scripts = 50 | django-project=django.core.management:execute_from_command_line 51 | 52 | [options.extras_require] 53 | dev = 54 | check-manifest==0.37 55 | django-debug-toolbar==1.11 56 | ipython==7.4.0 57 | 58 | [options.packages.find] 59 | where = 60 | src 61 | -------------------------------------------------------------------------------- /setup.py-tpl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from setuptools import setup 3 | 4 | setup() 5 | -------------------------------------------------------------------------------- /src/project_name/__init__.py-tpl: -------------------------------------------------------------------------------- 1 | __project_name__ = "{{ project_name }}" 2 | __version__ = "0.1.0" 3 | -------------------------------------------------------------------------------- /src/project_name/apps/__init__.py-tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keimlink/django-project-package-template/f231c479a0e984d912a889b8e7871ca45f2d0985/src/project_name/apps/__init__.py-tpl -------------------------------------------------------------------------------- /src/project_name/conf/__init__.py-tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keimlink/django-project-package-template/f231c479a0e984d912a889b8e7871ca45f2d0985/src/project_name/conf/__init__.py-tpl -------------------------------------------------------------------------------- /src/project_name/conf/settings.py-tpl: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for {{ project_name }} project. 3 | 4 | Generated by 'django-admin startproject' using Django {{ django_version }}. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/{{ docs_version }}/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/ 11 | """ 12 | from pathlib import Path 13 | 14 | from envparse import env 15 | 16 | # Build paths inside the project like this: str(BASE_DIR / "subdir") 17 | BASE_DIR = Path(__file__).resolve(strict=True).parents[1] 18 | 19 | PROJECT_DIR = BASE_DIR.parents[1] 20 | 21 | # Quick-start development settings - unsuitable for production 22 | # See https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/checklist/ 23 | 24 | # SECURITY WARNING: keep the secret key used in production secret! 25 | SECRET_KEY = env("DJANGO_SECRET_KEY", default="{{ secret_key }}") 26 | 27 | # SECURITY WARNING: don't run with debug turned on in production! 28 | DEBUG = env("DJANGO_DEBUG", cast=bool, default=True) 29 | 30 | # IP addresses marked as “internal” that can use the debug_toolbar 31 | # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#internal-ips 32 | INTERNAL_IPS = ["localhost", "127.0.0.1", "[::1]"] 33 | 34 | # List of strings representing the host/domain names that this site can serve 35 | # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#allowed-hosts 36 | ALLOWED_HOSTS = env("DJANGO_ALLOWED_HOSTS", cast=list, default=[]) 37 | 38 | 39 | # Application definition 40 | 41 | INSTALLED_APPS = [ 42 | "django.contrib.admin", 43 | "django.contrib.auth", 44 | "django.contrib.contenttypes", 45 | "django.contrib.sessions", 46 | "django.contrib.messages", 47 | "django.contrib.staticfiles", 48 | ] 49 | if DEBUG: 50 | INSTALLED_APPS += ("debug_toolbar",) 51 | 52 | MIDDLEWARE = [ 53 | "django.middleware.security.SecurityMiddleware", 54 | "django.contrib.sessions.middleware.SessionMiddleware", 55 | "django.middleware.common.CommonMiddleware", 56 | "django.middleware.csrf.CsrfViewMiddleware", 57 | "django.contrib.auth.middleware.AuthenticationMiddleware", 58 | "django.contrib.messages.middleware.MessageMiddleware", 59 | "django.middleware.clickjacking.XFrameOptionsMiddleware", 60 | ] 61 | if DEBUG: 62 | MIDDLEWARE = ["debug_toolbar.middleware.DebugToolbarMiddleware"] + MIDDLEWARE 63 | 64 | ROOT_URLCONF = "{{ project_name }}.conf.urls" 65 | 66 | TEMPLATES = [ 67 | { 68 | "BACKEND": "django.template.backends.django.DjangoTemplates", 69 | "DIRS": [str(BASE_DIR / "templates")], 70 | "APP_DIRS": True, 71 | "OPTIONS": { 72 | "context_processors": [ 73 | "django.template.context_processors.debug", 74 | "django.template.context_processors.request", 75 | "django.contrib.auth.context_processors.auth", 76 | "django.contrib.messages.context_processors.messages", 77 | ] 78 | }, 79 | } 80 | ] 81 | 82 | WSGI_APPLICATION = "{{ project_name }}.wsgi.application" 83 | 84 | 85 | # Database 86 | # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#databases 87 | 88 | DATABASES = { 89 | "default": { 90 | "ENGINE": "django.db.backends.sqlite3", 91 | "NAME": str(PROJECT_DIR / "db.sqlite3"), 92 | } 93 | } 94 | 95 | 96 | # Password validation 97 | # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#auth-password-validators 98 | 99 | AUTH_PASSWORD_VALIDATORS = [ 100 | {"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator"}, 101 | {"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"}, 102 | {"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"}, 103 | {"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"}, 104 | ] 105 | 106 | 107 | # Internationalization 108 | # https://docs.djangoproject.com/en/{{ docs_version }}/topics/i18n/ 109 | 110 | LANGUAGE_CODE = "en-us" 111 | 112 | LOCALE_PATHS = [str(BASE_DIR / "locale")] 113 | 114 | TIME_ZONE = "UTC" 115 | 116 | USE_I18N = True 117 | 118 | USE_L10N = True 119 | 120 | USE_TZ = True 121 | 122 | 123 | # Static files (CSS, JavaScript, Images) 124 | # https://docs.djangoproject.com/en/{{ docs_version }}/howto/static-files/ 125 | 126 | STATIC_URL = env("DJANGO_STATIC_URL", default="/static/") 127 | 128 | STATIC_ROOT = env("DJANGO_STATIC_ROOT", default=str(PROJECT_DIR / "staticfiles")) 129 | 130 | STATICFILES_DIRS = (str(BASE_DIR / "static"),) 131 | 132 | # Media files (uploaded by a user) 133 | # https://docs.djangoproject.com/en/{{ docs_version }}/topics/files/ 134 | 135 | MEDIA_URL = env("DJANGO_MEDIA_URL", default="/media/") 136 | 137 | MEDIA_ROOT = env("DJANGO_MEDIA_ROOT", default=str(PROJECT_DIR / "media")) 138 | -------------------------------------------------------------------------------- /src/project_name/conf/urls.py-tpl: -------------------------------------------------------------------------------- 1 | """ 2 | {{ project_name }} URL Configuration. 3 | 4 | The ``urlpatterns`` list routes URLs to views. For more information please see: 5 | https://docs.djangoproject.com/en/{{ docs_version }}/topics/http/urls/ 6 | 7 | Examples: 8 | Function views 9 | 1. Add an import: from {{ project_name }}.apps.my_app import views 10 | 2. Add a URL to urlpatterns: path("", views.home, name="home") 11 | Class-based views 12 | 1. Add an import: from {{ project_name }}.apps.other_app.views import Home 13 | 2. Add a URL to urlpatterns: path("", Home.as_view(), name="home") 14 | Including another URLconf 15 | 1. Import the include() function: from django.urls import include, path 16 | 2. Add a URL to urlpatterns: path("blog/", include("{{ project_name }}.apps.blog.urls")) 17 | 18 | """ 19 | from django.conf import settings 20 | from django.contrib import admin 21 | from django.urls import include, path 22 | 23 | urlpatterns = [path("admin/", admin.site.urls)] 24 | 25 | if settings.DEBUG: 26 | import debug_toolbar 27 | 28 | urlpatterns = [path("__debug__/", include(debug_toolbar.urls))] + urlpatterns 29 | -------------------------------------------------------------------------------- /src/project_name/locale/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keimlink/django-project-package-template/f231c479a0e984d912a889b8e7871ca45f2d0985/src/project_name/locale/.gitkeep -------------------------------------------------------------------------------- /src/project_name/static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keimlink/django-project-package-template/f231c479a0e984d912a889b8e7871ca45f2d0985/src/project_name/static/.gitkeep -------------------------------------------------------------------------------- /src/project_name/templates/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keimlink/django-project-package-template/f231c479a0e984d912a889b8e7871ca45f2d0985/src/project_name/templates/.gitkeep -------------------------------------------------------------------------------- /src/project_name/wsgi.py-tpl: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for {{ project_name }} project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/ 8 | """ 9 | import os 10 | 11 | from django.core.wsgi import get_wsgi_application 12 | 13 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.conf.settings") 14 | 15 | application = get_wsgi_application() 16 | --------------------------------------------------------------------------------