Skip to content

Instantly share code, notes, and snippets.

@ryan2clw
Created August 17, 2019 12:56
Show Gist options
  • Save ryan2clw/d4d61b906e9f50e93d9acb52f3249574 to your computer and use it in GitHub Desktop.
Save ryan2clw/d4d61b906e9f50e93d9acb52f3249574 to your computer and use it in GitHub Desktop.
Endpoints for creating and requesting cards
""" These are endpoints that get or create cards and rows """
from rest_framework import generics
from play.models import Card
from play.serializers import CardSerializer
class CardList(generics.ListCreateAPIView):
""" Get or create cards """
queryset = Card.objects.all()
serializer_class = CardSerializer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment