Sometimes, the built-in viewsets are not flexible enough to meet a modern web app's needs. APIView provides a more bare bones—but flexible—way to work.
- [Instructor] In this episode,…we'll be looking at class-based views…in Django REST Framework.…In this video, we're going to be learning the differences…between the APIView and the ViewSet class…from Django REST Framework, and then we're going to look…at building our own custom ViewSet,…so here's the main differences between the ViewSet…and the APIView.…Both of these classes are provided by Django REST Framework…to help quickly and easily scaffold out your API.…ViewSets use the Django REST Framework predefined methods…like list, retrieve, and create.…Each of these methods map up to an HTTP verb…like GET, POST, PUT, and DELETE,…but Django REST Framework does all of the work for you.…
The APIView instead provides a modified class-based view…like View that we had used previously.…The main difference between APIView…and the generic Django View,…is that the APIView uses Django REST Framework's own,…specialized request and response classes,…instead of Django's generic request and response classes.…The ViewSet is compatible with the browsable API…
- 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
1. Advanced Class-Based Views
2. Building a REST API
Authentication with DRF6m 14s
3. GraphQL: An Alternative API
4. Optimizing Your Environment
5. Tests, Tests, Tests
6. Securing Django
- 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.Cancel
Take 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.