Answer the question
In order to leave comments, you need to log in
How to use Datalist in Django?
The form accepts a string from the datalist, but the validation fails because the string is not a record object in the model, how can I fix it?
Cannot assign "'Тест название'": "Sale.good" must be a "Good" instance.
<datalist id="goods">
<select>
{% for good in context %}
<option value='{{good.name}}'></option>
{% endfor %}
</select>
</datalist>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question