简体   繁体   中英

How do I use button on card to change a session value?

I am making a menu that goes through a few different steps. Select the grade, then select the textbook, then select the lesson. I want to display the textbooks as cards with buttons that will bring the user to a view of all the lessons associated with that textbook. I've used session to go from the grade to the textbook, but I'm not sure how to go from the textbook to the lessons. I think the way of getting there is to have the button change the session value to that textbook, and bring me to the view that will filter the lessons by that textbook, but I'm not sure how to do that. Any suggestions would be welcome!

Django just isn't capable of rendering a form with choices as images. This can only be achieved with a some Java Script or other front end tools.

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