Skip to content

Commit cb1385d

Browse files
committed
added ability to settings_local append to installed_apps, middleware_classes tuples and etc.
1 parent f2ac293 commit cb1385d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

manage.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
import sys
44

55
if __name__ == "__main__":
6-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pythonbrasil8.settings")
6+
if os.path.exists(os.path.join(os.path.dirname(__file__), 'pythonbrasil8', 'settings_local.py')):
7+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pythonbrasil8.settings_local")
8+
else:
9+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pythonbrasil8.settings")
710

811
from django.core.management import execute_from_command_line
912

pythonbrasil8/settings.py

-5
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,3 @@
161161

162162
COMPRESS_OFFLINE = True
163163
COMPRESS_ENABLED = True
164-
165-
try:
166-
from settings_local import *
167-
except ImportError:
168-
pass

pythonbrasil8/settings_local.py.example

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from settings import *
2+
13
import os
24

35
EMAIL_HOST_USER = '[email protected]'

0 commit comments

Comments
 (0)