# Path: users/models.py
# class CustomerUser(User):
#     """docstring for CustomerUser"""
#     cellphone = models.CharField(
#         help_text=_("Número de telefone. Preencha apenas com númreos."),
#         verbose_name=_("Telefone Celular"),
#         max_length=15, null=False, blank=False)
# 
#     phone_number = models.CharField(
#         help_text=_("Número de telefone. Preencha apenas com númreos."),
#         verbose_name=_("Teledone Fixo"),
#         max_length=15, null=True, blank=False)
# 
#     class Meta:
#         verbose_name = _('Cliente')
#         verbose_name_plural = _('Clientes')
# 
#     def __str__(self):
#         return (self.first_name + " " + self.last_name)


from django import forms
from django.core.exceptions import ValidationError
from django.core.validators import validate_email
from django.utils.translation import ugettext_lazy as _
from .models import CustomerUser


class CustomerUserRegistrationForm(forms.ModelForm):
    """
    Class for CustomerUser registration form.
    """
    username = forms.CharField(label=_("Nome de usuário"))
    first_name = forms.CharField(label=_("Nome"))
    last_name = forms.CharField(label=_("Sobrenome"))
    email = forms.CharField(label=_("E-mail"), validators=[validate_email])
    password = forms.CharField(label=_("Senha"), widget=forms.PasswordInput)
    password_validation = forms.\
        CharField(label=_("Confirmação de senha"), widget=forms.PasswordInput)

    class Meta:

# Path: users/models.py
# class CustomerUser(User):
#     """docstring for CustomerUser"""
#     cellphone = models.CharField(
#         help_text=_("Número de telefone. Preencha apenas com númreos."),
#         verbose_name=_("Telefone Celular"),
#         max_length=15, null=False, blank=False)
# 
#     phone_number = models.CharField(
#         help_text=_("Número de telefone. Preencha apenas com númreos."),
#         verbose_name=_("Teledone Fixo"),
#         max_length=15, null=True, blank=False)
# 
#     class Meta:
#         verbose_name = _('Cliente')
#         verbose_name_plural = _('Clientes')
# 
#     def __str__(self):
#         return (self.first_name + " " + self.last_name)


# Path: users/forms.py
from django import forms
from django.core.exceptions import ValidationError
from django.core.validators import validate_email
from django.utils.translation import ugettext_lazy as _
from .models import CustomerUser



class CustomerUserRegistrationForm(forms.ModelForm):
    """
    Class for CustomerUser registration form.
    """
    username = forms.CharField(label=_("Nome de usuário"))
    first_name = forms.CharField(label=_("Nome"))
    last_name = forms.CharField(label=_("Sobrenome"))
    email = forms.CharField(label=_("E-mail"), validators=[validate_email])
    password = forms.CharField(label=_("Senha"), widget=forms.PasswordInput)
    password_validation = forms.\
        CharField(label=_("Confirmação de senha"), widget=forms.PasswordInput)

    class Meta:

        model = CustomerUser