from core.serializers import ImageSerializer | |
from rest_framework import generics | |
from core.models import Image | |
class ImageList(generics.ListCreateAPIView): | |
queryset = Image.objects.all() | |
serializer_class = ImageSerializer | |
class ImageDetail(generics.RetrieveUpdateDestroyAPIView): | |
queryset = Image.objects.all() | |
serializer_class = ImageSerializer | |