Introduction: From Setup to Sleek Web App, Letβs Do This!
Hey Django warriors! π
Welcome to Day 4 of my 20 Days of Django Challenge. Today, weβre not just writing code weβre building a cool tech-themed app powered by Djangoβs powerful Model-View-Template (MVT) architecture.
I created a Django project with two apps:
users β handles user registration
yooh β showcases tech blog posts with a modern UI
From installing Django to writing views, templates, and wiring up URLs, Iβve got the screenshots, code snippets, and full breakdown to guide you step-by-step.π₯
Letβs turn your Django basics into a beautiful web experience!
Step-by-Step Breakdown: What I Built Today
1οΈβ£ Environment Setup
Checked Python & pip versions:
python --version
pip --version
Created & activated a virtual environment:
python -m venv env
source venv/bin/activate # Windows: venv\Scripts\activate
Installed Django:
pip install django
2οΈβ£ Project & App Creation
Started the Django project:
django-admin startproject config .
Created two apps:
python manage.py startapp users
python manage.py startapp yooh
Registered the apps in settings.py:
INSTALLED_APPS = [
...
'users.apps.UsersConfig',
'tech.apps.TechConfig',
]
3οΈβ£ The MVT Magic β¨
Models
CustomUser in users/models.py extending AbstractUser
TechPost in yooh/models.py for tech blog posts
Then ran:
python manage.py makemigrations
python manage.py migrate
Views
Register view in users/views.py with Django forms and messages
Home view in yooh/views.py displaying all tech posts
Templates
Created base.html with Bootstrap 5 navbar + footer
Designed:
register.html β user form
home.html β tech post cards
Folder structure:
templates/
βββ base.html
βββ users/
β βββ register.html
βββ tech/
βββ home.html
4οΈβ£ Static Files & CSS
Added this to settings.py:
TEMPLATES[0]['DIRS'] = [BASE_DIR / 'templates']
STATIC_URL = 'static/'
STATICFILES_DIRS = [BASE_DIR / 'static']

Created static/css/styles.css with custom layout and card styling.
5οΈβ£ URL Configuration
Main urls.py:
path('users/', include('users.urls')),
path('', include('yooh.urls')),
users/urls.py β register/
tech/urls.py β homepage ('')
Run server:
python manage.py runserver
The results:
Lessons & Reflections
(i)Understanding MVT takes some mental rewiring, but itβs super clean once you grasp it.
(ii)Separating templates by app = organized & scalable.
(iii)Bootstrap made the app instantly polished minimal CSS, max results!
β
Conclusion: Your Turn to Build!
Day 4 was packed but powerful! Iβve now got:
(i)Two connected apps
(ii)Real models & views
(iii)A working UI with user registration
(iv)Sample blog posts live on the homepage
Whether youβre following this series or just curious about Django, I encourage you to give it a try!
π£Call to Action:
Try building this project yourself or remix it with your own twist!
Have questions? Built something cool? Drop a comment below!











Top comments (0)