<p>I have a django application that I'd like to add some rest interfaces to.  I've seen <a href="http://code.google.com/p/django-rest-interface/" rel="noreferrer">http://code.google.com/p/django-rest-interface/</a> 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?</p>

Well, from the look of things, there's an
```
authentication
```
parameter to
```
Collection
```
. (see this example:
authentication.py
)
Second, (even if Django doesn't have it yet,) there should probably be a middleware that does CSRF/XSRF form checking. (Oh, there seems to
be one
.) You should also be able to use the
```
login_required
```
and
```
permission_required
```
decorators
in the urls.py.