Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77853892
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
Fri, Aug 16, 19:45
Size
845 B
Mime Type
text/x-python
Expires
Sun, Aug 18, 19:45 (2 d)
Engine
blob
Format
Raw Data
Handle
19933536
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
settings_dev.py
View Options
# settings for dev.py
import
environ
import
os
# 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'
)
# wildcard to change for production
ALLOWED_HOSTS
=
[
'*'
]
# }
DATABASES
=
{
# read os.environ['DATABASE_URL'] and raises ImproperlyConfigured exception if not found
'default'
:
{
'NAME'
:
env
(
'DBNAME'
),
'ENGINE'
:
'django.db.backends.mysql'
,
#mysql.connector.django or django.db.backends.mysql
'USER'
:
env
(
'DBUSER'
),
'PASSWORD'
:
env
(
'DBPASSWORD'
),
'HOST'
:
env
(
'DBHOST'
),
}
}
Event Timeline
Log In to Comment