Opened 8 years ago

Closed 8 years ago

#9514 closed (fixed)

Two admin templates incorrectly use errors.items

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

Description

This thread:

http://groups.google.com/group/django-users/browse_thread/thread/5dc2d51f331dd500

points out that the admin change_form.html uses errors.items|length, which is incorrect. errors is a list type; errors|length would seem to be what should be used. As is is now the plural message is always displayed even when there is only a single error on the page. grep shows admin/auth/user/change_password.html uses the same construct and probably also needs to be fixed.

Change History (2)

comment:1 Changed 8 years ago by Karen Tracey

Owner: changed from nobody to Karen Tracey
Status: newassigned

admin/auth/user/change_password.html is OK, it's actually using form.errors which is a dict. Just the admin change_form.html has the problem.

comment:2 Changed 8 years ago by Karen Tracey

Resolution: fixed
Status: assignedclosed

(In [9371]) Fixed #9514 -- Made admin change_form template correctly recognize/report when a form has only a single error.

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