Added postgres to tox and travis and included django 2.2.

This commit is contained in:
Fabio Caccamo
2019-02-06 16:23:22 +01:00
parent 1870635697
commit 8bffc8f82a
3 changed files with 114 additions and 43 deletions
+24 -3
View File
@@ -62,13 +62,34 @@ TEMPLATES = [{
},
},]
DATABASES = {
'default': {
database_engine = os.environ.get('DATABASE_ENGINE', 'sqlite')
database_config = {
'sqlite': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'NAME': ':memory:',
},
# 'mysql': {
# 'ENGINE': 'django.db.backends.mysql',
# 'NAME': 'admin_interface',
# 'USER': 'mysql',
# 'PASSWORD': 'mysql',
# 'HOST': '',
# 'PORT': '',
# },
'postgres': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'admin_interface',
'USER': 'postgres',
'PASSWORD': 'postgres',
'HOST': '',
'PORT': '',
}
}
DATABASES = {
'default': database_config.get(database_engine),
}
MEDIA_ROOT = os.path.join(BASE_DIR, 'admin_interface/public/media/')
MEDIA_URL = '/media/'