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.
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
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
Custom 500 error handler.
Templates: `500.html` Context: ErrorForm
|
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
|
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.
|