Mercurial > sat_legacy_website
comparison sat_website/views.py @ 33:73c6333fd124
change overview.html, move the previous content to principles.html
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 27 Jan 2015 08:07:15 +0100 |
parents | b45621706d83 |
children | 9d553570cc61 |
comparison
equal
deleted
inserted
replaced
32:876ae5e23690 | 33:73c6333fd124 |
---|---|
53 | 53 |
54 def overview(request): | 54 def overview(request): |
55 return render_to_response('sat_website/overview.html') | 55 return render_to_response('sat_website/overview.html') |
56 | 56 |
57 def generic_cat(request, category): | 57 def generic_cat(request, category): |
58 latest_dl_path, latest_version = utils.get_latest_sat() | |
59 context = { | 58 context = { |
60 "available_languages": ['fr', 'en'], | 59 "available_languages": ['fr', 'en'], |
61 "categories": CATEGORIES, | 60 "categories": CATEGORIES, |
62 "categories_right": CATEGORIES_RIGHT, | 61 "categories_right": CATEGORIES_RIGHT, |
63 "category": category, | 62 "category": category, |
64 "latest_dl_path": latest_dl_path, | |
65 "latest_version": latest_version, | |
66 } | 63 } |
64 "libervia_demo_url": utils.get_libervia_demo_url(), | |
65 "subscription_amounts": utils.get_asso_subscr_amounts(), | |
67 | 66 |
68 context.update(csrf(request)) | 67 context.update(csrf(request)) |
69 | 68 |
70 if not category or category == "overview": | 69 if not category or category == "overview": |
70 context.update(utils.get_asso_finance_status()) | |
71 return render_to_response('sat_website/overview.html', context) | 71 return render_to_response('sat_website/overview.html', context) |
72 elif category == "screenshots": | 72 elif category == "screenshots": |
73 context["screenshots"] = screenshots.screenshots | 73 context["screenshots"] = screenshots.screenshots |
74 elif category == "screenshots_tech": | 74 elif category == "screenshots_tech": |
75 context["screenshots"] = screenshots.screenshots_tech | 75 context["screenshots"] = screenshots.screenshots_tech |
76 elif category == "social_contract": | 76 elif category == "social_contract": |
77 context["SOCIAL_CONTRACT"] = social_contract.get_social_contract() | 77 context["SOCIAL_CONTRACT"] = social_contract.get_social_contract() |
78 elif category == "downloads": | |
79 latest_dl_path, latest_version = utils.get_latest_sat() | |
80 context["latest_dl_path"] = latest_dl_path | |
81 context["latest_version"] = latest_version | |
78 | 82 |
79 def all_keys(cats): | 83 def all_keys(cats): |
80 subcats = [value[1].keys() for value in cats.values() if isinstance(value, tuple)] | 84 subcats = [value[1].keys() for value in cats.values() if isinstance(value, tuple)] |
81 return sum(subcats, cats.keys()) | 85 return sum(subcats, cats.keys()) |
82 | 86 |