Commit b3cf1297b4564965df078e8e005d863178cacfec

Authored by Gustavo
1 parent 4fc47e70

Image changes

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
news/models.py
... ... @@ -17,7 +17,7 @@ def validate_img_extension(value):
17 17 class News(models.Model):
18 18 title = models.CharField( _("Title"), unique = True,max_length= 200)
19 19 slug = AutoSlugField(_("Slug"),populate_from='title',unique=True)
20   - image = models.ImageField(verbose_name = _('News Image'), upload_to = 'news/', validators = [validate_img_extension])
  20 + image = models.ImageField(verbose_name = _('News Image'), upload_to = 'news/', validators = [validate_img_extension],blank= True)
21 21 content = models.TextField(_('News Content'))
22 22 create_date = models.DateTimeField(_('Create Date'), auto_now_add = True)
23 23 creator = models.ForeignKey(User, verbose_name = _('Creator'), related_name = "news_creator_user", null = True)
... ...