KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I love django's @login_required decorator, but there's one thing I can't figure out how to make it do. If an unauthenticated user tries visits a @login_required page (e.g. "/private-stuff/"), I want to kick them back to the home page (e.g. "/home/"). But I don't want to append a "?next=" argument to the url. In other words, I just want to redirect to "/home/", not "/home/?next=/private-stuff/". How can I do that? Is there a better way than just writing my own decorator?
Tags (comma-separated)
Save Edits
Cancel