# Path: accounts/models.py
# class WhaleUser(User, AbstractBaseUser):
#     objects = WhaleUserManager()
#     email = models.EmailField(verbose_name=_('Email address *'), max_length=255, unique=True)
#     is_active = models.BooleanField(default=True)
#     is_admin = models.BooleanField(default=False)
# 
# 
#     USERNAME_FIELD = 'email'
#     REQUIRED_FIELDS = ['nickname']
# 
#     def get_full_name(self):
#         return self.nickname
# 
#     def get_short_name(self):
#         return self.nickname
# 
#     def __str__(self):             
#         return self.nickname


from django import forms
from django.forms import widgets
from accounts.models import WhaleUser
from django.core.mail import send_mail
from django.utils.translation import ugettext_lazy as _


class LoginForm(forms.Form):
    email = forms.EmailField(label=_('Email address *'),widget=forms.EmailInput(attrs={ 'placeholder': _('Enter your email')}), max_length=255, required=True)
    password = forms.CharField(widget=forms.PasswordInput(attrs={ 'placeholder': _('Enter your password')}),label=_('Password *'))


class UserCreationForm(forms.ModelForm):
    password = forms.CharField(widget=forms.PasswordInput(attrs={ 'placeholder': _('Enter your password')}),label=_('Password *'))
    password_confirmation = forms.CharField(widget=forms.PasswordInput(attrs={ 'placeholder': _('Confirm your password')}),label=_('Password confirmation *'))

    class Meta:

# Path: accounts/models.py
# class WhaleUser(User, AbstractBaseUser):
#     objects = WhaleUserManager()
#     email = models.EmailField(verbose_name=_('Email address *'), max_length=255, unique=True)
#     is_active = models.BooleanField(default=True)
#     is_admin = models.BooleanField(default=False)
# 
# 
#     USERNAME_FIELD = 'email'
#     REQUIRED_FIELDS = ['nickname']
# 
#     def get_full_name(self):
#         return self.nickname
# 
#     def get_short_name(self):
#         return self.nickname
# 
#     def __str__(self):             
#         return self.nickname


# Path: accounts/forms.py
from django import forms
from django.forms import widgets
from accounts.models import WhaleUser
from django.core.mail import send_mail
from django.utils.translation import ugettext_lazy as _



class LoginForm(forms.Form):
    email = forms.EmailField(label=_('Email address *'),widget=forms.EmailInput(attrs={ 'placeholder': _('Enter your email')}), max_length=255, required=True)
    password = forms.CharField(widget=forms.PasswordInput(attrs={ 'placeholder': _('Enter your password')}),label=_('Password *'))


class UserCreationForm(forms.ModelForm):
    password = forms.CharField(widget=forms.PasswordInput(attrs={ 'placeholder': _('Enter your password')}),label=_('Password *'))
    password_confirmation = forms.CharField(widget=forms.PasswordInput(attrs={ 'placeholder': _('Confirm your password')}),label=_('Password confirmation *'))

    class Meta:

        model = WhaleUser