#16148: get_object_or_404 hook feature
-------------------------+-------------------------------
 Reporter:  havelove@…   |          Owner:  nobody
     Type:  New feature  |         Status:  new
Milestone:               |      Component:  Uncategorized
  Version:  1.3          |       Severity:  Normal
 Keywords:               |   Triage Stage:  Unreviewed
Has patch:  0            |  Easy pickings:  0
-------------------------+-------------------------------
 how about add a hook to get_object_or_404 to render a template with  the
 same name of model when object does not exist ?

 For example:
 user = get_object_or_404(User, pk=pk)

 if the user does not exist, get_object_or_404 will try to render
 "404/user.html" to show the error page other than a single 404 page for
 all queries.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16148>
Django <https://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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to