On Fri, Aug 6, 2010 at 5:05 PM, meenakshi <meenak...@mbi.ucla.edu> wrote:
> To clarify - I get a 404 message with DEBUG on (i.e. DEBUG=True), and > a 500 message with DEBUG off (DEBUG=False), not the other way around. > With DEBUG=False, standard handling of the Http404 exception will be to attempt to render a 404.html template. If that template does not exist, this attempt will result in a server error (500). Standard handling of that error will attempt to render a 500.html template. If that template does not exist, that attempt will also cause a server error and the only information about the whole chain of errors you will see is the last exception, which reports that 500.html does not exist. If you want to run with DEBUG=False, you need to create these error templates (see http://docs.djangoproject.com/en/dev/topics/http/views/#the-404-page-not-found-viewand the following section). Failing to do so means any error encountered will simply result in a report that you do not have a 500.html template. However, I don't think you want to run with DEBUG=False at this point. The message: You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page. is not intended to imply your problem will be fixed by setting DEBUG=False, it is just attempting to explain why you are seeing the detailed error information page. The standard 404 page (if you had a 404.html template) would give you no information at all about why the page you are attempting to access was not found, whereas the debug page you are seeing gives you all the information you need to fix the problem. The real error you need to fix is that you are attempting to retrieve the root page and you do not have any url patterns that match it. Going to 'admin/' works because you have a url pattern that matches that. If you want to retrieve the root page you need to add a url pattern that matches it and maps to a view that returns whatever you want to appear on that page. Karen -- http://tracey.org/kmt/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.