Intro to Class-Based Views in Django

preview_player
Показать описание
If you were wondering how class-based views work in Django, I will introduce the concept to you in this video.

Рекомендации по теме
Комментарии
Автор

I struggled a lot to learn this for days. Thank You! It's very clear now.

SisiraSomaratne
Автор

Got your email recently about the new flask uploads. I haven't checked it out as I am more into Django. This video is pretty easy to follow and understand. Thanks Anthony.

mujeebishaque
Автор

Please keep posting .. Your work is really very helpful.

ajaysharma
Автор

Class based views are most probably awesome, but in this particular case it just doubles the amount of lines. I cant find any added value except turning it slowly into Java.
I dont know a thing about class based views, it's just my first impression. I was sure improvements works other way around - reducing boilerplate instead of literally multiplying it.

jonathanhirschbaum
Автор

Is this in Django REST Framework ? Or in Django ?

liorbm
Автор

Where from did you learn class based view?

litebook
Автор

thanks a lot how to get the current Post in home page while commenting. because there are many posts and when I click I want vivre to recognize which posts I am commenting.

pk= 2 but I want pk = pk and it gets more posts on listview and confused the comment form

classicguy
Автор

in CarView class there are two functions called get and post. Those name are default by django or can i give a different name for those tow classes

michaeljohn-klpm
Автор

This video misses most of the point of class based views. The author is using the most basic 'view' object, which requires that he repeat most of the logic from his function based view in the class based view, which provides very little benefit. The true 'magic' happens when your new class based view inherits from one of the generic views such as FormView, CreateView, UpdateView, etc. All you have to do is set a few properties within the class and eliminate the boilerplate code that is shown in this example. If you are watching this video you should really try to find another example that illustrates use of the generic views in order to better understand the true power of class based views.

MK-ojol
Автор

great videos dude....
why did you use pk=2 .
can anyone clarify

sushant
Автор

Hi Team, I am using CLass based views (ListView) and want to display the list of items but at the same time need to join two tables to get the desired result. Any info where i can overwirte the method or function to use custom based query.?
Looking for response... Thanks

mayanktripathiu
Автор

I'm finding it difficult to understand the use of class base view

alfredglaygbo
Автор

I've a REQUEST... can you make a video on more real projects like. a small website where we login as admin and have authority to remove or add other accounts. and someone can easily make an account and start posting etc. like a mini social network? wouldn't be that great?

zulfiqarabid
Автор

I saw people using form_class, add_form, and form. What are the differences?

zhaoyinqin
Автор

in class multiple methods is there how i can pass this method in url file in is_view()

webtutor
Автор

How can i pass a primary key of an object to a class based view?

marvinotieno
Автор

Though I always like all of ur videos, but in this case, I don't really get when n why would u use class based views

rohitbhanot
Автор

come on... you could make a def for rendering instead of declaring form, context and calling render for both methods! That is super usefull!! anyways thank you for the video

Shadownrun
Автор

This is a pretty bad way to use the class Model in django.

JG-qjxb