Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F62285273
settings_dev.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, May 12, 04:28
Size
1 KB
Mime Type
text/x-python
Expires
Tue, May 14, 04:28 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17628365
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
settings_dev.py
View Options
# settings for dev.py
import
environ
# If using in your own project, update the project namespace below
from
django_app.settings
import
*
env
=
environ
.
Env
(
# set casting, default value
DEBUG
=
(
bool
,
False
)
)
# False if not in os.environ
DEBUG
=
env
(
'DEBUG'
)
# Raises django's ImproperlyConfigured exception if SECRET_KEY not in os.environ
SECRET_KEY
=
env
(
'SECRET_KEY'
)
ALLOWED_HOSTS
=
env
.
list
(
'ALLOWED_HOSTS'
)
# Parse database connection url strings like psql://user:pass@127.0.0.1:8458/db
# DATABASES = {
# # read os.environ['DATABASE_URL'] and raises ImproperlyConfigured exception if not found
# 'default': env.db(),
# {
# 'ENGINE': 'django.db.backends.mysql',
# 'DBNAME': os.path.join(BASE_DIR, 'mysql'),
# 'DBUSER': os.path.join(BASE_DIR, 'mysql'),
# 'DBPASSWORD': os.path.join(BASE_DIR, 'mysql'),
# 'DBHOST': os.path.join(BASE_DIR, 'db'),
# 'PORT': 5432,
# }
# }
DATABASES
=
{
# read os.environ['DATABASE_URL'] and raises ImproperlyConfigured exception if not found
'default'
:
env
.
db
(
"DBNAME"
),
}
Event Timeline
Log In to Comment