• Stars
    star
    116
  • Rank 303,808 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 3 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Master the Django ORM - Object-Relational Mapper. Learn to use the Django ORM in your Django applications.

veryacademy

Django ORM Mastery Series

Master the Django ORM - Object-Relational Mapper
The Django ORM’s main goal is to facilitate data transfer between a relational database, MySQL/Postgres and many others and the Django application model. The most convenient aspect of the ORM is that it automates this transmission, such that the developer need not learn or write any SQL. This is a powerful features of Django that enables rapid development of applications developed with the Django framework.

Please join our active, growing community:
Website (Coming Soon) | Twitter | YouTube

Aims of this course

The aims of this course is to:

  • learn how to build applications using the Django framework ORM

Course Introduction

The Django ORM mastery Series is designed for students who wants to learn the Django Framework ORM in more detail than that is normally presented on Django courses. Therefore, this course is a great way to start expanding your knowledge of Django development. We start from a beginners level slowly moving into more advanced topics. I have tried to design this course to be modular so that you could also focus in on particular subjects, tutorials or aspects of the Django ORM should you prefer this mode of learning. Django as a powerful framework makes it easy to interact with database with the Django ORM. This allows you to directly map your object-oriented models to database table structures and in doing so also builds the data and table relationships.

On this course you will be taught a wide range of skills, here are a few topics that we will be learning:

  • Filter and exclude methods
  • F and Q objects
  • django-debug-toolbar
  • Annotations and aggregations

Tutorials

The free tutorials, can be found here on our YouTube channel. If you find the series of tutorials valuable, please consider donating to help us create and grow our tutorial library.

Prerequisites

  • Install Python onto your PC/Laptop
  • Optional - Visual Studio Code Editor
  • Tutorials use Windows OS (you can use other OS but it might require additional steps not detailed in the tutorials)
  • Ideally you would have some knowledge of creating a basic Django application

Who is this course for

This course tries to cater for many types of learners:

  • new developers,
  • not so new developers,
  • degree students,
  • Everyone else who is looking to learn Django in more depth

Course Content

Level 1 - What is the Django ORM?
A quick overview and demystification of the basics concepts of the Django ORM. The Django ORM is a core feature which we will be exploring in this tutorial series. You will get to know more about making queries and how that translates to SQL.

Link to Tutorial https://youtu.be/iQF6pln3Gog
Level 1 - How to perform an OR query on a database - including Q objects [Repo:2]
The Django ORM series covers a range of common functions that you will perform on a database with Django. In this tutorial we take a look at creating OR queries both in native Django statements and using Q objects. In addition we take a look at the SQL that powers the queries and look to see how we can see the performance of our queries.

Link to Tutorial https://youtu.be/XbOUjyC--Ao
Level 1 - How to perform an AND query on a database - including Q objects [Repo:3]
The Django ORM series covers a range of common functions that you will perform on a database with Django. In this tutorial we take a look at creating AND queries both in native Django statements and using Q objects. In addition we take a look at the SQL that powers the queries and look to see how we can see the performance of our queries.

Link to Tutorial https://youtu.be/yuRisebNnvU
Level 1 - How to perform a UNION query on a database [Repo:4]
The Django ORM series covers a range of common functions that you will perform on a database with Django. In this tutorial we take a look at creating UNION queries on multiple select statements. In addition we take a look at the SQL that powers the queries and look to see how we can see the performance of our queries.

Link to Tutorial https://youtu.be/_kvvHXS-OZs
Level 1 - How to perform a NOT query on a database - including Q Objects [Repo:5]
The Django ORM series covers a range of common functions that you will perform on a database with Django. In this tutorial we take a look at creating NOT queries or Django exclude as it is known on multiple select statements. We look at a basic example of exclude as well as using Q objects to build a NOT query. In addition we take a look at the SQL that powers the queries and look to see how we can see the performance of our queries.

Link to Tutorial https://youtu.be/o2ZgwV8R2Rk
Level 1 - Select and Output individual fields [Repo:6]
The Django ORM series covers a range of common functions that you will perform on a database with Django. In this tutorial we take a look at how to select individual fields from a database and output the data onto a template.

