Ticket #9321: django_t9321_r15242_a.diff
File django_t9321_r15242_a.diff, 2.2 KB (added by , 14 years ago) |
---|
-
django/db/models/fields/related.py
9 9 from django.db.models.query_utils import QueryWrapper 10 10 from django.db.models.deletion import CASCADE 11 11 from django.utils.encoding import smart_unicode 12 from django.utils.translation import (ugettext_lazy as _, string_concat, 13 ungettext, ugettext) 12 from django.utils.translation import ugettext_lazy as _, ungettext, ugettext 14 13 from django.utils.functional import curry 15 14 from django.core import exceptions 16 15 from django import forms … … 1007 1006 1008 1007 Field.__init__(self, **kwargs) 1009 1008 1010 msg = _('Hold down "Control", or "Command" on a Mac, to select more than one.')1011 self.help_text = string_concat(self.help_text, ' ', msg)1012 1013 1009 def get_choices_default(self): 1014 1010 return Field.get_choices(self, include_blank=False) 1015 1011 -
django/contrib/admin/options.py
24 24 from django.utils.functional import curry 25 25 from django.utils.text import capfirst, get_text_list 26 26 from django.utils.translation import ugettext as _ 27 from django.utils.translation import ungettext 27 from django.utils.translation import ungettext, string_concat 28 28 from django.utils.encoding import force_unicode 29 29 30 30 HORIZONTAL, VERTICAL = 1, 2 … … 53 53 models.FileField: {'widget': widgets.AdminFileWidget}, 54 54 } 55 55 56 SELECT_MULTIPLE_MSG = _('Hold down "Control", or "Command" on a Mac, to select more than one.') 57 56 58 csrf_protect_m = method_decorator(csrf_protect) 57 59 58 60 class BaseModelAdmin(object): … … 180 182 elif db_field.name in (list(self.filter_vertical) + list(self.filter_horizontal)): 181 183 kwargs['widget'] = widgets.FilteredSelectMultiple(db_field.verbose_name, (db_field.name in self.filter_vertical)) 182 184 185 kwargs['help_text'] = string_concat(kwargs.get('help_text', ''), ' ', SELECT_MULTIPLE_MSG) 186 183 187 return db_field.formfield(**kwargs) 184 188 185 189 def _declared_fieldsets(self):