django-rest-framework/examples/modelresourceexample/resources.py
2011-06-15 14:09:57 +01:00

8 lines
233 B
Python

from djangorestframework.resources import ModelResource
from modelresourceexample.models import MyModel
class MyModelResource(ModelResource):
model = MyModel
fields = ('foo', 'bar', 'baz', 'url')
ordering = ('created',)