Using function-based views can quickly cause messy code. Class-based views can help solve this.
- [Instructor] Hello, and welcome back…to Advanced Class Based Views…from Mastering Django Web Development by Packt Publishing.…In this section, we're going to be…taking a look at extending class based views…from the generic objects that Django provides.…How to use mixins to add extended functionality…to your views using custom class based views…that you will build out of the generic view object.…How to create a switchboard view…that will stitch together the functionality…of multiple different views into one class.…And where you can get help with class based views…when you inevitably run into issues.…
Video one will be Extending Class Based Views.…In this video, we'll be looking at…how to extend the generic ListView, DetailView,…and DeleteView that Django provides.…How to make them work with your custom objects.…Let's look at some code now.…In this code example that I'll be using today,…I've just taken the Django project's polls tutorial…and modified it slightly to add a Delete method.…I've also removed the voting method,…
Author
Released
10/8/2018- Extending class-based views
- Building a REST API
- Working with GraphQL
- Building a basic schema
- Optimizing your environment
- Working with Pipenv
- How Django handles testing
- Securing the Django admin
Skill Level Advanced
Duration
Views
Related Courses
-
Advanced Python
with Joe Marini2h 27m Advanced -
Code Clinic: Python
with Barron Stone1h 51m Intermediate -
Python: Design Patterns
with Jungwoo Ryoo1h 59m Intermediate
-
1. Advanced Class-Based Views
-
The course overview4m 46s
-
Extending class-based views12m 1s
-
Using mixins6m 47s
-
Creating custom CBVs5m 40s
-
Building switchboard views6m 44s
-
-
2. Building a REST API
-
Authentication with DRF6m 14s
-
3. GraphQL: An Alternative API
-
Introduction to GraphQL7m 29s
-
Building a basic schema8m 16s
-
Building custom objects6m 34s
-
Working with mutations6m 52s
-
-
4. Optimizing Your Environment
-
Pipenv: The new pip8m 25s
-
Custom Pipenv environment4m 30s
-
-
5. Tests, Tests, Tests
-
Why testing matters7m 35s
-
How Django handles testing13m 32s
-
Testing models10m 20s
-
Testing views8m 46s
-
Testing it all together5m 35s
-
-
6. Securing Django
-
Security in Django3m 54s
-
Securing the Django admin3m 47s
-
Planning for failure6m 39s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Extending class-based views