Web Development · WDC-38

Basic Python Django

Basic Python Django is a foundation course in building web applications with Python and Django 6, from a focused Python refresher, URLs, views and templates to models, the ORM, the Django admin, forms, user accounts, a first REST API and deployment with Docker. It suits students, teachers and IT staff who already know some Python.

Updated
From 6,210 THB / person 6,900 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration18 hours · 3 days
  • FormatOnsite / live online
  • Next roundOn request
  • CertificateIncluded

Course overview

Django is a long-established Python web framework for building database-driven web sites and business systems, because it comes with everything you need, from the ORM, admin site, forms and user system to protection against common vulnerabilities. Teams can build systems quickly without assembling tools one by one, and grow into APIs or larger systems later.

This course takes learners with some Python through a focused refresher of the Python that Django needs, then builds a web application with Django 6, from URLs, views and templates to models, the ORM and the Django admin. Learners write class-based views, use template partials, build forms with validation, add user accounts and permissions, carry out CRUD against MySQL and write a first REST API, and finish by writing tests and deploying the site with Docker. (3 days, 6 hours per day, 18 hours in total, Beginner level.)

What you’ll gain

  • Review and use the parts of Python that Django development relies on
  • Understand the MVT architecture and set up a Django project
  • Create URLs, views and templates and manage static files
  • Design models and work with the database through the ORM
  • Work with forms, pass values and validate data
  • Build user accounts and set authentication and permissions
  • Write a basic REST API with Django
  • Write tests and deploy a Django site with Docker

Who this course is for

  • Students and beginners who want to build web applications with Python
  • Teachers, lecturers and trainers who want to teach web development with Django
  • IT staff and system administrators who build internal business systems
  • Developers from other languages who want to start with Python and Django

Prerequisites

  • Some basic Python, such as variables, conditions and loops
  • Able to write basic HTML and CSS
  • Basic understanding of databases and SQL
  • Able to use Windows or macOS, and a laptop that can run Docker Desktop

Curriculum

Course Details

This course is the 2026 edition of Basic Python Django (Basic Course). It runs for 3 days, 6 hours per day (18 hours in total, 09:00-16:00), as lectures with labs. Beginner level. This edition moves to Django 6 on Python 3.14 with projects managed by uv, shortens the Python basics from a full day to the parts Django really uses, drops Jinja2 in favour of the Django Template Language with template

partials, runs MySQL on Docker, and adds ORM queries, the Django admin, testing and deployment with Docker, while keeping the original core of templates, databases, forms and validation, authentication and a first REST API. Those who want to go further can continue with Building REST APIs with Python or Advanced Python Django. Every lab uses open source or free tools. Learners take home a lab guide and the source code of a shop web site.

Day 1 Python for Django and Starting a Project

Section 1: Lab: Setting Up Your Tools

  • Install uv and let it install Python 3.14
  • Create a project and virtual environment with uv
  • Set up VS Code and extensions for Python and Django
  • Keep code in Git with a .gitignore file
  • Lab: run a first Python program in your own project

Section 2: Lab: The Python You Need for Django

  • Data types, variables, operators and f-strings
  • Strings, numbers, lists and dictionaries
  • Conditions, loops and comprehensions
  • Handling errors and exceptions
  • Lab: a product list program using lists and dictionaries

Section 3: Lab: Functions, OOP and Packages

  • Functions, parameters, *args and **kwargs, and type hints
  • Classes, objects and inheritance, the basis of models and views
  • Decorators that Django uses often
  • Modules, packages and installing packages with uv add
  • Lab: product and order classes in OOP style

Section 4: Introducing Django and the MVT Architecture

  • What Django is and the kinds of work it suits
  • The MVT idea and the path from request to response
  • Create a project with startproject and an app with startapp
  • settings.py, DEBUG and keeping secrets safe
  • Lab: run a first site with runserver

Section 5: Lab: URLs, Views and Templates

  • Define URLs with path() and pass values through the URL
  • Write function views and pass data to templates
  • The Django Template Language: tags, filters and conditions
  • Base templates, template inheritance and static files
  • Lab: a multi-page shop site with Bootstrap 5.3
Day 2 Models, the ORM, the Admin and Class-Based Views

Section 6: Lab: Models and Migrations

  • Create models and choose the right field types
  • ForeignKey, ManyToMany and OneToOne relationships
  • makemigrations, migrate and reading migration files
  • BigAutoField primary keys, the default in Django 6
  • Lab: product, category and order models

