@@ -85,13 +85,13 @@ def prepare_class(self, sender, **kwargs):
85
85
if not self .has_default ():
86
86
self .default = tuple (getattr (sender , self .choices_name ))[0 ][0 ] # set first as default
87
87
88
- def contribute_to_class (self , cls , name ):
88
+ def contribute_to_class (self , cls , name , * args , ** kwargs ):
89
89
models .signals .class_prepared .connect (self .prepare_class , sender = cls )
90
90
# we don't set the real choices until class_prepared (so we can rely on
91
91
# the STATUS class attr being available), but we need to set some dummy
92
92
# choices now so the super method will add the get_FOO_display method
93
93
self .choices = [(0 , 'dummy' )]
94
- super ().contribute_to_class (cls , name )
94
+ super ().contribute_to_class (cls , name , * args , ** kwargs )
95
95
96
96
def deconstruct (self ):
97
97
name , path , args , kwargs = super ().deconstruct ()
@@ -130,10 +130,10 @@ def __init__(self, *args, **kwargs):
130
130
self .when = when
131
131
super ().__init__ (* args , ** kwargs )
132
132
133
- def contribute_to_class (self , cls , name ):
133
+ def contribute_to_class (self , cls , name , * args , ** kwargs ):
134
134
self .monitor_attname = '_monitor_%s' % name
135
135
models .signals .post_init .connect (self ._save_initial , sender = cls )
136
- super ().contribute_to_class (cls , name )
136
+ super ().contribute_to_class (cls , name , * args , ** kwargs )
137
137
138
138
def get_monitored_value (self , instance ):
139
139
return getattr (instance , self .monitor )
@@ -249,11 +249,11 @@ def __init__(self, *args, **kwargs):
249
249
self .add_excerpt_field = not kwargs .pop ('no_excerpt_field' , False )
250
250
super ().__init__ (* args , ** kwargs )
251
251
252
- def contribute_to_class (self , cls , name ):
252
+ def contribute_to_class (self , cls , name , * args , ** kwargs ):
253
253
if self .add_excerpt_field and not cls ._meta .abstract :
254
254
excerpt_field = models .TextField (editable = False )
255
255
cls .add_to_class (_excerpt_field_name (name ), excerpt_field )
256
- super ().contribute_to_class (cls , name )
256
+ super ().contribute_to_class (cls , name , * args , ** kwargs )
257
257
setattr (cls , self .name , SplitDescriptor (self ))
258
258
259
259
def pre_save (self , model_instance , add ):
0 commit comments