Opened 8 years ago

Closed 5 years ago

Last modified 2 years ago

#4471 closed Uncategorized (wontfix)

Newforms errors.as_text probably shouldn't prefix the string with an '*' character

Reported by: zigiDev@… Owned by: nobody
Component: Forms Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

To make

errors.as_text

more generic, it probably shouldn't prefix the returned string with an asterisk. This would give template authors more control over the formatting of error strings.

Attachments (1)

remove_stars_from_errors.diff (1.8 KB) - added by Grant Kelly <gkelly@…> 8 years ago.

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by Grant Kelly <gkelly@…>

comment:1 Changed 8 years ago by Grant Kelly <gkelly@…>

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 8 years ago by SmileyChris

  • Triage Stage changed from Unreviewed to Design decision needed

comment:3 Changed 7 years ago by yogi

I know it's old, but it still (AFAIK) applies. Let's get rid of the asterisk! I think the diff needs to remove the extra space at the beginning too.

comment:4 Changed 5 years ago by mtredinnick

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

Would be backwards incompatible at this point. Making this change in your own code is easy enough, as it's possible to use a custom Error class on forms and the method can be subclassed.

comment:5 Changed 2 years ago by nu.everest@…

  • Easy pickings unset
  • Severity set to Normal
  • Type set to Uncategorized
  • UI/UX unset

How do I make a custom Error class on my form for 'non_field_errors' so that I can use {{ form.non_field_errors.as_text }} in my template without the silly '*' throwing off the qì (Ch'i) of my site?

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