from django import forms 
from django.contrib.auth.models import User

class UserRegistrationForm(forms.ModelForm):
    password=forms.CharField(label='password',
                            widget=forms.PasswordInput)
    password2=forms.CharField(label='Repeat password',
                            widget=forms.PasswordInput) 

    class Meta:
        model=User
        fields=('username', 'first_name', 'email') 

    def clean_password2(self):
        cd=self.cleaned_data
        if cd['password']!=cd['password2']:
            raise forms.validationError("password don't match")
        return cd['password2']


6f14314ddab23bc474493bdfac34c80f330214db
<mask token>


class UserRegistrationForm(forms.ModelForm):
    <mask token>
    <mask token>


    class Meta:
        model = User
        fields = 'username', 'first_name', 'email'
    <mask token>

<mask token>


class UserRegistrationForm(forms.ModelForm):
    <mask token>
    <mask token>


    class Meta:
        model = User
        fields = 'username', 'first_name', 'email'

    def clean_password2(self):
        cd = self.cleaned_data
        if cd['password'] != cd['password2']:
            raise forms.validationError("password don't match")
        return cd['password2']

<mask token>


class UserRegistrationForm(forms.ModelForm):
    password = forms.CharField(label='password', widget=forms.PasswordInput)
    password2 = forms.CharField(label='Repeat password', widget=forms.
        PasswordInput)


    class Meta:
        model = User
        fields = 'username', 'first_name', 'email'

    def clean_password2(self):
        cd = self.cleaned_data
        if cd['password'] != cd['password2']:
            raise forms.validationError("password don't match")
        return cd['password2']

from django import forms
from django.contrib.auth.models import User


class UserRegistrationForm(forms.ModelForm):
    password = forms.CharField(label='password', widget=forms.PasswordInput)
    password2 = forms.CharField(label='Repeat password', widget=forms.
        PasswordInput)


    class Meta:
        model = User
        fields = 'username', 'first_name', 'email'

    def clean_password2(self):
        cd = self.cleaned_data
        if cd['password'] != cd['password2']:
            raise forms.validationError("password don't match")
        return cd['password2']

from django import forms 
from django.contrib.auth.models import User

class UserRegistrationForm(forms.ModelForm):
    password=forms.CharField(label='password',
                            widget=forms.PasswordInput)
    password2=forms.CharField(label='Repeat password',
                            widget=forms.PasswordInput) 

    class Meta:
        model=User
        fields=('username', 'first_name', 'email') 

    def clean_password2(self):
        cd=self.cleaned_data
        if cd['password']!=cd['password2']:
            raise forms.validationError("password don't match")
        return cd['password2']

