Skip to content

Instantly share code, notes, and snippets.

@jacobh
Created July 29, 2014 03:43
Show Gist options
  • Save jacobh/89be077863c802f793fb to your computer and use it in GitHub Desktop.
Save jacobh/89be077863c802f793fb to your computer and use it in GitHub Desktop.
class PaymentSummaryViewSet(viewsets.ModelViewSet):
queryset = PaymentSummary.objects.all()
serializer_class = PaymentSummarySerializer
@action()
def send(self, request, pk=None):
# code to send individual payment summary
@collection_action()
def send_pending(self, request):
# will be called when hitting
# /api/payment-summary/send_pending/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment