X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/24b3d8ffb8f352dbc050c12d29fcb0acdfdd26a3..fae5481a4c64c9bbd09249bb1d2b2bcb2a076052:/apps/funding/models.py?ds=sidebyside diff --git a/apps/funding/models.py b/apps/funding/models.py index 2c2820d58..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): @@ -25,6 +26,7 @@ class Offer(models.Model): 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, on_delete = models.SET_NULL) def cover_img_tag(self): return u'' % self.cover.url