from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _


class RegistrationForm(UserCreationForm):
    email = forms.EmailField(help_text='Enter a valid email address')
    address = forms.CharField()
    website = forms.URLField()

    def clean_email(self):
        email = self.cleaned_data['email']
        try:
            User.objects.get(email=email)
        except User.DoesNotExist:
            return self.cleaned_data['email']
        raise forms.ValidationError(_("Email already exists"))

27aab28d01b51258b61fea7acc3f474f390e4715
<mask token>


class RegistrationForm(UserCreationForm):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class RegistrationForm(UserCreationForm):
    <mask token>
    <mask token>
    <mask token>

    def clean_email(self):
        email = self.cleaned_data['email']
        try:
            User.objects.get(email=email)
        except User.DoesNotExist:
            return self.cleaned_data['email']
        raise forms.ValidationError(_('Email already exists'))

<mask token>


class RegistrationForm(UserCreationForm):
    email = forms.EmailField(help_text='Enter a valid email address')
    address = forms.CharField()
    website = forms.URLField()

    def clean_email(self):
        email = self.cleaned_data['email']
        try:
            User.objects.get(email=email)
        except User.DoesNotExist:
            return self.cleaned_data['email']
        raise forms.ValidationError(_('Email already exists'))

from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _


class RegistrationForm(UserCreationForm):
    email = forms.EmailField(help_text='Enter a valid email address')
    address = forms.CharField()
    website = forms.URLField()

    def clean_email(self):
        email = self.cleaned_data['email']
        try:
            User.objects.get(email=email)
        except User.DoesNotExist:
            return self.cleaned_data['email']
        raise forms.ValidationError(_('Email already exists'))

from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _


class RegistrationForm(UserCreationForm):
    email = forms.EmailField(help_text='Enter a valid email address')
    address = forms.CharField()
    website = forms.URLField()

    def clean_email(self):
        email = self.cleaned_data['email']
        try:
            User.objects.get(email=email)
        except User.DoesNotExist:
            return self.cleaned_data['email']
        raise forms.ValidationError(_("Email already exists"))
