Commit 48f94442 by Victor Shnayder

todos and comments

parent 4cf83557
...@@ -20,5 +20,10 @@ class EditingDescriptor(MakoModuleDescriptor): ...@@ -20,5 +20,10 @@ class EditingDescriptor(MakoModuleDescriptor):
def get_context(self): def get_context(self):
return { return {
'module': self, 'module': self,
'data': self.definition['data'], 'data': self.definition.get('data', ''),
# TODO (vshnayder): allow children and metadata to be edited.
#'children' : self.definition.get('children, ''),
# TODO: show both own metadata and inherited?
#'metadata' : self.own_metadata,
} }
...@@ -243,6 +243,7 @@ def index(request, course_id, chapter=None, section=None, ...@@ -243,6 +243,7 @@ def index(request, course_id, chapter=None, section=None,
return result return result
@ensure_csrf_cookie @ensure_csrf_cookie
def jump_to(request, location): def jump_to(request, location):
''' '''
...@@ -269,7 +270,7 @@ def jump_to(request, location): ...@@ -269,7 +270,7 @@ def jump_to(request, location):
except NoPathToItem: except NoPathToItem:
raise Http404("This location is not in any class: {0}".format(location)) raise Http404("This location is not in any class: {0}".format(location))
# Rely on index to do all error handling
return index(request, course_id, chapter, section, position) return index(request, course_id, chapter, section, position)
@ensure_csrf_cookie @ensure_csrf_cookie
......
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