Model Forms - Django File Upload Tutorial - Part 2

preview_player
Показать описание
In this tutorial we are going to implement Model Forms to handle file upload using ImageField and FileField. As an example to illustrate this use case, we are going to create a Django model named "Book" with title, author, pdf, and cover image. Then, we are going to implement a data table to list the uploaded books and a Django form to upload new books.

-------------------------------------------------------------------------------

(0:22) ImageField and FileField definition
(1:30) Starting a CRUD example creating a Book model
(3:30) Migrating the Book model
(3:48) Adding the function based views to handle the upload and file listing
(6:24) [Actual example starts here] Creating the upload book form
(8:58) Handling the uploaded file inside a view function
(10:50) Listing the uploaded files
(12:36) Adding a download button to save the file
(14:12) Installing django-crispy-forms and using Bootstrap 4 styles on the forms
(15:21) Adding a ImageField to the Book model
(18:12) Displaying the uploaded image inside the table listing the books

-------------------------------------------------------------------------------

-------------------------------------------------------------------------------

🧔🏻 Follow me on:

#django #python
Рекомендации по теме
Комментарии
Автор

God is have been searching for your tutorials here since last year...thank Jesus there are finally out..

edwardmike
Автор

Greatest Tutorial of django seen just learning django and found this now and I think I need to watch every video of this guy now

aryankhandelwal
Автор

These tutorials are very precious; I've watched many of django's tutorials. What set these tutorials apart from others' ones is that you explained how they works. Goodjob! If I notice anyone is learning django I will recommend your tutorials.

siwasoontreerat
Автор

Thank you! the coding is smooth as long as you memorize the interconnections between the codes.

richardalcantara
Автор

I'm amazed at how clean and informative your video tutorials are, please continue to do awesome works!

josephjohngalo
Автор

simple truly is better than complex but your simple is totally amazing. Such a problem solver.

immaculatekimani
Автор

Vitor is such an amazing person and a programmer. Loved all your videos. Thank you so much for taking the time to make these best quality videos.

mujeebishaque
Автор

This is the best tutorial of Django FileField and ImageField ... Thank you so much for explaining all of the concepts in detail :)

kushalghimire
Автор

Vitor, your tutorials are awesome ans have the right level of detail. I wish you could make more of them to cover the other parts of Django.

FluxFloyd
Автор

calm, smooth, swift awesome content problem solved saved my day!

naumanmansuri
Автор

Very simple, very understandable! Thanks a lot!

ulvidamirli
Автор

simple is better that complex : i have subscribed

ahmedelmawrdy
Автор

I was struggling for file uploading in Django. Luckily, watched your video. You make it so simple and understandable. Maybe because you already know #simpleisbetterthancomplex ;) Loving your work! Thank you so much for sharing!!

melodymusic
Автор

I love what you've done here and the use of Django docs as the reference, thanks a lot just a tip please mute the internal mic.

Mrabdulazizbidani
Автор

thank you bro.. i learned to show pdf from media directory ..

milanbhandari
Автор

Thank you Victor. This is very good tutorial!

광저우존버맨
Автор

Hey, I just love the way you explained us all the things. That's great.. is it possible to provide some tutorials about api integrations.. That would be very helpful.. Thanks again..

rakeshkumarbhol
Автор

You are an amazing teacher.Thanks mate
Cheers !!!

kiranraj-dwgq
Автор

Hi vitor
Thank you for your tutorial a lot.
One thing I want to know. Can you please tell me how to convert my pycharm terminal like yours?
I see its looks and auto completion is so cool. I tried a lot but could not find out a way.
Thanks in advanced.

jahangiralam
Автор

You job is magnific! continue with plus tutorial. Congratulations Vitor!

emanuelgabriel