Commit 57a3c97d by benjaoming

Fix #211 by adding a bit more clarity on the context variable handling

parent e08b54d1
...@@ -107,11 +107,12 @@ class Create(FormView, ArticleMixin): ...@@ -107,11 +107,12 @@ class Create(FormView, ArticleMixin):
return redirect('wiki:get', self.newpath.path) return redirect('wiki:get', self.newpath.path)
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
kwargs['parent_urlpath'] = self.urlpath c = ArticleMixin.get_context_data(self, **kwargs)
kwargs['parent_article'] = self.article c['parent_urlpath'] = self.urlpath
kwargs['create_form'] = kwargs.pop('form', None) c['parent_article'] = self.article
kwargs['editor'] = editors.getEditor() c['create_form'] = kwargs.pop('form', None)
return super(Create, self).get_context_data(**kwargs) c['editor'] = editors.getEditor()
return c
class Delete(FormView, ArticleMixin): class Delete(FormView, ArticleMixin):
......
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