Opened 13 years ago

Closed 13 years ago

#16148 closed New feature (wontfix)

get_object_or_404 hook feature

Reported by: havelove@… Owned by: nobody
Component: Core (Other) Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


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.

Change History (2)

comment:1 by Aymeric Augustin, 13 years ago

Component: UncategorizedCore (Other)
Triage Stage: UnreviewedDesign decision needed

A discussion is taking place on the mailing list.

This sounds too specific for core, IMO.

comment:2 by Luke Plant, 13 years ago

Resolution: wontfix
Status: newclosed

I agree with aaugustin, closing on that basis. Thanks for the suggestion though.

Note: See TracTickets for help on using tickets.
Back to Top