gunicorn/examples/read_django_settings.py
Benoit Chesneau 95b7ffeeaa chore: prepare release 25.0.2
- Bump version to 25.0.2
- Update copyright year to 2026 in LICENSE and NOTICE
- Add license headers to all Python source files
- Add changelog entry for 25.0.2
2026-02-06 08:21:18 +01:00

24 lines
509 B
Python

#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
"""
Use this config file in your script like this:
$ gunicorn project_name.wsgi:application -c read_django_settings.py
"""
settings_dict = {}
with open('frameworks/django/testing/testing/settings.py') as f:
exec(f.read(), settings_dict)
loglevel = 'warning'
proc_name = 'web-project'
workers = 1
if settings_dict['DEBUG']:
loglevel = 'debug'
reload = True
proc_name += '_debug'