Skip to content
Snippets Groups Projects
Commit f894353f authored by Piotr Mitros's avatar Piotr Mitros
Browse files

No cache of courseware. This caused lots of issues

parent a9f94da8
No related merge requests found
......@@ -15,6 +15,7 @@ from django.template import Context, loader
from mitxmako.shortcuts import render_to_response, render_to_string
#from django.views.decorators.csrf import ensure_csrf_cookie
from django.db import connection
from django.views.decorators.cache import cache_control
from lxml import etree
......@@ -32,6 +33,7 @@ etree.set_default_parser(etree.XMLParser(dtd_validation=False, load_dtd=False,
template_imports={'urllib':urllib}
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
def profile(request):
''' User profile. Show username, location, etc, as well as grades .
We need to allow the user to change some of these settings .'''
......@@ -208,6 +210,7 @@ def render_accordion(request,course,chapter,section):
return {'init_js':render_to_string('accordion_init.js',context),
'content':render_to_string('accordion.html',context)}
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
def index(request, course="6.002 Spring 2012", chapter="Using the System", section="Hints"):
''' Displays courseware accordion, and any associated content.
'''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment