#26978: Improve the message attached to the 404 raised by get_object_or_404 and get_list_or_404 ---------------------------------+------------------------------ Reporter: ewjoachim | Owner: Type: Uncategorized | Status: new Component: Error reporting | Version: 1.9 Severity: Normal | Keywords: 404, object_name Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 ---------------------------------+------------------------------ == The problem : ==
If no object is returned by get_object_or_404 and get_list_or_404, they raise an Http404 error for which the error message contains the {{{model._meta.object_name}}}. This name should not really be shown to the user within the normal workflow. Classes have a {{{ verbose_name }}} that is more appropriate. Moreover, this message should be translatable. (not sure if it's really a bug or a feature...) == Code : == https://github.com/django/django/blob/64aba7a8aba06b8be52a1a099b44e1d3be4bdd26/django/shortcuts.py#L93 -- Ticket URL: <https://code.djangoproject.com/ticket/26978> 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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/052.90906a29b8f34fae584d3fd2f5d9b8d8%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.