Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80794826
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
Mon, Sep 2, 15:21
Size
1 KB
Mime Type
text/x-python
Expires
Wed, Sep 4, 15:21 (2 d)
Engine
blob
Format
Raw Data
Handle
20443909
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
,
}
}
# MSSQL
# DATABASES = {
# 'default': {
# 'NAME': 'my_database',
# 'ENGINE': 'sqlserver_ado',
# 'HOST': 'dbserver\\ss2012',
# 'USER': '',
# 'PASSWORD': '',
# }
# }
Event Timeline
Log In to Comment