Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #17493 -- Made `Widget.id_for_label()` consistently be an insta…

…nce method.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17452 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1cd18f4cfdaf5f4a4002e9c59e1146e5fa0d70d3 1 parent ad8ebb7
Julien Phalip authored February 05, 2012
1  django/forms/extras/widgets.py
@@ -101,7 +101,6 @@ def id_for_label(self, id_):
101 101
             return '%s_%s' % (id_, first_select)
102 102
         else:
103 103
             return '%s_month' % id_
104  
-    id_for_label = classmethod(id_for_label)
105 104
 
106 105
     def value_from_datadict(self, data, files, name):
107 106
         y = data.get(self.year_field % name)
4  django/forms/widgets.py
@@ -234,7 +234,6 @@ def id_for_label(self, id_):
234 234
         tags.
235 235
         """
236 236
         return id_
237  
-    id_for_label = classmethod(id_for_label)
238 237
 
239 238
 class Input(Widget):
240 239
     """
@@ -735,7 +734,6 @@ def id_for_label(self, id_):
735 734
         if id_:
736 735
             id_ += '_0'
737 736
         return id_
738  
-    id_for_label = classmethod(id_for_label)
739 737
 
740 738
 class CheckboxSelectMultiple(SelectMultiple):
741 739
     def render(self, name, value, attrs=None, choices=()):
@@ -767,7 +765,6 @@ def id_for_label(self, id_):
767 765
         if id_:
768 766
             id_ += '_0'
769 767
         return id_
770  
-    id_for_label = classmethod(id_for_label)
771 768
 
772 769
 class MultiWidget(Widget):
773 770
     """
@@ -826,7 +823,6 @@ def id_for_label(self, id_):
826 823
         if id_:
827 824
             id_ += '_0'
828 825
         return id_
829  
-    id_for_label = classmethod(id_for_label)
830 826
 
831 827
     def value_from_datadict(self, data, files, name):
832 828
         return [widget.value_from_datadict(data, files, name + '_%s' % i) for i, widget in enumerate(self.widgets)]

0 notes on commit 1cd18f4

Please sign in to comment.
Something went wrong with that request. Please try again.