On Dec 31, 2005, at 11:14 AM, Michael Hipp wrote:
How do I make this work?
In mysite/apps/simple/views.py I have:
from django.core.extensions import render_to_response
def saysomething(request):
assert False, "Test assert"
return render_to_response('base', {'message': "My message."})
The inclusion of the 'assert' line causes it to throw exception
"TemplateDoesNotExist: 500" and no sign of the output from assert
anywhere.
That's because you have DEBUG off, so Django is looking for a
template "500.html" to display a "nice" error message fit for public
consumption. If you turn DEBUG on, you'll see the assertion error.
Jacob