Opened 14 years ago
Closed 14 years ago
#16148 closed New feature (wontfix)
get_object_or_404 hook feature
| Reported by: | 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 |
Description
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 , 14 years ago
| Component: | Uncategorized → Core (Other) |
|---|---|
| Triage Stage: | Unreviewed → Design decision needed |
comment:2 by , 14 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
I agree with aaugustin, closing on that basis. Thanks for the suggestion though.
Note:
See TracTickets
for help on using tickets.
A discussion is taking place on the mailing list.
This sounds too specific for core, IMO.