Link to Tutorial https://youtu.be/fdkgcZHA0Ew
Level 1 - Performing raw SQL queries [Repo:7]
The Django ORM series covers a range of common functions that you will perform on a database with Django. In this tutorial we introduce the idea of running your own SQL queries, thus bypassing some of the Django ORM features. This is an introductory guide to help you get start with the general concepts and structure of building raw SQL queries.

Link to Tutorial https://youtu.be/iWDvsMOngxk
Level 1 - Performing raw SQL queries without the ORM [Repo:8]
The Django ORM series covers a range of common functions that you will perform on a database with Django. In this tutorial we introduce the idea of running your own SQL queries, thus bypassing the Django ORM features. This is an introductory guide to help you get start with the general concepts and structure of building SQL queries outside of the Django ORM.

Link to Tutorial https://youtu.be/_TtBxvYwoHY
Level 1 - Django Model Inheritance Options Introduction
The Django ORM series covers a range of common functions that you will perform on a database with Django. In this tutorial we introduce the idea of model inheritance using 3 options that Django provides, Abstract models, Multi-table model inheritance and Proxy models. I give you an overview of each and provide a small example of how to use each type of inheritance option.

Link to Tutorial https://youtu.be/4Xag2FzmN60
Level 1 - Towards SQL Optimization - Django Debug Toolbar Package
Thinking more serious about Python Django means understanding a little more about the performance of our django application. As you might imagine there are many tools and methods to measure performance. Moving into that direction the django-debug-toolbar give us provide some useful information to help us start thinking about database/SQL optimizations.

This level of abstraction the ORM provides (although it does a great job) it can cloud our understanding the performance of our application. And as better performance can convert to lower running costs – its an important aspect of our development we need to know more about.

Starting your journey to database optimization, we need to understand what is happening behind the scenes or more importantly monitor SQL performance. If you have seen the other tutorials in this series we already know that we can collect information about SQL queries that be being executed. In this tutorial, although there are many various ways to log SQL queries, here we take a look at the package django-debug-toolbar – which as you will see provides more than just SQL information. Overall, it provides us some great insights into our application.

Link to Tutorial https://youtu.be/riBTlU6iMc4

Level 1 - First Look: Transaction Atomicity
Django’s default behaviour is to run in autocommit mode, By default each query is immediately committed to the database, each SQL query gets wrapped in its own transaction and a transaction is automatically committed or rolled back.

A transaction is a sequence of one or more SQL operations that are treated as a unit. All operations should be executed successfully in order to call the transaction successful. Transactions ideally have four properties, commonly known as ACID. This is a standard set of properties aimed to guarantee database transactions are processed reliably which is especially concerned with how a database recovers from any failure.

Atomicity is the defining property of database transactions. Atomic require us to create a block of code within which the atomicity on the database is guaranteed.

Link to Tutorial https://youtu.be/BchP5Mn1IYg

Level 2 - Multiple Database Setup [Repo:9]
Python Django multiple database setup example with 3 databases and 2 applications. In this tutorial we look at Django’s support for interacting with multiple databases. This is a beginners introductory example helping us get familiar with setting up multiple databases with Django.

Link to Tutorial https://youtu.be/g-FCzzzjBWo
Level 2 - Python Django Inheritance Optimization Exercise [Repo:20]
In this Python Django tutorial we work through a set of examples to develop a better understanding of Django model inheritance. We try and answer the question of how to design a product table where we may need to have many types of product thus needing to create multiple tables.

Link to Tutorial https://youtu.be/Y4ahqzSs7nI

Community Driven Content

I activity try and promote feedback to taylor courses to your needs and wishes. Here is a list of features requested by community. If you would like to request any other feature not listed here - please visit our YouTube channel and make a comment.

Next Planned Tutorials

  • More coming soon...

Suggestions

  • Please visit our YouTube channel to make suggestions

Contributing

This course welcomes contributions and suggestions. At present, we are not accepting any code contributions. When the tutorials have finished the project will be open to welcome code contributions. If you find any errors or have trouble with any of our code - please get in contact with us through our YouTube channel.

Instructor

Zander, the founder of Very Academy has over 20 years of development and educational lecturing experience. He is now focused on developing free technical courses and resources on a range of subjects.

