Skip to content

Commit 0801b0e

Browse files
committed
Refactored settings layout for production.
1 parent 11d7ee7 commit 0801b0e

File tree

6 files changed

+5
-4
lines changed

6 files changed

+5
-4
lines changed

Diff for: manage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
import sys
44

55
if __name__ == "__main__":
6-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pydotorg.settings")
6+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pydotorg.settings.local")
77
from django.core.management import execute_from_command_line
88
execute_from_command_line(sys.argv)

Diff for: pydotorg/settings/__init__.py

Whitespace-only changes.

Diff for: pydotorg/settings.py renamed to pydotorg/settings/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
### Basic config
55

6-
BASE = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
6+
BASE = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
77
DEBUG = TEMPLATE_DEBUG = True
88
SITE_ID = 1
99
SECRET_KEY = 'hu9h&&%j*tcj2o9!k2w%ao=fcw&$0z$)la$&8vl+s$4y%r946h'

Diff for: pydotorg/settings/local.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .base import *

Diff for: pydotorg/pipeline.py renamed to pydotorg/settings/pipeline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
import subprocess
33

4-
from .settings import BASE
4+
from .base import BASE
55

66
PIPELINE_CSS = {
77
'style': {

Diff for: pydotorg/wsgi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# if running multiple sites in the same mod_wsgi process. To fix this, use
2020
# mod_wsgi daemon mode with each site in its own daemon process, or use
2121
# os.environ["DJANGO_SETTINGS_MODULE"] = "pydotorg.settings"
22-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pydotorg.settings")
22+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pydotorg.settings.local")
2323

2424
# This application object is used by any WSGI server configured to use this
2525
# file. This includes Django's development server, if the WSGI_APPLICATION

0 commit comments

Comments
 (0)