janedenone wrote:
> Hi,
>
> I use the following simple view
>
> def index(request, page_id, current_subpage=1):
>       try:
>               current_page = get_object_or_404(Page, pk=page_id)
>       except:
>               # if anything else goes wrong, display the 404 anway
>               raise Http404
>
> In debug mode, my app returns the detailed 'page not found' page for
> non-existing pages, but as soon as I switch debug to false, the
> 500 template is shown. I can, however, display render and return the
> 404 template manually.
>
> What could possibly go wrong when a Http404 exception is raised, i.e.
> why does Django use the 500 template in this case?
>
>   
That depends whether your site does anything special with 404 errors.
Some sites display them with full decoration, and so there's always the
chance that 404 processing goes squiffy, in which case you may well see
a 500.

It's clear that some code is being executed in processing the 404
without debug that *isn't* executed when you process a 404 with debug
set. Now you just have to find out what ...

regards
 Steve


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to