擅长:python、mysql、java
<p>所以Harben让我走上了正确的道路,来看看init方法</p>
<p>它是这样重新编写的:</p>
<pre><code>def __init__(self, *args, **kwargs):
super().__init__(*args,**kwargs)
self.fields['Groupname'].queryset = DareGroups.objects.filter(groupmember__IsAdmin=True)
</code></pre>