Added a better slugify function, monthly archives work, notes are optional now.
[~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')
12
13
14 class IngredientForm(ModelForm):
15
16         class Meta:
17                 model = Ingredient
18                 exclude = ('slug',)
19
20
21 class NewUserForm(forms.Form):
22         first_name = forms.CharField()
23         last_name = forms.CharField()
24         email = forms.EmailField()
25         username = forms.CharField()
26         password = forms.CharField(widget=forms.PasswordInput)
27         confirm_password = forms.CharField(widget=forms.PasswordInput)