mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-07 13:34:53 +03:00
Set CONN_MAX_AGE to 60 seconds -- fixes #710
Setting the value in the production config.
This commit is contained in:
parent
b2fbb36b9d
commit
89c9704f9a
|
@ -182,12 +182,14 @@ DATABASES = {
|
|||
'PASSWORD': env('RDS_PASSWORD'),
|
||||
'HOST': env('RDS_HOSTNAME'),
|
||||
'PORT': env('RDS_PORT'),
|
||||
'CONN_MAX_AGE': 60,
|
||||
}
|
||||
}
|
||||
{% else %}
|
||||
# Use the Heroku-style specification
|
||||
# Raises ImproperlyConfigured exception if DATABASE_URL not in os.environ
|
||||
DATABASES['default'] = env.db('DATABASE_URL')
|
||||
DATABASES['default']['CONN_MAX_AGE'] = 60
|
||||
{%- endif %}
|
||||
|
||||
# CACHING
|
||||
|
|
Loading…
Reference in New Issue
Block a user