
Explore restful APIs with Django Rest Framework, building a CRUD API from scratch using function-based and class-based views, generics, mixins, viewsets, and authentication for a flight reservation project.
Discover how this django rest framework course is organized into sections with quizzes and hands-on lectures, and install the required tools at the start to maximize learning.
Identify how REST uses the http protocol to enable create, read, update, and delete operations through verbs like post, get, put, patch, and delete, with uniform interfaces and multiple formats.
Discover why RESTful web services use a single HTTP interface to perform get, post, put, and delete operations, enabling interoperability across platforms, statelessness, scalability, and caching for high performance.
Explore what Django Rest Framework is and why it's popular, using class-based and function-based views for crud, serializers, ORM, a web browsable api, and built-in security.
install zango with pip, ensure python is installed and up to date, and verify the zango version using python -m zango --version.
Install Django rest framework with pip to set up your project. Ensure Python and Django are installed, then run pip install Django rest framework to complete the setup.
Install mysql and mysql workbench by downloading the installer, installing both, and configuring a root password; it runs as a Windows service and can be managed via Windows services.
Install and launch MySQL workbench, create and test a local connection, enter the configured password, and create a database named My DB for later lectures.
Download and install the MySQL community server on Windows, install Visual C++ prerequisites, choose the installer, set root password, enable password encryption, and complete basic configuration with MySQL Workbench.
Install MySQL Workbench on Windows, run the installer with defaults, launch, set up a local connection, and connect to remote servers or create a database in a query window.
Install the mysqlclient package using pip to enable your Python or Django Rest Framework applications to communicate with a MySQL database.
Switch from Atom IDE, sunset in December 2022, to Visual Studio Code or PyCharm for Django projects and explore command-line workflows in the next lecture.
Install and configure Visual Studio Code for Django development by downloading the IDE, installing Python and Django extensions (Django template and snippets), and using the integrated terminal for Django commands.
Install Postman to test your microservices' RESTful API, using its API development environment to send get, post, put, and patch requests; configure headers, JSON bodies, and basic authentication.
Engage in a hands-on Django Rest Framework course by creating multiple projects and downloading completed projects from the resources section; unzip the zip file and study to become an expert.
Download the lecture slides from the resources section to quickly review topics, available as Keynote for Mac and dot ppts for Windows.
Create a Django rest framework project and app, add rest framework and the app to installed apps, and prepare to code the restful service in the next lecture.
Create a function-based view that returns a static employee dictionary as a json response, exposing a simple restful endpoint and illustrating the http json payload the client receives.
Define a function-based view that returns a static employee dictionary serialized to json via json response, preparing to configure the url and test the new restful endpoint.
Configure app level urls in Django Rest Framework by moving the app urls.py, including it in project urls.py, and exposing the employees list endpoint under first app.
Create a Django model class named employee with fields id, name, and salary, and implement a __str__ method to return a readable representation of the object.
Configure the database to MySQL, create the employee db, then run makemigrations and migrate to create Django tables, including app_employee with id, name, and salary.
Fetch all employee records from the database in the view, return a json with name and salary under employees, and test by running the server and calling the endpoint.
Explore the zango rest framework's request and response classes, status module, and API view decorators that enable a RESTful API with GET and POST and proper content negotiation.
Create and expose a CRUD API with function based views using the API view decorator, handling list and detail endpoints for models via get, post, put, and delete.
Learn how serialization converts model objects and query sets to JSON and back using serializers and model serializers in Django rest framework, define fields, and validate and save data.
Create a Django project and an FBV app, integrate the rest framework, and configure a sqlite database named student.db to enable function-based views and serializers for RESTful CRUD operations.
Create the student model by adapting the employee class, define a decimal score field, implement a string method returning score, and run migrations to initialize the student database in MySQL.
Create a Django Rest Framework serializer using ModelSerializer in the FBV app, defining a Student serializer with a meta class and specified fields to serialize and deserialize.
Define a function-based view that retrieves all students and creates a student, returning all records via a serializer with many=True and a REST framework response.
Implement the post method to create a student by deserializing request data with a serializer, validating it, saving to the database, and returning a 201 response, or 400 with errors.
Apply the api_view decorator from Django Rest Framework to a function, declaring allowed methods like GET and POST.
Implement primary key based operations in a function-based view to retrieve, update, and delete a student by primary key using a serializer, error handling, and proper http responses.
Configure the urls in django rest framework by importing views and mapping the students collection to student_list and the detail view to student_detail in urls.py, using paths 'students/' and 'students/<int:pk>/'.
Test your rest api using the ui generated by django rest framework, performing non-primary key and primary key operations with get, post, put, and delete on students.
Use postman to test the django rest framework's RESTful web services by performing get, post, and put operations on the students API, including creating, updating, and retrieving records.
Master class based views to build rest endpoints, replacing conditional logic with get, post, put, and delete methods, and use serializers, mixins, generics, and viewsets to simplify operations.
Create a Django Rest Framework project using class based views. Reuse the student model and serializers while configuring settings and rest_framework apps for CBV serialization.
Define a class-based view for non-primary key operations using APIView, implement get and post methods, serialize data with a serializer, validate, and return appropriate responses.
Develop a class-based view for primary key based operations in Django Rest Framework, implementing get, put, and delete with a reusable get_object and http 404 or 204 responses.
Configure the URLs and test the application using class-based views, defining list and detail endpoints for students, running migrations, and validating get, post, update, and delete operations.
Learn how Django rest framework mixins power generic API views with list, create, retrieve, update, and destroy operations, reducing repetition through dry principles, using query set and serializer to JSON.
Explore non primary key based operations and primary key based operations using mixins in a generic API view, configuring queryset and serializer class for the student data.
Implement primary key based operations in Django Rest Framework using retrieve, update, and destroy mixins. Define a student detail view with a generic API view, queryset, and serializer_class.
Test the mixin code without changing urls.py, verify the student list and details endpoints load, and perform CRUD operations via the web UI, including primary key based updates and deletes.
Leverage Zango generics to create REST endpoints with ListCreateAPIView and RetrieveAPIView, reducing boilerplate. Extend these classes to support both non-id and id-based operations.
Explore generics to simplify code by replacing mixins and class-based views with generics for list create and retrieve update destroy operations, using the query set and serializers.
Explore how Django Rest Framework uses model view sets, mixins, and routers to support primary key and non-primary key operations with automatic URL routing and a serializer.
Implement rest endpoints with a view set by inheriting from model view set, defining queryset and serializer, to support primary key and non-primary key access; routes will be configured next.
Expose view sets as restful endpoints with a default router, register the student view set, and include router.urls to test CRUD operations at /students.
Create a Django project from the command line, then create an app, configure rest_framework in settings, and set up an author DB for future migrations.
Create a Django model pair, author and book, with a one-to-many relationship via a foreign key, including author first_name, last_name, book title, rating, and on delete cascade with related_name books.
Create nested serializers in Django REST framework by defining a book serializer and an author serializer. Embed the book serializer inside the author serializer to include books as read only.
Create rest endpoints by building generic views for authors and books, defining list/create and retrieve/update/destroy operations with proper querysets and serializers in Django Rest Framework.
Configure urls for the django rest framework app by creating author and book list and detail paths at the app level and including them in the project level.
Test nested serialization in Django Rest Framework by creating authors and books via the API, running migrations and the server, then observing authors with their books.
Sample of the reviews:
Good Course. I like the teaching style, short videos with good focus subject coverage such that I can manage my time more effectively. - Mark Mneimneh
Great Course. Good Basic Knowledge of the Framework - Gus Minor
The course is good for beginners. I looked for this type of course, short and specific. I learned from it. I got a better understanding of drf. - Fidel Rosell
---
Are you a python and Django developer who wants to create python rest apis while mastering Django Rest Framework(DRF)? Are you an experienced Django Developer who wants to fill in any gaps in your knowledge of creating a REST APIs using Django REST Framework then this course is for you too.
DRF is the most widely used Web Application Development framework in the industry today. Django makes it super easy to create production ready web applications. You will start this course by learning what Django REST Framework is ,the different features that are a part of every Django REST application .You will be working hands on one feature at a time .You will then create a web application using all the knowledge you gain from those sections.
Learn what REST APIs are and why we need them
Create REST APIs using Function Based Views
Create REST APIs using Class Based Views
Use mixins, generics and ViewSets
Configure Router and Routes for your REST APIs
Secure you REST APIs using Authentication and Authorization
What are the requirements?
Knowledge of Python , Atom or PyCharm (Installation of Atom is covered in easy setup section)