"""
Form for user registration
"""
from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User


class SignUpForm(UserCreationForm):
    """
    Form with the fields needed to create an user
    """
    first_name = forms.CharField(max_length=30)
    last_name = forms.CharField(max_length=30)
    email = forms.EmailField(max_length=254, help_text='Inform a valid email address.')
    class Meta:
        model = User
        fields =('username',
                'first_name',
                'last_name',
                'email',
                'password1',
                'password2')