2014-07-28 17:28:00 +00:00
|
|
|
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
|
2014-07-28 17:28:00 +00:00
|
|
|
|
|
|
|
from .models import Order
|
|
|
|
from .serializers import OrderSerializer
|
|
|
|
|
|
|
|
|
|
|
|
class OrderViewSet(AccountApiMixin, viewsets.ModelViewSet):
|
2015-04-23 14:34:04 +00:00
|
|
|
queryset = Order.objects.all()
|
2014-07-28 17:28:00 +00:00
|
|
|
serializer_class = OrderSerializer
|
|
|
|
|
2015-04-23 14:34:04 +00:00
|
|
|
|
2014-07-28 17:28:00 +00:00
|
|
|
router.register(r'orders', OrderViewSet)
|