django-premailer
Django template tag that turns CSS blocks into style attributes using premailer.
Decision gist · record as of 2026-08-14
Yes, if you are using an older Django version (1.6–1.9 range) and need inline CSS for email templates. No, if you are on a modern Django release—the package is unmaintained since 2016 and classifiers only list support through Django 1.9 and Python 3.5. Consider alternatives or verify compatibility with your Django version before committing to this package.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Installation is straightforward with no runtime dependencies.
- The package is dormant—last release was in 2016 and last commit in 2024—so it receives no active maintenance, though the repository remains public and unarchived.
License · maintenance · safety
MIT (permissive) — MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
last release 2016-06-20 (3707 days) · last repo commit 2024-02-11 · 49 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 211,839 downloads/mo, #9,471 on PyPI
Alternatives
Verify before relying
pip install django-premailer
# In settings.py, add to INSTALLED_APPS:
INSTALLED_APPS = (
'django_premailer',
)
# In template:
{% load premailer %}
{% premailer "http://example.com" %}
h1 { color: blue; }
{{ content }}
{% endpremailer %}- Whether the underlying premailer library is actively maintained and compatible with current Django versions
- Whether this package works reliably with modern Python versions beyond those listed in classifiers (3.5 and earlier)
- Current test coverage and whether the package has been tested against recent Django releases
What it is and what it does
django-premailer is a Django template tag wrapper around the premailer library that converts CSS rules into inline style attributes on HTML elements. It is primarily designed for preparing HTML emails, where external stylesheets cannot be reliably loaded by mail clients. You load the tag in a template, wrap HTML content and CSS rules in the premailer block, and the tag outputs HTML with styles moved from the CSS block into inline style attributes on matching elements.
The package has no runtime dependencies and installs cleanly. However, it has been dormant since 2016 with no active maintenance, meaning it may not be tested or compatible with modern Django versions or Python releases. The underlying premailer library is a separate dependency that you will need to install separately to use this tag.
Use it for
- Preparing transactional email templates in Django where inline CSS is required for consistent rendering across email clients
- Converting Django-templated HTML with CSS blocks into email-safe HTML for sending via SMTP
- Building email notification systems that need styled HTML without relying on external stylesheet delivery
- Inlining styles for HTML content that will be rendered in environments that strip external CSS links
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are using an older Django version (1.6–1.9 range) and need inline CSS for email templates.
No, if you are on a modern Django release—the package is unmaintained since 2016 and classifiers only list support through Django 1.9 and Python 3.5. Consider alternatives or verify compatibility with your Django version before committing to this package.
Install
django-premailer on PyPI
Before you install
Installation is straightforward with no runtime dependencies. The package is dormant—last release was in 2016 and last commit in 2024—so it receives no active maintenance, though the repository remains public and unarchived.
License in practice
MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install django-premailer
# In settings.py, add to INSTALLED_APPS:
INSTALLED_APPS = (
'django_premailer',
)
# In template:
{% load premailer %}
{% premailer "http://example.com" %}
h1 { color: blue; }
{{ content }}
{% endpremailer %}
Verify before relying
- Whether the underlying premailer library is actively maintained and compatible with current Django versions
- Whether this package works reliably with modern Python versions beyond those listed in classifiers (3.5 and earlier)
- Current test coverage and whether the package has been tested against recent Django releases
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 3,707 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 211,839 / month, #9,471 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaFramework :: DjangoFramework :: Django :: 1.6Framework :: Django :: 1.7Framework :: Django :: 1.8Framework :: Django :: 1.9Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: CommunicationsTopic :: Internet :: WWW/HTTPTopic :: Other/Nonlisted TopicTopic :: Software Development :: Libraries :: Python Modules |
Evidence: django_premailer-0.2.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “django inline css”
- django-premailerA Django template tag that converts CSS blocks into inline style…
- django-compressorDjango Compressor combines, minifies, and caches linked and inline…
- django-bootstrap-formRenders Django form fields as Bootstrap-styled HTML using a simple…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also premailer · css-inline · pynliner · django-sekizai · django-compressor · django-templated-mail · djangocms-admin-style · email-to · emails · django-template-partials