title: Django PermissionRequiredMixin redirect to login template with message
body: <p>I got this view and I'm using <code>PermissionRequiredMixin</code> on it...it works fine but when I redirect to login template (set in settings <code>LOGIN_URL</code>) I need it shows a message there like <strong>"You don't have permission to do this"</strong>. Any idea how to do it without creating a custom decorator, just using <code>PermissionRequiredMixin</code> itself?</p>
  
  <pre><code>from django.contrib.auth.mixins import PermissionRequiredMixin
  
  class MyView(PermissionRequiredMixin,View):
  
      template = 'myapp/item_detail.html'
      permission_required = 'myapp.change_item'
  
  
      def get(self, request, *args, **kwargs):
          #Query here
          return render(request, self.template)
  </code></pre>
  
  <p>What do I need to add in order to achieve that?</p>