from rest_framework.decorators import api_view
from rest_framework import permissions, status, viewsets
from rest_framework.response import Response
from longclaw.longclaworders.models import Order
from longclaw.longclaworders.serializers import OrderSerializer


@api_view(["POST"])
def fulfill_order(request, pk):
    ''' Get all basket items
    '''
    order = Order.objects.get(id=pk)
    order.status = Order.FULFILLED
    order.save()
    return Response(status=status.HTTP_204_NO_CONTENT)


class OrderViewSet(viewsets.ModelViewSet):
    serializer_class = OrderSerializer
    permission_classes = [permissions.IsAdminUser]
    queryset = Order.objects.all()

692aba2949e3d2fde20919b6dbf7f0f5f9fd49cc
<mask token>

<mask token>


class OrderViewSet(viewsets.ModelViewSet):
    serializer_class = OrderSerializer
    permission_classes = [permissions.IsAdminUser]
    queryset = Order.objects.all()

<mask token>


@api_view(['POST'])
def fulfill_order(request, pk):
    """ Get all basket items
    """
    order = Order.objects.get(id=pk)
    order.status = Order.FULFILLED
    order.save()
    return Response(status=status.HTTP_204_NO_CONTENT)


class OrderViewSet(viewsets.ModelViewSet):
    serializer_class = OrderSerializer
    permission_classes = [permissions.IsAdminUser]
    queryset = Order.objects.all()

from rest_framework.decorators import api_view
from rest_framework import permissions, status, viewsets
from rest_framework.response import Response
from longclaw.longclaworders.models import Order
from longclaw.longclaworders.serializers import OrderSerializer


@api_view(['POST'])
def fulfill_order(request, pk):
    """ Get all basket items
    """
    order = Order.objects.get(id=pk)
    order.status = Order.FULFILLED
    order.save()
    return Response(status=status.HTTP_204_NO_CONTENT)


class OrderViewSet(viewsets.ModelViewSet):
    serializer_class = OrderSerializer
    permission_classes = [permissions.IsAdminUser]
    queryset = Order.objects.all()

from rest_framework.decorators import api_view
from rest_framework import permissions, status, viewsets
from rest_framework.response import Response
from longclaw.longclaworders.models import Order
from longclaw.longclaworders.serializers import OrderSerializer


@api_view(["POST"])
def fulfill_order(request, pk):
    ''' Get all basket items
    '''
    order = Order.objects.get(id=pk)
    order.status = Order.FULFILLED
    order.save()
    return Response(status=status.HTTP_204_NO_CONTENT)


class OrderViewSet(viewsets.ModelViewSet):
    serializer_class = OrderSerializer
    permission_classes = [permissions.IsAdminUser]
    queryset = Order.objects.all()
