I have a rows or words like this:
hello
ok
there
hi
I want to let the user select each row, store that row in variable and process that using the DJango view. How can I do that? Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
not exactly sure how you want the user to select each row, but here’s a simple example if you want to use a checkbox, letting the user make a selection from a defined list in the index page and process it however you want in the vote view (stored in the choices list variable):
in your views.py:
and in the index.html:
and for example in the vote.html:
(A modified ripoff from https://docs.djangoproject.com/en/1.4/intro/tutorial04/🙂