Django Tutorial - SQLite3 DataBase Tutorial

  Рет қаралды 183,814

Tech With Tim

Tech With Tim

Күн бұрын

Пікірлер: 156
@meowareasaservice
@meowareasaservice Жыл бұрын
str(item.text) because your text in the models is char type and not string, so it has to be converted to string to be able to load properly on the browser. I know it's too late now, but I hope this helps people who learn by watching this video. I really love all your videos, you are very good at explaining. I came from old fashioned PHP frameworks and want to learn django. I'm glad I make a good decision, python is great and versatile. Back end front end, it can do anything.
@dexterasis1004
@dexterasis1004 3 жыл бұрын
I will watch every ad Tim just to give something in return. Thank you for all of your tutorials!
@quidpanic7095
@quidpanic7095 5 жыл бұрын
You sir are a codin jedi master, thanks for showing this most clear tutorials i've seen in ages. Most programming tutorials are in hindi
@johnshome8443
@johnshome8443 5 жыл бұрын
As someone below mentioned, I also got an error when trying to run 'python manage.py makemigrations main' I simply had to change max_Length to max_length (lower case 'l') this worked. Thank you for the comment below.
@TeaSmuggler
@TeaSmuggler 4 жыл бұрын
For anyone else noticing this: The lower-case "L" in sublime text looks like upper-case when in keyword format. Tim did type "length" in lower case, but it just looks like upper case. The font was probably made in order for the user to be able to distinguish variable names from normal text, not for tutorial purposes.
@simchalederman8728
@simchalederman8728 4 жыл бұрын
Thank you JoJo!! i had that same issue and you saved me!
@data.practitioner
@data.practitioner 2 жыл бұрын
Thanks 🙏
@amanm5087
@amanm5087 Жыл бұрын
Thanks man saved me from frustration
@dav1d_andrew
@dav1d_andrew 4 жыл бұрын
Hi Time. I would like to thank you for this awesome tutorial. I "know" how to "make things work" in Django, but your tutorial is explaining the WHY. Thanks bro.
@jimrakel418
@jimrakel418 5 жыл бұрын
Redid the last 2 video and got almost everything working for me. Hopefully it will come together with the next video.
@robertplourde6380
@robertplourde6380 2 жыл бұрын
This is by far the best tutorial I have found yet!
@hello_world_zz
@hello_world_zz 5 ай бұрын
Just best video instruction. Thanks a lot. And... you changed after 5 years 😊
@joel4987
@joel4987 4 жыл бұрын
I thought I was ready for this o.O Back to basics...
@manimaran5202
@manimaran5202 3 жыл бұрын
Edited : Worked thanks ur a life saver
@paia6447
@paia6447 Жыл бұрын
1:16 the configuration path is important when dealing with templates and custom html
@MrABblackriver
@MrABblackriver 4 жыл бұрын
you are really the best to explain things
@anonymousghost5384
@anonymousghost5384 3 жыл бұрын
I tried that with mysql no problem at all❤❤❤❤❤❤
@SafikMaster
@SafikMaster 5 жыл бұрын
I have watched the whole thing, I made everything work, but I still have absolutely no idea what I just did and what all those things mean.
@zlls
@zlls 4 жыл бұрын
yeah it's complicated, to understand, you should know that the 'items' he got are saved in the sql database. So basically when you type a name in the url bar, that name will be passed to the index func and it will response by 'printing' the item text. Sorry if i am not much clear, I'm not an expert and I dont' know if I'm getting wrong with something.
@v_vijay_krishnan
@v_vijay_krishnan 4 жыл бұрын
Yeah, this video doesn't explain everything. This video is only for suckers
@hooverzavala8071
@hooverzavala8071 4 жыл бұрын
make five to ten diferent basic projects and then you get it, just dont quit
@hooverzavala8071
@hooverzavala8071 4 жыл бұрын
​@@zlls Yeah but the name is not directly passed to the index; when you type a parameter (127.0.0.1:8000/) in the url bar and press enter, first django search that parameter inside /main/urls.py (), if is founded search the function asociated ( views.index ), which is stored inside main/views.py ( def index(): ) and last run that function
@Flamiooo
@Flamiooo 4 жыл бұрын
@@v_vijay_krishnan it is a great video, you are not great student
@pilleow
@pilleow 3 жыл бұрын
12:02 the way he said "memory address" just killed me XD
@jorgeastiazaran
@jorgeastiazaran 3 жыл бұрын
Best tutorial for begginers!
@saharamanson1970
@saharamanson1970 4 жыл бұрын
Nice bro keep it up........
@JeromeNoypi
@JeromeNoypi Ай бұрын
Thanks a lot this is Great!
@fosterxu
@fosterxu Жыл бұрын
讲的非常好,点赞!👍
@abdurrazzak1612
@abdurrazzak1612 Жыл бұрын
U re always awesome man
@Voronza
@Voronza 3 жыл бұрын
Большое спасибо, очень помогло!
@lorenamendes7427
@lorenamendes7427 4 жыл бұрын
Thank you for these amazing videos! You explain things very well :)
@vandanavasudevan143
@vandanavasudevan143 6 ай бұрын
Thank you!
@Sure_Math_Center
@Sure_Math_Center Жыл бұрын
Great video
@mpedzi031
@mpedzi031 4 жыл бұрын
Great stuff Tim, thanks.
@FeedFall8
@FeedFall8 5 жыл бұрын
I love this video series
@redtomato258
@redtomato258 Жыл бұрын
Thank you so much
@hiraawan3430
@hiraawan3430 3 жыл бұрын
wow like i'm really getting things
@zlls
@zlls 4 жыл бұрын
Hey, in html you don't need to put , with one it already works ()
@flopism493
@flopism493 Ай бұрын
nice bruh.............after 4 years
@bricegnanago409
@bricegnanago409 4 жыл бұрын
Thank you so much ! Can you show me how to create a database view in sqlite and use it in django ?
@tonystarksu8619
@tonystarksu8619 4 жыл бұрын
Tim said that he is going to use SQLite3, but I have no idea where he used it. I don't even see him typing anything about the word 'SQLite'. Can anyone explain it for me?
@jhumaroy2418
@jhumaroy2418 5 жыл бұрын
Please make a video for quiztest in django with SQLite
@danydilo
@danydilo 3 жыл бұрын
I think you should give more context to your explanations. Would be good if you could briefly zoom out onto the Django architecture and file system and then zoom in into details.
@akshathraghav4978
@akshathraghav4978 3 жыл бұрын
Hey, i am facing an issue. In my item_set.get(id = 1/2/3), an error always pops up telling me that there is no matching item. But when I search for it using the name = '', it works as it should. If anyone else is facing this issue and knows why this is happening, please let me know. Thanks
@kei5985
@kei5985 3 жыл бұрын
Me trying to make a really nice website while wix is out here literally doing the same thing but better
@uromisaac7858
@uromisaac7858 4 жыл бұрын
please my ToDoList is indicating an error, "ToDoList has no objects". ls = ToDoList.objects.get(id=id)
@320adikos
@320adikos 4 жыл бұрын
Solution for using Visual Studio Code: 1. Ctrl + "," (comma) 2. Extensions --> Python --> Linting --> Enable Linting (chosen) 3. Linting Pylint Path: python_django 4. Save & Enjoy Before this you must install package: python3 install pylint-django (or python install pylint-django)
@prathampandey9898
@prathampandey9898 3 жыл бұрын
I am getting error "table main_todolist has no column named name" @ t. save( ) 10.36
@sainco3036
@sainco3036 5 жыл бұрын
thanks.
@mmanuel6874
@mmanuel6874 5 жыл бұрын
my item_set.all() doesnt work
@muzik6808
@muzik6808 4 жыл бұрын
same here
@suyashvashishtha4904
@suyashvashishtha4904 4 жыл бұрын
Did you got it right
@Harsh-fd4ml
@Harsh-fd4ml 3 жыл бұрын
Go to the mall 😂 Robin is that you
@hadimasri420
@hadimasri420 5 жыл бұрын
10 mins late ..🤩😍
@shyren_more
@shyren_more 4 жыл бұрын
@Tech with Tim at 13:31, I tried listening to it multiple times the reason that you said why t.item_set.all() doesn't throw error but it just doesn't make any sense, could you please explain in simpler words here in comments PS: Great video!
@lavanya_m01
@lavanya_m01 3 жыл бұрын
Btw he wasn't talking about why it didn't throw any error. He was just explaining that each ToDoList has a set of Items.
@waqaspathan3337
@waqaspathan3337 3 жыл бұрын
The item_set function returns a list of all the items belonging to a particular “parent” object. In this case the parent object is the todo list and one of its items happens to be an object called Item. I think the wording in this specific scenario is a bit tricky since both the function name and the object name both share the name “item”, but they are not related.
@error0803
@error0803 2 жыл бұрын
Guys, item_set is NOT a keyword. Just part of it is. Tim has two models named ToDoList and Item. That Item model's name gets lowercased and added to _set. So it will become item_set. If the model's name were Car, then the set would be named car_set. Set is created when you indicate that the model is in relationship with another model.
@abdullahalnoman2577
@abdullahalnoman2577 2 жыл бұрын
Hi Tim, how do I connect an exsiting database to my current django project?
@marospapan8565
@marospapan8565 5 жыл бұрын
When I type to command line "python manage.py makemigrations main" I get this error: __init__() got an unexpected keyword argument 'max_lenght'. I checked everything maybe three four times but I still don't know how to fix it.
@manish93channel
@manish93channel 5 жыл бұрын
it should be max_length() I think
@Pandaman456
@Pandaman456 5 жыл бұрын
the L in the max length should be lowercased
@edwardnovais7
@edwardnovais7 5 жыл бұрын
I'm with the same error, I didn't find nothing wrong. Could someone help me?
@edwardnovais7
@edwardnovais7 5 жыл бұрын
Hi friend, I solved it, you wrote the word 'length wrong. Check it out.
@delivaapp7068
@delivaapp7068 2 жыл бұрын
Hie, Tim , is there a way to generate an ERD from an already existing django sqlite3 database?
@monicacolling2399
@monicacolling2399 2 жыл бұрын
I've followed along with every step and went back to verify everything is typed correctly. I'm at 17:54, and I'm getting an error screen when I put in /(insert any number) ---- as in literally placing any number there. TypeError at /1 index() got an unexpected keyword argument 'id'
@thomaspynchon8400
@thomaspynchon8400 4 жыл бұрын
I can't save the object for some reason. 😣
@yeetpizza7452
@yeetpizza7452 3 жыл бұрын
just a quick thing why do you have to use a virtual environment it is really puzzling me because i cant figure out why?
@pizzaman6999
@pizzaman6999 4 жыл бұрын
Sir, how you created that model page back in the beginning
@Astrous
@Astrous 4 жыл бұрын
It should come auto when u are making the app
@bpera1
@bpera1 Жыл бұрын
I want to create items. Some are integers and some are names. How do I do that in shell
@mr.mikaeel6264
@mr.mikaeel6264 4 жыл бұрын
Isn't it much easier and less time consuming to just create an app to use inside the pre-built Django admin area and add queries to the db from there? Ive used both methods and i make alot of typos so honestly adding queries in the shell can be frustrating. Plus with an app you dont need to write the lines of code everytime in the shell as everything is easily modifiable from the admin GUI. Anyway, just a noobs idea here. Probably smth i'm overlooking.
@vishaljadeja2089
@vishaljadeja2089 2 жыл бұрын
When i do " ToDoList.object.all()" The output is Instead of object name, did i do something wrong ? Thank you in advance
@kundamwenje2224
@kundamwenje2224 2 жыл бұрын
am also having the same challenge did you figure it out?
@vishaljadeja2089
@vishaljadeja2089 2 жыл бұрын
@@kundamwenje2224 no brother i try id and other stuff but it won't work.
@ednaakisa1777
@ednaakisa1777 Жыл бұрын
*objects.all*if am not wrong
@pedrofontoura8119
@pedrofontoura8119 4 жыл бұрын
hayo, i have a problem with the python "manage.py migrate" it says that havent any migrations to aply, and i havent done this before what i do?
@shyren_more
@shyren_more 4 жыл бұрын
have you executed python manage.py makemigrations before ?
@pedrofontoura8119
@pedrofontoura8119 4 жыл бұрын
@@shyren_more never
@shyren_more
@shyren_more 4 жыл бұрын
@@pedrofontoura8119 yeah then first execute python manage.py makemigrations This kinds of stage your changes and to apply those changes(Models created or anything else) execute python manage.py migrate Hope this helps
@ambientsoda106
@ambientsoda106 6 ай бұрын
how do you delete your project/ virtual environment when you no longer want the project?
@eng.hasanyousif1161
@eng.hasanyousif1161 5 жыл бұрын
dear tim when i type t.save() its give me an error do think because iam using python 3.7
@jacobccooper
@jacobccooper 5 жыл бұрын
do you figure it out im having this too
@phhoangquan3187
@phhoangquan3187 4 жыл бұрын
i have table Z_todolist has no column named name Error:(((( could you solve it
@aldaineclarke755
@aldaineclarke755 4 жыл бұрын
I have python 3.7..and it works fine..just follow the error..it usually gives an explanation
@ayoubZaZen
@ayoubZaZen 4 жыл бұрын
bro i have the same error did you fond the slotion
@vustudent5569
@vustudent5569 Жыл бұрын
can you help me please in connecting mysql in django?
@katerynamisik7601
@katerynamisik7601 3 жыл бұрын
It is an error when I try to add some lists, 10 min in the video... Thank u in advance
@divyanshu8874
@divyanshu8874 4 жыл бұрын
Bro one humble request actually I am from India we are not that proficient in English.pls speak slowly so that we can understand.
@eduardsandersons8793
@eduardsandersons8793 4 жыл бұрын
just choose a slower playback speed
@suyashvashishtha4904
@suyashvashishtha4904 4 жыл бұрын
Bro don't say "We" . Just say i am not able. And in start i was also not able to.... But reduce the play back speed
@annadonts
@annadonts Жыл бұрын
hi! i'm getting an attribute error during t.item_set.all(), can someone tell me why it doesn't work for me when i have done the exact same thing as Tim did? :(
@midnightdishwasher1071
@midnightdishwasher1071 2 жыл бұрын
mine says object has no attribute the item_set
@kavithareddy4774
@kavithareddy4774 5 жыл бұрын
I'm getting error as : module django. db.models has no attribute foreignkey
@vihashah5975
@vihashah5975 4 жыл бұрын
check capitalization its ForeignKey
@Walikanani
@Walikanani 3 жыл бұрын
why use "L" in modeLs.ModeL and on_deLete? it just seemed to cause me errors
@fazlensaleha8929
@fazlensaleha8929 5 жыл бұрын
At 3.30am. 😎
@PhucThinh1505
@PhucThinh1505 3 жыл бұрын
I just got and solved an issue with the 'max_Length', it should be in the lower key right? so I wonder how did you not face an error when you make migrations for the main app?
@ziaadkn6387
@ziaadkn6387 Жыл бұрын
Over a year late but, it was in lowercase but lowercase and uppercase are similiar due to Sublime Text font as it was not intended for tutorials
@weixiangzhao561
@weixiangzhao561 2 жыл бұрын
Hi Tim, when I do t.item_set.all() it shows: OperationalError: no such column: main_item.complete Could you tell me what is wrong?
@rajkuwarnishad3809
@rajkuwarnishad3809 Жыл бұрын
same issue here btw did u find any solution?
@pjmclenon
@pjmclenon 4 жыл бұрын
hello, dont we have to do 1. python3 manage.py makemigrations webapp 2. python3 manage.py sqlmigrate webapp 3. python3 manage.py migrate webapp ??? thxz alot Lisa
@katerynamisik7601
@katerynamisik7601 3 жыл бұрын
this tutorial doesn't work very well.. the home page is crashed after changes in views & urls ... :'(
@OpGamerz-qz4yz
@OpGamerz-qz4yz 3 жыл бұрын
the Item Function is not working
@davideettori3226
@davideettori3226 5 жыл бұрын
When a type migrate it tells me that i don't have a virtual environment Do you know why ?? And when i type activate dj it tells me 'could not find conda environment: dj'
@TechWithTim
@TechWithTim 5 жыл бұрын
Don’t worry about the virtual environment I just use one for my installation you don’t need it
@davideettori3226
@davideettori3226 5 жыл бұрын
@@TechWithTim ok but it keep saying that i can't migrate anythingh without a virtual environment
@TechWithTim
@TechWithTim 5 жыл бұрын
okay then create a virtual environment, activate it and try: $ conda create -n dj python=3.6 $ activate dj $ python manage.py migrate (don't include $)
@davideettori3226
@davideettori3226 5 жыл бұрын
Thank you very much but i have one last question. :) Now it say that he can't import django but i have already typed 'pip install django' Sorry if i am annoying you
@chawong5860
@chawong5860 5 жыл бұрын
@@davideettori3226 try conda install django
@abdulwadudkhan684
@abdulwadudkhan684 9 ай бұрын
Hey you just make a mistake or some thing else because in this what you thought it's not plzz make what you put on the mysite urls section plzz it lots of confusion 😊
@marekkarasz3776
@marekkarasz3776 4 жыл бұрын
yeah well, I have an error on my screen says that ToDoList has no attribute. I follow along with this video and this is 3rd time something not working even though I did everything you said. Just like in previous videos. I should probably watch somebody else
@mr.mikaeel6264
@mr.mikaeel6264 4 жыл бұрын
Watch from 19:00 make sure this is correct the views.py and also check if the urls.py is correct. Might just be a ; or ) that's missing.
@aman65b
@aman65b 3 жыл бұрын
Everything works except items = ls.item_set.get(id=1) --> error "Item matching query does not exist" however, if I do, items = ls.item_set.get(text="this text") it works. Don't know why.
@arjunreddy6867
@arjunreddy6867 3 жыл бұрын
Had the same issue.Have u found out what the problem was??
@sajanmahat4764
@sajanmahat4764 4 жыл бұрын
where is the next video please
@jimrakel418
@jimrakel418 5 жыл бұрын
Finished creating the models file, typed python manage.py makemigrations main and I get a reply back, 'no installed app with label 'main'. when I do python manage.py migrate, it says Apply all migrations: admin, auth, contenttypes, sessions. I even spent considerable time double checking my spelling and it is correct. Any ideas on how I can fix it?
@patyearick6821
@patyearick6821 5 жыл бұрын
Got me also. Tim should refer to his django setup tutorial: techwithtim.net/tutorials/django/setup That is where he does the Python "manage.py startapp main" and that creates the main.
@SafikMaster
@SafikMaster 5 жыл бұрын
For people reading in the future, I had that problem because I didn't save the settings.py file. After adding 'main.apps.MainConfig', to the settings file it somehow updates for Tim without saving. For me each change that I make I have to save it and then run the cmd command again and it works.
@faran_9
@faran_9 4 жыл бұрын
Problem : ToDoList.objects.get(.....) gives error: Class 'ToDoList' has no 'objects' member Can anyone help?
@5ithofnov159
@5ithofnov159 4 жыл бұрын
did you migrate the models? first make migrations and then migrate did you import from main.models? are your paths correct?
@tharikhajar
@tharikhajar 4 жыл бұрын
@@5ithofnov159 Having the same issue here. Trying to makemigrations again tells me that there are no changes detected, and "No migrations to apply" when I try to migrate.
@zutoebola4922
@zutoebola4922 4 жыл бұрын
Do you even know how to make a multiple item query?
@classicguy7813
@classicguy7813 5 жыл бұрын
django.db.utils.OperationalError: no such table: blog_mrsorrow :( My table not appears after many attemps
@harisrama1
@harisrama1 5 жыл бұрын
have u solved this yet bc i get the same thing
@classicguy7813
@classicguy7813 5 жыл бұрын
There is no use if you has given "fake migrations" command. Just delete all django start the app again
@classicguy7813
@classicguy7813 5 жыл бұрын
@@harisrama1 Yes Sir! You need to delete all migrations in all files all apps. Then you need to: PROJECT içinde APP yani MODULE oluşturma cd C:\Users\MSI\Documents\webpy python manage.py startapp blog y python manage.py migrate PROJECT içinde APP yani MODULE oluşturma cd C:\Users\MSI\Documents\webpy python manage.py startapp users y python manage.py migrate python manage.py makemigrations python manage.py migrate
@hrushikesh-1914
@hrushikesh-1914 4 жыл бұрын
@@classicguy7813 it worked to me..thanks 😊😊
@FAB199191
@FAB199191 3 жыл бұрын
I know it's a late answer, but you just can delete the DB, the contents of the migrations and all pychache folders and do makemigrations and migrate again. Then it should work
@tharunjannu
@tharunjannu 4 жыл бұрын
__init__.py error Import Module error
@shubhamkaudewar7297
@shubhamkaudewar7297 4 жыл бұрын
Make sure you added app in settings.py
@TheLOLFactory-u5z
@TheLOLFactory-u5z 2 жыл бұрын
Your videos and Corey's are too similar. The vibes and all is just the same. You guys teach too well.
@reer-r5b
@reer-r5b Жыл бұрын
can you speak chinese
@seanrosario5223
@seanrosario5223 4 жыл бұрын
this was a bad tutorial
@deki90to
@deki90to 4 жыл бұрын
you need to talk slower and commit to explaining stuff, dont just run, this mean nothing to us
@Linuxovert
@Linuxovert 4 жыл бұрын
KZbin developers heard your complaining and invented the Playback Speed feature to control the speed of the video, you can find it in the setting
@deki90to
@deki90to 4 жыл бұрын
@@Linuxovert So if I slow down the video, there is MORE to learn? Don't try to be smart, you are not
@TSUinformatca_UPTMA
@TSUinformatca_UPTMA 4 жыл бұрын
thanks.
@jadrianverkouteren3799
@jadrianverkouteren3799 3 ай бұрын
I do makemigrations and the cmd screen says "No installed app with label 'main'."
@greetingsgentlemen.8179
@greetingsgentlemen.8179 4 жыл бұрын
where is next video please?
Django Tutorial - Admin Dashboard
9:19
Tech With Tim
Рет қаралды 65 М.
Django Tutorial - Templates & Custom HTML
27:52
Tech With Tim
Рет қаралды 114 М.
Accompanying my daughter to practice dance is so annoying #funny #cute#comedy
00:17
Funny daughter's daily life
Рет қаралды 15 МЛН
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,6 МЛН
ТВОИ РОДИТЕЛИ И ЧЕЛОВЕК ПАУК 😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 6 МЛН
Django Tutorial - Setup, Installation and Page Navigation
20:28
Tech With Tim
Рет қаралды 301 М.
Django Tutorial - Simple Forms
21:56
Tech With Tim
Рет қаралды 79 М.
Learn Django in 20 Minutes!!
21:25
Tech With Tim
Рет қаралды 417 М.
Django Tutorial - User Registration & Sign Up Page
25:18
Tech With Tim
Рет қаралды 110 М.
Accompanying my daughter to practice dance is so annoying #funny #cute#comedy
00:17
Funny daughter's daily life
Рет қаралды 15 МЛН