# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from django.urls import reverse
from django.utils.html import mark_safe
from django.utils.timezone import utc
from django.urls import reverse
from django.utils.html import mark_safe
from django.utils.timezone import utc
from catalogue.models import Book
from catalogue.utils import get_random_hash
from polls.models import Poll
from catalogue.models import Book
from catalogue.utils import get_random_hash
from polls.models import Poll
clear_cached_renders(self.detail_bar)
clear_cached_renders(self.status)
clear_cached_renders(self.status_more)
clear_cached_renders(self.detail_bar)
clear_cached_renders(self.status)
clear_cached_renders(self.status_more)
'is_current': self.is_current(),
'is_win': offer_sum >= self.target,
'missing': self.target - offer_sum,
'is_current': self.is_current(),
'is_win': offer_sum >= self.target,
'missing': self.target - offer_sum,