Python Django - The Practical Guide

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

Start

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!

Section: Getting Started

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

Section: Course Setup

6. Module Introduction (1:05)
7. Installing Python & Django (6:25)
8. Creating a Django Project (2:33)
9. Installing an IDE (5:54)
10. Analyzing the Created Project (4:48)
11. Starting a Development Server (5:05)
12. Django Apps (8:19)
13. Analyzing the Created Project (2:27)
14. More Advanced Setup Steps (1:00)
15. Useful Resources & Links (1:00)

Section: URLs & Views

16. Module Introduction (2:45)
17. Creating a New Project (5:34)
18. What are URLs & Views? (5:42)
19. Creating a First View & URL (13:27)
20. Adding More Views & URLs (3:11)
21. Dynamic Path Segments & Captured Values (9:35)
22. Path Converters (5:16)
23. Adding More Dynamic View Logic (5:20)
24. Redirects (8:48)
25. The Reverse Function & Named URLs (10:31)
26. Returning HTML (5:48)
27. Practicing URLs, Views & Dynamic View Logic (9:37)
28. Summary (4:43)
29. Useful Resources & Links (1:00)

Section: Templates & Static Files

30. Module Introduction (3:55)
31. Adding & Registering Templates (14:55)
32. Rendering Templates (4:16)
33. Template Language & Variable Interpolation (5:38)
34. Exercise Solution (1:56)
35. Filters (4:19)
36. The Django Visual Studio Code Extension (2:29)
37. Tags & the "for" Tag (8:02)
38. The URL Tag for Dynamic URLs (6:10)
39. The "if" Tag for Conditional Content (5:16)
40. Template Inheritance (9:38)
41. Exercise Solution (1:31)
42. Including Partial Template Snippets (9:45)
43. More on the Django Template Language (DTL) (1:00)
44. 404 Templates (7:08)
45. Adding Static Files (9:13)
46. Adding Global Static Files (6:24)
47. Adding CSS Styling (15:55)
48. Building Static URLs Dynamically (1:00)
49. Summary (4:48)
50. Useful Resources & Links (1:00)

Section: Course Project: Building a Blog - The Basics

51. Module Introduction (1:13)
52. Setting Up the Starting Project (3:45)
53. Planning the Project (4:26)
54. Adding URLs & Views (11:16)
55. Adding First Templates (8:10)
56. Template Content & Static Files (16:11)
57. Adding Images as Static Files (2:58)
58. Adding the "All Posts" Page & Style (10:32)
59. Linking the Pages (4:16)
60. Adding the "Single Post" Page (5:39)
61. Adding Dummy Data to the "Views" File (4:09)
62. Special Template Features & Syntax (11:26)
63. Adding a Single Post Page (8:44)
64. Adding a 404 Page (1:57)
65. Useful Resources & Links (1:00)

Section: Data & Models

66. Module Introduction (2:55)
67. Different Kinds of Data (6:56)
68. Understanding Database Options (6:15)
69. Understanding SQL (6:38)
70. Django Models (1:02)
71. Creating a Django Model with Fields (9:44)
72. Migrations (6:58)
73. Inserting Data (4:35)
74. Getting all Entries (1:52)
75. Updating Models & Migrations (12:17)
76. Updating Data (5:50)
77. Deleting Data (1:17)
78. Create Instead of Save (3:07)
79. Querying & Filtering Data (7:43)
80. "or" Conditions (4:02)
81. Query Performance (5:43)
82. Bulk Operations (1:00)
83. Preparing Templates (7:10)
84. Rendering Queried Data in the Template (2:59)
85. Redering the Details Page (9:38)
86. Model URLs (4:21)
87. Adding a Slugfield & Overwriting Save (9:04)
88. Using the Slug & Updating Field Options (6:05)
89. Aggregation & Ordering (7:13)
90. Summary (3:29)
91. Useful Resources & Links (1:00)

Section: Admin

92. Module Introduction (2:14)
93. Logging Data Into the Admin Panel (5:28)
94. Adding Models to the Admin Area (3:32)
95. Configuring Model Fields (3:03)
96. Configuring the Admin Settings (6:28)
97. More Config Options (5:04)
98. Useful Resources & Links (1:00)

Section: Relationships

99. Module Introduction (1:52)
100. Understanding Relationship Types (3:04)
101. Adding a one-to-many Relation & Migrations (9:02)
102. Working with Relations in Python Code (6:29)
103. Cross Model Queries (5:04)
104. Managing Relations in Admin (5:06)
105. Adding a one-to-one Relation (6:42)
106. One-to-one Python Code (4:54)
107. One-to-one & Admin Config (5:23)
108. Setting-up many-to-many (4:44)
109. Using many-to-many in Python (5:18)
110. Many-to-many in Admin (2:20)
111. Summary (2:37)
112. Useful Resources & Links (1:00)

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

