From: Kriti Godey Date: Wed, 24 Feb 2010 21:41:22 +0000 (-0500) Subject: Added forms.py with forms for sandwich, artist and ingredient. X-Git-Url: http://git.ithinksw.org/~kgodey/maayanwich.git/commitdiff_plain/2cc7186840aa440de15f8926c3069c9fcc8cdf10 Added forms.py with forms for sandwich, artist and ingredient. --- diff --git a/forms.py b/forms.py new file mode 100644 index 0000000..8685ea4 --- /dev/null +++ b/forms.py @@ -0,0 +1,23 @@ +from django.forms import ModelForm +from models import Sandwich, Ingredient, Artist + + +class SandwichForm(ModelForm): + + class Meta: + model = Sandwich + exclude = ('slug',) + + +class IngredientForm(ModelForm): + + class Meta: + model = Ingredient + exclude = ('slug',) + + +class ArtistForm(ModelForm): + + class Meta: + model = Artist + exclude = ('slug',) \ No newline at end of file diff --git a/models.py b/models.py index 4ed80d8..5d371e3 100644 --- a/models.py +++ b/models.py @@ -36,4 +36,3 @@ class Sandwich(models.Model): def __unicode__(self): return self.adjective - \ No newline at end of file