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

Public read-only logo endpoint #325

Merged
merged 2 commits into from
Dec 9, 2023
Merged
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
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
Loading