Section 7: Querying Data with the ORM

  • Create, update and delete data in the Django shell
  • filter, exclude, order_by and field lookups
  • Complex conditions with Q and F
  • Count and summarise data with aggregate and annotate
  • Lab: a sales report by category

Section 8: Lab: The Django Admin

  • Create a superuser and register models with the admin
  • Customise list pages with list_display, search_fields and list_filter
  • Edit related data on one page with inlines
  • Actions for handling many records at once
  • Lab: a back office for managing products

Section 9: Class-Based Views

  • The difference between function views and class-based views
  • ListView and DetailView with pagination
  • CreateView, UpdateView and DeleteView
  • Customise behaviour with get_queryset and get_context_data
  • Lab: product list and detail pages

Section 10: Lab: Next Steps with Templates

  • Template partials with partialdef and partial in Django 6
  • Create custom filters and template tags
  • Context processors for data used on every page
  • Report results with the message framework
  • Lab: a reusable shop layout for the whole site
Day 3 Forms, User Accounts, APIs and Deployment

Section 11: Lab: Forms and Validation

  • Form and ModelForm, and rendering forms in templates
  • Validate data with clean methods at field and form level
  • CSRF tokens and passing values with GET and POST
  • Upload images with ImageField
  • Lab: forms to add and edit products with images

Section 12: Authentication and User Permissions

  • Django's user system and a custom user model
  • Sign up, log in and log out
  • Protect pages with login_required and LoginRequiredMixin
  • Permissions and groups for user roles
  • Lab: user accounts where only staff can edit products

Section 13: Lab: CRUD with MySQL

  • Run MySQL 8.4 on Docker and install mysqlclient
  • Move from SQLite to MySQL and keep connection settings in environment variables
  • Full CRUD with class-based views and ModelForm
  • Custom 404 and 500 error pages, and logging
  • Lab: a product management system on MySQL

Section 14: A First REST API with Django

  • What a REST API is and how it differs from pages that return HTML
  • Return JSON with JsonResponse
  • An introduction to the Django REST Framework, serializers and API views
  • Test the API with Bruno or Postman
  • Lab: a product list API for other apps to use

Section 15: Workshop: Testing and Deployment

  • Write tests with Django's TestCase and test client
  • Check settings with check --deploy and gather static files with collectstatic
  • Run Django with Gunicorn in Docker Compose alongside MySQL
  • Use an AI assistant to explain and fix code, and always check the result yourself
  • Workshop: a shop site with user accounts, ready to go live

Schedule & training options

For individuals — public rounds

No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

How does Django's MVT architecture work?

MVT stands for Model, View and Template. When a request arrives, Django uses the URLconf to decide which view handles it. The view reads or saves data through models, which talk to the database through the ORM, and passes the data to a template that renders the HTML response. The controller role from MVC is played by Django itself, which handles URLs and routes each request.

What are the steps to start a new Django project?

In the course we create the project with uv init and install Django with uv add django. Then create the project with django-admin startproject, create an app with python manage.py startapp and add it to INSTALLED_APPS. Run migrate to create the built-in tables and runserver to open the site at http://127.0.0.1:8000. Django 6 needs Python 3.12 or later.

How does form validation work in Django?

Create a form with Form or ModelForm and set rules for each field, such as required and max_length. When data arrives, call is_valid(); Django checks every field and keeps the valid data in cleaned_data. For extra checks, write a clean_ method named after a field to validate that field, or a clean method to validate several fields together. Error messages are shown on the form automatically.

Who is the Basic Python Django course for, and what should I know beforehand?

It suits students and beginners who want to build web sites with Python, teachers who teach web development, IT staff who build internal systems and developers from other languages who want to start with Django. You should know some Python, be able to write basic HTML and CSS and understand basic databases. The first day includes a refresher of the Python that Django uses.

What will I be able to do after the Basic Python Django course?

You will be able to build your own web application with Django 6, from URLs, views and templates to models and the ORM, manage data through the Django admin, create validated forms, add user accounts and permissions, carry out CRUD against MySQL, write a first REST API, write tests and deploy with Docker. Participants who complete the training receive a Certificate of Completion with its own number, which can be verified online.

Can the Basic Python Django course be run in-house for our team?

Yes. It can be run in-house for your team, with examples adapted to your work, such as building internal systems around the data your organisation already uses. You can request a quotation from this page, or contact us on LINE @itgenius or by phone on 02-570-8449.

Related articles

Articles are published in Thai.