This repository has been archived on 2025-06-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dusken-prototype/dusken/api/address.py
T
2014-01-23 19:44:59 +01:00

19 lines
549 B
Python

from tastypie.resources import ModelResource
from tastypie import fields
from dusken.models import Address
from dusken.authorization import MyDjangoAuthorization
from dusken.authentication import OAuth20Authentication
class AddressResource(ModelResource):
class Meta:
queryset = Address.objects.all()
resource_name = 'address'
authorization = MyDjangoAuthorization()
authentication = OAuth20Authentication()
def dehydrate(self, bundle):
bundle.data['full'] = bundle.obj.full
return bundle