API documentation for django_wsgi
¶
-
class
django_wsgi.handler.
DjangoWSGIRequest
(environ)¶ Bases:
django.core.handlers.wsgi.WSGIRequest
Django request that makes an alternative WebOb request available as an instance attribute.
-
webob
¶ webob.Request
instance for the WSGI environment behind the current Django request.
-
-
django_wsgi.handler.
APPLICATION
= <django_wsgi.handler.DjangoApplication object>¶ WSGI application based on
DjangoApplication
.
Embedded applications¶
-
django_wsgi.embedded_wsgi.
make_wsgi_view
(wsgi_app)¶ Return a callable which can be used as a Django view powered by the
wsgi_app
.Parameters: wsgi_app – The WSGI which will run the view. Returns: The view callable.
-
django_wsgi.embedded_wsgi.
call_wsgi_app
(wsgi_app, request, path_info)¶ Call the
wsgi_app
withrequest
and return its response.Parameters: - wsgi_app (callable) – The WSGI application to be run.
- request (
django_wsgi.handler.DjangoWSGIRequest
) – The Django request. - path_info – The
PATH_INFO
to be used by the WSGI application.
Raises django_wsgi.exc.ApplicationCallError: If
path_info
is not the last portion of thePATH_INFO
inrequest
.Returns: The response from the WSGI application, turned into a Django response.
Return type:
Exceptions¶
Exceptions raised by django_wsgi.
-
exception
django_wsgi.exc.
DjangoWSGIException
¶ Bases:
Exception
Base class for exceptions raised by
django_wsgi
.
-
exception
django_wsgi.exc.
ApplicationCallError
¶ Bases:
django_wsgi.exc.DjangoWSGIException
Exception raised when an embedded WSGI application was not called properly.