π Day 1: Getting Started with Django β Beginner's Web Dev Series

Welcome to Day 1 of our 10-day Django Workshop! π
If youβre new to Django and looking for a fast-track way to build secure, scalable web applications using Python, youβre in the right place.
In this post, weβll cover the basics and help you create your first Django project and application β with hands-on coding. Letβs dive in.
π What is Django?
Django is a high-level Python web framework that enables rapid development of secure and maintainable websites. It takes care of much of the hassle of web development so you can focus on writing your app without reinventing the wheel.
β Built by developers, for developers
β Follows the Model-View-Template (MVT) architecture
β Includes built-in admin panel, authentication, ORM, routing, and more
π‘ Why Django?
β‘ Fast Development: Less code, more productivity.
π Secure: Prevents common threats like CSRF, XSS, SQL Injection.
π οΈ Batteries Included: Comes with most things pre-built.
π DRY Principle: Donβt Repeat Yourself β write reusable, clean code.
π Scalable: Trusted by startups and large enterprises alike.
π Who Uses Django?
Many tech giants and platforms started or still run on Django:
Instagram
Pinterest
Mozilla Firefox
Disqus
Bitbucket
Karobar
Django powers apps with millions of users β so yes, itβs production ready!
βοΈ Setting Up Django in 3 Steps
β 1. Install Python (Skip if already installed)
Visit https://python.org and install Python 3.13.3.
β 2. Create a Virtual Environment
python3 -m venv .venv
source .venv/bin/activate # On Windows: env\Scripts\activate
β 3. Install Django
pip install django
Confirm installation:
django-admin --version
π Done! Letβs build something real.
π Creating Your First Django Project
Run this command in your terminal:
django-admin startproject mysite
cd mysite
This creates the following structure:
mysite/
βββ manage.py
βββ mysite/
βββ __init__.py
βββ settings.py
βββ urls.py
βββ asgi.py
βββ wsgi.py
π Understanding the folder structure
manage.py
: Command-line utility to manage the project
__init__.py: Marks the folder as a Python package
settings.py
: Configuration for the entire project
urls.py
: Maps URLs to views and routes requests
wsgi.py
: WSGI entry point used by servers (like Gunicorn or Django's dev server)
asgi.py
: ASGI entry point for async servers (e.g., WebSockets)
π§± Create Your First Django App
Inside your project folder:
python manage.py startapp homepage
Update settings.py
to include the new app:
INSTALLED_APPS = [
...,
'homepage',
]
Now you have a reusable app where youβll build features.
π§ What is a View in Django?
A view is a Python function that takes a web request and returns a web response.
Letβs create a simple view in homepage/views.py
:
from django.http import HttpResponse
def index(request):
return HttpResponse("Welcome to Django Workshop!")
π Hooking Up URLs
Step 1: Create a new file homepage/urls.py
:
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
]
Step 2: Connect it to the project-level mysite/urls.py
:
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('homepage.urls')),
]
π Run Your Django Server
Fire up the dev server:
python manage.py runserver
Visit http://127.0.0.1:8000/
and youβll see:
Welcome to Django Workshop!
You just built your first Django page π
π οΈ Your Turn: Day 1 Challenge
Create your first Django project from scratch:
Project name:
mywebsite
App name:
homepage
Build a view that returns: "Day 1 challenge completed!"
Configure the app and route it correctly to show the message in the browser.
π Coming Up Nextβ¦
Tomorrow weβll cover:
Detailed url routing
Understanding Views(Function Based)
Introduction to Templates
Static files and Media files
Subscribe to my newsletter
Read articles from Shankar Lamichhane directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Shankar Lamichhane
Shankar Lamichhane
Hi, Iβm Shankar β a Sr. Software Engineer specializing in Python, Django, and DevOps. I build scalable web applications, APIs, and cloud-native systems, with a focus on clean architecture and backend automation.