
Master building REST APIs with Django REST framework and Python through a project-based IMDb API clone. Start from basics and advance to serializers, views, permissions, authentication, filtering, pagination, and testing.
Welcome to building REST APIs with Django REST framework and Python. Stay consistent, engage in Q&A and reviews, and learn video settings like playback speed, resolution, audio, and notes.
Discover how an api acts as a middleman to connect frontend and backend using json, with url structure, endpoints, django rest framework concepts, and private, partner, and public api types.
Explore the REST architecture, including endpoints, methods, headers, and JSON data, and learn how CRUD operations map to post, get, put, and delete.
Master the basics of Django by setting up a project, folder structure, and sending json responses. Create a virtual environment and choose a code editor for Django.
Set up and run a Django project named watch mate, activate your virtual environment, create the watchlist app, and start the local server with sqlite3.
Install the app, apply migrations, create a super user, and register the movie model in the admin panel; define name, description, and active fields, then prepare views and urls.
Create a function-based view to fetch all movies from watch list app, convert the queryset to a Python list using values, and return a JsonResponse with a movies dictionary.
Learn how to expose a single object via a detail view using a primary key, build a custom JSON response, and prepare for serialization with Django REST framework.
Cover Django rest framework basics: installation, serialization and deserialization, two serializer types (serializer and model serializer), two view types (class-based and function-based), and accessing APIs via browsable API or Postman.
Create a movie serializer with id, name, description, and active fields, connect it to a get API view to list movies using Django REST Framework, and return serialized data.
Extend a Django REST framework API by adding post, put, and delete handling with a serializer's create and update methods, data validation, and movie records persistence.
Learn how to use Django REST framework status codes to respond after delete operations, returning 204 no content or other codes like 200, 400, 404, and 500 based on outcomes.
Explains field level validation, object level validation, and validators in Django REST Framework serializers, with practical steps for implementing in serializer.py and raising validation errors.
Explore serializer fields and core arguments to enforce read only, write only, required, and default behaviors with boolean, string, and numeric types, and learn how model serializer streamlines schemas.
Learn to build a Django REST Framework model serializer that maps a movie model to fields, enabling create and update, with include or exclude of id, name, and description.
Learn to add a custom serializer field in Django REST framework using Serializer Method Field and a get_xxx method to compute values like name length.
reshape the project models by renaming movie to watch list, adding watch list and streaming platform models, and updating serializers, views, and urls, with migrations and admin setup.
Explore Django relationships by implementing one-to-one, many-to-one, and many-to-many connections between models, using foreign keys, cascade delete, and related names in the streaming platform and watch list example.
Demonstrate nested serializers to map a streaming platform to its many movies via a watch list, using many set to true and read only in a reverse one-to-many relationship.
Learn how the hyperlinked model serializer in Django REST framework exposes urls instead of ids, and how to pass request context to render relationships as urls or ids.
Implement serializer relations by adding a review model linked to movies via a foreign key, enabling a one-to-many relationship with rating, description, timestamps, and prepare for generic views.
Explore using generic API view and mixins in Django REST framework to implement list, create, retrieve, update, and destroy operations with a queryset and serializer.
Design URL structures to fetch all reviews for a specific movie and to access individual reviews, using a class based view and the generic class based view.
Learn to implement concrete class based views with django rest framework, using list, create, and retrieve api views to handle get, post, put, and delete for a review.
Overwrite queryset to return reviews for a specific movie by filtering with the movie's id, then expose list and create endpoints using perform_create and custom serializer behavior.
Leverage viewsets and a default router to combine list and detail logic into a single url path, automatically handling list and retrieve operations while reducing code.
Explore how model view sets in Django REST Framework handle create, retrieve, update, destroy, and list operations, including read-only variants and router-driven URLs.
Learn how Postman complements the Django REST framework's browsable API by testing get, post, put, patch, and delete requests, exploring authentication, endpoints, and readable JSON responses.
Introduce a foreign key user to reviews, perform migrations, update the serializer, and enforce one review per user per movie while preparing for authentication and permissions.
Enable temporary login for testing using Django REST framework's API auth. Learn how to assign normal, staff, and super user roles to control access to admin panels and user edits.
Explore how permissions restrict access in django rest framework, covering global and object-level controls. Identify built-in types like is authenticated and is admin, and design custom permissions for per-user edits.
Define custom permissions in Django REST Framework by creating a permissions.py file, implementing admin versus read-only access with has_permission and has_object_permission, and enforcing review owner write rights for unsafe methods.
Implement a custom calculation feature by adding average rating and total reviews fields to a movie watch list, update them with each new review, and enforce single-user reviews.
Learn the difference between authentication and permission, and explore how authentication verifies a logged-in user using basic, token, and JWT methods with Django REST framework, tested with Postman.
Implement basic authentication across the Django REST Framework project by configuring settings.py, replacing session authentication, and optionally using per-class authentication, testing with Postman using the Authorization header and base64 encoding.
Understand token authentication workflows in the Django rest framework by logging in with a username and password, generating and using a token in the authorization header to access protected endpoints.
Understand token authentication to access content by passing a token in the authorization header. Verify the token against the user in the database to enable authorized access and updates.
Build a dedicated user app in Django to manage registration and login, wiring login via obtain_auth_token and using the token in request headers for authenticated actions.
Explore building a registration endpoint in Django REST Framework: define a user serializer with password confirmation and write-only fields, validate email uniqueness, and return a token for immediate authenticated access.
Register new users with autogenerate tokens and return the auth token in the registration response by leveraging signals and the Django REST Framework token model.
Implement a logout endpoint that deletes the current user's authentication token via request.user on a post request and returns a 200 response.
Welcome to Django Rest Framework Masterclass, One single course to start your DRF journey as a beginner step-by-step. This course touches on each and every important topic through concept explanation, documentation, and implementation. The entire course is designed for beginners with one goal in mind, to build powerful REST APIs using Python and Django.
Throughout the course, we will explore the most important Django Rest Framework topics step-by-step:
1. API Basics
2. Serializers
- Serializers
- ModelSerializer
- HyperlinkedModelSerializer
3. Function-Based
4. Class-Based Views
- APIView
- Generic Views
- Mixins
- Concrete View Classes
5. Viewsets and Routers
6. Permissions
- IsAuthenticated
- IsAdminUser
- IsAuthenticatedOrReadOnly
- Custom Permission
7. Authentications
- BasicAuthentication
- TokenAuthentication
- JSON Web Token Authentication
8. Throttling
- AnonRateThrottle
- UserRateThrottle
- ScopedRateThrottle
- Custom Throttles
9. Django Filter Backend
- Filtering
- Searching
- Ordering
10. Pagination
- Page Number
- Limit Offset
- Cursor
11. Automated API Testing
------------------
Why this course?
Complete course is focused on the concept learning approach, you learn every concept through a logical and visual learning approach.
Learn all important concepts in the simplest possible way with examples and real-life project.
You just need basic Python and Django knowledge, we will cover everything step-by-step from scratch.
------------------
After completing this course you will be ready to work as an Intern, Fresher, or Freelancer and you will also be able to implement everything yourself! Most importantly you will be ready to divide deep with future practice and hard level question of DRF.
Enroll now, I will make sure you learn best about Django Rest Framework.