Mercurial > sat_legacy_website
comparison sat_website/views.py @ 89:4b4a5d7602f8
rename screenshots to media, since not only screenshots but also videos are listed
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 16 Jun 2015 12:35:32 +0200 |
parents | 6250b65523c6 |
children | e138879873f1 |
comparison
equal
deleted
inserted
replaced
88:f91363b1048c | 89:4b4a5d7602f8 |
---|---|
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 screenshots, social_contract, utils, forms | 29 import media, social_contract, utils, forms |
30 | 30 |
31 CATEGORIES = OrderedDict([('frontends', (_(u"Presentation"), | 31 CATEGORIES = OrderedDict([('frontends', (_(u"Presentation"), |
32 OrderedDict([("features", _(u"Features")), | 32 OrderedDict([("features", _(u"Features")), |
33 ("frontends", _(u"Frontends")), | 33 ("frontends", _(u"Frontends")), |
34 ("screenshots", _(u"Screenshots & Videos")), | 34 ("media", _(u"Screenshots & Videos")), |
35 ]))), | 35 ]))), |
36 ('principles', (_(u"Technical area"), | 36 ('principles', (_(u"Technical area"), |
37 OrderedDict([("principles", _(u"Principles")), | 37 OrderedDict([("principles", _(u"Principles")), |
38 ("specifications", _(u"Specifications")), | 38 ("specifications", _(u"Specifications")), |
39 ("downloads", _(u"Downloads")), | 39 ("downloads", _(u"Downloads")), |
52 ("social_contract", _(u"Social contract")), | 52 ("social_contract", _(u"Social contract")), |
53 ]) | 53 ]) |
54 | 54 |
55 CATEGORIES_ALIASES = {"adhesion": "membership", | 55 CATEGORIES_ALIASES = {"adhesion": "membership", |
56 "adhesion_form": "membership_form", | 56 "adhesion_form": "membership_form", |
57 "screenshots": "media", | |
57 } | 58 } |
58 | 59 |
59 CATEGORIES_HIDDEN = ('membership_form', 'thank_you') | 60 CATEGORIES_HIDDEN = ('membership_form', 'thank_you') |
60 | 61 |
61 PROJECTS_INFOS = {'sat': _(u'contains the backend, Primitivus and Jp'), | 62 PROJECTS_INFOS = {'sat': _(u'contains the backend, Primitivus and Jp'), |
85 context.update(utils.get_asso_finance_status()) | 86 context.update(utils.get_asso_finance_status()) |
86 | 87 |
87 if not category or category == "overview": | 88 if not category or category == "overview": |
88 context.update(utils.get_asso_finance_status()) | 89 context.update(utils.get_asso_finance_status()) |
89 return render_to_response('sat_website/overview.html', context) | 90 return render_to_response('sat_website/overview.html', context) |
90 elif category == "screenshots": | 91 elif category == "media": |
91 context["screenshots"] = screenshots.screenshots | 92 context["media"] = media.media |
92 context["screenshots_tech"] = screenshots.screenshots_tech | 93 context["media_tech"] = media.media_tech |
93 elif category == "social_contract": | 94 elif category == "social_contract": |
94 context["SOCIAL_CONTRACT"] = social_contract.get_social_contract() | 95 context["SOCIAL_CONTRACT"] = social_contract.get_social_contract() |
95 elif category == "downloads": | 96 elif category == "downloads": |
96 context["projects_infos"] = utils.get_projects_infos(PROJECTS_INFOS) | 97 context["projects_infos"] = utils.get_projects_infos(PROJECTS_INFOS) |
97 elif category in ("association", "membership"): | 98 elif category in ("association", "membership"): |