rename render_to_forbitten to render_to_forbidden. #370

This commit is contained in:
Oskar Hahn 2012-10-24 11:39:27 +02:00
parent 17afa3c5d1
commit c58d478151
2 changed files with 4 additions and 4 deletions

View File

@ -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)))

View File

@ -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)