Django message framework and login_required

Posted by Brandon on Stack Overflow See other posts from Stack Overflow or by Brandon
Published on 2010-04-27T18:20:03Z Indexed on 2010/04/27 18:23 UTC
Read the original article Hit count: 211

Filed under:

I'm using the Django Message Framework to show messages to users as well as the @login_required decorator on one of my views. So if a user tries to access a certain view without being logged in, they get kicked to the login page. How would I go about adding an error message to the login page saying "In order to do ... you must be logged in". I can't add it in the view like you normally would because the non-logged in user would never get to there.

© Stack Overflow or respective owner

Related posts about django