django-rest-framework/examples/modelresourceexample/resources.py

8 lines
233 B
Python
Raw Normal View History

2011-06-15 17:09:57 +04:00
from djangorestframework.resources import ModelResource
from modelresourceexample.models import MyModel
class MyModelResource(ModelResource):
model = MyModel
fields = ('foo', 'bar', 'baz', 'url')
ordering = ('created',)