Home / Django Beginner
Django Beginner
Django from a first view to a finished blog app: URLs, templates, models, migrations, the admin, forms, sessions and users. Every example runs for real against Django.
Django is the Python framework for building websites that keep data. Fifty short lessons move you from a first view to a finished blog app. Every example runs for real against Django 6.1.3.
Course contents
Work top to bottom — the sidebar is the course. Topics later in the list assume the ones before them.
Getting Started
Start: Django Introduction ❯URLs and Views
- Your First Django View
- Django URL Patterns
- Django Path Converters
- Django View Arguments
- Including App URLs
Templates
- Your First Django Template
- Django Template Variables
- Django Template Filters
- Django Template Tags
- Django Template Conditions
- Django Template Inheritance
- Escaping in Django Templates
Models
- Your First Django Model
- Django Model Fields
- Django Migrations
- The Django Shell
- Creating Objects in Django
- Reading Objects in Django
- Updating and Deleting Objects
The Admin
- The Django Admin Site
- Registering Models in the Admin
- Django Admin List Display
- Django Admin Search and Filters
Forms
- Your First Django Form
- Django Form Fields
- Validating Django Forms
- Handling a POST in Django
- Django ModelForms
Static Files
Start: The Django Static Folder ❯Sessions and Users
- Django Sessions
- Django Cookies
- The Django User Model
- Django Login and Logout
- Protecting Django Views
Errors
Start: Handling 404 in Django ❯Apps and Structure
Start: What Is a Django App? ❯APIs and Finishing
Start: Building a JSON API with Django ❯Django Capstone: A Blog
Beginner · ⏱ 8 min · standalone lesson
Learn Django
Django is a Python framework for building websites that keep data. A browser asks for one address, and a view in Django answers with a page. The framework takes care of the web plumbing. Your code decides what each address returns and which rows it shows. URLs name the addresses. Views build the answers. Templates hold the pages. Models hold the data.
Skills arrive one at a time, each one resting on the last. A first project and the development server open the course, then views and URLs, then templates. Models follow, with the migrations that shape the database, then the admin site that edits the rows. Forms, static files, sessions, and users come next, then error pages, apps, and settings. A JSON API lesson leads into the blog capstone. There the pieces come together as one working app.
Eleven groups hold the fifty lessons, plus the capstone on its own. Every closing example is a whole program, checked with the Django test client, which reaches the app without a server. What the run prints is what the page shows. The test client is the workbench for the whole course. It asks for addresses, posts forms, logs users in, and reads cookies, all from one Python file.
What you will learn
Fifteen things the course teaches, in the order they arrive:
- Start a Django project and serve it with the development server
- Answer addresses with views, URL patterns, and path converters
- Share URL files between a project and its apps with include
- Render templates with variables, filters, tags, and inheritance
- Keep typed text safe with escaping, and switch the safe filter on with care
- Shape data with models, fields, and migrations
- Create, read, update, and delete rows through the ORM
- Edit rows in the admin site, with list display, search, and filters
- Build HTML forms, validate them, and handle a POST
- Save form data straight into a model with a ModelForm
- Serve CSS and images out of the static folder
- Remember readers with sessions and cookies, and log users in and out
- Answer missing pages with custom 404 pages
- Split a project into apps, read its settings, and shape a JSON API
- Finish a blog app that ties the course together
Who this Django course is for
No web knowledge is needed. The opening lessons say what a request is before any view answers one. Each new term gets its meaning inside the example that needs it. A little Python helps: variables, functions, lists, dicts, and classes. Without that Python, begin with the Python Beginner course.
All fifty lessons add up to four hours and six minutes. The models and admin lessons slow most readers down. That is expected. Those lessons are worth a second read.
Students bound for web work will find the opening lessons easy ground before bigger frameworks. Hobbyists planning a small site get the footing a Django app expects. Readers coming from Flask meet the same ideas in Django dress. Routes become URL patterns, and the app factory becomes settings and apps.
How this course works
Every example runs for real against Django 6.1.3. The printed output matches what the run gave. The test client asks the questions, so no lesson needs a server running to prove its point. One server lesson runs the real development server with a timeout and shows the startup lines it prints.
Each lesson ends with a running program and one question to answer. The teaching order never changes. Models make little sense before templates land. Forms make little sense before a request lands. Login makes little sense before sessions land. Your progress lives in this browser, on the machine where you read. No account is needed, and no lesson asks for payment.
Frequently asked questions
Do I need to know Python before Django?
Some Python helps: variables, functions, lists, dicts, and classes. The course explains every Django idea from scratch, but it does not teach Python itself. The Python Beginner course covers the Python this course needs.
Do the examples need a running server?
No. Every closing example runs through the Django test client, which reaches the app without a server. Only the server lesson starts the real development server, and it quotes the startup lines it prints.
What version of Django does the course use?
Django 6.1.3. Every example was run against it, and the pages show exactly what the runs printed.
Does Django need a database?
Django keeps its data in a database. The course uses SQLite, the small file database Django ships with, so nothing extra needs installing. Models, migrations, and the admin all work against it.
What do I build by the end?
A small blog app: posts listed on a page, one post per page, and a form that adds a new post. The capstone joins views, URLs, templates, models, and forms into one working app.
Next steps
- Python Beginner ❯ — The Python this course needs, first: 116 lessons, a first program through files and classes.
- Python Intermediate ❯ — After Django, stretch the Python further: 52 lessons on larger programs, classes, files, and error handling.
- SQL ❯ — Give your Django apps something to work with. The SQL course holds 51 lessons on putting questions to a database with select, filter, joins, and window functions.