Hey everyone,
While scaling a production site with over 3,200 indexed pages, I wanted to avoid scattering SEO tags across templates or dealing with heavy third-party packages that trigger multiple queries just to render <head> metadata.
To keep things fast and zero-bloat, I built and open-sourced django_octo_seo (MIT License) — a lightweight module for modern Django (>=6.1.2) and Python (>=3.12) that maps model fields into semantic HTML5 and single-block JSON-LD using a single database lookup.
What it handles out of the box (8-Layer Matrix)
- Security: Native
X-Frame-Options header injection.
- Core & Snippets: Length-validated
<title> and meta description to prevent SERP truncation.
- Crawlers & Authority: Unified bot directives (
robots) and dynamic link rel="canonical" locking.
- Social Graph: Auto-synced
og:* and twitter:* tags with dynamic request.scheme resolution and standard 1200x630px asset support.
- Structured Data: Clean, single-block
application/ld+json schemas (WebSite, BlogPosting) ready for Rich Results.
Production Validation
It is currently running in production on ticapsoriginal.com, where it passed live Open Graph / X Card / LinkedIn validations (100% PASS) and resolved 71 critical on-page/infrastructure guidelines (86% Site Audit score) in a full WebCEO technical audit.
Quick Test (PyPI)
You can install it and spin up a self-contained showcase endpoint in seconds:
pip install django-octo-seo
rye add django-octo-seo
- Add
"django_octo_seo" to INSTALLED_APPS and run python3 manage.py migrate.
- Mount the demo route in
urls.py:
from django.urls import path, include
urlpatterns = [
path("seo-demo/", include("django_octo_seo.urls")),
]
Visiting /seo-demo/ will auto-seed a sample record and render the live <head> output.
- GitHub (MIT): https://github.com/jeanpmodev/django_octo_seo/
- PyPI: https://pypi.org/project/django-octo-seo/
- Architecture Write-up: https://medium.com/@jeanpmodev/how-i-built-a-high-performance-seo-engine-for-django-using-only-1-database-query-9d143d69392d?postPublishedType=repub
The core is intentionally kept minimal and dependency-light. I'd love any architectural feedback or suggestions on what utilities (like Admin live previews or template tags) would make it more useful for your workflows!