This file contains settings which are shared between development- and production-settings. The provide sane defaults for developing and a solid base for production settings.
Path Configuration¶DJANGO_ROOT
PROJECT_ROOT
SITE_NAME
STATIC_ROOT
[project_root]/run/static
. Please refer to the official settings documentation on STATIC_ROOT and this howto on static files.
MEDIA_ROOT
[project_root]/run/media
. Please refer to the official settings documentation on MEDIA_ROOT.
STATICFILES_DIRS
[project_root]/static
to the list. See the official settings documentation on STATICFILES_DIRS for more details.
PROJECT_TEMPLATES
Django will look in these locations for additional templates. Our settings module adds [project_root]/templates
.
This setting was changed to reflect the changes in Django 1.8: Django features the possibility to use multiple different template engines. This is controlled with the TEMPLATES directive and represents the old TEMPLATE_DIRS directive. See the official settings documentation on TEMPLATES for more details.
DEFAULT_APPS
django-admin startproject
. Please note that this is no official setting. Django operates with INSTALLED_APPS
, which will be set in dev.py.
MIDDLEWARE
django-admin startproject
. See the official settings documentation on MIDDLEWARE for more details. (Please note: This was used to be called MIDDLEWARE_CLASSES)
TEMPLATES
SECRET_FILE
SECRET_KEY
for security purposes. As you can clearly see, this is a very sensitive information. We will store this key in a file. This fileâs location is set up here. Default value is [project_root]/run/SECRET.key
.
ADMINS
MANAGERS
DEBUG
False
, because these are our common settings, which are shared between all configurations. We just want debugging while we are developing, so debugging will be activated in dev.py. See official settings documentation on DEBUG for additional information.
LANGUAGE_CODE
TIME_ZONE
USE_I18N
False
) The setting is activated in i18n.py
.
USE_L10N
USE_TZ
(modified in 1.2: renamed dev.py
to development.py
) This file contains development settings. Plase note, that manage.py
will now automatically use this setting-file as its default, while wsgi.py
still refers to production.py
.
DATABASES
[project_root]/run/dev.sqlite3
.
INSTALLED_APPS
INSTALLED_APPS
-setting by using DEFAULT_APPS
and add any app we need for development.
(modified in 1.2) This file should contain production settings. Currently, it just reverts some development specific configuration values, DEBUG
and ALLOWED_HOSTS
. Please note, that the behaviour of manage.py
changed: It now uses the settings in development.py
automatically, while [project_root]/wsgi.py
refers to the settings in production.py
.
(removed in 1.2) This are the saved settings from django-admin startproject
. We just keep them for completeness, these settings are not actually used.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4