License

MIT License

More Repositories

1

django-ecommerce-project

The Django-Ecommerce is an open-source project initiative and tutorial series built with Python and the Django Framework.
Python
396
star
2

docker-mastery-with-django

Docker Mastery with Django is an open-source initiative and tutorial series. Learn from a beginner level how to use Docker, compose and Kubernetes for django projects.
HTML
207
star
3

django-ecommerce-project-v2

Python
81
star
4

YT_FastAPI_Beginner_Fast-Track

Python
73
star
5

YT-Django-DRF-Simple-Blog-Series-Part-1

HTML
65
star
6

yt-nginx-mastery-series

JavaScript
63
star
7

pytest-mastery-with-django

A Pytest Django Course - Learn how to implement Pytest with Django.
Python
62
star
8

django-learning-pathway

(Currently in development) Learning pathways for learning Django.
51
star
9

YT_FastAPI_Celery_Redis_Flower_Introduction

Python
50
star
10

YT-Django-DRF-Simple-Blog-Series-JWT-Part-3

HTML
44
star
11

YT-Django-Project-Chatroom-Getting-Started

Python
44
star
12

Django-4.x-ORM-Course

Python
43
star
13

YT-Django-Theory-Create-Custom-User-Models-Admin-Testing

Python
34
star
14

YT-Django-Docker-Compose-Celery-Redis-PostgreSQL

Python
34
star
15

YT-Django-CBV-Mini-Series

Python
29
star
16

YT-Vue-Django-Auth-JWT

Python
27
star
17

YT_NextJS_DRF_Ecommerce_2021_Part1

Python
24
star
18

YT-Vue-with-DjangoRestAPI

Python
22
star
19

FastAPI_AWS_Lambda_Deployment

Python
22
star
20

YT_FastAPI_Beginner_Fast-Track-GraphQL

Python
21
star
21

YT_FastAPI_User_Token_Authentication

Python
21
star
22

YT-Django-DRF-Simple-Blog-Series-Social-Login-Part-9

HTML
20
star
23

YT-Django-Iris-App-3xj9B0qqps

Python
19
star
24

YT-Django-Celery-Series-Part3-Schedule-Tasks

Python
19
star
25

Django-Permissions-Mastery

Python
18
star
26

YT-Django-Allauth-Google

Python
17
star
27

YT-Django-DRF-Simple-Blog-Series-File-Uploading-Part-8

HTML
16
star
28

YT-Django-Infinite-Scroll-Example-1

JavaScript
14
star
29

YT-Django-DRF-Simple-Blog-Series-Simple-CRUD-Part-7

HTML
14
star
30

YT-GraphQL-Django-Get-Started

Python
14
star
31

YT_Inline_Formset_CBV_Ex1

Python
13
star
32

YT_Django_Two_Factor_Example

Python
12
star
33

YT_Django_TensorFlow_Image_Classification_Basic

Python
12
star
34

YT-GraphQL-User-Authentication-GraphQL-Auth

Python
12
star
35

YT-Django-Docker-Compose-Introduction

Python
11
star
36

YT-Django-API-Quiz-Part1

Python
11
star
37

YT-Django-RestAPI-React-Frontend

Python
11
star
38

Django-Tutorials

JavaScript
10
star
39

YT_Django_Project_Ecommerce_v1_Part1

Python
10
star
40

YT_Django_Admin_csv_Button_Upload

Python
10
star
41

YT-React-Django-Chatroom-Part-3-Django-Backend

Python
10
star
42

YT-Django-Docker-Deploy-Heroku-Container

Python
10
star
43

YT_Faker_Intro

Python
10
star
44

YT_NextJS_DRF_Ecommerce_2021_Part2_Sessions_HttpOnly

JavaScript
9
star
45

YT-Django-Simple-Blog-App-Part5-Comments-MPTT

Python
9
star
46

YT-Django-Celery-Series-email-example

Python
9
star
47

YT_NextJS_GraphQL_Django_Ecommerce_2021_Part1

Python
9
star
48

YT-GraphQL-Django-Queries-Introduction

Python
9
star
49

YT_Django_async_views_ex1

Python
8
star
50

YT-Django-GitHub-Actions-Testing

Python
8
star
51

YT-React-Django-Chatroom-Part-3-React-Backend

JavaScript
8
star
52

YT_Django_Internationalization_Part_1

Python
8
star
53

YT-Django-Testing-Series-Introduction-models

HTML
8
star
54

YT-Django-DRF-Simple-Blog-Series-Permissions-Part-2

HTML
8
star
55

YT_Django_Project_Ecommerce_Part_6_Final

Python
8
star
56

Python-Beginner-PY001

8
star
57

yt-django-4-baseline-multiple-image-form

Python
7
star
58

YT-Django-Celery-Series-Intro-Install-Run-Task

Python
7
star
59

YT-Django-DRF-Simple-Blog-Series-Filters-Basic-Search-Part-6

HTML
7
star
60

YT-Django-Heroku-Deploy-Channels-Daphne

Python
7
star
61

YT-Django-Simple-Blog-App-Part8-User-Authentication-System

HTML
6
star
62

YT_Django_Project_Ecommerce_Part_8_PayPal

Python
6
star
63

YT-Django-Media-Static-AWS-S3

Python
6
star
64

YT-Django-Docker-Compose-PostgreSQL-Volume

Python
6
star
65

YT_Django_Core_Middleware_Intro

Python
6
star
66

YT-XAMPP-SSL-Config

6
star
67

YT_Django_Project_Ecommerce_Part_3_Final_v1

HTML
5
star
68

YT-Django-args-kwargs

HTML
5
star
69

YT_NextJS_GraphQL_Django_Ecommerce_2021_Part2_HttpOnly_Cookie_JWT

JavaScript
5
star
70

YT-Django-Image-API-Service-Project-Introduction-Build

Python
5
star
71

YT_Django_Project_Ecommerce_v1_Part2-Basket-Sessions

Python
5
star
72

YT-Django-Simple-Blog-App-AF4ji8bb1M8

Python
5
star
73

YT-Django-RestAPI-Webpage

Python
5
star
74

yt-django-crontab-database-actions

HTML
5
star
75

YT-Django-DRF-Simple-Blog-Series-Viewset-Routers-Part-4

HTML
5
star
76

YT-Vue-Django-ML-Iris-API

Python
4
star
77

discord-quiz-bot-project

Python
4
star
78

YT_Crash_Course_Django_2021

Python
4
star
79

YT_Docker_Compose_Start_Django_App

Python
4
star
80

Python-Excel

Python Excel
4
star
81

YT_Django_Multiple_Database_Example1

Python
4
star
82

YT-Django-Simple-Blog-App-Part6-Simple-Search

Python
4
star
83

Python-Challenges

Jupyter Notebook
4
star
84

YT-Django-Admin-Series-SummerNote

JavaScript
3
star
85

YT-django-search-full-text-search-introduction

Python
3
star
86

YT-Django-Simple-Blog-App-Part4-FileUploads

Python
3
star
87

YT-Django-DRF-Simple-Blog-Series-Schema-Documentation-Part-5

HTML
3
star
88

YT-Django-User-Auth

Python
3
star
89

YT-FlaskAPI-Vue-ML-Wine-Classification

Jupyter Notebook
3
star
90

YT-Django-Simple-Blog-App-Part15-MPTT-AJAX-Comments

HTML
3
star
91

YT_Django_Project_Ecommerce_Part_7_Wish_List

Python
3
star
92

YT-Django-API-Quiz-React-Frontend-Part2

Python
3
star
93

Python-Intermediate-PY003

3
star
94

YT-Django-ORM-introduction-noORM-raw-sql-part8

Python
3
star
95

YT-Django-Admin-Series-Admin-Template

JavaScript
3
star
96

YT_Docker_Django_Beginners_First_Steps

Python
3
star
97

selenium-mastery-with-django

Python
3
star
98

YT-Django-Simple-Blog-App-Part11-Like-Feature-AJAX

HTML
3
star
99

YT-Django-Simple-Blog-App-Part2-Comments

Python
3
star
100

YT-Django-Simple-Blog-App-Part13-Towards-Adv-Search-with-PostgreSQL

HTML
3
star