django-orchestra-test/orchestra/apps/bills/api.py

16 lines
349 B
Python
Raw Normal View History

2014-07-23 16:24:56 +00:00
from rest_framework import viewsets
from orchestra.api import router
from orchestra.apps.accounts.api import AccountApiMixin
from .models import Bill
from .serializers import BillSerializer
class BillViewSet(AccountApiMixin, viewsets.ModelViewSet):
model = Bill
serializer_class = BillSerializer
router.register(r'bills', BillViewSet)