From: Kriti Godey Date: Fri, 26 Feb 2010 19:41:14 +0000 (-0500) Subject: Edited Sandwich model to have a Patron and a user. Added form stuff to views.py. X-Git-Url: http://git.ithinksw.org/~kgodey/maayanwich.git/commitdiff_plain/c5081ff36f82cd3b06f813b9be49a9947f9cb6ce Edited Sandwich model to have a Patron and a user. Added form stuff to views.py. --- diff --git a/models.py b/models.py index 5d371e3..768d898 100644 --- a/models.py +++ b/models.py @@ -26,9 +26,11 @@ class Sandwich(models.Model): date_made = models.DateField() date_added = models.DateTimeField(default=datetime.datetime.now, editable=False) artist = models.ForeignKey(Artist) + patron = models.CharField(max_length=200) ingredients = models.ManyToManyField(Ingredient) picture = models.ImageField(upload_to='sandwiches/') notes = models.TextField() + user = models.ForeignKey(User) class Meta: ordering = ['date_added'] diff --git a/views.py b/views.py index 66aa2bb..a56e4ec 100644 --- a/views.py +++ b/views.py @@ -7,8 +7,8 @@ def add_sandwich(request): def add_artist(request): - sform = ArtistForm() + aform = ArtistForm() def add_ingredient(request): - sform = IngredientForm() \ No newline at end of file + iform = IngredientForm() \ No newline at end of file