No video

How to Upload an Image Using Django ImageField (The RIGHT Way)

  Рет қаралды 38,662

Caleb Curry

Caleb Curry

Күн бұрын

Пікірлер: 44
@codebreakthrough
@codebreakthrough 2 жыл бұрын
(FREE) Early access course notes - calcur.tech/backend-notes Timestamps: 00:00 - Introduction 08:03 - Add a file 09:17 - Display id in admin page 09:53 - Movie detail page 15:22 - Display movie in HTML 16:13 - Configuration garbage
@user-vu9dl3vn7l
@user-vu9dl3vn7l 2 ай бұрын
Thanks a lot for this guide!
@dragoondigital01
@dragoondigital01 Жыл бұрын
Oh man, that was so clear and simple. Imgs were always a bit confusing for me when it comes to Django. I'm definitely donating some $ once I'm not broke :D
@jaddadzakaria
@jaddadzakaria Жыл бұрын
same that was clear
@thaleshenriquesantosdasilv7027
@thaleshenriquesantosdasilv7027 2 ай бұрын
Direct! You jus got i New subscrever. Greatings from Brazil my man! The way i speak this is my country is "salve! meu amigo"
@isadora.university
@isadora.university 6 ай бұрын
You helped me a lot, than you so much!! 🇧🇷
@praisecodes
@praisecodes Жыл бұрын
Bruh!!!!!! This is exactly what i needed.. God Bless You.
@Marcin-mb9lg
@Marcin-mb9lg 2 жыл бұрын
The only place where I found answer how to make it :) Thanks a lot!
@alialahdal3734
@alialahdal3734 Жыл бұрын
Clear and good explanation , Thanks❤
@alexanderseydewitz8620
@alexanderseydewitz8620 Жыл бұрын
Eres el mejor, enserio me ayudaste con algo que me tenía horas ocupado, gracias
@somorgin7933
@somorgin7933 Жыл бұрын
Thank You veru much!!!! You realy help me to do this on my own
@chawaphiri1196
@chawaphiri1196 Жыл бұрын
Thank you So Much for this Video. You are a lifesaver.
@daniellaerachannel
@daniellaerachannel 2 жыл бұрын
first and supporter!
@mohammedbakkari3090
@mohammedbakkari3090 9 ай бұрын
hi, I have a question please I want to share an image from my laptop to tablet (without touching in the tablet). if I changed the image on my laptop it must change in the tbalet. thanks in advance
@Duncangkcl
@Duncangkcl 2 жыл бұрын
Thanks heaps for this Caleb
@ashokkmr8758
@ashokkmr8758 9 ай бұрын
how to set default image to image field and show it in urls ? , like showing media files in urls
@benlee2207
@benlee2207 10 ай бұрын
Thank you.
@anon1.9.8.7.6
@anon1.9.8.7.6 Жыл бұрын
When I select choose file in the django admin to upload the image nothing happens 😟😟😟 I’ve been stuck here for hours, can’t find the error
@rgsma5316
@rgsma5316 Жыл бұрын
Hi, How is it to make ImageField() as optional where user is given the option to Upload or NOT to upload the image. I have been having problem to do just that on Django DRF APIView.
@lucas_koblitz
@lucas_koblitz Жыл бұрын
You can set null=True
@user-fr3nt5uc7i
@user-fr3nt5uc7i Жыл бұрын
Спасибо, ты меня спас!!!
@ThisIsBander
@ThisIsBander 11 ай бұрын
Hey Caleb thank you so much for the video! I am having a small problem on my end. When I determine the path of the files in the upload_to arg it doesn't save into the stores files unless i specifically say stores/images but when I do that the GET looks in stores/stores/images I could just move the file over after it uploads to the file outside of the stores files but Im just curious what I am doing wrong.
@hrishikeshsonawane1113
@hrishikeshsonawane1113 Жыл бұрын
error: type object Movie has no attribute object AttributeError Please help
@xtiandyc7034
@xtiandyc7034 2 жыл бұрын
I do have custom user model with profile-image field. In my form_valid method I have this user.save(commit=False) to save other extra fields. The problem I'm having is I can't save the image under a directory with the profile_image/user.pk as the folder name for the instance is not yet saved and the folder made is profile_image/None instead of the user.pk. Can you give me a workaround on this other than using UUID? I was thinking of using signals but I can't pull it off.
@poornachanduchalla5651
@poornachanduchalla5651 2 жыл бұрын
Bro can u also do video of capturing a image(through laptop camera) and storing it Django please
@arun.sekher
@arun.sekher Жыл бұрын
Thank you for the video. May I know what VSCode extension are you using that prompt you with the Django imports tool tips?
@ruslanways
@ruslanways 2 жыл бұрын
Great tutorial! Thank you! p.s. could you show the same uploading image functionality, but to get an image from outer URL (from internet)? or maybe just give me an idea..
@alimaher8386
@alimaher8386 2 жыл бұрын
Great T-Shirt :)
@nostranostra1176
@nostranostra1176 2 жыл бұрын
From freecodecamp (database design course)
@alilinares3088
@alilinares3088 Жыл бұрын
16:18 sent me 💀
@Dareen641
@Dareen641 8 ай бұрын
16:44
@AmirIskandar
@AmirIskandar Жыл бұрын
IMPORTANT!! DO NOT USE THIS IN PRODUCTION. THIS IS UNSAFE. People can view your whole code. Great for debugging. But NOT for production. This is NOT the "correct" way.
@LowVi
@LowVi Жыл бұрын
how can ppl view my code this way?
@adfgejshcylwnoaoxgoakwoxio9703
@adfgejshcylwnoaoxgoakwoxio9703 2 жыл бұрын
thanks 😘
@luissantiagolopez3863
@luissantiagolopez3863 7 ай бұрын
How old are you dude? You look 40 and 18 at the same time
@mrm4691
@mrm4691 2 жыл бұрын
Hi Caleb, Can you do a video on future of django, I've heard that web 3.0 is taking over web 2.0. I mean block chain technology. Is that really true ? Will django become unneeded?
@gwidera
@gwidera 2 жыл бұрын
Good video, unfortunately, I'm not able to get the image to show up. I keep seeing "GET /movies/djangouploads/files/covers/dune.jpg HTTP/1.1" 404 2678 If I leave off /movies, I'm able to view the file. Any thoughts on what is going on?
@barryryan5187
@barryryan5187 Жыл бұрын
inside of movie.html change to
@SCBealer
@SCBealer Жыл бұрын
Thank you, my image was not showing but I had the model set as featured_image so {{ post.featured_image.url}} got it for me
@RoshanYadav-kf5jj
@RoshanYadav-kf5jj Жыл бұрын
Thanks bro
@TattedFaceJoey
@TattedFaceJoey 2 жыл бұрын
MEDIA_ROOT = "" MEDIA_URL = os.path.join(MEDIA_ROOT, "/") That worked for me.
@cevirpedaldagorkma9012
@cevirpedaldagorkma9012 Жыл бұрын
Thanks a lot my friend !
@julianadelosrios9876
@julianadelosrios9876 10 ай бұрын
yes? it gives me this error Lockdown failed: TypeError: At intrinsics.Object.groupBy expected boolean not function at isAllowedPropertyValue (lockdown-install.js:1:53384) at isAllowedProperty (lockdown-install.js:1:53807) at visitProperties (lockdown-install.js:1:55095) at isAllowedPropertyValue (lockdown-install.js:1:53041) at isAllowedProperty (lockdown-install.js:1:53807) at visitProperties (lockdown-install.js:1:55095) at lockdown-install.js:1:55523 at repairIntrinsics (lockdown-install.js:1:144597) at lockdown-install.js:1:145462 at lockdown-run.js:4:3 (anónimo) @ lockdown-run.js:17 lockdown-more.js:99 Protecting intrinsics failed: ReferenceError: harden is not defined at lockdown-more.js:69:13 at Set.forEach () at protectIntrinsics (lockdown-more.js:44:22) at lockdown-more.js:97:5
Django Forms - Save Form Data to Database with Model Forms
10:58
Caleb Curry
Рет қаралды 34 М.
Python Django Images - How to Upload & Display Images
12:55
Dave Gray
Рет қаралды 10 М.
❌Разве такое возможно? #story
01:00
Кэри Найс
Рет қаралды 3,4 МЛН
Little brothers couldn't stay calm when they noticed a bin lorry #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 20 МЛН
Upload Images To Django - Django Wednesdays #38
14:46
Codemy.com
Рет қаралды 77 М.
The Biggest Issues I've Faced Web Scraping (and how to fix them)
15:03
How To Upload Images With Django - Django Blog #26
17:59
Codemy.com
Рет қаралды 78 М.
Django REST Framework - Build an API from Scratch
40:39
Caleb Curry
Рет қаралды 214 М.
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Рет қаралды 944 М.
Rust References and Ownership Complete Introduction
28:45
Caleb Curry
Рет қаралды 3,8 М.
Django Update Image Deletion with Signals
21:07
Very Academy
Рет қаралды 1,5 М.
❌Разве такое возможно? #story
01:00
Кэри Найс
Рет қаралды 3,4 МЛН