UNIT 05 · TOPIC 01
Introduction to Django Framework
Django is a Python web framework with URL routing, views, templates, models and built-in development tools.
The idea
Introduction to Django Framework, simply explained
Django is a Python web framework with URL routing, views, templates, models and built-in development tools.
01
See the big picture
How the idea flows
Read the diagram as a simple path: begin with a problem, use the Python idea, then verify the result.
02
Everyday connection
Real-life example
↗
A community portal can use Django to display events, accept registrations and store member details.
03
Learn by doing
Python code example
PYTHONExample
from django.http import HttpResponse
def hello_view(request):
return HttpResponse('Hello from Django')
# In a Django project, map a URL to this view.Expected result
A browser receives: Hello from DjangoTry it: Change one value in the code, predict what will happen, then run it and compare your answer.
04
Keep this in mind
Key takeaways
- Django is a Python web framework with URL routing, views, templates, models and built-in development tools.
- Think of a real problem where introduction to django framework could save time or organize information.
- Test small changes and read the result carefully before moving to a bigger program.
Quick self-check
Can you explain it in your own words?
What is the main idea of Introduction to Django Framework?
Django is a Python web framework with URL routing, views, templates, models and built-in development tools.
Where could you see this idea in everyday life?
A community portal can use Django to display events, accept registrations and store member details.
