Commit db73b510 by benjaoming

redirect for delete view to parent

parent dcf7e721
...@@ -126,9 +126,8 @@ class Delete(FormView, ArticleMixin): ...@@ -126,9 +126,8 @@ class Delete(FormView, ArticleMixin):
therefore it is separate.""" therefore it is separate."""
urlpath = kwargs.get('urlpath', None) urlpath = kwargs.get('urlpath', None)
# Where to go after deletion... # Where to go after deletion...
self.next = request.GET.get('next', None) self.next = ""
self.cannot_delete_root = False self.cannot_delete_root = False
if not self.next:
if urlpath and urlpath.parent: if urlpath and urlpath.parent:
self.next = reverse('wiki:get', kwargs={'path': urlpath.parent.path}) self.next = reverse('wiki:get', kwargs={'path': urlpath.parent.path})
elif urlpath: elif urlpath:
......
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