File Uploads - with Django REST Framework!

Описание к видео File Uploads - with Django REST Framework!

This video looks at how to setup file uploads with Django REST Framework. We cover Django FileFields, MEDIA settings, DRF Parsers, Views and Serializers, and finally how to upload the file to the DRF API using an AJAX request in JavaScript.

☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
https://ko-fi.com/bugbytes

📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
00:48 Creating Django model with FileField
03:09 Adding Django MEDIA settings
03:35 Adding Django REST Framework serializer
05:06 Creating REST Framework API view for file upload
14:42 Changing content-type with REST Framework Parsers
18:50 Adding DRF read-only field to track upload date
22:34 Calling API with JavaScript AJAX request

𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://bugbytes.io/posts/
👾 Github: https://github.com/bugbytes-io/
🐦 Twitter:   / bugbytesio  

📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
Django REST Framework: https://www.django-rest-framework.org/
REST framework serializers: https://www.django-rest-framework.org...
REST framework parsers: https://www.django-rest-framework.org...
Classy DRF: https://www.cdrf.co/

#python #django #webdevelopment

Комментарии

Информация по комментариям в разработке