Now you able to use existed type instance or factory method to create and customize class during in-code configuration.
E.g.:
>>> settings.set('worker_class', MyWorkerClass)
>>> settings.set('worker_class', lambda: MyWorkerClass)
All other formats still valid.
- handle new way to launch applications in django 1.4
- simplify the way we discover the project path and settings
- add --pythonpath & --settings options for django applications
- still compatible with older versions (>=1.1)
-handle DJANGO_SETTINGS_MODULE env.
close#283, #275, #274, #241
* Always log the exception locally
* Still only pass the exception in the HTTP response if
debug is turned on.
* Slight cosmetic changes to the actual HTML of the error
response.
We now treat Server and Date headers as hop-by-hop headers (ie, drop them)
so that they aren't repeated. While not technically hop-by-hop, the WSGI
spec says we should take the role of an origin server.
Fixes#79
This allows people to pass info from the command line to a WSGI
application. See examples/alt_spec.py for code that uses this
method. Example invocation:
$ gunicorn 'alt_spec:load("my arg here")'
Notice the single quotes to avoid shell escape semantics.
Closes#56Closes#40
* All configuration and bootup is handled by the Application objects.
* There is now a strict ordering on the precedence of configuration
settings:
1. Each option is given a default value of some sort in options.ini
2. Any detectable framework configuration settings override the hard
coded defaults for options. Currently, only Paster applications
have support for this.
3. Anything that is specified in a Gunicorn configuration file (by
default gunicorn.conf.py) overrides what was possibly set by a
framework specific configuration source.
4. Anything specified on the command line reins supreme. The command
line is the final authority on a given configuration option.
Though, not all configuration options are available via command
line.
* Configuration metadata is pulled from an options.ini. In the future I'll
use this to build the example gunicorn.conf.py and the config.rst file
in docs/site/config.rst.
I haven't tested the differences thoroughly. The next item on my agenda
is to figure out a way to start testing Gunicorn that doesn't make my
eyes bleed.
Reported by Sergey Shepelev. I changed his patch slightly because of the
man page language. As I read things, the close on exec flag is separate
from the F_SETFL flags.