Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,9 @@ dmypy.json
# End of https://www.gitignore.io/api/django

# vs code files
.vscode
.vscode
bin
libs
pyvenv.cfg

.idea
Empty file added get_a_doc/settings/__init__.py
Empty file.
15 changes: 1 addition & 14 deletions get_a_doc/settings.py → get_a_doc/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
SECRET_KEY = '0&+ddh#txdwpps86wp57f9=_pynv#lug5no3!z2)qmd%v7%va)'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
DEBUG = False


# Application definition
Expand Down Expand Up @@ -75,17 +73,6 @@
WSGI_APPLICATION = 'get_a_doc.wsgi.application'


# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}


# Password validation
# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators

Expand Down
12 changes: 12 additions & 0 deletions get_a_doc/settings/dev.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from .base import * # noqa

DEBUG = True

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), # noqa
}
}

ALLOWED_HOST = ['*']
17 changes: 17 additions & 0 deletions get_a_doc/settings/prod.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from .base import * # noqa

# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresq',
'NAME': '',
'PORT': 5432,
'HOST': '127.0.0.1',
'PASSWORD': '',
'USER': '',
}
}

ALLOWED_HOST = ['your_domains']
1 change: 1 addition & 0 deletions get_a_doc/settings/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .dev import * # noqa
4 changes: 3 additions & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@


def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'get_a_doc.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE',
os.environ.get('DJANGO_SETTINGS_MODULE',
'get_a_doc.settings.dev'))
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
Expand Down