Ticket #16834: admin_not_allowed.diff

File admin_not_allowed.diff, 688 bytes (added by Wim Feijen <wim@…>, 4 years ago)
  • django/contrib/admin/forms.py

    diff --git a/django/contrib/admin/forms.py b/django/contrib/admin/forms.py
    index f26c100..ea2511b 100644
    a b class AdminAuthenticationForm(AuthenticationForm): 
    3838                                        " Try '%s' instead.") % user.username
    3939                raise forms.ValidationError(message)
    4040            elif not self.user_cache.is_active or not self.user_cache.is_staff:
     41                message = _("You are not allowed to enter the administration area of this website.")
    4142                raise forms.ValidationError(message)
    4243        self.check_for_test_cookie()
    4344        return self.cleaned_data
Back to Top