#15607: Custom error templates in a single Django application
-----------------------------------------+----------------------
               Reporter:  jose           |        Owner:  nobody
                 Status:  closed         |    Milestone:
              Component:  HTTP handling  |      Version:  1.2
             Resolution:  needsinfo      |     Keywords:
           Triage Stage:  Unreviewed     |    Has patch:  0
    Needs documentation:  0              |  Needs tests:  0
Patch needs improvement:  0              |
-----------------------------------------+----------------------

Comment (by jose):

 Okay, your example case is the best way to explain my situation, because
 is just that I did in the Django project which I am working :)

 So, we have two Django apps in the same project, app1 and app2, each of
 them with its own 'urls.py' file where the URL routing is specified. My
 case is that I want to specify a different 'handler404 = ...' and a
 'handler500 = ....' in each 'urls.py' file. Then when you type, for
 example, 'http:/mysite.com/app1/BAD_URL' you get the 404.html template
 specified in the app1 views, and if you type
 'http://mysite.com/app2/BAD_URL' you get the 404.html template specified
 in the app2 views. And the same for the 500 errors.

 Now, this is not possible because you only can do this in the project
 'urls.py' and the handler404 and handler500 must be the same for all the
 applications involved in the project.

 This is what I am referring when I asked for a custom error handler for an
 app.

 Cheers.
 Jose

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15607#comment:4>
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