Quantcast
Channel: User Christoffer - Stack Overflow
Viewing all articles
Browse latest Browse all 45

Answer by Christoffer for Excluding password when extending UserCreationForm

$
0
0

You can just remove the password2 field in the init of the form like so:

class MyUserCreationForm(UserCreationForm):

    def __init__(self, *args, **kargs):
        super(MyUserCreationForm, self).__init__(*args, **kargs)
        del self.fields['password2']

Viewing all articles
Browse latest Browse all 45

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>