Opened 17 years ago

Closed 16 years ago

#6983 closed (fixed)

error class in edit_inline objects has quotes escaped

Reported by: bbolli <me+django@…> Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords: auto-escape nfa-fixed
Cc: Triage Stage: Fixed on a branch
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When missing to enter a required field in inline related models, the top of the forms says correctly to "fix the error below" (or similar; I'm running on a Swiss German system), but below, no errors are displayed. This is because of an auto-escaping bug in admin/views/base.py. See the patch for a possible fix.

Attachments (2)

base.py.patch (432 bytes ) - added by bbolli <me+django@…> 17 years ago.
Auto-escaping patch
6893.diff (585 bytes ) - added by dan 16 years ago.
patch to fix quoting of added classes in inline edit in oldforms-admin

Download all attachments as: .zip

Change History (7)

by bbolli <me+django@…>, 17 years ago

Attachment: base.py.patch added

Auto-escaping patch

comment:1 by bbolli <me+django@…>, 17 years ago

Sorry, the patch is not relative to the Django root. Please apply the patch in the directory django/django/contrib/admin/views. Thanks.

comment:2 by Marc Fargas, 16 years ago

Triage Stage: UnreviewedAccepted

Note that this happens with edit_inline_tabular. I'm not sure this will be fixed as there's a strong effort to get newforms-admin in trunk ASAP.

by dan, 16 years ago

Attachment: 6893.diff added

patch to fix quoting of added classes in inline edit in oldforms-admin

comment:3 by dan, 16 years ago

hm, as of r7823, this bug still occurred both with STACKED and TABULAR inline editing- and the patch, if applied to contrib/admin/views/main.py, as i assume the intention of the submitter it seems to work alright.

I've re-rolled the patch in the project root and attached it.

comment:4 by Karen Tracey <kmtracey@…>, 16 years ago

Keywords: nfa-fixed added
Triage Stage: AcceptedFixed on a branch

Note this appears to be an old admin problem only; I cannot recreate on newforms-admin. If I leave out required field(s) and try to save I see the appropriate error(s) on the field(s) that fail validation. The overall error at the top is missing, but that is a different problem with its own ticket (#5628). I don't know that it is worth fixing for old admin at this point.

comment:5 by Brian Rosner, 16 years ago

Resolution: fixed
Status: newclosed

This is no longer a problem since the merge of newforms-admin in [7967].

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