W3docs

Python Django - The Practical Guide

Learn how to build web applications and websites with Python and the Django framework

Start course

Python is the most popular programming language of the world - it's versatile, easy to learn and very powerful!

We already got a Python course which you can take if you want to learn Python.

But one of the primary things you can build with Python is a website! You can use Python for web development.

And to make that easier, you would typically use a framework like Django - simply because that allows you to focus on your core business logic and you don't need to re-invent the wheel and implement all the nitty-gritty technical details from scratch.

And this course is about Django - the most popular Python web development framework out there!

Django covers all aspects of web development - from handling requests and responses, over rendering dynamic HTML pages with templates, all the way up to making database access and data management easy. It's all baked in and it's all covered in great detail in this course!

This course teaches Django from the ground up - you don't need to know anything about it to get started. Basic Python and web development knowledge is all you need.

We'll start at the absolute basics and understand how to create Django project, how to run them and how to add features - step by step.

In detail, this course covers:

  • Installing Django
  • Creating and understanding Django projects
  • Understanding URLs, views, requests and responses
  • Working with templates and static files like CSS and images
  • Working with data and models
  • Connecting data with relationships (one-to-many, one-to-one, many-to-many)
  • Querying data with Django's powerful model solution
  • Adding administration panels to your projects
  • Handling user input with forms - manually and with Django's built-in form support
  • Advanced features like class-based views (and when to use them)
  • Dealing with file uploads and how to serve uploaded files
  • Working with sessions
  • In-depth deployment instructions and examples
  • Different ways of deploying and serving static files and user uploads
  • And much more!

All those concepts are taught in great depth and backed up by a complete example course project where we build a "Blog website" from the ground up.

Therefore, you'll learn all the important concepts and the theory and you're also going to be able to see it applied to a real project.

Hence, once you completed the course, you'll have a very solid understanding of Django and you'll be able to dive into your own Django projects!

Course content

Section 1Getting Started

  • Welcome to the Course!
    2:05
  • What is Django?
    4:58
  • The Course Prerequisites
    1:54
  • What's Inside the Course?
    3:14
  • Getting the Most out of the Course
    3:05

Section 2Course Setup

  • Module IntroductionPremium
    1:05
  • Installing Python & DjangoPremium
    6:25
  • Creating a Django ProjectPremium
    2:33
  • Installing an IDEPremium
    5:54
  • Analyzing the Created ProjectPremium
    4:48
  • Starting a Development ServerPremium
    5:05
  • Django AppsPremium
    8:19
  • Analyzing the Created ProjectPremium
    2:27
  • More Advanced Setup StepsPremium
    1:00
  • Useful Resources & LinksPremium
    1:00

Section 3URLs & Views

  • Module IntroductionPremium
    2:45
  • Creating a New ProjectPremium
    5:34
  • What are URLs & Views?Premium
    5:42
  • Creating a First View & URLPremium
    13:27
  • Adding More Views & URLsPremium
    3:11
  • Dynamic Path Segments & Captured ValuesPremium
    9:35
  • Path ConvertersPremium
    5:16
  • Adding More Dynamic View LogicPremium
    5:20
  • RedirectsPremium
    8:48
  • The Reverse Function & Named URLsPremium
    10:31
  • Returning HTMLPremium
    5:48
  • Practicing URLs, Views & Dynamic View LogicPremium
    9:37
  • SummaryPremium
    4:43
  • Useful Resources & LinksPremium
    1:00

Section 4Templates & Static Files

  • Module IntroductionPremium
    3:55
  • Adding & Registering TemplatesPremium
    14:55
  • Rendering TemplatesPremium
    4:16
  • Template Language & Variable InterpolationPremium
    5:38
  • Exercise SolutionPremium
    1:56
  • FiltersPremium
    4:19
  • The Django Visual Studio Code ExtensionPremium
    2:29
  • Tags & the "for" TagPremium
    8:02
  • The URL Tag for Dynamic URLsPremium
    6:10
  • The "if" Tag for Conditional ContentPremium
    5:16
  • Template InheritancePremium
    9:38
  • Exercise SolutionPremium
    1:31
  • Including Partial Template SnippetsPremium
    9:45
  • More on the Django Template Language (DTL)Premium
    1:00
  • 404 TemplatesPremium
    7:08
  • Adding Static FilesPremium
    9:13
  • Adding Global Static FilesPremium
    6:24
  • Adding CSS StylingPremium
    15:55
  • Building Static URLs DynamicallyPremium
    1:00
  • SummaryPremium
    4:48
  • Useful Resources & LinksPremium
    1:00

