Skip to content

Commit

Permalink
Added logo model
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamín Mravec committed Nov 11, 2023
1 parent 043f0bc commit a5a84c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@
},
"editor.defaultFormatter": "ms-python.autopep8",
"editor.formatOnSave": true,
"python.linting.pylintArgs": [
"--load-plugins",
"pylint_django"
]
}

}
4 changes: 2 additions & 2 deletions cms/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from rest_framework.response import Response

from cms.models import InfoBanner, MenuItem, MessageTemplate, Post, Logo
from cms.permissions import PostPermission, IsAdminUser
from cms.permissions import PostPermission
from cms.serializers import (InfoBannerSerializer, MenuItemShortSerializer,
MessageTemplateSerializer, PostSerializer, LogoSerializer)

Expand Down Expand Up @@ -74,7 +74,7 @@ def download_logo(self, request):
response['Content-Disposition'] = f'attachment; filename="{logo.name}"'
return response

@action(methods=['post'], detail=False, url_path='upload', permission_classes=[IsAdminUser])
@action(methods=['post'], detail=False, url_path='upload')
def upload_publication(self, request):
"""Nahrá súbor publikácie"""
if 'file' not in request.data:
Expand Down

0 comments on commit a5a84c7

Please sign in to comment.