Heads up! To view this whole video, sign in with your Courses Plus account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
Congratulations!
You've learned a huge amount
about Django's class based views.
0:00
That's fitting since they're a huge change
to how you've been writing views so far.
0:03
You don't have to use CBVs,
but you'll find that they crop
0:07
up in a lot of other libraries and
tools in the general community.
0:10
So you should at least
be familiar with them.
0:13
For example, Django REST framework
is built up around class based views.
0:15
Class based views can really help
reduce the amount of code and
0:20
boilerplate you put into your projects.
0:23
Less code usually means fewer places for
bugs to crop up, too.
0:25
You should also find that by using
class based views, they're mix-ins and
0:28
building your own library of mix-ins, that
you start being able to reuse more and
0:31
more of your code between features and
even projects.
0:35
I've been a big fan of class
based views since they came out.
0:39
They were actually the subject of
my first ever conference talk.
0:41
So while I'm biased, I think they're
an amazing part of Django and
0:45
one that everyone should use.
0:47
Thanks for learning with me,
and I'll see you next time.
0:49
You need to sign up for Treehouse in order to download course files.
Sign up