Section 5Course Project: Building a Blog - The Basics

  • Module IntroductionPremium
    1:13
  • Setting Up the Starting ProjectPremium
    3:45
  • Planning the ProjectPremium
    4:26
  • Adding URLs & ViewsPremium
    11:16
  • Adding First TemplatesPremium
    8:10
  • Template Content & Static FilesPremium
    16:11
  • Adding Images as Static FilesPremium
    2:58
  • Adding the "All Posts" Page & StylePremium
    10:32
  • Linking the PagesPremium
    4:16
  • Adding the "Single Post" PagePremium
    5:39
  • Adding Dummy Data to the "Views" FilePremium
    4:09
  • Special Template Features & SyntaxPremium
    11:26
  • Adding a Single Post PagePremium
    8:44
  • Adding a 404 PagePremium
    1:57
  • Useful Resources & LinksPremium
    1:00

Section 6Data & Models

  • Module IntroductionPremium
    2:55
  • Different Kinds of DataPremium
    6:56
  • Understanding Database OptionsPremium
    6:15
  • Understanding SQLPremium
    6:38
  • Django ModelsPremium
    1:02
  • Creating a Django Model with FieldsPremium
    9:44
  • MigrationsPremium
    6:58
  • Inserting DataPremium
    4:35
  • Getting all EntriesPremium
    1:52
  • Updating Models & MigrationsPremium
    12:17
  • Updating DataPremium
    5:50
  • Deleting DataPremium
    1:17
  • Create Instead of SavePremium
    3:07
  • Querying & Filtering DataPremium
    7:43
  • "or" ConditionsPremium
    4:02
  • Query PerformancePremium
    5:43
  • Bulk OperationsPremium
    1:00
  • Preparing TemplatesPremium
    7:10
  • Rendering Queried Data in the TemplatePremium
    2:59
  • Redering the Details PagePremium
    9:38
  • Model URLsPremium
    4:21
  • Adding a Slugfield & Overwriting SavePremium
    9:04
  • Using the Slug & Updating Field OptionsPremium
    6:05
  • Aggregation & OrderingPremium
    7:13
  • SummaryPremium
    3:29
  • Useful Resources & LinksPremium
    1:00

Section 7Admin

  • Module IntroductionPremium
    2:14
  • Logging Data Into the Admin PanelPremium
    5:28
  • Adding Models to the Admin AreaPremium
    3:32
  • Configuring Model FieldsPremium
    3:03
  • Configuring the Admin SettingsPremium
    6:28
  • More Config OptionsPremium
    5:04
  • Useful Resources & LinksPremium
    1:00

Section 8Relationships

  • Module IntroductionPremium
    1:52
  • Understanding Relationship TypesPremium
    3:04
  • Adding a one-to-many Relation & MigrationsPremium
    9:02
  • Working with Relations in Python CodePremium
    6:29
  • Cross Model QueriesPremium
    5:04
  • Managing Relations in AdminPremium
    5:06
  • Adding a one-to-one RelationPremium
    6:42
  • One-to-one Python CodePremium
    4:54
  • One-to-one & Admin ConfigPremium
    5:23
  • Setting-up many-to-manyPremium
    4:44
  • Using many-to-many in PythonPremium
    5:18
  • Many-to-many in AdminPremium
    2:20
  • SummaryPremium
    2:37
  • Useful Resources & LinksPremium
    1:00

Section 9Course Project - Building a Blog: Data & Models

  • Module IntroductionPremium
    1:57
  • Planning the Data ModelsPremium
    4:03
  • Adding a Post ModelPremium
    7:36
  • Author Model & one-to-manyPremium
    3:06
  • Tag Model many-to-manyPremium
    1:22
  • Registering Models for AdminPremium
    1:15
  • Migrations & Admin LoginPremium
    3:13
  • Adding Data via AdminPremium
    3:02
  • Configuring the Admin PanelPremium
    5:36
  • Fetching Posts for Starting PagePremium
    6:37
  • All Post & Single Post PagesPremium
    4:50
  • Using Author & Tags DataPremium
    8:34
  • SummaryPremium
    1:40
  • Useful Resources & LinksPremium
    1:00

Section 10Forms

  • Module IntroductionPremium
    1:53
  • Starting SetupPremium
    4:52
  • Adding a Dummy FormPremium
    4:40
  • Get & Post RequestsPremium
    9:59
  • CSRF ProtectionPremium
    5:52
  • Handling Form Submission & Extracting DataPremium
    9:50
  • Manual Form Validation & the Problems with "that"Premium
    6:09
  • Using the Django Form ClassPremium
    11:04
  • Validation with Django FormsPremium
    4:12
  • Customizing the Form ControlsPremium
    5:00
  • Customizing the Rendered HTMLPremium
    5:05
  • Adding StylingPremium
    9:08
  • Adding More Form ControlsPremium
    7:37
  • Storing Form Data in a DatabasePremium
    8:37
  • Introducing ModelformsPremium
    6:39
  • Configuring the ModelformPremium
    3:47
  • Saving Data with a ModelformPremium
    4:28
  • Class Based ViewsPremium
    8:41
  • SummaryPremium
    5:53
  • Useful Resources & LinksPremium
    1:00

