from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User

#from django.forms import ModelForm
#from capstone_code.models import Wine, Winery, Cellar

class SignUpForm(UserCreationForm):
    first_name = forms.CharField(max_length=30, required=True)
    last_name = forms.CharField(max_length=30, required=True)
    email = forms.EmailField(max_length=254, help_text='Required. Inform a valid email address.')

    class Meta:
        model = User
        fields = ('username', 'first_name', 'last_name', 'email', 'password1', 'password2', )


# class WineryForm(ModelForm):
#
#     class Meta:
#         model = Winery
#         fields = ['winery_name', 'winery_addr', 'winery_phn']
#
#
# class WineForm(ModelForm):
#
#     class Meta:
#         model = Wine
#         fields = ['wine_name', 'winery_name', 'varietal', 'price', 'quantity']
#
# class CellarForm(ModelForm):
#     """
#     Form for user input of their wines by name, winery and barcode
#     """
#     class Meta:
#         model = Cellar
#         fields = ['wine_name', 'winery_name', 'barcode']






d9b338da8a797f37efe640cfb14398644a8b58df
<mask token>

<mask token>


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


    class Meta:
        model = User
        fields = ('username', 'first_name', 'last_name', 'email',
            'password1', 'password2')

<mask token>


class SignUpForm(UserCreationForm):
    first_name = forms.CharField(max_length=30, required=True)
    last_name = forms.CharField(max_length=30, required=True)
    email = forms.EmailField(max_length=254, help_text=
        'Required. Inform a valid email address.')


    class Meta:
        model = User
        fields = ('username', 'first_name', 'last_name', 'email',
            'password1', 'password2')

from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User


class SignUpForm(UserCreationForm):
    first_name = forms.CharField(max_length=30, required=True)
    last_name = forms.CharField(max_length=30, required=True)
    email = forms.EmailField(max_length=254, help_text=
        'Required. Inform a valid email address.')


    class Meta:
        model = User
        fields = ('username', 'first_name', 'last_name', 'email',
            'password1', 'password2')

from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User

#from django.forms import ModelForm
#from capstone_code.models import Wine, Winery, Cellar

class SignUpForm(UserCreationForm):
    first_name = forms.CharField(max_length=30, required=True)
    last_name = forms.CharField(max_length=30, required=True)
    email = forms.EmailField(max_length=254, help_text='Required. Inform a valid email address.')

    class Meta:
        model = User
        fields = ('username', 'first_name', 'last_name', 'email', 'password1', 'password2', )


# class WineryForm(ModelForm):
#
#     class Meta:
#         model = Winery
#         fields = ['winery_name', 'winery_addr', 'winery_phn']
#
#
# class WineForm(ModelForm):
#
#     class Meta:
#         model = Wine
#         fields = ['wine_name', 'winery_name', 'varietal', 'price', 'quantity']
#
# class CellarForm(ModelForm):
#     """
#     Form for user input of their wines by name, winery and barcode
#     """
#     class Meta:
#         model = Cellar
#         fields = ['wine_name', 'winery_name', 'barcode']





