File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
+ import json
2
3
3
4
from django .conf import settings
4
5
@@ -16,7 +17,7 @@ def configure_settings():
16
17
17
18
if test_db is None :
18
19
db_config = {
19
- 'ENGINE' : 'django.db.backends.postgresql_psycopg2 ' ,
20
+ 'ENGINE' : 'django.db.backends.postgresql ' ,
20
21
'NAME' : 'ambition' ,
21
22
'USER' : 'postgres' ,
22
23
'PASSWORD' : '' ,
@@ -27,13 +28,17 @@ def configure_settings():
27
28
}
28
29
elif test_db == 'postgres' :
29
30
db_config = {
30
- 'ENGINE' : 'django.db.backends.postgresql_psycopg2 ' ,
31
+ 'ENGINE' : 'django.db.backends.postgresql ' ,
31
32
'USER' : 'postgres' ,
32
33
'NAME' : 'entity' ,
33
34
}
34
35
else :
35
36
raise RuntimeError ('Unsupported test DB {0}' .format (test_db ))
36
37
38
+ # Check env for db override (used for github actions)
39
+ if os .environ .get ('DB_SETTINGS' ):
40
+ db_config = json .loads (os .environ .get ('DB_SETTINGS' ))
41
+
37
42
settings .configure (
38
43
ENTITY_EMAILER_MAX_SEND_MESSAGE_TRIES = 3 ,
39
44
DATABASES = {
You can’t perform that action at this time.
0 commit comments