简体   繁体   中英

Login required in django

I am developing ecommerce website in django. I have view ( addToCart) I want sure before add to cart if user logged in or not so that i use @login_required('login') before view but when click login it show error (can't access to page ).

Note that: normal login is working

Please check the following 1. Add login url on settings 2. Add redirect url on login required decorator 3. If you create a custom login view make sure to check next kwargs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM