neoice neoice - 1 month ago 10
HTTP Question

Django: using <select multiple> and POST

I'm using something like this in my template

<select multiple="multiple" name="services" id="services" size="5">
{% for service in services %}
<option value="{{service.id}}">{{service}}</option>
{% endfor %}
</select>


When I view the POST data in Firebug or the Django debug, I see it only sends one value. Am I doing something wrong or misunderstanding a concept?

Answer
request.POST.getlist('services')