config file extension should be a python extension

This change make it clear what is configuration file for Gunicorn.
Using a filename with an extension different than a python extension
was never supported. Also it gives us some room for a proper config file.
This commit is contained in:
benoitc 2019-11-25 20:20:05 +01:00
parent 444b2d8213
commit d31ac1df83

View File

@ -51,10 +51,11 @@ isn't mentioned in the list of :ref:`settings <settings>`.
Configuration File
==================
The configuration file should be a valid Python source file. It only needs to
be readable from the file system. More specifically, it does not need to be
importable. Any Python is valid. Just consider that this will be run every time
you start Gunicorn (including when you signal Gunicorn to reload).
The configuration file should be a valid Python source file with a **python
extension** (e.g. `gunicorn.conf.py`). It only needs to be readable from the
file system. More specifically, it does not need to be importable. Any Python
is valid. Just consider that this will be run every time you start Gunicorn
(including when you signal Gunicorn to reload).
To set a parameter, just assign to it. There's no special syntax. The values
you provide will be used for the configuration values.