Hi all, I've started to use the django-rest-interface to build an API for a service that I'm working on. Principally all that's required is for a client to be able to create and update objects remotely via POST and PUT, but as this is the first REST interface I've built I'm trying to explore all the options.
The first problem I've come up against is the correct way to make queries. django-rest-interface allows you to build custom URLs, so for example "/json/polls/121/choices/2/" will return the second choice from poll #121. But building a custom URL for each query isn't very flexible and django-rest-api doesn't seem to have any dynamic way to provide them. This approach doesn't let you query on anything other than foreign key relationships either. I thought about tacking some GET params onto a request and filtering the resulting queryset by them, but I've not come across any REST implementations that do this and I'm not sure if it's the correct thing to do. If I understand REST correctly then everything should be discoverable by URL and links, so perhaps querying has no place? That seems altogether too limited though. Can someone clarify the principals for me, and suggest a way to perform queries RESTfully? Many thanks, Matt. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---