reviewboard.admin.middleware¶
- init_review_board_middleware(get_response)[source]¶
Handle the initialization of Review Board.
- Parameters:
get_response (
callable
) – The method to execute the view.
- load_settings_middleware(get_response)[source]¶
Middleware that loads the settings on each request.
- Parameters:
get_response (
callable
) – The method to execute the view.
- check_updates_required_middleware(get_response)[source]¶
Middleware that checks if manual updates need to be done.
If updates are required, all attempts to access a URL will be redirected to the updates page (or an appropriate error response for API calls).
- Parameters:
get_response (
callable
) – The method to execute the view.
- class ExtraExceptionInfoMiddleware(get_response)[source]¶
Bases:
object
Add extra debugging information to exception e-mails.
If an exception occurs, the META field will be updated to contain the username and e-mail address of the user who triggered the error (if any), and the Local Site name (if any).
- __init__(get_response)[source]¶
Initialize the middleware.
- Parameters:
get_response (
callable
) – The method to call to get the response object.
- process_exception(request, exception)[source]¶
Process an exception.
Exceptions from views are handled by sending the admin users an e-mail with the traceback. This adds additional information to the META dictionary before that happens.
- __call__(request)[source]¶
Run the middleware.
- Parameters:
request (
django.http.HttpRequest
) – The HTTP request from the client.- Returns:
The response object.
- Return type: