db/models/fields/related.py hardcodes m2m help_text for select widget
|Reported by:||Ole Laursen||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
There's a bit of code in the many to many field definition that appends some help for the standard usability-troubled HTML select widget to the help_text:
msg = ugettext_lazy('Hold down "Control", or "Command" on a Mac, to select more than one.') self.help_text = string_concat(self.help_text, ' ', msg)
This means that if you define a custom help_text, you have to take care to someone de-append the help_text when overwriting the widget for a form, e.g. when using the built-in
CheckboxSelectMultiple widget instead of a plain select box.
Practical issues aside, it's also probably not a good idea to hardcode the help_text for a particular presentational widget in the db layer, had to grep the whole codebase to find it. :)
I suggest the text be moved to the
SelectMultiple widget in the forms code.