Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove edit functions from API endpoints #764

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/public/cantusdata/views/chant.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
from rest_framework import generics


class ChantList(generics.ListCreateAPIView):
class ChantList(generics.ListAPIView):
model = Chant
queryset = Chant.objects.all()
serializer_class = ChantSerializer


class ChantDetail(generics.RetrieveUpdateDestroyAPIView):
class ChantDetail(generics.RetrieveAPIView):
model = Chant
queryset = Chant.objects.all()
serializer_class = ChantSerializer
4 changes: 2 additions & 2 deletions app/public/cantusdata/views/concordance.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
from rest_framework import generics


class ConcordanceList(generics.ListCreateAPIView):
class ConcordanceList(generics.ListAPIView):
model = Concordance
queryset = Concordance.objects.all()
serializer_class = ConcordanceSerializer


class ConcordanceDetail(generics.RetrieveUpdateDestroyAPIView):
class ConcordanceDetail(generics.RetrieveAPIView):
model = Concordance
queryset = Concordance.objects.all()
serializer_class = ConcordanceSerializer
4 changes: 2 additions & 2 deletions app/public/cantusdata/views/folio.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from rest_framework import generics


class FolioList(generics.ListCreateAPIView):
class FolioList(generics.ListAPIView):
model = Folio
serializer_class = FolioSerializer

Expand All @@ -29,7 +29,7 @@ def get_queryset(self):
return queryset[:1] # Make sure we return only one element


class FolioDetail(generics.RetrieveUpdateDestroyAPIView):
class FolioDetail(generics.RetrieveAPIView):
model = Folio
queryset = Folio.objects.all()
serializer_class = FolioSerializer
4 changes: 2 additions & 2 deletions app/public/cantusdata/views/manuscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
from cantusdata.renderers import templated_view_renderers


class ManuscriptList(generics.ListCreateAPIView):
class ManuscriptList(generics.ListAPIView):
model = Manuscript
queryset = Manuscript.objects.filter(public=True)
serializer_class = ManuscriptListSerializer
template_name = "require.html"
renderer_classes = templated_view_renderers


class ManuscriptDetail(generics.RetrieveUpdateDestroyAPIView):
class ManuscriptDetail(generics.RetrieveAPIView):
model = Manuscript
queryset = Manuscript.objects.filter(public=True)
serializer_class = ManuscriptSerializer
Expand Down