diff options
author | Helmut Grohne <helmut@subdivi.de> | 2008-10-14 13:48:02 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2008-10-14 13:48:02 +0200 |
commit | 93374eaaace42da6c89663f09fcbbf2afcb3637c (patch) | |
tree | 907305447a0447a2bf9aece301d6d3f9e710c1d5 /wsgitools/middlewares.py | |
parent | 7b46d32f7dfb63eb597d6f3ad918766d732af68d (diff) | |
download | wsgitools-93374eaaace42da6c89663f09fcbbf2afcb3637c.tar.gz |
added epydoc markup to doc strings
Diffstat (limited to 'wsgitools/middlewares.py')
-rw-r--r-- | wsgitools/middlewares.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/wsgitools/middlewares.py b/wsgitools/middlewares.py index 908b5b3..146d7a5 100644 --- a/wsgitools/middlewares.py +++ b/wsgitools/middlewares.py @@ -45,8 +45,8 @@ class SubdirMiddleware: __all__.append("NoWriteCallableMiddleware") class NoWriteCallableMiddleware: """This middleware wraps a wsgi application that needs the return value of - start_response function to a wsgi application that doesn't need one by - writing the data to a StringIO and then making it be the first result + C{start_response} function to a wsgi application that doesn't need one by + writing the data to a C{StringIO} and then making it be the first result element.""" def __init__(self, app): """Wraps wsgi application app.""" @@ -106,14 +106,14 @@ class NoWriteCallableMiddleware: __all__.append("ContentLengthMiddleware") class ContentLengthMiddleware: """Guesses the content length header if possible. - @note: The application used must not use the write callable returned by - start_response.""" + @note: The application used must not use the C{write} callable returned by + C{start_response}.""" def __init__(self, app, maxstore=0): """Wraps wsgi application app. It can also store the first result bytes to possibly return a list of strings which will make guessing the size of iterators possible. At most maxstore bytes will be accumulated. Please note that a value larger than 0 will violate the wsgi standard. - The magical value () will make it always gather all data. + The magical value C{()} will make it always gather all data. @type maxstore: int or () """ self.app = app @@ -192,15 +192,15 @@ def cacheable(environ): __all__.append("CachingMiddleware") class CachingMiddleware: - """Caches reponses to requests based on SCRIPT_NAME, PATH_INFO and - QUERY_STRING.""" + """Caches reponses to requests based on C{SCRIPT_NAME}, C{PATH_INFO} and + C{QUERY_STRING}.""" def __init__(self, app, maxage=60, storable=storable, cacheable=cacheable): """ @param app: is a wsgi application to be cached. @type maxage: int @param maxage: is the number of seconds a reponse may be cached. @param storable: is a predicate that determines whether the response - may be cached at all based on the environ dict. + may be cached at all based on the C{environ} dict. @param cacheable: is a predicate that determines whether this request invalidates the cache.""" self.app = app @@ -278,7 +278,8 @@ class BasicAuthMiddleware: @param check_function: is a function taking three arguments username, password and environment returning a bool indicating whether the request may is allowed. The older interface of taking only the - first two arguments is still supported via catching a TypeError. + first two arguments is still supported via catching a + C{TypeError}. @type realm: str @param app401: is an optional WSGI application to be used for error messages @@ -333,7 +334,7 @@ class BasicAuthMiddleware: __all__.append("TracebackMiddleware") class TracebackMiddleware: """In case the application throws an exception this middleware will show an - html-formatted traceback using cgitb.""" + html-formatted traceback using C{cgitb}.""" def __init__(self, app): """app is the wsgi application to proxy.""" self.app = app |