skillfed

django-sekizai

Django Sekizai

django-sekizai v4.1.0 353.7K downloads/30d#7,301 on PyPI468
Permissive license BSD-3-Clause Active released

What it is and what it does

Django Sekizai is a template block management system for Django that solves the problem of organizing CSS and JavaScript includes across nested templates. Instead of scattering style and script tags throughout your template hierarchy, you define named blocks (called 'sekizai' blocks) in your base template and use template tags to append content to them from any sub-template. The package automatically deduplicates identical content within a block and can order CSS at the top and JavaScript at the bottom, following web best practices.

It's built on django-classy-tags and integrates with Django's template language through custom template tags. The package is production-stable, endorsed by the django CMS Association, and serves as the media handling framework for django CMS. It works with Django 3.2 through 4.2 and Python 3.8 or later, installing as a pure Python wheel with low friction.

Use it for:

  • Organize CSS and JavaScript includes from multiple sub-templates into a single base template without manual ordering.
  • Prevent duplicate CSS or JavaScript files from being included multiple times when the same sub-template is rendered in different contexts.
  • Build reusable template components that declare their own CSS/JS dependencies without knowing where they'll be rendered.
  • Manage media assets in django CMS-based projects where sekizai is the standard media handling framework.
  • Centralize CSS in the document head and JavaScript before the closing body tag across a complex template hierarchy.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Django Sekizai provides template block management for Django, letting you define placeholders in templates and append content to them from sub-templates, with automatic deduplication and ordering for CSS and JavaScript.

Yes. Django Sekizai is production-stable, actively maintained, has no known vulnerabilities, and solves a real problem in Django template organization. The low install friction and permissive license make it a safe choice. The 1200-day gap since the last release is notable but the repository remains active with recent commits, suggesting the package is mature rather than abandoned. Install it if you're building Django projects with nested templates that need centralized CSS/JavaScript management.

Install

django-sekizai on PyPI

pip

pip install django-sekizai

uv

uv add django-sekizai

poetry

poetry add django-sekizai

Installing django-sekizai

Before you install

Low friction install with a pure Python wheel. Actively maintained with recent commits; last release was over 1200 days ago but the repository remains active and endorsed by the django CMS Association.

License in practice

BSD-3-Clause is permissive; you can use this in commercial and closed-source projects with minimal restrictions beyond retaining the license notice.

Quickstart

pip install django-sekizai

# In your Django template:
{% load sekizai_tags %}
{% addtoblock "css" %}<link rel="stylesheet" href="style.css">{% endaddtoblock %}
{% addtoblock "js" %}<script src="app.js"></script>{% endaddtoblock %}

# In your base template:
{% renderblock "css" %}
{% renderblock "js" %}

Requires Django 3.2 or later and Python 3.8 or later; django-classy-tags must be installed as a runtime dependency.

Verify before relying

  • Whether the package works with Django versions beyond 4.2 (classifiers list only up to 4.2).
  • Current test coverage and whether the 1200-day gap since last release reflects stability or stalled maintenance.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 2 — django, django-classy-tags
Maintenance actively maintained — 1,200 days since the last release
Last repo commit
First released
Downloads 353,721/month — #7,301 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_sekizai-4.1.0-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 3.2Framework :: Django :: 4.0Framework :: Django :: 4.1Framework :: Django :: 4.2Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software DevelopmentTopic :: Software Development :: Libraries

Tags

django template blockstemplate placeholder managementdjango css javascript orderingtemplate content deduplicationdjango media handlingnested template blocks django
django-templatesmedia-management

More Software Development packages