From bac61d5cdcf269261d196f0390ff0c72b74ac3e5 Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Sun, 11 Oct 2020 01:12:52 +0200 Subject: [PATCH] Translated permission_denied_message. --- django_lostplaces/lostplaces/views/base_views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django_lostplaces/lostplaces/views/base_views.py b/django_lostplaces/lostplaces/views/base_views.py index 4737307..346f6d4 100644 --- a/django_lostplaces/lostplaces/views/base_views.py +++ b/django_lostplaces/lostplaces/views/base_views.py @@ -11,6 +11,7 @@ from django.contrib.messages.views import SuccessMessageMixin from django.shortcuts import redirect, get_object_or_404 from django.urls import reverse_lazy +from django.utils.translation import ugettext_lazy as _ from lostplaces.models import Place @@ -21,7 +22,7 @@ class IsAuthenticatedMixin(LoginRequiredMixin, View): the login page. ''' login_url = reverse_lazy('login') - permission_denied_message = 'Please login to proceed' + permission_denied_message = _('Please login to proceed') def handle_no_permission(self): messages.error(self.request, self.permission_denied_message)