Django Models

From my past post: https://me.chrisdevcode.com/posts/django-architecture-models-views-templates/ In Django, a model is what defines your database table. It’s basically a python class that maps to a single table in your database. For example, class Users will simply be the Users table: class Users(models.Model): full_name = models.CharField(max_length=200) bio = models.TextField() def __str__(self): return self.full_name Django’s documentation on models: https://docs.djangoproject.com/en/5.2/topics/db/models/ In Django, a model is a special type of object that represents and stores data in the database. A database is simply a structured collection of data — where you keep information such as users, blog posts, and more. ...

July 2, 2025 · 2 min · Chris Achinga

Django Architecture: Models, Views and Templates

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. At its core, Django follows the MVT architecture: Model, View, and Template — which is similar in principle to the traditional MVC (Model-View-Controller) pattern. Side note, you can build your Django application using your desired architecture. Django doesn’t necessarily specify any particular form of architectural layering. This article is an extension of the previous post: https://me.chrisdevcode.com/posts/django-project-structure/ ...

July 1, 2025 · 3 min · Chris Achinga

Django Project Structure

Before we proceed, it’s important to understand how a typical Django project is structured. Django’s project structure is thoughtfully designed to make your code clean and maintainable. Whether building a simple blog or a complex web application, understanding this structure is critical for managing your project efficiently as it grows. Below, we’ll explore the key components of a typical Django project and how they work together. Assumptions This post will assume that you have your development already configured for Django/Python development. ...

June 30, 2025 · 3 min · Chris Achinga