Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

django-gulp-rev

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-gulp-rev

A simple Django integration with gulp-rev

  • 0.2
  • PyPI
  • Socket score

Maintainers
1

=============== django-gulp-rev

Django gulp-rev is a simple Django app that integrates gulp-rev <https://www.npmjs.com/package/gulp-rev>_ with your Django website.

django-gulp-rev looks for your rev-manifest.json file generated by gulp-rev and parses it to provide dynamic versioned paths to your static assets. In default, the rev-manifest.json file should be in your STATIC_ROOT directory.

When DEBUG == True, django-gulp-rev doesn't use the rev-manifest.json file, instead it appends random characters at the end of the file, like this:

/devstatic/css/main.css?39daksd

When DEBUG is set to False, everything works as expected, and django-gulp-rev uses your rev-manifest.json file to return a versioned static url:

/static/css/main-39daksd.css

Quick start

  1. Add "gulp_rev" to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [ ... 'gulp_rev', ]

  2. Load "rev" in your templates:

    {% load 'rev' %}

  3. Use in your templates like this:

    {% static_rev 'css/main.css' %}

Configuration

DJANGO_GULP_REV_PATH


Override default STATIC_ROOT/rev-manifest.json filepath

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc