« Back to Posts Django Python

Django Blog Website

A step-by-step journey of building a functional blog from scratch to deployment.


Have you ever had an idea so big that it felt intimidating to even start? For me, it was building a personal website. Three years ago, I took the first step: I bought a domain name from domain.com. Then… nothing happened.

That’s right — my dream sat idle, gathering digital dust. But today, it’s live and thriving, and I’m excited to share how I went from a parked domain to a working website, complete with all the challenges, learnings, and wins along the way.

Step 1: Buying the Domain (and Letting It Sit)

Back in 2021, I bought my domain name. At the time, I had grand visions for what it could become—a blog, a portfolio, maybe even an e-commerce site. But without the skills or a concrete plan, I did nothing.

Eventually, I moved the domain to GoDaddy. Why? Well, it seemed more popular, and I liked their interface. Plus, their customer support gave me confidence that I could figure things out when I was ready.

Here’s the cost breakdown for my domain journey:

ItemCost
Initial Purchase€14.96/year
2-Year Renewal€49.59
9-Year Renewal€223.17

Step 2: Learning Django at Work

The real turning point came when I started working at HostWise. My team had a project to build a password manager using Django, and it introduced me to this powerful Python framework. Django is incredible because it makes creating web apps faster and cleaner.

Here’s why I fell in love with Django:

Step 3: Dennis Ivy to the Rescue

After getting my feet wet with Django at work, I wanted to build something personal. I found Dennis Ivy’s tutorials on YouTube, and they were a game-changer.

His step-by-step guide helped me:

If you look at my website, you might still see traces of Dennis Ivy’s template (though I’ve tweaked a lot). My goal is to completely customise it over time.

Step 4: Hosting on PythonAnywhere

Hosting a website felt like the final boss battle. I chose PythonAnywhere because it’s affordable and straightforward for Django projects. While I’m no stranger to GitHub or environment variables, the real challenge was getting everything to work together—ensuring a seamless transition from local development to a live server.

If you’re building your own Django project, here are some suggestions:

The real learning came in setting everything up together. From configuring ALLOWED_HOSTS to ensuring SSL certificates were correctly applied, each step brought its own challenges. But the satisfaction of seeing the website live and working makes it all worth it.

Step 5: Upgrades and Enhancements

As I built the site, I made some upgrades:

Code Snippets

Here’s a peek at how I handled key parts of the project:

CKEditor Integration

# models.py
from django_ckeditor_5.fields import CKEditor5Field

class Post(models.Model):
    content = CKEditor5Field('Content')

Environment Variables

# .env file
SECRET_KEY=your_secret_key
DEBUG=True
ALLOWED_HOSTS=kamranthomas.com,www.kamranthomas.com

Django Settings

# settings.py
from dotenv import load_dotenv
import os

load_dotenv()
SECRET_KEY = os.getenv("SECRET_KEY")
DEBUG = os.getenv("DEBUG", "False") == "True"
ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS", "").split(",")

The Architecture

I designed a simple but functional architecture:

Website Architecture Diagram

Challenges and Learnings

Was it smooth sailing? Absolutely not. Here are the bumps I hit and what I learned:

Fun Facts About Django

Final Thoughts

This project wasn’t just about building a website—it was about proving to myself that I could take an idea and make it real.

If you’re sitting on a project idea, don’t wait as long as I did. Start small, make mistakes, and keep going. Have questions or a project you’re working on? Share it with me — I’d love to connect and learn together!

Comments: 1

Create an account to comment:

Register/Login

Linda Alimagham: Dec-21-2024

Thanks Kamran, that’s very interesting and thank you for sharing this information.