1 | diff '--exclude=*.pyc' -r django-1.4/db/models/fields/related.py django-custom/db/models/fields/related.py
|
---|
2 | 1120,1122d1119
|
---|
3 | < msg = _('Hold down "Control", or "Command" on a Mac, to select more than one.')
|
---|
4 | < self.help_text = string_concat(self.help_text, ' ', msg)
|
---|
5 | <
|
---|
6 | diff '--exclude=*.pyc' -r django-1.4/forms/fields.py django-custom/forms/fields.py
|
---|
7 | 28c28
|
---|
8 | < from django.utils.translation import ugettext_lazy as _
|
---|
9 | ---
|
---|
10 | > from django.utils.translation import ugettext_lazy as _, string_concat
|
---|
11 | 696a697,711
|
---|
12 | >
|
---|
13 | > def _patch_help_text(self):
|
---|
14 | > '''function that appends the help text. implemented only for
|
---|
15 | > sub-classes that use the SelectMultiple widget should call this
|
---|
16 | > on their constructor'''
|
---|
17 | > if hasattr(self, '_multiselect_patched') :
|
---|
18 | > pass
|
---|
19 | > else :
|
---|
20 | > print '%s - %s'%(smart_str(self.label), repr(type(self.widget)))
|
---|
21 | > if type(self.widget) is SelectMultiple :
|
---|
22 | > msg = _('Hold down "Control", or "Command" on a Mac, to select more than one.')
|
---|
23 | > self.help_text = string_concat(self.help_text, ' ', msg)
|
---|
24 | > setattr(self,'_multiselect_patched',True)
|
---|
25 | > else :
|
---|
26 | > setattr(self,'_multiselect_patched',False)
|
---|
27 | 771a787,789
|
---|
28 | > def __init__(self,*arg,**kwarg):
|
---|
29 | > super(MultipleChoiceField,self).__init__(*arg,**kwarg)
|
---|
30 | > self._patch_help_text()
|
---|
31 | diff '--exclude=*.pyc' -r django-1.4/forms/models.py django-custom/forms/models.py
|
---|
32 | 930a931,933
|
---|
33 | >
|
---|
34 | > self._patch_help_text()
|
---|
35 | >
|
---|