Allow blank password fields on User model when updating profile in Django

后端 未结 2 570
没有蜡笔的小新
没有蜡笔的小新 2021-02-06 00:34

Edited to include code

class UserForm(UserCreationForm):

    def __init__(self, *arg, **kw):
        super(UserForm, self).__init__(*arg, **kw)

        # re-         


        
2条回答
  •  青春惊慌失措
    2021-02-06 00:59

    You can create your own password form field and handle it manually. Or you can override clean method and remove password related errors yourself.

提交回复
热议问题