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

17 lines
371 B
Python
Raw Normal View History

2014-05-08 16:59:35 +00:00
from rest_framework import viewsets
from orchestra.api import router
from orchestra.apps.accounts.api import AccountApiMixin
2014-10-17 10:04:47 +00:00
from .models import Contact
from .serializers import ContactSerializer
2014-05-08 16:59:35 +00:00
class ContactViewSet(AccountApiMixin, viewsets.ModelViewSet):
model = Contact
serializer_class = ContactSerializer
router.register(r'contacts', ContactViewSet)
2014-10-17 10:04:47 +00:00