# Django-Pipeline: Asset Packaging for Django Applications

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/jazzband-django-pipeline
Generated for open source discovery and AI-assisted research.

Django-Pipeline is a robust asset packaging library designed for Django projects. It streamlines the process of concatenating and compressing CSS and JavaScript files, enhancing web application performance. This tool also offers built-in JavaScript template support and optional data-URI embedding for images and fonts.

GitHub: https://github.com/jazzband/django-pipeline
OSRepos URL: https://osrepos.com/repo/jazzband-django-pipeline

## Summary

Django-Pipeline is a robust asset packaging library designed for Django projects. It streamlines the process of concatenating and compressing CSS and JavaScript files, enhancing web application performance. This tool also offers built-in JavaScript template support and optional data-URI embedding for images and fonts.

## Topics

- Python
- Django
- Asset Management
- Frontend Development
- Web Performance
- Static Files
- Jazzband

## Repository Information

Last analyzed by OSRepos: Sun Jul 26 2026 16:41:23 GMT+0100 (Western European Summer Time)
Detail views: 2
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction
Django-Pipeline is an essential asset packaging library for Django, maintained by the Jazzband community. It provides comprehensive solutions for managing static assets, including CSS and JavaScript concatenation and compression. This library helps optimize your Django applications by reducing file sizes and HTTP requests, leading to faster load times.

## Installation
To integrate Django-Pipeline into your project, install it using pip:

bash
pip install django-pipeline


After installation, add `'pipeline'` to your `INSTALLED_APPS` in `settings.py`.

## Examples
Django-Pipeline compiles and compresses your asset files from `STATICFILES_DIRS` to `STATIC_ROOT` when you run Django's `collectstatic` command. Here's a quick example to set up basic CSS and JavaScript compilation and compression:

python
# settings.py
INSTALLED_APPS = [
    # ...
    'pipeline',
]

STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'pipeline.finders.PipelineFinder',
)

PIPELINE = {
    'STYLESHEETS': {
        'css_files': {
            'source_filenames': (
                'css/main.css',
                'css/normalize.css',
            ),
            'output_filename': 'css/styles.css',
            'extra_context': {
                'media': 'screen,projection',
            },
        },
    },
    'JAVASCRIPT': {
        'js_files': {
            'source_filenames': (
                'js/app.js',
                'js/script.js',
            ),
            'output_filename': 'js/main.js',
        }
    }
}


Remember that Pipeline typically operates when `DEBUG` is `False`. You may also need to install compilers and compressors, for example, using NPM:

python
# Example for yuglify
PIPELINE.update({
    'YUGLIFY_BINARY': path.join(BASE_DIR, 'node_modules/.bin/yuglify'),
})


Finally, load your static files in your Django templates:

html
{% load pipeline %}
{% stylesheet 'css_files' %}
{% javascript 'js_files' %}


## Why Use
Using Django-Pipeline significantly improves the performance of your Django applications by optimizing frontend assets. It automates the process of combining multiple CSS and JavaScript files into single, compressed bundles, reducing the number of HTTP requests and the overall data transfer size. This leads to faster page load times, a better user experience, and simplifies asset management within your project.

## Links
For more detailed information, usage guides, and to contribute, please visit the official resources:
*   [GitHub Repository](https://github.com/jazzband/django-pipeline){:target="_blank"}
*   [Official Documentation](https://django-pipeline.readthedocs.io){:target="_blank"}
*   [Issue Tracker](https://github.com/jazzband/django-pipeline/issues){:target="_blank"}