Skip to main content

django-compressor-celery

A extension of django_compressor which compress the files by celery workers. The system behind the scene is very simple. The first request on a page with a {% compress %} block will create a celery task which compress this specific block. Instead to wait for the compressed version the first request gets the uncompressed version. After the compress task is finished compressor will deliver the compressed code from the cache directory.

Benefits:
  • Support all features of template inheritance

  • No offline compression by deployment

Install

  • Install as usual django-compressor and celery for django

  • Install django-compressor-celery

  • Add compressor_celery to your installed apps

  • Replace in your template {% load compress %} with {% load compress_celery %}

Configuration

If you want to change some task options you should use the settings key COMPRESS_CELERY_TASK_CONFIG which contains a dict with the options. (Inspired by django-celery-email)

Example:

COMPRESS_CELERY_TASK_CONFIG = {
    'name': 'compressor.lets_compress',
    'queue': 'compressor',
    'ignore_result': False
    ...
}

The default config should work well for the most use cases.

Metadata

Release files for django_compressor_celery 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django_compressor_celery 0.2
File Size Uploaded Provenance
django_compressor_celery-0.2.tar.gz 3.0 kB Without provenance Details

Release files / django_compressor_celery-0.2.tar.gz

Download URL django_compressor_celery-0.2.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
61e445b42f40d4708b82fe500feecd520cdd800b5fd02ee70230bdb4c9f48e31
BLAKE2b-256 checksum
How to use checksums
2860491d75adac777970859df54a656e424966c8a65ceac7e784c211f85cc08b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django_compressor_celery 0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page