Adding Images & Changing Models In Django | Python Django Tutorials In Hindi #27
ฝัง
- เผยแพร่เมื่อ 12 ก.ย. 2024
- ►Source Code + Resources - www.codewithhar...
►Full Django Course Playlist - • Python Django Tutorial...
►Click here to subscribe - / @codewithharry
Best Hindi Videos For Learning Programming:
►Learn Python In One Video - • Learn Python In Hindi ...
►Learn JavaScript in One Video - • JavaScript Tutorial
►Learn PHP In One Video - • Learn Php In One Video...
►Machine Learning Using Python - • Machine Learning Tutor...
►Creating & Hosting A Website (Tech Blog) Using Python - • [Hindi] Web Developmen...
►Advanced Python Tutorials - • Intermediate/Advanced ...
►Object Oriented Programming In Python - • Object Oriented Progra...
►Python Data Science and Big Data Tutorials - • Python Data Science an...
Follow Me On Social Media
►Website (created using Flask) - www.codewithha...
►Facebook - / codewithharry
►Instagram - / codewithharry
►Personal Facebook A/c - / geekyharis
Twitter - / haris_is_here
I watched your Python 15 hours course and now I am watching Django series
I noticed from starting to now your behavior not changed at all.Such a Down To Earth Man You Are!!
Very Very Congrats For 7 LAKH SUBSCRIBER
Love You Bro!!
after you said this, I also observed the same!! Now he is at 1.64 M and still with same energy and humble attitude ~(˘▾˘~)
lmao it's 1.94m
@@Jose-qk3di now 2.36m 😎
@@saranghae3720 it's 3.18M now
@@Vishalkumar85124 damn its 3.64 M now
those who havant installed pillow just install it & your makemigration command will work fine
How
It says Requirement already satisfied but still doesnt works
@@beastnighttv try PIL
Thanks y
I'll recommend your channel to every coding enthusiast i know who want to learn coding ...
You worth it harry bhai!!!!
Harry bhai acche video bana rhe ho aaap . Me aapka video dekhke Django sikha huuun .Thank you.
For anyone getting,
*ValueError: invalid literal for int() with base 10:* or even this *ValueError: Field 'price' expected a number but got ' '.*
You just need to open the first file which has been linked in the error, it will be named like *__init__.py* in the end, open that file there you will find a statement *return int(value)* just make it *return value* also it will prompt you just click *you want to edit the file anyways*. Save the changes, and now run migrate command again and hopefully you will not get any error.
Ooooo thank you bhai🤝 this method working🤗🤗
Excellent Work love from Pakistan. Your teaching skills are extraordinary. ❤
Hey Bro i like👍 your videos, I'm facing problem, how to upload multiple images in django admin panel..
Ye to bahut aasan tha bhai aur maza aa rha h
Explained it like it was too easy
Harry sir waiting for Social Networking app
thanku so much harish bai..
Harry bhai kya series banaiye yaar. Maza aa gaya.
In which video you discussed "ManyToMany" relationship?
very very nice explained bro.......#You_Rocks
sir you are the one of the best teacher..
Harry bhai! your explanation is awesome!
Thanks a lot!! this is the best channel
You are best Harry Bhai.... thanks
hey harry bro!
your videos helped me a lot
thanks for that
huge respect 🤙
but i am facing a problem right now.
i’ve created user class in django model
which has fields like username, userlastname and image of user,
i am capturing userimage through webcam and i want to rename it to userfullname before i submit any forms
please help me bro!
#good morning
The greatest python course in Hindi on #TH-cam #No:-1 love you #brother.
you are doing great job my dear brother
Sir server ko stop karne ka shortcut batao please..??
ctrl+function+b
ctrl + c
Thank you👍
you teaching style is awesome bro ,i share
I'm loving it :)
harry bhai
error:
shop.product.image: cannot use imagefield becausa pillow is not installed
Error fix ho gya ho to bta dena kaise fix hua hai, same error mera v hai
@@amiteshsingh94 cmd me jakar pillow install krlo bus......
Thanks a lot bhaiya
you have very good memory..number of technology so deeply :)
If we don't apply make migrations and directly apply migrate
Will it be correct or not?
Getting error for image....Pillow is not installed
python -m pip install Pillow
run it
Bro i have an issue. When I click on products in admin panel then it just shown an operational error regarding an coloumn something. And when i click on add products then it simply opens the page where we need to insert various details of product. But when i click save and add another. Then it just shows error regarding the class i defined in models. Models.product_id error
Hey Mehra, Try the command
python manage.py migrate --run-syncdb
Syncdb will create table for apps without migrations and Just incase it fails, create a folder named migrate inside the apps directory and add an empty file __init__.py inside it then try the command again
GREAT>>>>>>>>>>>>>>>>>>>>>>>>
Harry bhai....
keep it up..
love you brother
some of you might be getting error after putting the imagefield in the model
just go to your terminal and pip install Pillow
copied same code still getting this error
Field 'price' expected a number but got ''
Thanks haris bhai. Mujhe bhi Dil chahiye.
bhai social nwteorking ka bhi video lagaooo
Nive tutorial, thanks Harry
Sir, please make a video on social network
Please sir
thanks
Getting error 'value error invalid int() with base 10'
Awesome bro..
Hello sir .
Why we should learn python programming?
Is python programming need for making games?
For datascience/ML/AI/web development yes also for games and many more
Bro.... Thanks a lot......
koi SOLUTION bta do
PROBLEM:
bhai maine is code mai phle baar -------- price = models.IntegerField(default = "") --------- likh kr makemigrations aur migrate kia tb error aya --------- ValueError: Field 'price' expected a number but got ''.
uske baad maine --------price = models.IntegerField(default = 0) --------likh kr fir se makemigrations aur migrate kia tab bhi mujha same error show kr raha hai
aur jab maine price wali field hi hta di tab bhi same error show kr raha hai........
plzz solution btao Harry bhai..
CODE
from django.db import models
# Create your models here.
class Product(models.Model):
product_id = models.AutoField
product_name = models.CharField(max_length = 120)
product_description = models.TextField()
publication_date = models.DateField()
catagory = models.CharField(max_length = 120, default = "")
subcatagory = models.CharField(max_length = 120, default = "")
price = models.IntegerField(default = 0)
product_image = models.ImageField(upload_to = "shop/images", default = "")
def __str__(self):
return self.product_name
same problem bro
bro i face it as i mentioned earlier bt now I solve it go to migration file where it is written price default=' ' change to default=0 then run it again do migrate again it will run
@@webseriesworld1791 Actually , This method worked, Thank You!.
@@webseriesworld1791thank you brother i was search for this solution for sometime ❤
Listen!!! i am trying to add image path( is in my downloads ) in code but i got error... can u explain me how i can write path. Thanks!
@@Aykan303 thanks! I'll try that
I installed pillow ...but when I run makemigrations it again give error ...(install pillow)....I dont know why please help me
Same problem..
Did you solve it? If yes, then please tell me, how I can solve it...
Please help
Please help
when this error is occur . terminal show command for install pillow. like "python -m install pillow"
Thank u so much ❤️
bhai one video on social network website
the card carousel is still in one line and not how its supposed to be even from your source code, Please help!
Shukriya
I get error
you makeing django much simpler
BRO IN THIS ONE PROBLEM IS THERE WE HAVE TO UPLOAD A PRODUCT WITH ATLEAST A FOUR IMAGES IN ONE , SO I TRIE D TO MAKE BUT WHILE MIGRATION ITS ALL GOING HIDED THE ALL IMAGES
outstanding vedio
sir how can i add multiple images to product model instead of only one image......
ValueError: invalid literal for int() with base 10: ''
This is one error u might get here.U won't get its soln in comments because its quite deep
so search it in utube for it's soln as one col. is not found :)
It's my 1st bug in this I have fixed by myself...:)
awesome...............
Why my str function is not returning any response/changes .I have written same as harry
Sir its very difficult to make changes in sqlite3 database as i am unable to get proper documentation for it .i have searched google for droping a table and its showing unnnecsary results plz help me out of this
Thanks to help 😊 . 🍰
altough, i installed pillow,there is an error no attribute ImageField plz give suggestions
bro try installing it with the help of command:- python -m pip install pillow
then it will install correctly and will also function properly.
@@manjeetsingh6028 yes this command is work
@@manjeetsingh6028 errorr C:\Users\Ankit\AppData\Local\Temp\pip-instal
l-ibbtfofk\pillow\
@@manjeetsingh6028Thank you!
on running python manage.py migrate , i get error-
ValueError: invalid literal for int() with base 10: ''
I'm also getting the same error. Please tell me how you solved it.
@@CodeSadhu bro type python3 manage.py runserver
Same prob bro... Tell me how u fix it
apke django series pura learn kar raha hu,,,nd main full extra ordenry biggner hu harry vay,,,,andt now this time is vedio pe terminal pillow install karne ke liye bol raha he,,,,kya karu plz sujjest me.
And vo self Mai kya ayega self . Product name ki jagah
Very good
Love you sir
Awesome
Please make a video to send email verification mail when a user enters the email id in the sign-up form.
Very nice boss
[invalid literal for int() with base 10: '' "] ye error aa rha h jab bhi migrate kr rha hu please help me to fix the error please.............................
Talk with Rishabh same here
@@rohitjain028 mene error follow kiya jisme mene site packege me jakr file edit ki jab error ata hai to line no. aata h or directory b ati h mene usi directry ko jakr follow kiya ...and now i fixed this error
@@developerrishabh9311 Same here, How do you fix this error ?
@@developerrishabh9311 how you fixed this error,please help us
@@developerrishabh9311 can u tell me how u fixed it , in detail ?
Hy Harry Bhai,
jo apna slider banyea h wo uska jo arrow hn wo sahi sa work nh kar raha navigation bar ko b disturb kar raha hn
Bhai ek baar firse pura code likhke try Karo..kuch na kuch error hoga.. indentation sahi se Dena code meii..meii aj hi Kiya hu..sahi work karra h.. starting meii problems aari thii..Parr I realized ki mere code meii hi error thee
@@jasroopsinghreel ok bro
Harry bhai 👋👋
Social networking website please sir
Share kar diya hai bhai
Function not implemented aa rha h error 38
Is there a way by which we can add videos to our website, if yes please teach us. If anyone knows how it's done then please teach me by commenting. Or suggest any framework by which I can do it(Add videos)
how to make image optional?
Nice video
Bhai image wala record admin mai se delete hone par image delete nahi ho rahi hai shop/images directory mai se
After installing pillow also it shows same error what to do
awsome
nice sir
Sir i can't login with same userid and password
I'm stuck please help sir
please ,please,please
make social networking website
Yaar Bhai invalid literals for int base 10 wali error aa rahi he kya karu?while migrating
same here bro
@@webseriesworld1791 I resolved it by creating new project
how to insert image in database using django bro plzzz tell me
Shows attribute error when. Try to install pilow
Bro django administration mein SHOP , product yesa kuch nahi dikhra
how to delete data from product table?
Done harry bhai
Sir bina object banaye vo self.product name call kse hua please tell
Nice
how to login in django admin????
OperationalError at /admin/shop/product/
no such column: shop_product.category
can you please resolve it
bhai i got the same problem ...can you please resolve it
bhai, how can i delete my previous table because in that table arise some operational error like 'no such column'. i have deleted my ooo1_initial.py and recreate class in models.py . but problem solve ni ho rhi h.. please kuch reply do
Hey bro, try with this command.
python manage.py migrate --run-syncdb
Syncdb will create table for apps without migrations and Just incase it fails, create a folder named migrate inside the apps directory and add an empty file __init__.py inside it then try the command again
When I tried to open the admin page it gave the error of "Incorrect padding".
Can someone please guide on this error ?
harry bhai ap django administration pannel m products kha sy agy hay jb k mery pass show niii ho rha or m to ap ki videos k sath sath chal rha
i am late but trying alhumdillilah!
videos dobara dekho bhai!!
Print("This video is helpful")