2
The way you’re doing it now seems fine since you have a single numeric ID for each folder. If you wanted to pass a lot of parameters at once, especially if the set of parameters is not always the same, GET params are more appropriate.
POST is not relevant here as it is meant for updating data on the server, rather than simply requesting existing data.
0
I would recommend setting up an API (Tastypie or Django Rest Framework)
You could create something like this /api/v1/YOUR_APP_NAME/?limit=20
(Tastypie default has a limit of 20 per request)
Now you don’t have to have a separate url in Django for it and you have created a nice api
and unless you want to insert data you should always use a GET request.
- [Answered ]-My virtualenv is not taking into account ? [apache, mod_wsgi and django]
- [Answered ]-What is happening in this urlpatterns list of Python Django urls.py file?
- [Answered ]-Extending two related queries on same model in Django
- [Answered ]-Aggregate Sum on Django
- [Answered ]-Using ManyToManyFields() with Django
Source:stackexchange.com