Django Blog Pro

Django Blog Pro Documentation · v1.0.0

What's Included

Django Blog Pro is a complete, production-grade Django blogging platform with multi-author support, newsletters, analytics, comments, SEO, and everything you need to run a professional blog.


Requirements

Tool Version Purpose
Python 3.10+ Runtime
PostgreSQL 14+ Database (required for full-text search)
Redis 7+ Caching & task queue
Node.js 18+ Frontend assets (optional)

Quick Start

1. Extract and set up

unzip django-blog-pro.zip
cd django-blog-pro
python -m venv venv && source venv/bin/activate
pip install -r requirements/development.txt

2. Configure environment

cp .env.example .env

Edit .env with your settings:

SECRET_KEY=your-unique-secret-key-here
DEBUG=True
DATABASE_URL=sqlite:///db.sqlite3
REDIS_URL=redis://localhost:6379/0

3. Run migrations and seed data

python manage.py migrate
python manage.py seed_blog        # Load demo content
python manage.py createsuperuser  # Create admin account
python manage.py runserver

Visit:
- Blog: http://127.0.0.1:8000
- Admin Panel: http://127.0.0.1:8000/admin/
- API Docs: http://127.0.0.1:8000/api/docs/


Features

Core Blogging

  • Multi-Author System — Author profiles with bios, avatars, social links, and archive pages
  • Rich Content Editor — CKEditor 5 with image uploads, code blocks, and media embeds
  • Content Scheduling — Draft, review, scheduled publish, and auto-expire workflows
  • Series & Collections — Group related posts into ordered series with navigation
  • Reading Time — Auto-calculated based on content length
  • Table of Contents — Auto-generated from headings

Engagement

  • Comment System — Threaded comments with moderation, spam filtering, and email notifications
  • Newsletter — Built-in subscriber management with double opt-in and email campaigns
  • Bookmarks — Authenticated users can save posts for later
  • Social Sharing — One-click sharing with Open Graph and Twitter Card meta tags
  • Reactions — Like/love/clap reactions on posts

Discovery & SEO

  • Advanced Search — Full-text search with PostgreSQL, weighted fields, and suggestions
  • Category & Tag System — Hierarchical categories with tag clouds
  • Related Posts — Smart algorithm using tags, category, and content similarity
  • SEO Toolkit — Meta descriptions, canonical URLs, JSON-LD structured data, XML sitemap, robots.txt
  • RSS / Atom Feeds — Per-category and per-author feeds

Analytics & Performance

  • View Tracking — Post view counts with unique visitor tracking (privacy-friendly)
  • Reading Analytics — Track scroll depth and reading completion
  • Popular Posts — Trending and most-read post widgets
  • Image Optimization — Auto-resize, WebP conversion, and lazy loading
  • Caching — Redis-backed page and fragment caching with invalidation

Developer Experience

  • REST API — Full CRUD API for headless setups with Django REST Framework
  • Management Commandsseed_blog, create_search_index, cache_warm
  • Comprehensive Tests — 90%+ coverage with pytest
  • Docker Ready — Dockerfile, docker-compose, and CI/CD pipeline configs
  • Type Hints — Full type annotations throughout the codebase

Docker Setup

Development

docker compose up --build
docker compose exec web python manage.py migrate
docker compose exec web python manage.py seed_blog
docker compose exec web python manage.py createsuperuser

Production

docker compose -f docker-compose.prod.yml up --build -d
docker compose -f docker-compose.prod.yml exec web python manage.py migrate
docker compose -f docker-compose.prod.yml exec web python manage.py collectstatic --noinput

Database Configuration

createdb blogpro_db

Update .env:

DATABASE_URL=postgres://user:password@localhost:5432/blogpro_db

Enable full-text search:

python manage.py create_search_index

Email Configuration

Development

Emails print to console by default.

Production (SMTP)

EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST=smtp.mailgun.org
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=postmaster@yourdomain.com
EMAIL_HOST_PASSWORD=your-smtp-password
DEFAULT_FROM_EMAIL=blog@yourdomain.com

Supported: Mailgun, SendGrid, Amazon SES, Postmark, any SMTP provider.


Celery Workers

Celery handles newsletter sending, image optimization, search index updates, and analytics aggregation.

celery -A config worker -l info       # Start worker
celery -A config beat -l info         # Start scheduler
celery -A config worker -B -l info    # Both (dev only)

Running Tests

pytest                              # Run all tests
pytest --cov=apps --cov-report=html # With coverage report
pytest tests/blog/                  # Specific app tests

Production Deployment

Pre-deployment Checklist

python manage.py check --deploy
python manage.py collectstatic --noinput
python manage.py migrate

Environment Variables

DEBUG=False
SECRET_KEY=<strong-random-key>
ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com
DATABASE_URL=postgres://user:pass@host:5432/dbname
REDIS_URL=redis://host:6379/0
SECURE_SSL_REDIRECT=True

Gunicorn

gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3 --timeout 120

Project Structure

django-blog-pro/
├── apps/
│   ├── blog/           # Core blog (posts, categories, tags, series)
│   ├── authors/        # Multi-author profiles
│   ├── comments/       # Threaded comment system
│   ├── newsletter/     # Subscriber & campaign management
│   ├── analytics/      # View tracking & reading stats
│   ├── search/         # Full-text search engine
│   ├── reactions/      # Post reactions
│   ├── bookmarks/      # User bookmarks
│   └── core/           # Shared utilities
├── config/
│   ├── settings/       # Split settings (base, dev, prod, test)
│   ├── urls.py
│   ├── celery.py
│   └── wsgi.py
├── templates/          # Django templates
├── static/             # CSS, JS, images
├── requirements/       # Pip requirements (base, dev, prod)
├── docker/             # Docker configs
├── tests/              # Test suite
└── docs/               # Extended documentation

Configuration Reference

Variable Default Description
SECRET_KEY Django secret key (required)
DEBUG False Debug mode
DATABASE_URL sqlite:///db.sqlite3 Database connection
REDIS_URL redis://localhost:6379/0 Redis for caching & Celery
BLOG_POSTS_PER_PAGE 12 Posts per page
BLOG_COMMENTS_ENABLED True Enable comments
BLOG_COMMENTS_MODERATION True Moderate comments before publishing
BLOG_NEWSLETTER_ENABLED True Enable newsletter
BLOG_ANALYTICS_ENABLED True Enable view tracking
USE_S3 False Use AWS S3 for media storage
SENTRY_DSN Sentry error tracking

Troubleshooting

"No module named 'psycopg2'" — Install with pip install psycopg2-binary

"Redis connection refused" — Check Redis is running: redis-cli ping

Static files not loading — Run python manage.py collectstatic --noinput

Search not working — Requires PostgreSQL. Run python manage.py create_search_index

Images not uploading — Check media directory permissions: chmod -R 755 media/


License

  • Use in unlimited personal and commercial projects
  • Modify and customize freely
  • Deploy to production
  • Do not resell or redistribute the source code
  • Do not share outside your licensed team

Free updates for 12 months from purchase.


Django Blog Pro v1.0.0 — DjangoZen.com

Info

Product: Django Blog Pro

Type: Digital Product

Version: 1.0.0

Updated: Mar 24, 2026


All Documentation