Commit adbe71b5 by Bridger Maxwell

Got simplewiki just cleaned up enough to work again, so I could view a page for reference.

parent cdfeeb0c
...@@ -39,7 +39,7 @@ def update_template_dictionary(dictionary, request=None, course=None, article=No ...@@ -39,7 +39,7 @@ def update_template_dictionary(dictionary, request=None, course=None, article=No
if course: if course:
dictionary['course'] = course dictionary['course'] = course
if 'namespace' not in dictionary: if 'namespace' not in dictionary:
dictionary['namespace'] = course.wiki_namespace dictionary['namespace'] = "edX"
else: else:
dictionary['course'] = None dictionary['course'] = None
...@@ -99,7 +99,7 @@ def root_redirect(request, course_id=None): ...@@ -99,7 +99,7 @@ def root_redirect(request, course_id=None):
course = get_opt_course_with_access(request.user, course_id, 'load') course = get_opt_course_with_access(request.user, course_id, 'load')
#TODO: Add a default namespace to settings. #TODO: Add a default namespace to settings.
namespace = course.wiki_namespace if course else "edX" namespace = "edX"
try: try:
root = Article.get_root(namespace) root = Article.get_root(namespace)
...@@ -479,7 +479,7 @@ def not_found(request, article_path, course): ...@@ -479,7 +479,7 @@ def not_found(request, article_path, course):
"""Generate a NOT FOUND message for some URL""" """Generate a NOT FOUND message for some URL"""
d = {'wiki_err_notfound': True, d = {'wiki_err_notfound': True,
'article_path': article_path, 'article_path': article_path,
'namespace': course.wiki_namespace} 'namespace': "edX"}
update_template_dictionary(d, request, course) update_template_dictionary(d, request, course)
return render_to_response('simplewiki/simplewiki_error.html', d) return render_to_response('simplewiki/simplewiki_error.html', d)
......
...@@ -69,6 +69,7 @@ ${"Edit " + wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITx 6.002 ...@@ -69,6 +69,7 @@ ${"Edit " + wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITx 6.002
%else: %else:
<input type="submit" id="submit_edit" name="edit" value="Save Changes" /> <input type="submit" id="submit_edit" name="edit" value="Save Changes" />
<input type="submit" id="submit_delete" name="delete" value="Delete article" /> <input type="submit" id="submit_delete" name="delete" value="Delete article" />
%endif
<%include file="simplewiki_instructions.html"/> <%include file="simplewiki_instructions.html"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment