Brian is best teacher I have ever witnessed in my lifetime... Nothing unnecessary, every single word he say has purpose to learn you topic in most efficient way possible..
me to I have seen many teachers but Brian is different there is a way he connects one section to the other that makes you get a relationship and he explains had topics in avery simple and inteructive way that you visualise how everything comes about@@shubhamraj25
I have never so easily sat through a 2 hour TH-cam lecture as I have watching this! Amazingly displayed & taught. My CS teachers would always tell me Django is way too complicated and I'm shocked to see how high level and easy to grasp Django actually is!
46:00 start of flights django project 49:52 models.py 53:00 python manage.py shell 56:21 string representation of model function 59:00 linking two models 1:07:00 index.html for loop using the models 1:12:08 creating admin acc in django 1:17:00 adding functions to manipulate data in views.py 1:23:00 adding if empty clause using django in an html file 1:28:00 getting particular data from POST request 1:32:00 dropdown list in html 1:33:56 exclude passengers from a query 1:38:13 configure admin page 1:41:00 add/manage users (login) 1:49:00 authenticate user with username and password 1:51:00 access username in html from django 1:52:39 logout
Awesome lecture on a difficult topic! This is the type of video you have to watch over and over because it's so dense. He doesn't waste a single second.
Brian is awesome, a precious gem in teaching profession, learn much from his teaching in one video which could take years... thanks Brian, hoping you can share more & help more people to acquire Tech Skills!
What we need in this world is teacher like Brian and David who could articulate even the most complex languge and topic to a level that even the newborn could understand 😀. Thank you.
This one hit hard. Edit: Yes, the lecture had too much info, but as you start working on 1st part of the project, everything after that feels natural and fun to work on.
Remember that these lectures were accompanied by Homework ... the lecture just prepares you for that solitary task. Watch the lectures, then find the original assignments (or an approximation).
Despite my knowledge in SQL from cs50x, which saved me the first 55 minutes of the video, I still need to rewatch and practice everything past that in this week's lecture.
I have seen many teachers but Brian is different there is a way he connects one section to the other that makes you get a relationship and he explains had topics in avery simple and inteructive way that you visualise how everything comes about.with this course he has tought me what I have been struggling for six month in just hours.had I began with you I would be miles away Thanks Brian
These lectures are fantastic, but Brian is such a bloody fast typer that every time he gets to a section where he's coding I have to set the speed to 0.25 to try and code along, and even then he's faster than me!
I would recommend taking cs50x before this. Lots of information in this video that assumes you know certain things about python and programming in general. I was able to get through only because of cs50 and the amount of time i put into my final project for cs50. Django seems to have alot more built-in features than Flask or i just don't know flask well enough to use all the features and modules that come with it.
Thanks for the lecture. Covered a lot of information, that's for sure. Django is definitely powerful. I like the admin interface, very convenient. I like how it connects to a SQLite database by default and abstracts away the SQL statements. But I can also see how beginners would get totally lost. I would classify the subject material as intermediate to advanced. You need a good foundation in SQL, Python and object-oriented programming to keep up.
Deleting the first database entry isnt optional. Not doing some crashes the later code. 01:15:41 there was a cut here. The flight from paris to new york was added off camera. I hope this wont break things
I get this error when I click submit to add a passenger to the flight @ 01:36:31 TypeError at /flights/2/book Value after * must be an iterable, not int
@@w1llow01 I think you can pass it as a list [] or as a tuple, but if you type just (flight_id), it takes it just as if it didn't have the parenthesis. You have to add a comma to make it a tuple, like (flight_id, ).
1:15:22 there is TWO Flights, than you add 1 new Flight from Shanghai to Paris than you go on /flights/ page and we see FOUR flights - BUSTED (2+1=3) not four so it's all done not in one frame CS50 team, i appreciate your work here! You've done great material, i love it
Yes, the video was definitely edited. If you watch closely you'll notice the discontinuity. Probably to save time? As he's just repeating the adding of flights into the database. Very keen eye though! Somebody was paying attention, lol.
This is an excellent lecture! Thank you so much. I'm really looking forward to doing Project 2. One request for future lectures: please wait for a brief moment before switching to the full shot right after he finishes typing. His typing is so fast that I had to pause and rewind the video every time😁
Django's feature of writing sql commands for the user is such a time saver. Just to add a row of data to a table can be tedious. And of course Python's language is more simpler and easier to use for dealing with Django's database.
Why use plain HTML forms in this lecture instead of Django forms, like in the previous one? What is each one's advantage and disadvantage or their respective use cases?
1:30:25 Why the tuple here after `HttpResponseRedirect(reverse('flight', args=(flight.id, )))` there has to be a , after fight.id ? Without the , it showed error.
('a') is equivalent to 'a' in python. if there is no comma, python will think that u accidentally add a parentheses, so it will ignore the parentheses.
@@charlielin188 I made some changes to the code and now when I click the submit button, I get the same error page but when I reload flights/1, the passenger gets added. I will send the code in a few mins
After watching last lesson with Django and doing pset I though that Django is really awesome. In this lesson I had problems understanding it fully. Im here after CS50P and this course feels much harder so far. I had problems with pset0 since I have no prior experience with HTML and CSS. Anyway very dense and good lecture, for me a little bit too fast pace, but it's introduction so I guess I will understand it more and get back to it while doing future psets
At 55:02 while saving it says, a lot of lines...and " no such table :flights_flight".I have checked it and repeated it 10 times stilll..can anyone help.
59:00 he defines a foreign key to the model airport, but not to a specific column of the table, this means that is foreign key to any matchig string (code or city) ?
As much as I love these lessons, because he's using a MAC I have to constantly look up Windows or Linux variations of things. There are so many work arounds I have to do to get things to work. I guess problem solving is a huge part of coding though.
The Flight Table keeps incrementing from the last highest id value. I tried “ALTER TABLE Flight AUTO_INCREMENT = 1;” on the dbshell but all I get is Parse Error.
I'm stuck with this, can anyone help me with the lecture: Using the URLconf defined in airline.urls, Django tried these URL patterns, in this order: admin/ flights/ users/ [name='index'] users/ login [name='login'] users/ logout [name='logout'] The current path, users/login/, didn’t match any of these. I checked the settings & urls from airline already :
How a passenger could be on multiple flights? 1:19:58 How it's many to many relationship? Many passengers could be on one flight and one flight can have (one to many) passengers.. So seems like a many to one relationship..
a passenger can be on many flights since often you have to transfer from one flight to another especially on long flights. So Many passengers can be on many flights
He didnt write anything in the urlpattterns of urls.py in flights, i get errors when migrating, how come he left the field empty and his migration worked?
when i write in my Trimina % touch flight.sql ....its tell me ('touch' is not recognized as an internal or external command, operable program or batch file.) how can help me please.
That's because you are using Windows Powershell terminal. "touch" command is a bash terminal command which is available in MacOS and Linux by default. Use this in Windows: ni flight.sql
That's because in your system "touch" doesn't exist, if you're using windows i believe you can just use the "code flight.sql" or even make a new file with your mouse (name it properly) then edit as text
I have an question, that when I'm trying to run sqllite in terminal(vs code , windows) it shows sqlite is not recognised as an internal or external command so how to fix it ?
I created superuser but can not login with correct password and user, it says "Please enter the correct username and password for a staff account. Note that both fields may be case-sensitive." Please somebody help me. Thanks in advance.
I actually can't tell if Django is hard or not.
This man explains topics so clearly; I'm convinced he could teach me Hebrew in 8 minutes.
It's actually pretty basic stuff that he is teaching. That's why it feels easy.
and here I am, still strugling even learning on these "easy" topics, especially the previous one about Django 😬
@@StevenSenjaya hey there, don't worry about it, just keep studying :)) you'll make it
@@StevenSenjaya
Dear Bro ,
Teacher is a great man . Kindly Hear Each one 10 times . Then write Note . Then execute in computer . Try a new App
@@jancejose2716 10 is kinda crazy, 3 should be way enough
Brian is best teacher I have ever witnessed in my lifetime... Nothing unnecessary, every single word he say has purpose to learn you topic in most efficient way possible..
then you havene't seen much teahers
me to I have seen many teachers but Brian is different there is a way he connects one section to the other that makes you get a relationship and he explains had topics in avery simple and inteructive way that you visualise how everything comes about@@shubhamraj25
I have never so easily sat through a 2 hour TH-cam lecture as I have watching this! Amazingly displayed & taught. My CS teachers would always tell me Django is way too complicated and I'm shocked to see how high level and easy to grasp Django actually is!
46:00 start of flights django project
49:52 models.py
53:00 python manage.py shell
56:21 string representation of model function
59:00 linking two models
1:07:00 index.html for loop using the models
1:12:08 creating admin acc in django
1:17:00 adding functions to manipulate data in views.py
1:23:00 adding if empty clause using django in an html file
1:28:00 getting particular data from POST request
1:32:00 dropdown list in html
1:33:56 exclude passengers from a query
1:38:13 configure admin page
1:41:00 add/manage users (login)
1:49:00 authenticate user with username and password
1:51:00 access username in html from django
1:52:39 logout
This course makes me shift from PHP to Django.
This guys is a genius.
Awesome lecture on a difficult topic! This is the type of video you have to watch over and over because it's so dense. He doesn't waste a single second.
Brian is awesome, a precious gem in teaching profession, learn much from his teaching in one video which could take years... thanks Brian, hoping you can share more & help more people to acquire Tech Skills!
Bsadersa. Klas ssuasaiii
brian is a naturally talented teacher he teaches great things in a short time
What we need in this world is teacher like Brian and David who could articulate even the most complex languge and topic to a level that even the newborn could understand 😀. Thank you.
i was afraid i couldnt understand a full course in english but brian has an easy pronunciation and teaching skill,terrific class
This one hit hard.
Edit: Yes, the lecture had too much info, but as you start working on 1st part of the project, everything after that feels natural and fun to work on.
too much to digest in a single go xD
damn I agree
somtimes u gtta watch it a few times or watch it from a diff source.
I took CS50 and this is an extension of that course
Remember that these lectures were accompanied by Homework ... the lecture just prepares you for that solitary task. Watch the lectures, then find the original assignments (or an approximation).
Despite my knowledge in SQL from cs50x, which saved me the first 55 minutes of the video, I still need to rewatch and practice everything past that in this week's lecture.
Their videos are well-directed and they know how to make complex topics as simple as possible, making them impossible to ignore. Thank you, Brian.
Brian teaches in 2 hrs what paid courses teach in 2 months
True
Very true
This is true for all CS50 courses
We can't compare a Harvard University course with other courses out there, can we?
So true
I've developed four application with Laravel Framwork, but now I've realized, this framework is amazing!!! I'm going to dev with this
How's it going? How's it compared to Laravel?
I have seen many teachers but Brian is different there is a way he connects one section to the other that makes you get a relationship and he explains had topics in avery simple and inteructive way that you visualise how everything comes about.with this course he has tought me what I have been struggling for six month in just hours.had I began with you I would be miles away
Thanks Brian
These lectures are fantastic, but Brian is such a bloody fast typer that every time he gets to a section where he's coding I have to set the speed to 0.25 to try and code along, and even then he's faster than me!
At one time I thought he was faking the typing and it was being auto generated that's how fast his typing speed is 🤯
I have to pause the video every time so I can code along as well lol
For Brian it was a two-hour lecture. For me, it lasted eight hours.
Holy sh-. This lecture made me more interested in Django than the previous one. The ORM blew my mind. Thanks!
Thank you Prof. David J. Malan and Brian.
Brian goin full beast mode in this one.
Brian and also David are good teachers. The CS50 include CS50x and CS50w are absolutely masterpiece!
Spot on. Brian really shines here! I know nothing about SQL, but I'm enjoying my time here. He makes a 2-hour lecture fly by so fast!
Викладач чудово пояснює тему. Рекомендую
Amazing stuff, Brian. You made my Django learning experience so easy & smooth!
Thank you CS50 for this amazing lecture.
Thank you, Brian, Harvard, and whole Harvard CS50W crew!
Thanks so much Brian! Really useful stuff & great way of communicating it to us. Super powerful! Must have been a lot of work behind it!
It was so good I exited fullscreen like 10 times because of the sudden urge to like the video
I need brian yu the only teacher in my whole life amazing teaching skills man loved it 😍🔥💯
Now i am getting somewhere since its a little confusing ... it was a awesome lecture, you sir brian 👌
Now i understand 👍
Such a nice lecture, thank you Brian and the whole teaching team.
I would recommend taking cs50x before this. Lots of information in this video that assumes you know certain things about python and programming in general. I was able to get through only because of cs50 and the amount of time i put into my final project for cs50. Django seems to have alot more built-in features than Flask or i just don't know flask well enough to use all the features and modules that come with it.
very well explained. prolly the best tutorial on youtube
The information here is so dense .
Thanks for the lecture. Covered a lot of information, that's for sure. Django is definitely powerful. I like the admin interface, very convenient. I like how it connects to a SQLite database by default and abstracts away the SQL statements.
But I can also see how beginners would get totally lost. I would classify the subject material as intermediate to advanced. You need a good foundation in SQL, Python and object-oriented programming to keep up.
The content that is being provided here is just unique
Awesome! Thank you! I really love CS50W
Deleting the first database entry isnt optional. Not doing some crashes the later code.
01:15:41 there was a cut here. The flight from paris to new york was added off camera. I hope this wont break things
I get this error when I click submit to add a passenger to the flight @ 01:36:31
TypeError at /flights/2/book
Value after * must be an iterable, not int
it was a typo in return HttpResponseRedirect(reverse("flight", args=[flight_id])) had to use args=[] not args=()
@@w1llow01 I think you can pass it as a list [] or as a tuple, but if you type just (flight_id), it takes it just as if it didn't have the parenthesis. You have to add a comma to make it a tuple, like (flight_id, ).
1:15:22
there is TWO Flights, than you add 1 new Flight from Shanghai to Paris
than you go on /flights/ page and we see FOUR flights - BUSTED (2+1=3) not four
so it's all done not in one frame
CS50 team, i appreciate your work here! You've done great material, i love it
Yeah I think this is the edited version of the live class
Yes, the video was definitely edited. If you watch closely you'll notice the discontinuity.
Probably to save time? As he's just repeating the adding of flights into the database.
Very keen eye though! Somebody was paying attention, lol.
17:50 - create SQLite database
47:36 - Django airlines app
I am not a student. I know these already very well. Still, watching him is a joy 😅 💯
This is an excellent lecture! Thank you so much. I'm really looking forward to doing Project 2.
One request for future lectures: please wait for a brief moment before switching to the full shot right after he finishes typing. His typing is so fast that I had to pause and rewind the video every time😁
Django's feature of writing sql commands for the user is such a time saver. Just to add a row of data to a table can be tedious. And of course Python's language is more simpler and easier to use for dealing with Django's database.
Best coding tuto a ever watch
high quallity of education from the best in internet
Love this energy. Thank you, Brian!
00:30:16 - Joining Tables
Why use plain HTML forms in this lecture instead of Django forms, like in the previous one? What is each one's advantage and disadvantage or their respective use cases?
at 39:51 I think he needs to include additional JOIN query where he needs to join people table also to be able to include data about first name etc...
yes I also think this is the case
Thanks Alot ,this is the best channel to learn from
at 1:03:19 i am having an error saying "Cannot assign "'jfk'": "Flight.origin" must be a "Airport" instance." Can anyone help?
you have to deleteit from the database before you migrate. watch the video again, he did that at 57:49
brian is born different
At 1:36:09 I am getting NoReverseMatch at /flights/1 Reverse for 'book' with arguments '(1,)' not found. 1 pattern(s) tried: ['flights/
it's just a typo in this part of urls.py, path("/book", views.book, name="book")
Zakaria Jaddad was here, thanks to Mr Brain for this clear lecture🤍
1:30:25 Why the tuple here after `HttpResponseRedirect(reverse('flight', args=(flight.id, )))` there has to be a , after fight.id ? Without the , it showed error.
('a') is equivalent to 'a' in python. if there is no comma, python will think that u accidentally add a parentheses, so it will ignore the parentheses.
@@charlielin188 Hey, my form is not redirecting me to the page nor is it adding passengers to the given flight, pls help me
@@koushikvss7638What is the code inside ur view?
@@charlielin188 I made some changes to the code and now when I click the submit button, I get the same error page but when I reload flights/1, the passenger gets added. I will send the code in a few mins
@@koushikvss7638 What does the error page say?
Brian is on x2 mode. 🔥
After watching last lesson with Django and doing pset I though that Django is really awesome. In this lesson I had problems understanding it fully. Im here after CS50P and this course feels much harder so far. I had problems with pset0 since I have no prior experience with HTML and CSS. Anyway very dense and good lecture, for me a little bit too fast pace, but it's introduction so I guess I will understand it more and get back to it while doing future psets
At 55:02 while saving it says, a lot of lines...and " no such table :flights_flight".I have checked it and repeated it 10 times stilll..can anyone help.
Don't worry ,I solved it myself.It was my mistake.
59:00 he defines a foreign key to the model airport, but not to a specific column of the table, this means that is foreign key to any matchig string (code or city) ?
45:45 Race conditions - Transactions
1:35:41
ImproperlyConfigured: URL route '' uses parameter name 'flight_id/book' which isn't a valid Python identifier.
Solution?
Did you manage to get that sorted?
@@ntwananomazibuko765 typo, this is the correct code. book. The position of ">"
As much as I love these lessons, because he's using a MAC I have to constantly look up Windows or Linux variations of things. There are so many work arounds I have to do to get things to work. I guess problem solving is a huge part of coding though.
wow, maybe must takes a time to practice this so I can remember this lecture
What a great guy you're!
This Lectures worth on 0.75x. Man he is too fast. Machine
Thank you! Absolutely stunning lecture.
After testing a bit i found out that __str__ method is how your admin page actually shows each row in a table!
🙂🌹thanks
1:25:00 booking a flight
Great work, Brian Yu.
Brian you've started to grow on me
at 1:30:18, when he types args=(flight.id,) why is there a need for the comma after the flight.id?
Because "args" refers to the tuple. If you create tuple with one element only then you have to include the comma.
u must have got this error, Value after * must be an iterable, not int
The Flight Table keeps incrementing from the last highest id value. I tried “ALTER TABLE Flight AUTO_INCREMENT = 1;” on the dbshell but all I get is Parse Error.
1:40:20 (Timestamp)
Me listening to Brian: "This is a piece of cake"
Me using Django: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
I'm stuck with this, can anyone help me with the lecture:
Using the URLconf defined in airline.urls, Django tried these URL patterns, in this order:
admin/
flights/
users/ [name='index']
users/ login [name='login']
users/ logout [name='logout']
The current path, users/login/, didn’t match any of these.
I checked the settings & urls from airline already :
OOP is strong in this one.
How a passenger could be on multiple flights? 1:19:58 How it's many to many relationship? Many passengers could be on one flight and one flight can have (one to many) passengers.. So seems like a many to one relationship..
a passenger can be on many flights since often you have to transfer from one flight to another especially on long flights. So Many passengers can be on many flights
@@levanivashadze oh yeah thanks.. it's a possibility... Without an assumption, so it was a bit confusing for me..
why is the href link at 1:24:09
Back to Flights
and not
Back to Flights
They redirect to the same page. I think it wasn't necessary to specify the name of the app because it was the only app available at the moment
@@anaveronicaaponte I found the answer, it's something else. Do you want me to tell you or do want to find out yourself?
@@jonathanlee8162 I'd like to know 😄
@@anaveronicaaponte and then he never replies ._. but i believe it's because brian didn't define "app_name = "flighta" "
I tried following along typing the code, but can't type as fast as Brian lol. Luckily he explains everything well.
He didnt write anything in the urlpattterns of urls.py in flights, i get errors when migrating, how come he left the field empty and his migration worked?
when i write in my Trimina % touch flight.sql ....its tell me ('touch' is not recognized as an internal or external command,
operable program or batch file.) how can help me please.
same for me here. I used '.open C:/Users/Nkimba/OneDrive/Skrivbord/SQL/flights.db'. For your case use ' .open flight.db '
That's because you are using Windows Powershell terminal. "touch" command is a bash terminal command which is available in MacOS and Linux by default. Use this in Windows: ni flight.sql
That's because in your system "touch" doesn't exist, if you're using windows i believe you can just use the "code flight.sql" or even make a new file with your mouse (name it properly) then edit as text
Brain you are a genius
Fantastic lecture. Thank you!
1:01:51: is he ok???
How does he type so fast? SELECT(capital) * FROM(captial) flights(suddenly lowercase letters); Everything in a fraction of second/...
Thanks from Ukraine!
How they edit this video lecture, such that like in 56:53 where the computer screen is in Brian's background. Anyone know how to do that?
Green screen
@@ojouniisama5401 You dont even need that, ML can cut him out perfectly.
the commands is not working properly in windows.
On Windows use single quotes for the SQLite queries otherwise it won't work
he is freaking awesome ...................................
WoW 😲😲😲 my brain trembles!
absoultelly savior
But what if you want to add a logged in user as a passanger and only print that?
I have an question, that when I'm trying to run sqllite in terminal(vs code , windows) it shows sqlite is not recognised as an internal or external command so how to fix it ?
What is the name of song it's so gerogus
I created superuser but can not login with correct password and user, it says "Please enter the correct username and password for a staff account. Note that both fields may be case-sensitive."
Please somebody help me. Thanks in advance.
The lecture is really good. There is some artifacting on the video however.
did somebody got stuck on this lesson. The command "TOUCH" is not working on my windows cmd promt.
Same problem. It seems that Tough is an Macbook command. I solve this by creating the "flights.sql" file manually.
Touch only works for unix based systems, windows is not
how does this man type so FAST
amazin course tho fr
Bros prob been coding since he was 6
Awesome Just 💚💚💚
quality content as always from cs50!