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

Logo model #243

Merged
merged 11 commits into from
Nov 11, 2023
Merged

Logo model #243

merged 11 commits into from
Nov 11, 2023

Conversation

Benji47
Copy link

@Benji47 Benji47 commented Nov 11, 2023

No description provided.

@kovacspe
Copy link
Collaborator

Closes: #229

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toto by nemalo byt potrebne pridavat

cms/views.py Outdated
raise exceptions.PermissionDenied(
'Nedostatočné práva na vytvorenie tohoto objektu')

@action(methods=['get'], detail=True, url_path='download')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Túto metódu netreba. Stačí ak v response príde link na súbor. Tento súbor sa totiž bude servovať staticky

cms/views.py Outdated
return response

@action(methods=['post'], detail=False, url_path='upload')
def upload_publication(self, request):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toto by sa nemalo volať upload_publication

cms/views.py Outdated
file = request.data['file']
if mime_type(file) not in ['application/jpg', 'application/png']:
raise exceptions.ParseError(detail='Nesprávny formát')

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tento endpoint iba skontroluje ci tam je file. Ale nevytvori objekt.

@kovacspe kovacspe merged commit f9a14b1 into master Nov 11, 2023
2 checks passed
@kovacspe kovacspe deleted the Logo-model branch November 11, 2023 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants