← Django Foundations
1 / 25
Lesson 1 — Python for Django
Django is Python
Django is a web framework — a ready-made toolkit written in Python for building websites. Everything you write in Django (pages, data, rules) is ordinary Python code. So the first skill is plain Python: variables, strings and print().
user = "Alex"
print("Welcome,", user) # Welcome, Alex
print() with commas puts one space between the pieces for you.
Why it matters: every Django view, model and form is Python — if the basics feel easy, Django will too.
Want it another way?
Task
Add a second user "Sam" and print a welcome line for them too, in the same style.
Run your code — when the output matches the task, you will see a green check. Then mark the lesson complete.
Test your knowledge
A quick 3-question quiz on this lesson — instant feedback.