Skip to content

Commit

Permalink
Remove download publication action
Browse files Browse the repository at this point in the history
  • Loading branch information
mmihalik committed Dec 14, 2024
1 parent 4c96ee1 commit 5336984
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions competition/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,16 +963,6 @@ def perform_create(self, serializer):
raise exceptions.PermissionDenied(
'Nedostatočné práva na vytvorenie tohoto objektu')

@action(methods=['get'], detail=True, url_path='download')
def download_publication(self, request, pk=None):
"""Stiahne súbor publikácie"""
publication = self.get_object()
response = HttpResponse(
publication.file, content_type=mime_type(publication.file))
response['Content-Disposition'] = f'attachment; '\
f'filename="{publication.name}"'
return response


class GradeViewSet(viewsets.ReadOnlyModelViewSet):
"""Ročníky riešiteľov (Z9,S1 ...)"""
Expand Down

0 comments on commit 5336984

Please sign in to comment.