Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
A Guide to Django ORM | Master the Art of Querying Database
Rating: 4.4 out of 5(49 ratings)
2,157 students

A Guide to Django ORM | Master the Art of Querying Database

Learn about virtual environment, models, migration, meta classes, database relationships, queryset API methods in Django
Created byPrabin Baniya
Last updated 1/2022
English

What you'll learn

  • Creating Virtual Environment in Python and Setting Up Django Project in that virtual environment.
  • Writing Models in Django
  • Performing CRUD Operation via Django ORM
  • Learning about different queryset API provided by Django ORM like order_by, values, only, defer, select related, prefetch related
  • Getting Familiar with Q objects and F expressions

Course content

5 sections27 lectures3h 14m total length
  • IDE and Code Editor for Django1:18

    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.

  • DB Browser For SQlite0:40
  • Introduction to Virtual Environment in Linux and Windows6:24
  • Django Project and App Setup7:31

    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.

Requirements

  • Basics of Python
  • Object Oriented Programming Using Python
  • Database Management System [Optional]

Description

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.

  1. Virtual Environments

  2. Creating and Setting up Django Project in a virtual environment

  3. Writing Models

  4. Migrations

  5. Django Admin Panel

  6. Database Relationships

  7. Primary Key, Verbose Name

  8. Model Methods

  9. Meta Options

  10. Database CRUD Operation

  11. Using order_by, values, only, defer methods

  12. Performing union, intersection, and difference using Django ORM

  13. Performing field Lookups

  14. Querying Database Relationships

  15. About Q objects, F expression

  16. Select Related and Prefetch Related

  17. Performing raw SQL query

    and many more

Who this course is for:

  • Beginner Python developer curious about web development using Django
  • Any developer who wants to understand how to setup Django in virtual environment.
  • Any django developer who wants to understand how to write models in Django.
  • Any django developer who want to understand how to query the database.
  • Any django developer who wants to understand Django ORM