113. Module Introduction (1:57)
114. Planning the Data Models (4:03)
115. Adding a Post Model (7:36)
116. Author Model & one-to-many (3:06)
117. Tag Model many-to-many (1:22)
118. Registering Models for Admin (1:15)
119. Migrations & Admin Login (3:13)
120. Adding Data via Admin (3:02)
121. Configuring the Admin Panel (5:36)
122. Fetching Posts for Starting Page (6:37)
123. All Post & Single Post Pages (4:50)
124. Using Author & Tags Data (8:34)
125. Summary (1:40)
126. Useful Resources & Links (1:00)

Section: Forms

127. Module Introduction (1:53)
128. Starting Setup (4:52)
129. Adding a Dummy Form (4:40)
130. Get & Post Requests (9:59)
131. CSRF Protection (5:52)
132. Handling Form Submission & Extracting Data (9:50)
133. Manual Form Validation & the Problems with "that" (6:09)
134. Using the Django Form Class (11:04)
135. Validation with Django Forms (4:12)
136. Customizing the Form Controls (5:00)
137. Customizing the Rendered HTML (5:05)
138. Adding Styling (9:08)
139. Adding More Form Controls (7:37)
140. Storing Form Data in a Database (8:37)
141. Introducing Modelforms (6:39)
142. Configuring the Modelform (3:47)
143. Saving Data with a Modelform (4:28)
144. Class Based Views (8:41)
145. Summary (5:53)
146. Useful Resources & Links (1:00)

Section: Class Views

147. Module Introduction (1:07)
148. Adding Templates (4:21)
149. TemplateView (7:56)
150. Using the TemplateView (5:03)
151. Showing a Detail Template (5:06)
152. The ListView (6:55)
153. DetailView (3:48)
154. When to Use Which View (2:22)
155. FormView (6:42)
156. CreateView (4:47)
157. Useful Resources & Links (1:00)

Section: File Uploads

158. Module Introduction (1:21)
159. Starting Setup (1:24)
160. Making the File Upload Work (7:30)
161. Storing Uploaded Files Naive Approach (4:39)
162. Adding a Form with a Filefield (4:38)
163. Using Models for File Storage (8:44)
164. Using an Imagefield (2:19)
165. Using a CreateView (2:34)
166. Working with the File Field (5:10)
167. Serving Uploaded Files (6:50)
168. Summary (1:53)
169. Useful Resources & Links (1:00)

Section: Sessions

170. Module Introduction (0:38)
171. Problem Description (2:01)
172. What are Sessions? (3:41)
173. Enabling & Configuring Sessions (2:15)
174. Adding a New View (4:31)
175. Storing Data in Sessions (4:03)
176. Which Kind of Data Should be Stored (2:33)
177. Using Session Data (5:33)
178. Safely Accessing Session Data (1:12)
179. Summary (1:32)
180. Useful Resources & Links (1:00)

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

181. Module Introduction (2:05)
182. Adding an Imagefield to the Post Model (6:31)
183. Serving Uploaded Files (6:23)
184. Converting Views to Class Based (14:03)
185. Adding a Comment Model (5:15)
186. Adding a Comment Form (6:01)
187. Styling the Comment Form (7:15)
188. Handling Comment Form Submission (14:06)
189. Comment Form Validation Styles (9:39)
190. Outputting Comments (5:03)
191. Styling the Comments (3:13)
192. Comment Admin (3:44)
193. Read Later Starting Setup (7:09)
194. Managing Read Later via Session (13:52)
195. Read Later Page & Styling (6:30)
196. Finishing the Read Later Feature (6:21)
197. Useful Resources & Links (1:00)

Section: Deployment

198. Module Introduction (1:29)
199. Deployment Considerations (5:00)
200. Which Database (3:52)
201. Django & Web Servers (4:33)
202. Serving Static Files (5:43)
203. Choosing a Hosting Provider (2:42)
204. Getting Started & Revisiting Settings (7:00)
205. Collecting Static Files (7:35)
206. Serving Static Files (1:52)
207. A Note About Migrations (1:13)
208. Locking in Dependencies (5:48)
209. Using Environment Variables (5:03)
210. Deploying with Elastic Beanstalk (10:42)
211. SSL & Custom Domains (2:57)
212. Connecting PostgreSQL (18:58)
213. Serving Static Files Separately (8:51)
214. Serving Static Files via S3 (17:38)
215. Moving File Uploads to S3 (8:26)
216. Summary (1:28)
217. Useful Resources & Links (1:00)

Course Instructor

Image

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.