Section 11Class Views

  • Module IntroductionPremium
    1:07
  • Adding TemplatesPremium
    4:21
  • TemplateViewPremium
    7:56
  • Using the TemplateViewPremium
    5:03
  • Showing a Detail TemplatePremium
    5:06
  • The ListViewPremium
    6:55
  • DetailViewPremium
    3:48
  • When to Use Which ViewPremium
    2:22
  • FormViewPremium
    6:42
  • CreateViewPremium
    4:47
  • Useful Resources & LinksPremium
    1:00

Section 12File Uploads

  • Module IntroductionPremium
    1:21
  • Starting SetupPremium
    1:24
  • Making the File Upload WorkPremium
    7:30
  • Storing Uploaded Files Naive ApproachPremium
    4:39
  • Adding a Form with a FilefieldPremium
    4:38
  • Using Models for File StoragePremium
    8:44
  • Using an ImagefieldPremium
    2:19
  • Using a CreateViewPremium
    2:34
  • Working with the File FieldPremium
    5:10
  • Serving Uploaded FilesPremium
    6:50
  • SummaryPremium
    1:53
  • Useful Resources & LinksPremium
    1:00

Section 13Sessions

  • Module IntroductionPremium
    0:38
  • Problem DescriptionPremium
    2:01
  • What are Sessions?Premium
    3:41
  • Enabling & Configuring SessionsPremium
    2:15
  • Adding a New ViewPremium
    4:31
  • Storing Data in SessionsPremium
    4:03
  • Which Kind of Data Should be StoredPremium
    2:33
  • Using Session DataPremium
    5:33
  • Safely Accessing Session DataPremium
    1:12
  • SummaryPremium
    1:32
  • Useful Resources & LinksPremium
    1:00

Section 14Course Project: Building a Blog - Forms, Files & Sessions

  • Module IntroductionPremium
    2:05
  • Adding an Imagefield to the Post ModelPremium
    6:31
  • Serving Uploaded FilesPremium
    6:23
  • Converting Views to Class BasedPremium
    14:03
  • Adding a Comment ModelPremium
    5:15
  • Adding a Comment FormPremium
    6:01
  • Styling the Comment FormPremium
    7:15
  • Handling Comment Form SubmissionPremium
    14:06
  • Comment Form Validation StylesPremium
    9:39
  • Outputting CommentsPremium
    5:03
  • Styling the CommentsPremium
    3:13
  • Comment AdminPremium
    3:44
  • Read Later Starting SetupPremium
    7:09
  • Managing Read Later via SessionPremium
    13:52
  • Read Later Page & StylingPremium
    6:30
  • Finishing the Read Later FeaturePremium
    6:21
  • Useful Resources & LinksPremium
    1:00

Section 15Deployment

  • Module IntroductionPremium
    1:29
  • Deployment ConsiderationsPremium
    5:00
  • Which DatabasePremium
    3:52
  • Django & Web ServersPremium
    4:33
  • Serving Static FilesPremium
    5:43
  • Choosing a Hosting ProviderPremium
    2:42
  • Getting Started & Revisiting SettingsPremium
    7:00
  • Collecting Static FilesPremium
    7:35
  • Serving Static FilesPremium
    1:52
  • A Note About MigrationsPremium
    1:13
  • Locking in DependenciesPremium
    5:48
  • Using Environment VariablesPremium
    5:03
  • Deploying with Elastic BeanstalkPremium
    10:42
  • SSL & Custom DomainsPremium
    2:57
  • Connecting PostgreSQLPremium
    18:58
  • Serving Static Files SeparatelyPremium
    8:51
  • Serving Static Files via S3Premium
    17:38
  • Moving File Uploads to S3Premium
    8:26
  • SummaryPremium
    1:28
  • Useful Resources & LinksPremium
    1:00

Course instructor

Photo of Maximilian Schwarzmüller

Maximilian Schwarzmüller

As a self-taught professional I really know the hard parts and the difficult topics when learning new or improving on already-known languages. This background and experience enable me to focus on the most relevant key concepts and topics. My track record of many 5-star rated courses, more than 1,000,000 students worldwide as well as a successful YouTube channel is the best proof for that.

The most rewarding experience for me is to see how people find new, better jobs, build awesome web applications, work on amazing projects or simply enjoy their hobby with the help of my content. That's why, together with Manuel Lorenz, I founded Academind to offer the best possible learning experience and to share the pleasure of learning with our students.