Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
6ccfd87e
Commit
6ccfd87e
authored
Feb 01, 2012
by
Ernie Park
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
a6977aae
472a3996
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
courseware/content_parser.py
+5
-1
settings_new_askbot.py
+4
-0
static_template_view/views.py
+10
-1
No files found.
courseware/content_parser.py
View file @
6ccfd87e
...
...
@@ -2,6 +2,7 @@ import json
import
hashlib
from
lxml
import
etree
from
mako.template
import
Template
try
:
# This lets us do __name__ == ='__main__'
from
django.conf
import
settings
...
...
@@ -89,7 +90,10 @@ def id_tag(course):
def
course_file
(
user
):
# TODO: Cache.
tree
=
etree
.
parse
(
settings
.
DATA_DIR
+
UserProfile
.
objects
.
get
(
user
=
user
)
.
courseware
)
filename
=
settings
.
DATA_DIR
+
UserProfile
.
objects
.
get
(
user
=
user
)
.
courseware
data_template
=
Template
(
filename
=
filename
)
tree
=
etree
.
XML
(
data_template
.
render
())
id_tag
(
tree
)
return
tree
...
...
settings_new_askbot.py
View file @
6ccfd87e
...
...
@@ -3,6 +3,10 @@ import sys
import
djcelery
# Configuration option for when we want to grab server error pages
STATIC_GRAB
=
False
DEV_CONTENT
=
True
LIB_URL
=
'/static/lib/'
LIB_URL
=
'https://mitxstatic.s3.amazonaws.com/js/'
BOOK_URL
=
'/static/book/'
...
...
static_template_view/views.py
View file @
6ccfd87e
...
...
@@ -6,6 +6,7 @@
from
mitxmako.shortcuts
import
render_to_response
,
render_to_string
from
django.shortcuts
import
redirect
from
django.core.context_processors
import
csrf
from
django.conf
import
settings
#valid_templates=['index.html', 'staff.html', 'info.html', 'credits.html']
valid_templates
=
[
'mitx_global.html'
,
...
...
@@ -13,7 +14,15 @@ valid_templates=['mitx_global.html',
'tos.html'
,
'privacy.html'
,
'honor.html'
,
'copyright.html'
]
'copyright.html'
,
'404.html'
]
print
"!!"
,
settings
.
__dict__
if
settings
.
STATIC_GRAB
:
valid_templates
=
valid_templates
+
[
'server-down.html'
,
'server-error.html'
'server-overloaded.html'
]
def
index
(
request
,
template
):
csrf_token
=
csrf
(
request
)[
'csrf_token'
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment