-
Notifications
You must be signed in to change notification settings - Fork 8
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
Logo model #243
Conversation
Closes: #229 |
.vscode/settings.json
Outdated
There was a problem hiding this comment.
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') |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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') | ||
|
There was a problem hiding this comment.
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.
No description provided.