diff sat_website/views.py @ 149:b1c16cd53b62

update django to version 1.11, refactor project structure, better PEP-8 compliance
author souliane <souliane@mailoo.org>
date Tue, 17 Oct 2017 04:11:21 +0200
parents d0cd185f9b61
children
line wrap: on
line diff
--- a/sat_website/views.py	Tue Oct 17 19:18:44 2017 +0200
+++ b/sat_website/views.py	Tue Oct 17 04:11:21 2017 +0200
@@ -22,13 +22,12 @@
 """
 from django.http import Http404, HttpResponse
 from django.shortcuts import render_to_response
-from django.core.context_processors import csrf
+from django.template.context_processors import csrf
 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"),
                                 OrderedDict([("features", _(u"Features")),
                                              ("frontends", _(u"Frontends")),
@@ -77,14 +76,14 @@
     if category in CATEGORIES_ALIASES:
         category = CATEGORIES_ALIASES[category]
 
-    context = RequestContext(request, {
+    context = {
                "available_languages": ['fr', 'en'],
                "categories": CATEGORIES,
                "categories_right": CATEGORIES_RIGHT,
                "category": category,
                "libervia_demo_url": utils.get_libervia_demo_url(),
                "subscription_amounts": utils.get_asso_subscr_amounts(),
-               })
+               }
 
     context.update(csrf(request))
     context.update(utils.get_asso_finance_status())