
Andre Pretorius welcomes you to the Python Django REST API crash course for beginners, sharing his software development and AWS solutions architect background with Django, web apps, and cloud computing.
Identify the essential prerequisites for this course, including basic knowledge of Django and foundational HTML, CSS, and JavaScript, so you can confidently proceed.
Learn the basics of building a REST API in Django, using Django REST Framework, Django framework, and how to serialize data, with Vue endpoints and full stack topics.
Access course support via the Q&A forum, with the instructor ready to help and answer questions. Tackle issues on your own first, then use the Q&A thread if you’re stuck.
Structure your learning with a step-by-step approach to the sort process, set a consistent schedule, stay committed without overdoing it, and pursue slow, steady progress for long-term knowledge.
Learn to build a basic CRUD API and a registration and login API in Django, using serializers, view endpoints, and Postman to test get, post, put, and delete.
Download the final project code and slides from the resources folder, including the zip file and extra files. Check each lecture's resources for code snippets or references as you progress.
Install python 3.11.1 on Windows and add to path; install VS Code on Windows with path and a desktop icon; install extensions Plastic, Prettier, Auto Rename Tag, Django support.
Install python on macOS with a 3.11.x version, verify with python3 --version and pip3 --version; install Visual Studio Code and configure extensions: plastic, prettier, auto rename tag, and django support.
Set up a Django project on Windows by creating a dev folder, configuring a Python virtual environment, installing Django, and starting Elevate with manage.py runserver.
Set up a macOS Django project by granting terminal full disk access, creating a dev folder, activating a virtual environment, installing Django, and starting the elevate project to run locally.
Create and configure a Django app named API and add it to installed apps. Use terminal or Visual Studio Code to manage the virtual environment and run the server.
Connect the basic urls and views by creating the app’s urls.py, wiring path entries to views, and including them in the main project’s urls.py to expose the API routes.
Apply all default Django migrations to the SQLite database by running python manage.py migrate, migrating installed apps' initial migration files.
Create and register a Django product model with name, description, and price; define __str__ to show the product name, migrate, register in admin, create a superuser, and run the server.
Understand what a rest api is and how applications communicate via http. Explore how a Django back end talks to the front end like Angular, Vue, or React using json.
See how a Django backend and a React frontend exchange data with JSON via API endpoints, enabling the client and server to perform get, post, put, and delete operations.
Install and set up the Django rest framework in a virtual environment, add wrist_framework to installed apps, and run the server to verify the web API setup.
Create a product serializer using Django Rest Framework to translate a Python based product model to JSON by defining serializable class, meta data class, and fields id, name, description, price.
Learn how a serializer in the Django REST framework converts a Python object into JSON, using key-value pairs like id, name, description, and price to power API data.
Learn the four core http methods for rest APIs in Django: get retrieves data, post creates data, put updates or replaces current data, and delete removes data, with hands-on practice.
Explore CRUD—create, read, update, delete—and how these operations map to HTTP methods in a REST API, with post for create, get for read, and delete for remove.
Master creating view endpoints for a Django rest framework API, returning JSON data from a product list via a GET request using a serializer and response.
Download and set up Postman, a tool for developing and testing APIs, install the desktop app, create and verify an account, and practice basic rest requests.
Use the get request to obtain all objects from the product model and return a JSON response with Django Rest framework, testable in Postman when the server is online.
Handle post requests in Django REST framework by deserializing and validating request data, creating product objects, and returning serialized responses tested via Postman.
Fetch a specific product instance with a get request using a dynamic url and a primary key, serialize the result, and return it as json.
Master the put request to update a specific object by deserializing input, validating data, and saving changes, demonstrated by updating product 6 from Fanta Orange to Fanta Lime in Postman.
Delete a product using a delete request in a Django REST API, validate the id exists, return a 204 no content response, and test with Postman.
Apply best practices for status codes in Django REST APIs, refining control flow with elif and clear get and post responses, including 204 no content and 400 bad request.
Enable browser access to JSON by updating Django REST framework URL patterns with the format suffix patterns function, adjust views, and test products.json.
Build a Django REST framework user registration serializer using the default user model, with username, email, password, and password2, including extra_kwargs write_only, password validation, and hashed saving.
Build a Django REST framework registration API using a serializer to validate username, email, and password, save the user with hashed password, and return a response.
Explore the token authentication docs for the Django Rest Framework to understand a simple login-based API. Learn about authentication options such as basic, token, session, and remote user.
Learn to set up token authentication for the Django Rest Framework by installing the rest framework token app, migrating the database tables, and running the server.
Create a post save receiver in Django to auto generate and attach a token to each new user using the post save signal and the Django REST framework token model.
Test authentication tokens by deleting all users, recreating them, and verifying that each user gets a unique token after logging into the admin and generating tokens.
Generate authentication tokens through a REST API by registering and logging in users, returning the token via the token model and the Django REST Framework login view.
Thank you for enrolling in this course; it means a lot, and I hope it was valuable. Please leave a review or rating to help maintain quality.
Welcome! I'm here to teach you about the
-- Please read carefully --
This course is primarily intended for developers who have a basic knowledge of Django and ZERO knowledge of REST API's.
If you have primarily front-end development skills you'll be able to master the hidden language of the backend, since you will understand what is happening 'under the hood'. This will give you more confidence and broaden your understanding of how the front-end and back-end communicate with each other.
By the end of this course you will be able to:
- Create a virtual environment
- Initialise the DRF (Django Rest Framework)
- Create your serializer
- Create your view endpoints
- Handle POST, GET, PUT and DELETE requests
- Learn how to consume your API
- Understand one of the most complex concepts in back-end development
- Create a CRUD API
- Create a Register and Login API
I want to help YOU to build your very own REST API with Python and Django.
The Python Django: Build a Simple REST API for Beginners course has been structured in a simple and logical order. Everything that has been designed from the styling to the graphics and topics covered is crafted with the absolute duty of care towards the student.
It consists of practical hands-on demonstrations.
The course is structured in a logical and cohesive way - not just random lectures here there and everywhere.
It starts off very simple and then builds on gradually throughout the course.
The course includes the full project source code.
The Python Django: Build a Simple REST API for Beginners course is a highly practical course and allows you to apply your knowledge
Your instructor:
My name is Arno Pretorius. I'm a qualified IT teacher who has taught programming both in-person and online. My main passions are teaching and technology, so I thought why not just combine the best of both worlds to create something truly amazing and valuable. Over the years, I have created and deployed many real-world Django-based applications, including a job portal for university graduates and an exclusive social network.
I'm a Software developer, an AWS Solutions Architect and Developer associate. I have a keen interest in cloud computing, web development and everything that relates to programming and technology.
So, let's go and become fluent in Django.
Trust me you are in good hands!
This course also comes with:
- 3 hours of on-demand video
- Full lifetime access
- A Udemy certificate of completion
- Access on mobile and TV
Join me in this course if you want to master the fundamentals of learning how to build a REST API with Django.