更新时间:2023-02-05 13:54:08
您可以更改通过重写 init 方法创建子类:
You can alter the fields in a subclass by overriding the init method:
class LoginFormWithoutNickname(LoginForm):
def __init__(self, *args, **kwargs):
super(LoginFormWithoutNickname, self).__init__(*args, **kwargs)
self.fields.pop('nickname')