Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added multiple settings module #37

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
1 change: 1 addition & 0 deletions AlgoPhantomBackend/AlgoPhantomBackend/settings/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .development import *
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


"""
Django settings for AlgoPhantomBackend project.

Expand All @@ -23,8 +25,7 @@
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '*qh6y)st__^hvam8a@6ln5vz4+#_9qu$xl80oz%h9e71+-iutd'

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


ALLOWED_HOSTS = []

Expand Down Expand Up @@ -83,15 +84,6 @@
WSGI_APPLICATION = 'AlgoPhantomBackend.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
Expand Down Expand Up @@ -158,10 +150,5 @@
],
}

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = EMAIL_HOST_USER
EMAIL_HOST_PASSWORD = EMAIL_HOST_PASSWORD
DATA_UPLOAD_MAX_NUMBER_FIELDS = 10240


24 changes: 24 additions & 0 deletions AlgoPhantomBackend/AlgoPhantomBackend/settings/development.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from .base import *

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

# 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'),
}
}


# EMAIL_BACKEND ='django.core.mail.backends.smtp.EmailBackend'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = EMAIL_HOST_USER
EMAIL_HOST_PASSWORD = EMAIL_HOST_PASSWORD
DATA_UPLOAD_MAX_NUMBER_FIELDS = 10240
14 changes: 14 additions & 0 deletions AlgoPhantomBackend/AlgoPhantomBackend/settings/production.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from .base import *

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



EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = EMAIL_HOST_USER
EMAIL_HOST_PASSWORD = EMAIL_HOST_PASSWORD
DATA_UPLOAD_MAX_NUMBER_FIELDS = 10240
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,14 @@ ALGO-PHANTOMS-BACKEND # Project Name
| └──__pychache__ # Cache Folder [Default]
| ├──__init__.py # [Default]
| ├──asgi.py # [Default]
| ├──settings.py # [Default]
| ├──settings # [Default]
| | |
| | └──__pychache__
| | ├──__init__.py
| | ├──base.py
| | ├──development.py
| | ├──production.py
| | └──staging.py
| ├──urls.py # [Default]
| └──wsgi.py # [Default]
|
Expand Down