Can someone point me in the right direction. Essentially, I have a <form>
that has a variable number of fields:
<input value="1" name="cat">
<input value="2" name="dog">
<input value="3" name="tiger">
When I look at the request.POST
, the dictionary order is off:
{'dog':['2'], 'cat':[1], 'tiger':['3']}
I realize that dictionary ordering is not maintained within Python - however I need a way to get that ordering back on the backend.
How could I go about doing this? My first idea is using JS, but I was hoping there would be a better way.