Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
f894353f
Commit
f894353f
authored
13 years ago
by
Piotr Mitros
Browse files
Options
Downloads
Patches
Plain Diff
No cache of courseware. This caused lots of issues
parent
a9f94da8
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
courseware/views.py
+3
-0
3 additions, 0 deletions
courseware/views.py
with
3 additions
and
0 deletions
courseware/views.py
+
3
−
0
View file @
f894353f
...
...
@@ -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.
'''
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment