Skip to content

Commit

Permalink
Merge pull request #325 from ZdruzenieSTROM/readonly_logo
Browse files Browse the repository at this point in the history
Public read-only logo endpoint
  • Loading branch information
mmihalik authored Dec 9, 2023
2 parents 09e0e4e + 12e3b61 commit 6f7863c
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions cms/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from rest_framework import viewsets
from rest_framework.decorators import action
from rest_framework.exceptions import MethodNotAllowed
from rest_framework.request import Request
from rest_framework.response import Response

Expand Down Expand Up @@ -51,16 +50,10 @@ def visible(self, request):
return Response(serializer.data)


class LogoViewSet(viewsets.ModelViewSet):
class LogoViewSet(viewsets.ReadOnlyModelViewSet):
"""Logá"""
queryset = Logo.objects.all()
serializer_class = LogoSerializer
permission_classes = (PostPermission,)

# TODO: Maybe create upload image endpoint

def create(self, request, *args, **kwargs):
raise MethodNotAllowed('POST')


class InfoBannerViewSet(viewsets.ModelViewSet):
Expand Down

0 comments on commit 6f7863c

Please sign in to comment.