Answer the question
In order to leave comments, you need to log in
How to pass select value to template?
Good afternoon, there is such a form of a drop-down list http://pastebin.ru/CvRz3MPW , so how to transfer the selected element to the template? For example, a person selected millimeters, you need to transfer 'millimeters' to the template and not the value 1.
Answer the question
In order to leave comments, you need to log in
just set the values for the form field to weight_first = 1 and when the field widget is displayed, django will select the desired list item
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question