File tree 4 files changed +28
-9
lines changed 4 files changed +28
-9
lines changed Original file line number Diff line number Diff line change 13
13
from pathlib import Path
14
14
import os
15
15
from decouple import config
16
+ from decouple import Csv
17
+ import dj_database_url
16
18
17
19
# Build paths inside the project like this: BASE_DIR / 'subdir'.
18
20
BASE_DIR = Path (__file__ ).resolve ().parent .parent
23
25
24
26
# SECURITY WARNING: keep the secret key used in production secret!
25
27
SECRET_KEY = config ('SECRET_KEY' )
26
- SECRET_KEY = 'django-insecure-nx=a-t0d%tf4*mrws4hq_o1=9e&ko$#pntt3)6bva=lfim7vm5'
27
28
28
- # SECURITY WARNING: don't run with debug turned on in production!
29
- DEBUG = True
29
+ DEBUG = config ('DEBUG' , default = False , cast = bool )
30
+
31
+ ALLOWED_HOSTS = config ('ALLOWED_HOSTS' , cast = Csv ())
30
32
31
- ALLOWED_HOSTS = []
33
+ #SECRET_KEY = 'django-insecure-nx=a-t0d%tf4*mrws4hq_o1=9e&ko$#pntt3)6bva=lfim7vm5'
32
34
35
+ # SECURITY WARNING: don't run with debug turned on in production!
36
+ #DEBUG = True
33
37
34
38
# Application definition
35
39
83
87
# Database
84
88
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
85
89
90
+ # DATABASES = {
91
+ # 'default': {
92
+ # 'ENGINE': 'django.db.backends.sqlite3',
93
+ # 'NAME': BASE_DIR / 'db.sqlite3',
94
+ # }
95
+ # }
96
+
86
97
DATABASES = {
87
- 'default' : {
88
- 'ENGINE' : 'django.db.backends.sqlite3' ,
89
- 'NAME' : BASE_DIR / 'db.sqlite3' ,
90
- }
98
+ 'default' : dj_database_url .config (
99
+ default = config ('DATABASE_URL' )
100
+ )
91
101
}
92
102
93
-
94
103
# Password validation
95
104
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
96
105
Original file line number Diff line number Diff line change
1
+ asgiref == 3.5.0
2
+ dj-database-url == 0.5.0
3
+ Django == 4.0.2
4
+ django-widget-tweaks == 1.4.12
5
+ importlib-metadata == 4.11.1
6
+ Markdown == 3.3.6
7
+ python-decouple == 3.6
8
+ sqlparse == 0.4.2
9
+ tzdata == 2021.5
10
+ zipp == 3.7.0
You can’t perform that action at this time.
0 commit comments