Django

Models & ORM

Learn how Django represents and interacts with your database through models and the ORM (Object-Relational Mapping) layer. This section covers how to define data structures using models, how those models translate to database tables, and how to query, filter, and manipulate data using Python instead of raw SQL.

Understanding Django Models: A Beginner’s Guide

This beginner-friendly article introduces Django models and explains how they define the structure and behavior of application data. It covers model classes, fields, field options, primary keys, relationships, methods, metadata, migrations, ORM operations, and Django admin registration. By the end, developers new to Django will understand how models connect Python code to database tables and form the foundation of a Django application.

Django models define the structure of an application’s data. They provide a Python-based interface for creating database tables, storing records, ...

Understanding makemigrations, migrate, and Django’s Migrations Directory

This article explains how Django uses migrations to keep model definitions and database schemas synchronized. It covers the roles of makemigrations and migrate, the structure of each app’s migrations directory, migration dependencies and operations, inspection commands, data migrations, conflicts, common mistakes, and recommended development practices.

Django models define the structure of an application’s data, but editing a model does not directly change the database. ...

Join the Newsletter

Practical insights on Django, backend systems, deployment, architecture, and real-world development — delivered without noise.

Get updates when new guides, learning paths, cheat sheets, and field notes are published.

No spam. Unsubscribe anytime.



There is no third-party involved so don't worry - we won't share your details with anyone.