from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
?
I raise this if somebody GETs to a POST-only view or vice-versa.
On a related note (but probably on the wrong list), what exceptions
do people raise to push errors back to the browser? I have a RESTful
application with no interface, what's the best way to send out a 500
error in the event of a missing query parameter for example? Another
example might be a database failure.
On 18 Jan 2006, at 0:23, Joseph Kocherhans wrote:
from django.http import Http404, HttpResponse, HttpResponseRedirect
from django.core.exceptions import ObjectDoesNotExist
from django.template import Template
from django.template.context import Context, RequestContext
from django.template.loader import get_template, select_template,
render_to_string
from django.forms import FormWrapper
from django.core.extensions import render_to_response,
get_object_or_404, get_list_or_404
________________________________
Afternoon, man about the Internet -- http://aftnn.org/