Added forms.py with forms for sandwich, artist and ingredient.
authorKriti Godey <kriti.godey@gmail.com>
Wed, 24 Feb 2010 21:41:22 +0000 (16:41 -0500)
committerKriti Godey <kriti.godey@gmail.com>
Wed, 24 Feb 2010 21:41:22 +0000 (16:41 -0500)
forms.py [new file with mode: 0644]
models.py

diff --git a/forms.py b/forms.py
new file mode 100644 (file)
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
index 4ed80d8..5d371e3 100644 (file)
--- 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