Skip to content

Commit bee96a0

Browse files
Merge pull request #9 from pythonph/20180913_Issue#1_SetupDjangoProject
20180913 issue#1 setup django project
2 parents 056f20d + 3e7acb8 commit bee96a0

File tree

10 files changed

+18
-5
lines changed

10 files changed

+18
-5
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
__pycache__/
2+
db.sqlite3
File renamed without changes.
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
# Application definition
3232

33-
INSTALLED_APPS = [
33+
DJANGO_APPS = [
3434
'django.contrib.admin',
3535
'django.contrib.auth',
3636
'django.contrib.contenttypes',
@@ -39,6 +39,12 @@
3939
'django.contrib.staticfiles',
4040
]
4141

42+
THIRD_PARTY_APPS = []
43+
44+
LOCAL_APPS = []
45+
46+
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
47+
4248
MIDDLEWARE = [
4349
'django.middleware.security.SecurityMiddleware',
4450
'django.contrib.sessions.middleware.SessionMiddleware',
@@ -49,7 +55,7 @@
4955
'django.middleware.clickjacking.XFrameOptionsMiddleware',
5056
]
5157

52-
ROOT_URLCONF = 'pythonph.urls'
58+
ROOT_URLCONF = 'config.urls'
5359

5460
TEMPLATES = [
5561
{
@@ -67,7 +73,7 @@
6773
},
6874
]
6975

70-
WSGI_APPLICATION = 'pythonph.wsgi.application'
76+
WSGI_APPLICATION = 'config.wsgi.application'
7177

7278

7379
# Database

config/settings/development.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .base import *
2+
3+
ALLOWED_HOSTS = ['*']
File renamed without changes.

pythonph/wsgi.py renamed to config/wsgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111

1212
from django.core.wsgi import get_wsgi_application
1313

14-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pythonph.settings")
14+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.development")
1515

1616
application = get_wsgi_application()

manage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44

55
if __name__ == "__main__":
6-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pythonph.settings")
6+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.development")
77
try:
88
from django.core.management import execute_from_command_line
99
except ImportError as exc:

pythonph/empty

Whitespace-only changes.

requirements/base.pip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Django==2.0

requirements/development.pip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-r base.pip

0 commit comments

Comments
 (0)