File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 33
33
DATABASES = {
34
34
"default" : {
35
35
"ENGINE" : "django.db.backends.postgresql" ,
36
- "NAME" : " djangoproject" ,
36
+ "NAME" : os . getenv ( "DJANGO_DB_NAME" , " djangoproject") ,
37
37
"USER" : SECRETS .get ("db_user" , "djangoproject" ),
38
38
"HOST" : SECRETS .get ("db_host" , "" ),
39
39
"PASSWORD" : SECRETS .get ("db_password" , "" ),
40
40
"PORT" : SECRETS .get ("db_port" , "" ),
41
41
},
42
42
"trac" : {
43
43
"ENGINE" : "django.db.backends.postgresql" ,
44
- "NAME" : " code.djangoproject" ,
44
+ "NAME" : os . getenv ( "TRAC_DB_NAME" , " code.djangoproject") ,
45
45
"USER" : SECRETS .get ("trac_db_user" , "code.djangoproject" ),
46
46
"HOST" : SECRETS .get ("trac_db_host" , "" ),
47
47
"PASSWORD" : SECRETS .get ("trac_db_password" , "" ),
Original file line number Diff line number Diff line change 2
2
3
3
DOMAIN_NAME = os .getenv ("DOMAIN_NAME" , "djangoproject.com" )
4
4
5
+ if not os .getenv ("DJANGO_DB_NAME" ):
6
+ raise ValueError ("You must set DJANGO_DB_NAME in deployed environments." )
7
+
5
8
ALLOWED_HOSTS = [
6
9
f"www.{ DOMAIN_NAME } " ,
7
10
DOMAIN_NAME ,
You can’t perform that action at this time.
0 commit comments