
Learn to build a practical Django Rest Framework API with Docker, covering models, serializers, migrations, image uploads, and exporting files, plus a permission-driven admin dashboard for users, products, and orders.
Install Django, create a new project, access the admin site, and run the development server, noting migrations will be added later.
Configure the frontend as a separate dockerized service by pulling the prebuilt image from docker hub, exposing a port, restarting containers, and testing at localhost:88 while awaiting admin API integration.
Execute docker compose to access the admin_api service, apply migrations with python manage.py migrate, create a super user, and log into the Django admin at localhost:40000/admin.
Create your first rest api with Django rest framework by building a hello endpoint that handles get and post requests, wiring up urls, and testing with Postman.
Define a user model with first name, last name, and email (unique) and max length constraints, then migrate the database and retrieve users via a get endpoint.
Create a user registration endpoint in django rest framework using a model serializer, validate passwords, and test the api with Postman in a docker environment with MySQL.
Configure user serializer to include first name, last name, email, and password, marking the password as write-only to hide it in responses; use many-through relationship to display users during registration.
Implement a login api view that reads email and password, authenticates user, handles not found and incorrect password errors, and returns a success message, with jwt token in next tutorial.
Generate a jwt access token with user id, expiration, and secret key, encode with HS256, and store it as an http-only cookie named JWT for backend authentication.
Create a class-based API view to retrieve the authenticated user using a JWT authentication class that reads the token from cookies and enforces is_authenticated, then serialize and return user data.
Implement a logout function in a Django Rest Framework API view that uses a post request to delete the JWT cookie and return a success message.
Create role and permission models, link users to a role via a foreign key, and establish a many-to-many relation between roles and permissions with a through table, then run migrations.
Explore seeding a Django Rest Framework app with Docker by creating fixtures for permissions, roles, and users, loading them into the database, and configuring admin access.
Extend a Django Rest Framework API view for permissions, build a permission serializer from the permission model, ensure authentication, log in as admin, and retrieve all permissions.
Explore how to implement and customize viewsets in Django REST framework to handle list, retrieve, create, update, and destroy operations with consistent authentication and permission handling.
The lecture demonstrates configuring a role serializer to include nested permissions by using a permission serializer, enabling many-to-many through relationships to return permissions as objects.
Implement role creation using Django Rest Framework and a permission related field to serialize and validate data, handle errors, and return proper status codes for created roles.
Complete all five role methods in Django Rest Framework by using a role serializer, updating role instances with request data, and returning responses with 202 accepted and no content status.
Leverage Django Rest Framework generic views to manage users with generics.GenericAPIView and mixins, implementing get, post, put, and delete for list and single user responses.
Implement a custom django rest framework pagination by creating a custom pagination class, overriding get_paginated_response, and returning user data with a meta field including last_page, page, and page_size.
Build two profile endpoints in Django Rest Framework with Docker: update profile info via put with partial updates, and update password with confirm validation, including tests via login.
Add data to the authenticated user to expose permissions inside the user roles. Return permissions via a lambda function so the front end can list the user's permissions directly.
Create a product serializer and a generic API view with authentication, wire up product routes, and test by creating, updating, and deleting a product.
Upload images using a Django Rest Framework view by configuring a media folder, media route, and default storage, then test with Postman to verify the image URL served from media.
Create the orders app with two models (order and order item), run migrations, build serializers and a list/retrieve API with jwt authentication, and seed data for testing in postman.
Learn to add a serializer method field total via a get_total function that sums price times quantity for each order's items in Django Rest Framework with Docker.
Create a Django Rest Framework export view that returns a downloadable csv of orders and their items, with a header citing name, email, product title, price, and quantity.
Implement a chart api view with raw sql queries and a cursor to join orders and order items, group by date formatted to day, and return totals for the chart.
define a custom view permission in django rest framework, check authenticated users for view or edit access on models like users and missions, and enforce it across routes.
Install the corsheaders package, add it to the settings and include its middleware, then enable credentials to let the front end access the API and receive login cookies.
Test the frontend by logging in as admin and viewing the three-day sales chart. Create orders, products, and image uploads with prices to validate data handling.
Learn how to create an Admin App using Django Rest Framework.
In this tutorial you will learn:
How to create APIs with Django Rest Framework
Use Docker
Create protected routes
Login with HttpOnly Cookies
Use APIViews, ViewSets, Generic API Views
Authorize users for different routes
Upload Images
Export CSV files
If these are what you are looking for then this course is for you.