Commit 6d20678c by benjaoming

Merge branch 'master' of github.com:benjaoming/django-wiki

parents f8a6e1c3 7f820b66
......@@ -88,7 +88,7 @@ class Create(FormView, ArticleMixin):
# TODO: Handle individual exceptions better and give good feedback.
except Exception, e:
transaction.rollback()
if self.request.user.is_superuser():
if self.request.user.is_superuser:
messages.error(self.request, _(u"There was an error creating this article: %s") % str(e))
else:
messages.error(self.request, _(u"There was an error creating this article."))
......@@ -678,7 +678,7 @@ def root_create(request):
return redirect('wiki:get', path=root.path)
except NoRootURL:
pass
if not request.user.is_superuser():
if not request.user.is_superuser:
return redirect(settings.LOGIN_URL + "?next=" + reverse("wiki:root_create"))
if request.method == 'POST':
create_form = forms.CreateRootForm(request.POST)
......
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