Day 3: Connecting the Dots with Views & URLs
Description: Day 3 of my Django journey was all about views and URLs, the components that manage user requests and responses. If Django apps are the building blocks of a project, views and URLs are the connections that link everything together. Here's what I learned today: **What Did I Learn? 1) What Are Views?** Views are process in Django's request-response that handle user requests, process data, and return responses, such as web pages or JSON data. I began with function-based views, which are straightforward Python functions. For example: from django.http import HttpResponse def blog_home(request): return HttpResponse("This is the Blog Page Home!") 2) Mapping URLs to Views: To make the view accessible, I mapped it in urls.py: from django.urls import path from . import views urlpatterns = [ path('home/', views.blog_home, name='blog_home'), ] Navigating to /home/ displayed "This is the Blog Page Home!" in the browser—a confirmation that the URL and view were correctly linked.

Description:
Day 3 of my Django journey was all about views and URLs, the components that manage user requests and responses. If Django apps are the building blocks of a project, views and URLs are the connections that link everything together. Here's what I learned today:
**What Did I Learn?
1) What Are Views?**
Views are process in Django's request-response that handle user requests, process data, and return responses, such as web pages or JSON data.
I began with function-based views, which are straightforward Python functions. For example:
from django.http import HttpResponse
def blog_home(request):
return HttpResponse("This is the Blog Page Home!")
2) Mapping URLs to Views:
To make the view accessible, I mapped it in urls.py:
from django.urls import path
from . import views
urlpatterns = [
path('home/', views.blog_home, name='blog_home'),
]
Navigating to /home/ displayed "This is the Blog Page Home!" in the browser—a confirmation that the URL and view were correctly linked.