date_made = models.DateField()
ingredients = models.ManyToManyField(Ingredient)
date_added = models.DateTimeField(default=datetime.datetime.now, editable=False)
date_made = models.DateField()
ingredients = models.ManyToManyField(Ingredient)
date_added = models.DateTimeField(default=datetime.datetime.now, editable=False)
- picture = models.ImageField(upload_to='sandwiches/')
- notes = models.TextField()
+ picture = models.ImageField(upload_to='sandwiches/', blank=True)
+ notes = models.TextField(blank=True)
return reverse('sandwich_by_slug', kwargs={'slug':self.slug})
def save(self, *args, **kwargs):
return reverse('sandwich_by_slug', kwargs={'slug':self.slug})
def save(self, *args, **kwargs):