for me a simple solution to this is issue, is that django should be
able to recognize an HttpResponse as error and return it
like:
raise HttpResponseRedirect(url)
or
raise HttpResponse(render_to_template("errors/user_not_logged"),
context = RequestContext(context), status_code = 401)
with this approch a view can raise an HttpResponse and interrupt the
view process
django should simply check if the exception is an HttpResponse class
and simply returns it.
with the new TemplateResponse, everything is made mode customizable,
because the TemplateResponse should implement a render method that
checks is settings.DEBUG is true and then return a technical response,
or return template response.
On 31 Ott, 08:08, Mateusz Marzantowicz <
mmarzantow...@gmail.com>
wrote: