mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-30 01:46:24 +01:00
Don't import dev in project template settings
Developer settings were always imported whenever any portion of the project template settings package itself was imported. Using production settings would result in __init__.py importing the dev settings first, *then* overriding those with the production settings. This lead to somewhat counter-intuitive behaviour - dev settings that weren't explicitly set again in production would tag along to prod. To fix this, the project template settings package no longer imports dev, and settings.dev is explicitly used in both manage.py and wsgi.py.
This commit is contained in:
parent
d2f087f092
commit
4bb2bf2bbd
@ -5,7 +5,7 @@ import os
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings")
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings.dev")
|
||||
|
||||
from django.core.management import execute_from_command_line
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
from .dev import *
|
@ -13,6 +13,6 @@ import os
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings")
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings.dev")
|
||||
|
||||
application = get_wsgi_application()
|
||||
|
Loading…
Reference in New Issue
Block a user