Opened 13 years ago

Closed 13 years ago

#16370 closed Bug (duplicate)

All ManyToMany field get a default message which is not overridable

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


All ManyToManyFields get a default message in the help_text, which is not overridable.

The message is: 'Hold down "Control", or "Command" on a Mac, to select more than one.'

This is done in the file django/db/models/fields/ and it makes sense if the related field is being displayed as a select list.

However, if you display a many to many relation using the inbuilt CheckboxSelectMultiple widget - for example - the message actually makes no sense. It makes no sense because you will have multiple checkboxes which you can independently click on.

In fact, have a textual string referencing the likely output method in the model seems to be a layering violation.

Attached is a patch to put this text in only if there is no help_text provided. Since it will use the overridden help_text, people are free to add back in the initial text if required.

Attachments (1)

0001-Allow-the-help_text-on-related-fields-to-be-overridd.patch (942 bytes ) - added by Anand Kumria 13 years ago.

Download all attachments as: .zip

Change History (2)

comment:1 by anonymous, 13 years ago

Resolution: duplicate
Status: newclosed

This is #9321.

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