From c58d47815133f286f27de2f498c17ac691e184cd Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Wed, 24 Oct 2012 11:39:27 +0200 Subject: [PATCH] rename render_to_forbitten to render_to_forbidden. #370 --- openslides/utils/utils.py | 4 ++-- openslides/utils/views.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openslides/utils/utils.py b/openslides/utils/utils.py index 6d14b35a6..41aaf7544 100644 --- a/openslides/utils/utils.py +++ b/openslides/utils/utils.py @@ -101,13 +101,13 @@ def permission_required(perm, login_url=None): if request.user.has_perm(perm): return func(request, *args, **kw) if request.user.is_authenticated(): - return render_to_forbitten(request) + return render_to_forbidden(request) return redirect(reverse('user_login')) return wrapper return renderer -def render_to_forbitten(request, error= +def render_to_forbidden(request, error= ugettext_lazy("Sorry, you have no rights to see this page.")): return HttpResponseForbidden(render_to_string('403.html', {'error': error}, context_instance=RequestContext(request))) diff --git a/openslides/utils/views.py b/openslides/utils/views.py index becdbfc8b..be40f9062 100644 --- a/openslides/utils/views.py +++ b/openslides/utils/views.py @@ -52,7 +52,7 @@ from django.views.generic.list import TemplateResponseMixin from openslides.config.models import config -from openslides.utils.utils import render_to_forbitten, html_strong +from openslides.utils.utils import render_to_forbidden, html_strong from openslides.utils.signals import template_manipulation from openslides.utils.pdf import firstPage, laterPages @@ -93,7 +93,7 @@ class PermissionMixin(object): return HttpResponseRedirect("%s?next=%s" % (settings.LOGIN_URL, path)) else: - return render_to_forbitten(request) + return render_to_forbidden(request) return _View.dispatch(self, request, *args, **kwargs)