What are Django class based views & should you use them?

  Рет қаралды 82,365

Dennis Ivy

Dennis Ivy

Күн бұрын

Check out my Complete Django course! dub.sh/NvGboTI
Full Article: dennisivy.com/...
Build a full to do app with Django class based views: • Django To Do List App ...

Пікірлер: 118
@htlcnn
@htlcnn 3 жыл бұрын
Some of your code blocks should've used "def" instead of "function" keyword for function declaration.
@DennisIvy
@DennisIvy 3 жыл бұрын
Haha oh man good call!! I totally missed that 🤦‍♂️
@DennisIvy
@DennisIvy 3 жыл бұрын
I just updated the article but I can’t fix a video, let’s see how many people notice lol
@freekeys
@freekeys 3 жыл бұрын
Yes, I was thinking same😂
@DennisIvy
@DennisIvy 3 жыл бұрын
@@freekeys The problem with working in several different languages :p
@freekeys
@freekeys 3 жыл бұрын
@@DennisIvy Yes, I Agree hahah
@upcom1ng116
@upcom1ng116 3 жыл бұрын
This guy channel is so underrated. He is like the best Django tutorial out there. Always referrer back to Django document which how it should be. Explained all fundamentals of the Django concept.
@carlos.vargas91
@carlos.vargas91 2 жыл бұрын
+1
@DennisIvy
@DennisIvy 3 жыл бұрын
I'm in the process of filming the To-Do list tutorial so give me a day or two to link it up :)
@InBracket
@InBracket 3 жыл бұрын
Love from India ❤️
@rushipatil13
@rushipatil13 3 жыл бұрын
And also if possible make a video in new features added in new Django 3.2 updated version . Thanks for everything you have done until now for us 🙏🙏🙏
@aljon7992
@aljon7992 3 жыл бұрын
I'm happy to see your channel growing! Keep it up master dennis!
@7s9n
@7s9n 3 жыл бұрын
Love from yemen 💛
@frederickteye
@frederickteye 9 ай бұрын
We love you bro! ❤❤❤❤❤
@rembautimes8808
@rembautimes8808 3 жыл бұрын
Wow - a 30 min lecture that is worth its weight in gold. Thanks for the excellent lecture, I’m new to Django and could follow your well thought through tutorial
@deki90to
@deki90to 3 жыл бұрын
I feel you 100%! I start with class views, and I thought this is so easy and clean, I'll stick with this... and then...the pain comes when I try to do something on my own. I failed to render 2 templates on the same page, so I had to go back to functions! I recommanded functions over this
@timoijas5316
@timoijas5316 3 жыл бұрын
Hey Dennis you're doing amazing job. I started learning django with youtube tutorials and you're a godsend. I don't know if you take any suggestions, but it would be awesome if you could make a tutorial on how to make a map application with django, or how to utilize machine learning with django. Great stuff!
@ff4937
@ff4937 Жыл бұрын
Seriously, coming from someone that just started using Django, this video and the supplemental article is like a pot of gold! Initially, I was going the function-based view route, but I can now say with confidence I can write class-based views. Thank you!
@anand_dudi
@anand_dudi 2 жыл бұрын
The only guy who explained the topic clearly Thanks!
@animeshsingh4290
@animeshsingh4290 3 жыл бұрын
Depends on the job in hand, I usually use them as they are fast and clean. You could actually do anything with the methods in the base classes and use custom mixins as well as you would want with a function based views
@DennisIvy
@DennisIvy 3 жыл бұрын
Oh for sure, I’ve done that too :)
@sheraliabdurahmonov5651
@sheraliabdurahmonov5651 2 жыл бұрын
@@DennisIvy Why do not use CBV over FBV
@idontlikegoogleplus8776
@idontlikegoogleplus8776 Жыл бұрын
Great video. The Django guide I was following didn't go into enough detail on this topic and I knew the "magic" had to do with inheritance and some assumptions, but I reaaaallly hate not understanding what's going on under the hood. Thank you for this explanation.
@armaghan1196
@armaghan1196 3 жыл бұрын
Others: Django is dead Dennis: Well, let me introduce myself Great video Dennis!
@_boris
@_boris 3 жыл бұрын
Dennis: Hold my beer 🍺
@dasshrs
@dasshrs 3 жыл бұрын
Why django is dead, can you explain?
@Noaah1
@Noaah1 2 жыл бұрын
Thank you so so much for this, I came from your 7 hour django tutorial and already was wondering what were the differences between class and function based views. Your article is pure gold! I'm still in my path of becoming a django developer and your content is really helping me understand everything. Keep it up, and thanks again
@pranshupriyam632
@pranshupriyam632 Жыл бұрын
You videos are amazing Dennis! I was trying to find a good playlist on CBVs but this single video helped me understand the most about Class Based views than any of the playlists. Thank you for posting amazing tutorials on Django! ❤
@ValeriiTodua
@ValeriiTodua Жыл бұрын
Thank you very much !!!!! By your tutorials i have learned many new things about Django framework. Sorry for my English if something is wrong.
@mdahanaf
@mdahanaf 3 жыл бұрын
Totally Useful & best video on class base view in KZbin. Many many Thanks from my Heart. Send you lots of love from Bangladesh 🇧🇩.
@frederickteye
@frederickteye 9 ай бұрын
Thank you very much! I really appreciate all the hardwork that you put into this. I will return(my appreciation) back to society when I can. Or return(my appreciation) back to you when I can. Continue to stay cool.
@biznesmen8295
@biznesmen8295 2 жыл бұрын
Big hug and Thank you Dennis , I 've been strugling to understand this things since I started.
@parmanandchauhan6182
@parmanandchauhan6182 3 жыл бұрын
Wao allready learn function based django so amazed with ur class based view explanation.op
@sheriffawzy2998
@sheriffawzy2998 Жыл бұрын
I really appreciate your work Ivy ... good job.
@CodeWithStein
@CodeWithStein 3 жыл бұрын
Great explanations Dennis, really helpful! I love function based views, but I'm trying to use classes more.
@DennisIvy
@DennisIvy 3 жыл бұрын
It’s a love hate relationship with class based views lol
@CodeWithStein
@CodeWithStein 3 жыл бұрын
@@DennisIvy Absolutely! I like that they look cleaner than function based, but at the same time the function based gives me a better feeling of control since it's easier to see whats going on.
@aditya.01020
@aditya.01020 2 жыл бұрын
@@CodeWithStein I don't know why I am learning class based views, but they are cool
@SnoopLobster
@SnoopLobster 2 жыл бұрын
keep looking back to this as a resource, thank you
@aliasgar.burhani1099
@aliasgar.burhani1099 3 жыл бұрын
This guy gives credit to other youtubers also in his paid course (just django) ... kudos 👏👏
@DennisIvy
@DennisIvy 3 жыл бұрын
Thank you Aliasager, I owe many people credit for my success :)
@mubarakabdulkadir
@mubarakabdulkadir Жыл бұрын
Thank you Dennis. You are really amazing, this makes me love Django more and more
@raphaelhunold6812
@raphaelhunold6812 Жыл бұрын
Great introduction to class base view. Video helps. Gonna check if you made one about mixin 😅😊
@arunh3
@arunh3 3 жыл бұрын
I use the View class but nothing else...good video...I was planning learning about these specific class based views.
@jackieli1724
@jackieli1724 Жыл бұрын
One of the best tutorial I've ever seen! Thank you vvvvvvvvvvvvery muchhhhhhhhh!😋
@naveenvp1362
@naveenvp1362 3 жыл бұрын
No words for your expalantion..superb I love the way you decode the things❤.Completed your Dev search udemy course its an amazing short and crispy.now I will do that in class based views. And I will try to learn your react and django udemy course.soon (under progress).
@CodeWithTomi
@CodeWithTomi 3 жыл бұрын
Great video on class based views!
@DennisIvy
@DennisIvy 3 жыл бұрын
Thank you Tomi :)
@ARKPROCODER
@ARKPROCODER 3 жыл бұрын
Awesome Dennis, i was looking for this video from too long✌️💯 You have explained very clearly thank you! The experienced you shared( you tried converting function based views to class based views then code got messed up was Psych 😅😅😅 made me laugh)
@CraigMatadeen
@CraigMatadeen 3 жыл бұрын
Hey Deninis, it may not be that important but you may want to update the section with the mixins. ".. when we want to when we want to... ".
@Arbadjie
@Arbadjie 3 жыл бұрын
I purchased your udemy course and hope to start going through it by next month. I hope to learn a lot from you as always.
@DennisIvy
@DennisIvy 3 жыл бұрын
Hope you enjoy the course! It was a really fun project to work on :)
@wordwonders365
@wordwonders365 2 жыл бұрын
@@DennisIvy please link to your Udemy course
@vatsalgupta400
@vatsalgupta400 3 жыл бұрын
Hi Dennis Thanks! For such informative tutorial. I have one question, if someone is writing a view that doesn't use any of the models and performs its functionality (which is random) based on some data "inputed" by user. Then should one use Class based views since most of the classes that they inherit provide extended functionality for model based projects ?
@theebookkeeper
@theebookkeeper 3 жыл бұрын
You are a good teacher. Thanks Ivanov.
@DennisIvy
@DennisIvy 3 жыл бұрын
Thank you 🙏
@UnleashingMayhem
@UnleashingMayhem 3 жыл бұрын
This video saved my ass. Thank you so much.
@nomeh
@nomeh 2 жыл бұрын
I'm a full stack developer with 6+ yrs of python and django experience, I just want to tell you that you're far better off using the function based view especially if you're my type of programmer who loves using custom solutions
@kenafriq
@kenafriq 2 жыл бұрын
Quick question @dennis ivy.. I presume I should use viewsets for my API in django.. And for other models that are not part of the API should I also use view sets?
@owusukwesi6398
@owusukwesi6398 2 жыл бұрын
Im a big faj of this guy, i just love him
@glaceondev4149
@glaceondev4149 3 жыл бұрын
Acutally if you are working with django its fine and easy to use any of those 2 views. But if you are working with django-rest-framework then dude You gotta do it with class based views.Cuz it got more functionality.
@rqwebdev8836
@rqwebdev8836 3 жыл бұрын
Awesome explanation, I've taken paid courses with worse or next to no description of how class based views work!
@chrisogonas
@chrisogonas 2 жыл бұрын
Great resource! Thanks
@GeorgeRed6206
@GeorgeRed6206 2 жыл бұрын
@dennis - great video - how would you use a function/method inside the class that's in another file that you import as module?
@GeorgeRed6206
@GeorgeRed6206 2 жыл бұрын
i figured it out !
@Arbadjie
@Arbadjie 3 жыл бұрын
This is really helpful.
@anilpanwar8710
@anilpanwar8710 3 жыл бұрын
You make a Very Good Content Video..Thank you.
@abdussamad9399
@abdussamad9399 3 жыл бұрын
Thank you so much, It was awesome.
@footballCartoon91
@footballCartoon91 8 ай бұрын
man, I could not understand what actually context is ? in function based views, is context variables can be accessed anywhere from the html templates or is it the html templates that is passed to the `render()` method. For example, `return render(request, 'base/home.html', context)`. so, does this `context` variable accessible from let say `login.html`. Is it a global variable or is it only available for home.html ?
@MagnusAnand
@MagnusAnand 3 жыл бұрын
Excellent video.
@araftelevision
@araftelevision 2 жыл бұрын
Please just tell me how do I style the forms generated by django class based view
@micahtonning7967
@micahtonning7967 10 ай бұрын
Thanks for this video!
@oduwaimade6037
@oduwaimade6037 9 ай бұрын
Like C#, one can define a class handler for a business logic. How can something similar be achieved with Django classes?
@huynhn3474
@huynhn3474 3 жыл бұрын
Thank you! Very clear and detail.
@AdeboyeDN
@AdeboyeDN 3 жыл бұрын
Great video mentor I would like to have your Udemy course but I can't raise the money for it .
@litebook1951
@litebook1951 3 жыл бұрын
Where from did you learn class based view?
@rangabharath4253
@rangabharath4253 3 жыл бұрын
awesome as always Dennis :-)
@niharkashyap3897
@niharkashyap3897 2 жыл бұрын
what is the difference between plain django class based views and the class based views in Django Rest Framework?
@ronaldperaza5481
@ronaldperaza5481 3 жыл бұрын
Great video, and excellent teacher
@fahadherculean3941
@fahadherculean3941 Жыл бұрын
When is it best to use class based views compared to function views
@freekeys
@freekeys 3 жыл бұрын
Great explaination ❤️🌻
@younesboukroun3060
@younesboukroun3060 3 жыл бұрын
it would be great if there may be some other logics than cruds included in the app exemple
@harishrajora6453
@harishrajora6453 3 жыл бұрын
Hey Dennis. I have a question that has been bogging me down for some time now. Consider I have a website that shows only non-expired products (expiration is based on time). How can I run regular queries on db so that I can get the notification as soon as a product expires? Please help.
@nealrogers999
@nealrogers999 3 жыл бұрын
One way would be to have a regular db task checking the date/time (as rarely/often as is appropriate for your particular use case) and setting an 'expired' flag that you hold against a product. Then you have a database trigger on that field/record and do whatever you want to - send an email, write to a file, whatever.
@kelvin13230
@kelvin13230 3 жыл бұрын
Good overview!
@Boubaker_elbikam
@Boubaker_elbikam 5 ай бұрын
Thank you very much
@hassannaghibi1979
@hassannaghibi1979 2 жыл бұрын
tnx for sharing
@tobidegnon4409
@tobidegnon4409 2 жыл бұрын
Great video
@isaachatilima
@isaachatilima 2 жыл бұрын
Any tutorial to show how the html is managed?
@archimusprime844
@archimusprime844 10 ай бұрын
damn good explanation
@yeyintaung9837
@yeyintaung9837 11 ай бұрын
thank you
@DennisIvy
@DennisIvy 2 ай бұрын
Don't forget to check out my Complete Django course! dub.sh/NvGboTI
@aleksandramilicevic1153
@aleksandramilicevic1153 2 жыл бұрын
I cant access you article, nor website, why is that?
@younesboukroun3060
@younesboukroun3060 3 жыл бұрын
siometimes i strugle with calling at the url's my own method in a cbv, that inherit from View
@YashRaj-uy9qn
@YashRaj-uy9qn 5 ай бұрын
why he is using function rather def ?
@engsaamir-yj3rr
@engsaamir-yj3rr 3 жыл бұрын
Thanks a lot :)
@habiborrahaman4531
@habiborrahaman4531 3 жыл бұрын
How to slug use on django bolg website please 1 video create for us
@gabrielreyes8324
@gabrielreyes8324 3 жыл бұрын
Omg thanks!
@jdchannelviewer
@jdchannelviewer Жыл бұрын
If I never see another ToDo list app.....
@joelmiruni8660
@joelmiruni8660 3 жыл бұрын
Good
@zamanEhsani
@zamanEhsani 3 жыл бұрын
Please make a video on Django email. specially designed and beautiful email body.
@samucancld
@samucancld 2 жыл бұрын
sos el 1
@fusion857
@fusion857 Жыл бұрын
15:00
@lubnashaikh1610
@lubnashaikh1610 2 жыл бұрын
Hi there
@m3m194
@m3m194 2 жыл бұрын
Too much talking, try getting to the point quickly. Just a friendly advice
@unuefeejovwoke6609
@unuefeejovwoke6609 2 жыл бұрын
I think the talks were all necessary, he explained everything needed to be able to understand class based view and there is nothing wrong in sharing a story to pass a point across. If you have a problem with that then do your own tutorial on it and don't subscribe. Show appreciation for once.
@megacrons
@megacrons 2 жыл бұрын
next time, you go straight to point, nobody asked you for story, we just want to learn how to write class based view.
@DennisIvy
@DennisIvy 2 жыл бұрын
Next time don’t watch my video bud. No one asked you to bum off my free video then proceeded to give your unsolicited opinion 🤦‍♂️
@anilbarad1856
@anilbarad1856 2 жыл бұрын
How you should start running without learning how to walk ?
@SnoopLobster
@SnoopLobster 2 жыл бұрын
who shitted in your cereal kid?
@nareshchary14
@nareshchary14 3 жыл бұрын
thank you
Django Interview Questions (Junior Developer)
30:26
Dennis Ivy
Рет қаралды 125 М.
Which One Is The Best - From Small To Giant #katebrush #shorts
00:17
Зу-зу Күлпаш 2. Интернет мошенник
40:13
ASTANATV Movie
Рет қаралды 540 М.
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 2,8 МЛН
Don't look down on anyone#devil  #lilith  #funny  #shorts
00:12
Devil Lilith
Рет қаралды 45 МЛН
"The Life & Death of htmx" by Alexander Petros at Big Sky Dev Con 2024
23:01
Montana Programmers
Рет қаралды 63 М.
Django To Do List App With User Registration & Login
2:12:03
Dennis Ivy
Рет қаралды 336 М.
The AWS Lambda Doom Loop
10:09
AJ Stuyvenberg
Рет қаралды 368
The Biggest Issues I've Faced Web Scraping (and how to fix them)
15:03
Why Isn't Functional Programming the Norm? - Richard Feldman
46:09
Django Skills Roadmap To Getting A Job
17:31
Dennis Ivy
Рет қаралды 68 М.
I tried 8 different Postgres ORMs
9:46
Beyond Fireship
Рет қаралды 418 М.
Plain Text - Dylan Beattie - NDC Copenhagen 2022
59:20
NDC Conferences
Рет қаралды 165 М.
Django Rest Framework | Serializers & CRUD
22:40
Dennis Ivy
Рет қаралды 388 М.
Which One Is The Best - From Small To Giant #katebrush #shorts
00:17