Move back to standard settings file.
This commit is contained in:
parent
b549cf4ca6
commit
385dc74605
3 changed files with 14 additions and 38 deletions
|
@ -1,6 +1,7 @@
|
|||
import os
|
||||
|
||||
from decouple import config
|
||||
from dj_database_url import parse as db_url
|
||||
|
||||
|
||||
SETTINGS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
@ -8,6 +9,8 @@ CONFIG_DIR = os.path.dirname(SETTINGS_DIR)
|
|||
PROJECT_DIR = os.path.dirname(CONFIG_DIR)
|
||||
BASE_DIR = os.path.dirname(PROJECT_DIR)
|
||||
|
||||
DEBUG = config('DEBUG', default=False, cast=bool)
|
||||
|
||||
#
|
||||
# Django-specific settings
|
||||
#
|
||||
|
@ -29,6 +32,17 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||
|
||||
AUTH_USER_MODEL = 'core.RadioUser'
|
||||
|
||||
DATABASES = {
|
||||
'default': config(
|
||||
'DATABASE_URL',
|
||||
default='sqlite:///' + os.path.join(PROJECT_DIR, 'spradio.sqlite3'),
|
||||
cast=db_url
|
||||
)
|
||||
}
|
||||
|
||||
if DEBUG:
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
|
@ -1,38 +0,0 @@
|
|||
from decouple import config
|
||||
from dj_database_url import parse as db_url
|
||||
|
||||
from .base import *
|
||||
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
DATABASES = {
|
||||
'default': config(
|
||||
'DATABASE_URL',
|
||||
default='sqlite:///' + os.path.join(PROJECT_DIR, 'testdb.sqlite3'),
|
||||
cast=db_url
|
||||
)
|
||||
}
|
||||
|
||||
DEBUG = True
|
||||
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||
|
||||
'''
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False,
|
||||
'handlers': {
|
||||
'console': {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.StreamHandler',
|
||||
}
|
||||
},
|
||||
'loggers': {
|
||||
'django.db.backends': {
|
||||
'handlers': ['console'],
|
||||
'level': 'DEBUG',
|
||||
},
|
||||
}
|
||||
}
|
||||
'''
|
Loading…
Reference in a new issue