Django Glossary
A complete glossary of Django terms and definitions designed to make learning Django simple and accessible. Explore key concepts, core features, and essential terminology all in one place.
Table of Contents
- 1 Core & Project Structure
- 2 Models & Orm
- 3 Migrations
- 4 Views & Url Routing
- 5 Requests & Responses
- 6 Templates
- 7 Static & Media
- 8 Forms & Validation
- 9 Auth, Permissions & Security
- 10 Admin
- 11 Caching
- 12 Internationalization & Time
- 13 Signals
- 14 Management & Cli
- 15 Testing
- 16 Framework Utilities & Apps
Topic: Core & Project Structure
The Core & Project Structure terms explain how a Django project is organized and configured. These concepts cover files like manage.py, settings.py, and urls.py, along with project-level settings that control how your web application runs.
Django
MTV Pattern
Project
App
manage.py
python manage.py runserver
settings.py
urls.py
path('blog/', include('blog.urls'))
wsgi.py
asgi.py
INSTALLED_APPS
SECRET_KEY
DEBUG
ALLOWED_HOSTS
Environment Variables
DJANGO_SETTINGS_MODULE
Topic: Models & ORM
Models and the ORM (Object-Relational Mapper) allow Django developers to work with databases using Python code instead of raw SQL. These terms explain how to define models, query data, and manage relationships between different tables.
Model
Field
CharField
title = models.CharField(max_length=100)
TextField
IntegerField
BooleanField
FloatField
DateField
DateTimeField
SlugField
EmailField
URLField
UUIDField
AutoField
ForeignKey
ManyToManyField
OneToOneField
Manager
QuerySet
filter()
Book.objects.filter(author='John')
get()
Book.objects.get(id=1)
exclude()
order_by()
values()
annotate()
aggregate()
Q Objects
F Expressions
Topic: Migrations
Migrations in Django are a way to apply and track changes you make to your models (database schema). They help keep your database in sync with your models without writing raw SQL.
Migrations
makemigrations
python manage.py makemigrations
migrate
python manage.py migrate
Migration Operations
Migration Squashing
inspectdb
python manage.py inspectdb
Topic: Views & URL Routing
Views and URL Routing define how incoming web requests are handled and matched to the right logic and templates. These terms cover function-based views, class-based views, URL patterns, and reverse routing in Django 5.2.
View
Function-Based View (FBV)
Class-Based View (CBV)
Generic Views
TemplateView
path('', TemplateView.as_view(template_name='home.html'))
ListView
DetailView
FormView
CreateView
UpdateView
DeleteView
Mixins
LoginRequiredMixin
URL Dispatcher
path()
re_path()
include()
Namespaces
reverse()
redirect()
Http404
Topic: Requests & Responses
Requests and responses are at the core of Django’s request/response cycle. These terms explain how Django handles incoming HTTP requests and returns responses like HTML, JSON, or files.
HttpRequest
HttpResponse
return HttpResponse("Hello, world!")
JsonResponse
return JsonResponse({"status": "ok"})
StreamingHttpResponse
QueryDict
request.GET
request.POST
request.FILES
request.user
request.session
Topic: Templates
Templates in Django define how data is presented to users, usually in the form of HTML pages. They use the Django Template Language (DTL) to mix static HTML with dynamic content.
Template
Django Template Language (DTL)
Template Inheritance
Template Tags
Template Filters
{{ name|upper }}
Context
Context Processors
include tag
{% include 'navbar.html' %}
url tag
{% url 'blog:detail' post.id %}
static tag
<img src="{% static 'images/logo.png' %}">
Topic: Static & Media
Django separates static files (CSS, JavaScript, images) from media files (user uploads). These terms explain how to configure and serve them correctly in development and production.
Static Files
STATIC_URL
STATIC_URL = '/static/'
STATIC_ROOT
collectstatic
python manage.py collectstatic
Media Files
MEDIA_URL
MEDIA_URL = '/media/'
MEDIA_ROOT
FileField
ImageField
Storage Backends
Topic: Forms & Validation
Django provides a powerful forms library that handles HTML form rendering, validation, and saving data to models. These terms explain how forms work and how to ensure data is valid before saving.
Form
ModelForm
Form Fields
Widgets
is_valid()
cleaned_data
validators
ValidationError
form.save()
csrf_token
{% csrf_token %}
Topic: Auth, Permissions & Security
Django includes a built-in authentication and authorization system that handles users, groups, and permissions. It also provides middleware and settings to secure applications against common web vulnerabilities.
Authentication
Authorization
User Model
AbstractUser
AbstractBaseUser
Custom User Model
Permissions
Groups
Authentication Backends
Password Hashers
Password Validators
Sessions
CSRF Protection
SecurityMiddleware
XSS Protection
Clickjacking Protection
X_FRAME_OPTIONS
SECURE_SSL_REDIRECT
HSTS (SECURE_HSTS_SECONDS)
Topic: Admin
Django comes with a powerful built-in admin interface for managing application data. These terms explain how to customize and extend the admin site for your project.
Django Admin
ModelAdmin
admin.register
list_display
search_fields
list_filter
readonly_fields
Inlines
Admin Actions
Admin Site Customization
Topic: Caching
Django includes a caching framework to improve performance by storing frequently accessed data. These terms explain how to use different cache backends and caching techniques in Django 5.2.
Caching Framework
Cache Backends
Per-site Cache
Per-view Cache
Template Fragment Cache
cache_page decorator
@cache_page(60 * 15)
def my_view(request): ...
Low-level Cache API
Cache Keys
Cache Invalidation
Topic: Internationalization & Time
Django has built-in support for internationalization (i18n), localization (l10n), and timezone handling. These terms explain how to translate content and work with dates and times correctly.
i18n (Internationalization)
l10n (Localization)
Timezone Support
USE_TZ
LocaleMiddleware
gettext
gettext_lazy
Format Localization
Language Switching
Topic: Signals
Signals in Django allow different parts of an application to communicate with each other. They help trigger actions automatically when certain events occur, such as saving or deleting a model instance.
Signals
pre_save
post_save
pre_delete
post_delete
m2m_changed
receiver decorator
dispatch_uid
Topic: Management & CLI
Django includes a set of management commands to handle tasks like running the server, managing the database, and creating apps. These terms explain the most commonly used commands in Django 5.2.
startproject
django-admin startproject mysite
startapp
python manage.py startapp blog
runserver
python manage.py runserver
createsuperuser
python manage.py createsuperuser
shell
check
showmigrations
dumpdata
loaddata
Custom Management Commands
Topic: Testing
Django provides a built-in testing framework based on Python’s unittest module. These terms explain how to write and run tests for your Django applications.
Test Runner
TestCase
SimpleTestCase
TransactionTestCase
LiveServerTestCase
Client
response = self.client.get('/home/')
RequestFactory
Fixtures
setUp / tearDown
assertContains
Topic: Framework Utilities & Apps
Django includes several built-in frameworks and utilities that extend its functionality. These terms explain optional apps and helpers commonly used in Django projects.