Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#666 closed defect (fixed)

Admin should get 404 and 500 templates

Reported by: adrian Owned by: adrian
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The admin currently doesn't come with 404 and 500 templates. We should add "admin/500" and "admin/404" templates to django/contrib/admin/templates, and change the admin to use those.

Change History (4)

comment:1 Changed 9 years ago by nwp

It seems that while admin does now (svn r2402) have 404 and 500 templates, views/defaults.py by default just uses plain "404" and "500". Thinking about it, that makes sense, as it shouldn't rely on admin being installed in any given project. So wouldn't it make more sense to provide overall default 404 and 500 templates?

comment:2 Changed 9 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

It's up to you to create 404/500 templates for your project -- we want to avoid enforcing a "Django look" for end-user sites. Marking closed.

comment:3 Changed 8 years ago by josh

hey there... I'm new to Django and now I'm running into needing 404 and 500 tempalates.

Here's the deal: it's annoying to track this down. I'm just trying to prototype something so now I need to poke around, find a common/generic template and set it up to use it.

Why make people do this? Because you're afraid of enforcing a "Django look"? Unless you provide a default template, do you know what your Django look will be? An ugly python stack trace.

This should be reopened. Reason given for dismissing bug is unacceptable.

comment:4 Changed 8 years ago by Brian Rosner <brosner@…>

It is very simple to create the 404 and 500 templates. Just create 404.html and/or 500.html in the root of your template directory. Then please have a look at http://www.djangoproject.com/documentation/url_dispatch/#handler404 to get more advanced with the handling of the views. The reason for closing this bug is completely acceptable, there is no reason to provide a default look and feel for any error pages.

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