minor fixes
[~kgodey/maayanwich.git] / forms.py
1 from django.forms import ModelForm
2 from models import Sandwich, Ingredient
3 from django.contrib.auth.models import User
4 from django import forms
5
6
7 class SandwichForm(ModelForm):
8         
9         class Meta:
10                 model = Sandwich
11                 exclude = ('slug', 'user', 'ingredients')
12                 fields = ('adjective', 'date_made', 'notes', 'picture')
13
14
15 class IngredientForm(ModelForm):
16
17         class Meta:
18                 model = Ingredient
19                 exclude = ('slug',)
20
21
22 class NewUserForm(forms.Form):
23         first_name = forms.CharField()
24         last_name = forms.CharField()
25         email = forms.EmailField()
26         username = forms.CharField()
27         password = forms.CharField(widget=forms.PasswordInput)
28         confirm_password = forms.CharField(widget=forms.PasswordInput)