mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-30 05:24:00 +03:00
8 lines
233 B
Python
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',)
|