Translated permission_denied_message.
This commit is contained in:
parent
2d6ee4aef5
commit
bac61d5cdc
@ -11,6 +11,7 @@ from django.contrib.messages.views import SuccessMessageMixin
|
|||||||
|
|
||||||
from django.shortcuts import redirect, get_object_or_404
|
from django.shortcuts import redirect, get_object_or_404
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from lostplaces.models import Place
|
from lostplaces.models import Place
|
||||||
|
|
||||||
@ -21,7 +22,7 @@ class IsAuthenticatedMixin(LoginRequiredMixin, View):
|
|||||||
the login page.
|
the login page.
|
||||||
'''
|
'''
|
||||||
login_url = reverse_lazy('login')
|
login_url = reverse_lazy('login')
|
||||||
permission_denied_message = 'Please login to proceed'
|
permission_denied_message = _('Please login to proceed')
|
||||||
|
|
||||||
def handle_no_permission(self):
|
def handle_no_permission(self):
|
||||||
messages.error(self.request, self.permission_denied_message)
|
messages.error(self.request, self.permission_denied_message)
|
||||||
|
Loading…
Reference in New Issue
Block a user