Permission_require decorator, and redirecting to Login Page

7 views
Skip to first unread message

Victor Hooi

unread,
Oct 5, 2011, 10:53:52 AM10/5/11
to django...@googlegroups.com
heya,

I'm using the permission-required decorator with the inbuilt login view.

When I login as a user who has the appropriate permissions, it logs in fine, and all is good.

When I try to login as a user with valid credentials but lacking the appropriate permission, it simply keeps redirecting to the login page again - but doesn't display any error message at all.

I tried adding "{{ form.non_field_errors }}" to the form but it still doesn't display any error messages.

Is there any way to get it to display that your user lacks the appropriate permissions, as opposed to just redirecting to a blank login page again and again.

Cheers,
Victor
Reply all
Reply to author
Forward
0 new messages