1

I'm developing an web app with Django to query and download data from multiple weather stations. It's almost everything good but something that I don't like it's that when I filter by stations, the form passes them to the URL like this:

https://my-server/stations?station_name=1&station_name=2&station_name=3

And since the number of selected stations can reach more than 250 (this added to the fact that spatial data are also passed in the URL as coordinates, polygons...), I would like to know if there is any way to obtain the "station_name" parameter in a list format like this or similar, for me to later divide it in my views.py:

https://my-server/stations?station_name=1%3B2%3B3

On the other hand, I'm not sure if there are any contraindications when generating too long URLs, if not I have no problem maintaining the current format, but otherwise I would like to find a solution.

Thanks in advance

Edit: If it helps, I'm using the Select2MultipleWidget widget for this field.

SbManolo
  • 115
  • 2
  • 9

0 Answers0