Package omeroweb :: Package feedback :: Module views
[hide private]
[frames] | no frames]

Module views

source code

A view functions is simply a Python function that takes a Web request and returns a Web response. This response can be the HTML contents of a Web page, or a redirect, or the 404 and 500 error, or an XML document, or an image... or anything.

Functions [hide private]
 
thanks(request) source code
 
send_feedback(request) source code
 
send_comment(request) source code
 
custom_server_error(request, error500)
Custom 500 error handler.
source code
 
handler500(request)
Custom error handling.
source code
 
handler404(request) source code
 
handlerInternalError(request, error)
This is mostly used in an "object not found" situation, So there is no feedback form - simply display "not found" message.
source code
Variables [hide private]
  logger = logging.getLogger(__name__)

Imports: sys, locale, datetime, traceback, logging, settings, template_loader, HttpResponse, HttpResponseRedirect, HttpResponseServerError, HttpResponseNotFound, render_to_response, RequestContext, Context, page_not_found, server_error, debug, reverse, SendFeedback, ErrorForm, CommentForm


Function Details [hide private]

custom_server_error(request, error500)

source code 

Custom 500 error handler.

Templates: `500.html` Context: ErrorForm

handler500(request)

source code 

Custom error handling. Catches errors that are not handled elsewhere. NB: This only gets used by Django if omero.web.debug False (production use) If debug is True, Django returns it's own debug error page

handlerInternalError(request, error)

source code 

This is mostly used in an "object not found" situation, So there is no feedback form - simply display "not found" message. If the call was AJAX, we return the message in a 404 response. Otherwise return an html page, with 404 response.