Opened 12 years ago

Closed 12 years ago

#19066 closed Cleanup/optimization (duplicate)

ManyToMany Field doesn't allow help_text override

Reported by: Renato Alves Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


When using ModelForms with Models that include ManyToManyField's there's a default help_text message:
"Hold down "Control", or "Command" on a Mac, to select more than one."

If you use a different widget for fields of this type, such as CheckboxSelectMultiple, the help_text message makes no sense.

The way it's currently implemented the message is always appended to what is passed.

The attached patch changes this such that the message is only displayed if the empty string is passed (which is also the default by omission).

Attachments (1)

0001-Allow-overriding-help_text-default-message-on-ManyTo.patch (5.1 KB ) - added by Renato Alves 12 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 by Renato Alves, 12 years ago

I couldn't find documentation specific to the behavior of help_text in ManyToManyField.
Since this affects public API, should documentation be created? If so, please point out where it should be added.


PS: Possible duplicate of #9321 (only found it afterwards) but with different patch target.

comment:2 by Aymeric Augustin, 12 years ago

Resolution: duplicate
Status: newclosed

Indeed, it's a duplicate. I'll link to your patch from the other ticket, let's continue the discussion over there.

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