X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/5e0d7de506e280f66f4bcc42e2218a706a335138..bb22d24ba0e3d3681f78e9cadb1502dbc2ebdc1c:/apps/funding/models.py?ds=sidebyside diff --git a/apps/funding/models.py b/apps/funding/models.py index 5f2f17d73..162d33739 100644 --- a/apps/funding/models.py +++ b/apps/funding/models.py @@ -8,6 +8,7 @@ from django.db import models from django.utils.translation import ugettext_lazy as _, ugettext as __ import getpaid from catalogue.models import Book +from polls.models import Poll class Offer(models.Model): @@ -24,7 +25,8 @@ class Offer(models.Model): 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') + cover = models.ImageField(_('Cover'), upload_to = 'funding/covers') + poll = models.ForeignKey(Poll, help_text = _('Poll'), null = True, on_delete = models.SET_NULL) def cover_img_tag(self): return u'' % self.cover.url