On Mon, Nov 19, 2012 at 7:08 PM, Amrutha Rajiv <amrutha.ra...@gmail.com>wrote:
> Hey All, > I posted this on the django-tastypie group and I haven't got a response > yet. I hope there's someone here who can help me with this: > > I have a django project that is currently accessible through a web client. > What I need to do is create API end points to it so that a mobile app can > send GET & POST requests to it and get back JSON responses. After doing a > lot of research I've come to a conclusion that django-tastypie is the way > to go. > I have existing view functions for my web service that enables a user to > login & submit a report of sorts. I want the API URLs I add to the project > to hit the same view functions too. This is where I am stuck. I would > greatly appreciate it if someone can point to me any documentation that > explains how to do this. I've searched a lot to find information on this > but I did not find anything relevant, maybe I searched for the wrong > things. tastypie does allow me use existing code, right? > > Alternatively, I tried django-dynamic-response but I could not get it to > work and I didn't find much documentation related to that either. Is there > any other framework that will serve my purpose? > > Thanks in advance! > > Amrutha > > > I'm not certain what you mean by "same views", but request.is_ajax() may help if you want to detect the ajax case and pass it off to the tastypie back end (by calling a view from there and returning what it returns). -- 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.