X-Git-Url: http://git.ithinksw.org/~kgodey/maayanwich.git/blobdiff_plain/7d78aee74972b96c5c3837ccc9e6816e92f5aee6..c3f9729b3ffa534a9cea5e501859ea0db49f8551:/models.py diff --git a/models.py b/models.py index 4ed80d8..abbf825 100644 --- a/models.py +++ b/models.py @@ -10,25 +10,15 @@ class Ingredient(models.Model): def __unicode__(self): return self.name - -class Artist(models.Model): - name = models.CharField(max_length=150) - slug = models.SlugField() - bio = models.TextField() - - def __unicode__(self): - return self.name - - 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) picture = models.ImageField(upload_to='sandwiches/') notes = models.TextField() + user = models.ForeignKey(User) class Meta: ordering = ['date_added'] @@ -36,4 +26,3 @@ class Sandwich(models.Model): def __unicode__(self): return self.adjective - \ No newline at end of file