django-compressor

django-compressor: Combine and Minify Django Assets

Django Compressor is a Python library for Django that combines and minifies linked or inline JavaScript and CSS in templates. It writes optimized assets to cacheable static files, with configurable filters and compilers.

Stars
2.9k
Forks
605
Stars, last 30 days
-1
Last commit
12 days ago
Contributors
100+

Our take

Maintaineda few commits in the last 90 days

Health score

53/100

How it is scored
Activity
30
Community
81
Issues
53
Pull requests
46

-1 stars in the last 30 days

  • More contributors than 78% of the projects we track

Django Compressor remains maintained, but its recent activity is modest and it has not published a release in over a year, so assess release cadence and compatibility before adopting it for a new production workflow.

Good fit if

  • Your application uses Django templates and needs to combine or minify linked and inline CSS or JavaScript.
  • You want configurable processing and can run compression as part of deployment.
  • Your team is comfortable checking current compatibility and release status before upgrading.

Look elsewhere if

  • Your application does not use Django's template and static-file workflow.
  • You need a project with a recent published release as a prerequisite.
  • You cannot establish the licensing terms that apply to your use.
All health signals
Last commit2026-10-16 (12 days ago)
Commits, last 90 days2
Releases, last 12 months0
Contributors100+ (top contributor: 47% of commits)
Issues closed, last 90 days2
Pull requests merged, last 90 days2
Project age16 years

Checked on 2026-10-29 with the GitHub API.

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

2,869

Forks

606

Change since Nov 14, 2026: 0 stars·0 forks

Overview

Django Compressor is a Python library for Django that processes linked and inline JavaScript or CSS in Django templates, combining and minifying assets into cacheable static files. It helps Django teams reduce the number and size of assets served to browsers while allowing those files to use long cache lifetimes.

It fits into Django's template and static-file workflow: mark asset blocks with its template tags, then let Compressor parse and process them. Teams can run the work with requests or pre-generate assets using Django's compress management command.

Key Features

  • Processes JavaScript and CSS from linked files and inline template blocks.
  • Concatenates and minifies assets by default.
  • Generates content-dependent filenames for cacheable output.
  • Can inline processed content instead of emitting a file reference.
  • Supports configurable parsers, filters, and custom processing steps.
  • Includes filters for compiler and minifier integrations, plus conversion of some images to data URIs.
  • Offers a management command to compress assets outside the request/response cycle.

Use Cases

  • Django teams seeking to reduce the number of JavaScript and CSS files delivered to a browser.
  • Projects that want content-versioned static asset names for long-lived browser caching.
  • Teams using CSS preprocessors or JavaScript compilers who need configurable processing in their template workflow.
  • Deployments that want to generate compressed assets during a build or release rather than on a user request.

What you need

Detected in the repository

  • Python >=3.10 (from pyproject.toml)
  • Automated checks on GitHub Actions

Getting Started

Install the in-development version with:

pip install git+https://github.com/django-compressor/django-compressor.git

See the project documentation and README for setup and configuration details.

License in Plain Words

No standard license was detected. Without a license, the default copyright rules apply: you may read the code, but not reuse it. Check the repository or ask the authors.

Alternatives

  • django-pipeline: django-pipeline bundles and compresses assets during static-file collection, while django-compressor processes assets through template tags at render time.
ProjectLanguageLicenseStarsStatus
django-compressorPython–2.9kMaintained
django-pipelinePythonMIT1.5kQuiet

Considerations

The project is marked maintained, with a few commits in the last 90 days, but no release in over a year. Recent issue closures and merged pull requests are also limited, so check the repository for current support and compatibility details. Contributor activity is not flagged as concentrated. The repository data does not assert a license, so confirm the applicable license before incorporating it into a project.

Found this useful?

Share it with someone who would like django-compressor.

Comparisons