X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/6d7b11e4a01b2314c0527d94d91f3159c0bd34ce..ae60b2a3949e96357477cc04f90fd0873cee8a92:/apps/funding/templatetags/funding_tags.py diff --git a/apps/funding/templatetags/funding_tags.py b/apps/funding/templatetags/funding_tags.py deleted file mode 100755 index 5331f8c4a..000000000 --- a/apps/funding/templatetags/funding_tags.py +++ /dev/null @@ -1,29 +0,0 @@ -from django import template -from ..models import Offer - -register = template.Library() - - -@register.inclusion_tag("funding/tags/funding.html") -def funding(offer=None, link=False, add_class=""): - if offer is None: - offer = Offer.current() - if offer is None: - return {} - - return { - 'offer': offer, - 'is_current': offer.is_current(), - 'percentage': 100 * offer.sum() / offer.target, - 'link': link, - 'add_class': add_class, - } - - -@register.inclusion_tag("funding/tags/offer_detail_head.html") -def offer_detail_head(offer): - return { - 'offer': offer, - 'state': offer.state(), - } -