8
8
9
9
10
10
class PluginField (models .ForeignKey ):
11
- def __init__ (self , point = None , ** kwargs ):
11
+ def __init__ (self , point = None , * args , * *kwargs ):
12
12
# Normal path.
13
13
if point is not None :
14
14
kwargs ['limit_choices_to' ] = {
@@ -18,11 +18,11 @@ def __init__(self, point=None, **kwargs):
18
18
else :
19
19
if "to" in kwargs :
20
20
del kwargs ["to" ]
21
- super (PluginField , self ).__init__ (Plugin , ** kwargs )
21
+ super (PluginField , self ).__init__ (Plugin , * args , * *kwargs )
22
22
23
23
24
24
class ManyPluginField (models .ManyToManyField ):
25
- def __init__ (self , point = None , ** kwargs ):
25
+ def __init__ (self , point = None , * args , * *kwargs ):
26
26
# Normal path.
27
27
if point is not None :
28
28
kwargs ['limit_choices_to' ] = {
@@ -32,7 +32,7 @@ def __init__(self, point=None, **kwargs):
32
32
else :
33
33
if "to" in kwargs :
34
34
del kwargs ["to" ]
35
- super (ManyPluginField , self ).__init__ (Plugin , ** kwargs )
35
+ super (ManyPluginField , self ).__init__ (Plugin , * args , * *kwargs )
36
36
37
37
38
38
def get_plugins_qs (point ):
@@ -43,7 +43,7 @@ class PluginChoiceField(forms.ModelChoiceField):
43
43
def __init__ (self , point , * args , ** kwargs ):
44
44
kwargs ['to_field_name' ] = 'name'
45
45
super (PluginChoiceField , self ).\
46
- __init__ (queryset = get_plugins_qs (point ), * args , * *kwargs )
46
+ __init__ (queryset = get_plugins_qs (point ), ** kwargs )
47
47
48
48
def to_python (self , value ):
49
49
value = super (PluginChoiceField , self ).to_python (value )
@@ -57,16 +57,16 @@ class PluginMultipleChoiceField(forms.ModelMultipleChoiceField):
57
57
def __init__ (self , point , * args , ** kwargs ):
58
58
kwargs ['to_field_name' ] = 'name'
59
59
super (PluginMultipleChoiceField , self ).\
60
- __init__ (queryset = get_plugins_qs (point ), * args , * *kwargs )
60
+ __init__ (queryset = get_plugins_qs (point ), ** kwargs )
61
61
62
62
63
63
class PluginModelChoiceField (forms .ModelChoiceField ):
64
64
def __init__ (self , point , * args , ** kwargs ):
65
65
super (PluginModelChoiceField , self ).\
66
- __init__ (queryset = get_plugins_qs (point ), * args , * *kwargs )
66
+ __init__ (queryset = get_plugins_qs (point ), ** kwargs )
67
67
68
68
69
69
class PluginModelMultipleChoiceField (forms .ModelMultipleChoiceField ):
70
70
def __init__ (self , point , * args , ** kwargs ):
71
71
super (PluginModelMultipleChoiceField , self ).\
72
- __init__ (queryset = get_plugins_qs (point ), * args , * *kwargs )
72
+ __init__ (queryset = get_plugins_qs (point ), ** kwargs )
0 commit comments