comparison sat_website/views.py @ 71:a14845624e01

display a banner on top of all pages (but adhesion, adhesion_form and thank_you) to encourage people joining the association
author souliane <souliane@mailoo.org>
date Wed, 27 May 2015 18:56:16 +0200
parents bfa8009f0769
children 651c4049f32b
comparison
equal deleted inserted replaced
70:d6bf5414c6c4 71:a14845624e01
72 "libervia_demo_url": utils.get_libervia_demo_url(), 72 "libervia_demo_url": utils.get_libervia_demo_url(),
73 "subscription_amounts": utils.get_asso_subscr_amounts(), 73 "subscription_amounts": utils.get_asso_subscr_amounts(),
74 }) 74 })
75 75
76 context.update(csrf(request)) 76 context.update(csrf(request))
77 context.update(utils.get_asso_finance_status())
77 78
78 if not category or category == "overview": 79 if not category or category == "overview":
79 context.update(utils.get_asso_finance_status()) 80 context.update(utils.get_asso_finance_status())
80 return render_to_response('sat_website/overview.html', context) 81 return render_to_response('sat_website/overview.html', context)
81 elif category == "screenshots": 82 elif category == "screenshots":
84 elif category == "social_contract": 85 elif category == "social_contract":
85 context["SOCIAL_CONTRACT"] = social_contract.get_social_contract() 86 context["SOCIAL_CONTRACT"] = social_contract.get_social_contract()
86 elif category == "downloads": 87 elif category == "downloads":
87 context["projects_infos"] = utils.get_projects_infos(PROJECTS_INFOS) 88 context["projects_infos"] = utils.get_projects_infos(PROJECTS_INFOS)
88 elif category in ("association", "adhesion"): 89 elif category in ("association", "adhesion"):
89 context.update(utils.get_asso_finance_status())
90 context.update(utils.get_asso_urls()) 90 context.update(utils.get_asso_urls())
91 elif category == "adhesion_form": 91 elif category == "adhesion_form":
92 if request.method == 'POST': 92 if request.method == 'POST':
93 form = forms.RegistrationForm(request.POST) 93 form = forms.RegistrationForm(request.POST)
94 form.process_submitted_data() 94 form.process_submitted_data()