Added forms.py with forms for sandwich, artist and ingredient.
[~kgodey/maayanwich.git] / forms.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