开发者

RESTful interfaces in Django

开发者 https://www.devze.com 2022-12-21 14:55 出处:网络
I\'m willing to build a restful service using Django, I\'m coming form RoR background and facing some problems that could be defined using the following questions:

I'm willing to build a restful service using Django, I'm coming form RoR background and facing some problems that could be defined using the following questions:

  1. What package do you recom开发者_JAVA百科mend to use to have RESTful interfaces?
  2. Is there a way to make nested resources like a post HTTP request to /posts/post_id/comments that adds a new comment ?
  3. Is there a way to add some extra actions out of the CRUD set, like having extra method called notify on Post resource that works on post HTTP request.

Cheers,


1) Check out django piston. 2) Yes, you set it up in your urls list. 3) Yes, this is straightforward to do in your view.

Django Piston: http://bitbucket.org/jespern/django-piston/wiki/Home


I would say that you can do a lot just by implementing your own views that present theirselfs in a RESTful way.

But, there is a project called piston that seems to be exactly what you're looking for: "A mini-framework for Django for creating RESTful APIs".

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号