
Explore the IDEs and lightweight code editors you can use for Django projects, and learn how to download and set up the tools across different operating systems.
Learn to create a single Django project and blog app, set up a virtual environment, and add category, post, and comment models with a user authentication model.
Learn how Django migrations synchronize models with the database schema by creating migration files and applying them with makemigrations and migrate.
Explore Django ORM model field options, including null, blank, default, unique, choices, max_length, primary keys, and auto fields, with practical category and post examples.
Explore Django ORM relationships for many-to-one and many-to-many, using User, Category, and Post models, with foreign keys and cascade delete, and admin-based category assignment.
Build a Django ORM comments app by defining a blog post model and a comment model with a many-to-one relationship, linking comments to a user.
Learn how to perform complex lookups using Q objects to combine conditions with or and and, filter comments on a post, and apply not to exclude admin comments.
Master how Django ORM F expressions let you reference database fields in queries without loading them into memory, then filter posts by published on and last updated on times.
Learn how select_related and prefetch_related optimize Django ORM queries, reduce database hits, and efficiently fetch related objects like categories, users, and posts in one or few queries.
Execute raw SQL queries using the Django ORM to retrieve post instances and print their titles, demonstrating how raw queries return object instances and can be iterated.
Navigate the Django documentation overview to learn how to query databases with the ORM, explore models, many-to-many relationships, inheritance, and practical reference links for building Django projects.
In this course, you are going to learn various concepts related to Django ORM. Django ORM is a core and powerful component of the Django Framework. Using this ORM, we can simplify the database-related operations in an object-oriented way. In this course, you are going to learn how to model for a Blogging project. The agenda is not to make a blogging site, but to teach you about what can you do with the Django ORM and what Django ORM has to offer, to make your project performant. Then, we will deep dive into querying the database which is the most important section of this course. Without knowing how to query the database, you are never going to feel confident as a Django developer. So, you will be taught different things about queryset API provided by Django ORM in order to interact with the databases. You are going to learn various methods which are used in CRUD operations. Like order_by, values, only, defer, select_related, prefetch_related, Q objects, F expressions, raw SQL query, and many more.
At the end of this course, you will get familiar with the following topics, and you can apply this learning in any Django project.
Virtual Environments
Creating and Setting up Django Project in a virtual environment
Writing Models
Migrations
Django Admin Panel
Database Relationships
Primary Key, Verbose Name
Model Methods
Meta Options
Database CRUD Operation
Using order_by, values, only, defer methods
Performing union, intersection, and difference using Django ORM
Performing field Lookups
Querying Database Relationships
About Q objects, F expression
Select Related and Prefetch Related
Performing raw SQL query
and many more