Sandwich form actually adds things to the database now!
[~kgodey/maayanwich.git] / models.py
index 5d371e3..6c4f4b0 100644 (file)
--- a/models.py
+++ b/models.py
@@ -24,11 +24,13 @@ class Sandwich(models.Model):
        adjective = models.CharField(max_length=200)
        slug = models.SlugField()
        date_made = models.DateField()
-       date_added = models.DateTimeField(default=datetime.datetime.now, editable=False)
-       artist = models.ForeignKey(Artist)
        ingredients = models.ManyToManyField(Ingredient)
+       date_added = models.DateTimeField(default=datetime.datetime.now, editable=False)
+       artist = models.ForeignKey(Artist, related_name='Artist')
+       patron = models.ForeignKey(Artist, related_name='Patron')
        picture = models.ImageField(upload_to='sandwiches/')
        notes = models.TextField()
+       user = models.ForeignKey(User)
        
        class Meta:
                ordering = ['date_added']