使用django-rest-interface [英] Using django-rest-interface

查看:111
本文介绍了使用django-rest-interface的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个django应用程序,我想添加一些休息的接口。我看到 http://code.google.com/p/django-rest-界面/ ,但似乎很简单。例如,它似乎没有办法执行安全性。我如何限制人们可以通过其他界面来查看和操纵?通常我会把这种逻辑放在我的意见中。这是正确的地方,还是应该把更多的逻辑放在模型中?另外还有一个更好的图书馆在那里,还是需要自己滚动?

解决方案

我会研究使用django-piston http://bitbucket.org/jespern/django-piston/wiki/Home 应用程序如果安全是您的主要关注点。



我过去使用过django-rest-interface,其可靠而且简单可以非常强大,但是django-活动似乎更加灵活。 >

I have a django application that I'd like to add some rest interfaces to. I've seen http://code.google.com/p/django-rest-interface/ but it seems to be pretty simplistic. For instance it doesn't seem to have a way of enforcing security. How would I go about limiting what people can view and manipulate through the rest interface? Normally I'd put this kind of logic in my views. Is this the right place or should I be moving some more logic down into the model? Alternatively is there a better library out there or do I need to roll my own?

解决方案

I would look into using django-piston http://bitbucket.org/jespern/django-piston/wiki/Home application if security is your main concern.

I have used django-rest-interface in the past, its reliable and though simple can be quite powerful, however django-piston seems more flexible going forward.

这篇关于使用django-rest-interface的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