Horizon Middleware

Middleware provided and used by Horizon.

class horizon.middleware.HorizonMiddleware[source]

The main Horizon middleware class. Required for use of Horizon.

process_exception(request, exception)[source]

Catches internal Horizon exception classes such as NotAuthorized, NotFound and Http302 and handles them gracefully.


Adds data necessary for Horizon to function to the request.

process_response(request, response)[source]

Convert HttpResponseRedirect to HttpResponse if request is via ajax to allow ajax request to redirect url

Previous topic

Horizon Forms

Next topic

Horizon Context Processors

Project Source

This Page