Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F68475276
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
Thu, Jun 27, 13:55
Size
1 KB
Mime Type
text/x-python
Expires
Sat, Jun 29, 13:55 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18588875
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
(),
}
Event Timeline
Log In to Comment