django-orchestra/orchestra/contrib/orders/api.py

15 lines
358 B
Python
Raw Normal View History

from rest_framework import viewsets
from orchestra.api import router
2015-04-05 10:46:24 +00:00
from orchestra.contrib.accounts.api import AccountApiMixin
from .models import Order
from .serializers import OrderSerializer
class OrderViewSet(AccountApiMixin, viewsets.ModelViewSet):
model = Order
serializer_class = OrderSerializer
router.register(r'orders', OrderViewSet)