added some customization for starting the work
This commit is contained in:
parent
0ee8f4887a
commit
b79369e208
6 changed files with 52 additions and 17 deletions
0
config/db.sqlite3
Normal file
0
config/db.sqlite3
Normal file
10
config/settings/__init__.py
Normal file
10
config/settings/__init__.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
from decouple import config
|
||||
|
||||
ENV_TYPE = config('ENV_TYPE', default='DEVELOPMENT')
|
||||
|
||||
if ENV_TYPE == 'DEVELOPMENT':
|
||||
from .development import *
|
||||
else:
|
||||
from .production import *
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ https://docs.djangoproject.com/en/3.2/ref/settings/
|
|||
from pathlib import Path
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent.parent
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
|
@ -22,11 +22,6 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'django-insecure-i2&%xv)8(v=09kt6$_8+5*@3w72#fs$2dk8fwqv8)m*5(zm)ok'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
|
@ -70,17 +65,6 @@ TEMPLATES = [
|
|||
WSGI_APPLICATION = 'config.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
|
||||
|
17
config/settings/development.py
Normal file
17
config/settings/development.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
from .base import *
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
|
||||
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
17
config/settings/production.py
Normal file
17
config/settings/production.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
from .base import *
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
|
||||
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
7
requirements.txt
Normal file
7
requirements.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
asgiref==3.5.2
|
||||
backports.zoneinfo==0.2.1
|
||||
Django==3.2
|
||||
Pillow==9.2.0
|
||||
python-decouple==3.6
|
||||
pytz==2022.2.1
|
||||
sqlparse==0.4.3
|
Loading…
Reference in a new issue