+ redakcja_url = models.URLField(_('redakcja URL'), blank=True)
+ book = models.ForeignKey(Book, null=True, blank=True,
+ help_text=_('Published book.'))
+ cover = models.ImageField(_('Cover'), upload_to = 'funding/covers')
+ poll = models.ForeignKey(Poll, help_text = _('Poll'), null = True, blank = True, on_delete = models.SET_NULL)
+
+ def cover_img_tag(self):
+ return u'<img src="%s" />' % self.cover.url
+ cover_img_tag.short_description = _('Cover preview')
+ cover_img_tag.allow_tags = True
+