From 2cc7186840aa440de15f8926c3069c9fcc8cdf10 Mon Sep 17 00:00:00 2001 From: Kriti Godey Date: Wed, 24 Feb 2010 16:41:22 -0500 Subject: [PATCH] Added forms.py with forms for sandwich, artist and ingredient. --- forms.py | 23 +++++++++++++++++++++++ models.py | 1 - 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 forms.py 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 -- 2.20.1