diff options
| author | ianb <devnull@localhost> | 2005-05-21 22:23:34 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-05-21 22:23:34 +0000 |
| commit | 6f64b195e132851718e5b32a7d2be8f3c989cf87 (patch) | |
| tree | 87f7e3cc657db990371c56273c7a1bbfbd1d4495 /paste/configmiddleware.py | |
| parent | f739c94f1af2b50694a0d3c38ef36d4e3b8d1b97 (diff) | |
| download | paste-6f64b195e132851718e5b32a7d2be8f3c989cf87.tar.gz | |
Added documentation to configmiddleware; tweaked documentation extractor for lazy attributes (string references)
Diffstat (limited to 'paste/configmiddleware.py')
| -rw-r--r-- | paste/configmiddleware.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/paste/configmiddleware.py b/paste/configmiddleware.py index a08ee0d..ddbe4ec 100644 --- a/paste/configmiddleware.py +++ b/paste/configmiddleware.py @@ -1,9 +1,25 @@ from paste import CONFIG from paste import wsgilib +from paste.docsupport import metadata + +__all__ = ['ConfigMiddleware'] class ConfigMiddleware(object): + """ + A WSGI middleware that adds a ``paste.config`` key to the request + environment, as well as registering the configuration temporarily + (for the length of the request) with ``paste.CONFIG``. + """ + + _wsgi_add1 = metadata.WSGIKey('paste.config', + interface='paste.pyconfig.Config') + def __init__(self, application, config): + """ + This delegates all requests to `application`, adding a *copy* + of the configuration `config`. + """ self.application = application self.config = config |
