<filename>django-react/django_react/photos/views.py
from django.shortcuts import render

# Create your views here.

from .models import Photo
from .serializers import PhotoSerializer
from rest_framework import generics


class PhotoListCreate(generics.ListCreateAPIView):
    queryset = Photo.objects.all()
    serializer_class = PhotoSerializer

<filename>django-react/django_react/photos/views.py
from django.shortcuts import render

# Create your views here.

from .models import Photo
from .serializers import PhotoSerializer
from rest_framework import generics


class PhotoListCreate(generics.ListCreateAPIView):
    queryset = Photo.objects.all()
    serializer_class = PhotoSerializer

# Create your views here.