forms.py 443 Bytes
Newer Older
1 2
"""Forms module."""

3 4 5 6 7 8 9
from django import forms
from django.contrib.auth.forms import UserCreationForm

from .models import User


class SignUpForm(UserCreationForm):
10 11
    """Simple sign-up form overriding the basic Django user creation form."""

12 13 14
    email = forms.EmailField(label='Email', max_length=254)

    class Meta:
15 16
        """Django meta-class."""

17 18
        model = User
        fields = ('username', 'email', 'password1', 'password2', )