1👍
✅
Ah, I figured it out;
<form action="" method="post" enctype="multipart/form-data">{% csrf_token %}
<input type="hidden" name="engine_ids" value="{% for engine in engines %}{{engine.id}},{% endfor %}"/>
<input type="submit" value="Export engines" name="export"/>
</form>
👤A G
0👍
import json
...
return render(request, 'template', {'engine_id_list': json.dumps([e.id for e in Engine.objects.filter(thefilter)])}
- [Answer]-How to change the ManyToManyField widget?
- [Answer]-Rasing a 401 in a custom authentication methoud for Django
- [Answer]-Where to get the value when sending the request?
Source:stackexchange.com