comparison 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
comparison
equal deleted inserted replaced
115:bd30a18690e7 116:e138879873f1
24 from django.shortcuts import render_to_response 24 from django.shortcuts import render_to_response
25 from django.core.context_processors import csrf 25 from django.core.context_processors import csrf
26 from django.utils.translation import ugettext_lazy as _ 26 from django.utils.translation import ugettext_lazy as _
27 from django.template import RequestContext 27 from django.template import RequestContext
28 from collections import OrderedDict 28 from collections import OrderedDict
29 import datetime
29 import media, social_contract, utils, forms 30 import media, social_contract, utils, forms
30 31
31 CATEGORIES = OrderedDict([('frontends', (_(u"Presentation"), 32 CATEGORIES = OrderedDict([('frontends', (_(u"Presentation"),
32 OrderedDict([("features", _(u"Features")), 33 OrderedDict([("features", _(u"Features")),
33 ("frontends", _(u"Frontends")), 34 ("frontends", _(u"Frontends")),
78 "categories": CATEGORIES, 79 "categories": CATEGORIES,
79 "categories_right": CATEGORIES_RIGHT, 80 "categories_right": CATEGORIES_RIGHT,
80 "category": category, 81 "category": category,
81 "libervia_demo_url": utils.get_libervia_demo_url(), 82 "libervia_demo_url": utils.get_libervia_demo_url(),
82 "subscription_amounts": utils.get_asso_subscr_amounts(), 83 "subscription_amounts": utils.get_asso_subscr_amounts(),
84
85 # FIXME: dirty implementation just for the duration of the campaign!
86 # http://stackoverflow.com/questions/4327021/python-count-down-to-event-in-days-and-hours
87 "campaign_countdown": (datetime.datetime(2015, 12, 6) - datetime.datetime.now()).days,
83 }) 88 })
84 89
85 context.update(csrf(request)) 90 context.update(csrf(request))
86 context.update(utils.get_asso_finance_status()) 91 context.update(utils.get_asso_finance_status())
87 92