swh.web.common.middlewares module

class swh.web.common.middlewares.HtmlPrettifyMiddleware(get_response)[source]

Bases: object

Django middleware for prettifying generated HTML in development mode.

class swh.web.common.middlewares.HtmlMinifyMiddleware(get_response=None)[source]

Bases: object

Django middleware for minifying generated HTML in production mode.

class swh.web.common.middlewares.ThrottlingHeadersMiddleware(get_response=None)[source]

Bases: object

Django middleware for inserting rate limiting related headers in HTTP response.

class swh.web.common.middlewares.ExceptionMiddleware(get_response=None)[source]

Bases: object

Django middleware for handling uncaught exception raised when processing a view.

process_exception(request, exception)[source]