Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F61981603
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, May 10, 04:52
Size
851 B
Mime Type
text/x-python
Expires
Sun, May 12, 04:52 (2 d)
Engine
blob
Format
Raw Data
Handle
17554170
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')
DEBUG
=
True
# 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