#13808: Setting handler404 and/or handler500 in main urls.py does not work.
-------------------------------------+--------------------------------------
          Reporter:  josho           |         Owner:  nobody            
            Status:  closed          |     Milestone:                    
         Component:  Core framework  |       Version:  1.2               
        Resolution:  worksforme      |      Keywords:  urls error handler
             Stage:  Unreviewed      |     Has_patch:  0                 
        Needs_docs:  0               |   Needs_tests:  0                 
Needs_better_patch:  0               |  
-------------------------------------+--------------------------------------
Changes (by kmtracey):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => worksforme
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I do exactly this in one of my projects so I'm not sure how to diagnose
 what issue you are seeing, but I have confirmed it works for me on 1.1 and
 current trunk. For reference my project's main urls.py file is structured
 like so:

 {{{
 #!python
 from django.conf.urls.defaults import *
 from django.contrib import admin

 from django import template
 from django import http

 admin.autodiscover()

 urlpatterns = patterns('',
 # snipped actual urlpatterns
 )

 handler404 = 'urls.custom_404_view'
 handler500 = 'urls.custom_500_view'
 def custom_404_view(request, template_name='404.html'):
 # snipped custom 404 view code


 def custom_500_view(request, template_name='500.html'):
 # snipped custom 500 view code
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13808#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

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

Reply via email to