Mercurial > sat_legacy_website
diff sat_website/views.py @ 116:e138879873f1
changes to link the crowdfunding campaign (revert to be done manually after 45 days)
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 20 Oct 2015 11:15:45 +0200 |
parents | 4b4a5d7602f8 |
children | 1bdb78a21647 |
line wrap: on
line diff
--- a/sat_website/views.py Tue Oct 20 10:11:27 2015 +0200 +++ b/sat_website/views.py Tue Oct 20 11:15:45 2015 +0200 @@ -26,6 +26,7 @@ from django.utils.translation import ugettext_lazy as _ from django.template import RequestContext from collections import OrderedDict +import datetime import media, social_contract, utils, forms CATEGORIES = OrderedDict([('frontends', (_(u"Presentation"), @@ -80,6 +81,10 @@ "category": category, "libervia_demo_url": utils.get_libervia_demo_url(), "subscription_amounts": utils.get_asso_subscr_amounts(), + + # FIXME: dirty implementation just for the duration of the campaign! + # http://stackoverflow.com/questions/4327021/python-count-down-to-event-in-days-and-hours + "campaign_countdown": (datetime.datetime(2015, 12, 6) - datetime.datetime.now()).days, }) context.update(csrf(request))