github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

gregnewman / django-cachebuster

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 11
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

tag helpers to generate javascript and css tags with a cachebuster — Read more

  cancel

http://20seven.org/journal/2008/09/django-cachebuster.html

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

readme edit 
gregnewman (author)
Mon Sep 22 06:27:01 -0700 2008
commit  21b46b0b2f1f9c7b8500e9de2ad273c3e50c4a83
tree    fdd2d4b8d3c08f487b98e008460eb5a9e23a44de
parent  45a740064afc669a4447ec0984eb9c754829b467
django-cachebuster /
name age
history
message
file README.rst Mon Sep 22 06:27:01 -0700 2008 readme edit [gregnewman]
file tag_helper.py Mon Sep 22 05:59:50 -0700 2008 fixed another extra forward slash [gregnewman]
README.rst

Cachebuster Template Tags

Use the cachebuster tag_helpers to ensure the browswers are not caching your css or javascript edits. Using the template tags will return a full css or javascript tag with the filename and a sha1 string appended based on the name of the file and the edit date of the file. When the file is changed the hash is also updated.

Usage

Load the tag

{% load tag_helper %}

Javascript

{% js_tag "jquery.js" %} or {% js_tag "jquery" %}

will return

<script src="/site_media/jquery.js?e90301f912ab5c1b72d6422aa690d76c1cbff357" type="text/javascript"></script>

CSS

{% css_tag "base.css" %} or {% css_tag "base" %}

 will return

<link rel="stylesheet" href="/site_media/base.css?aa3117fb84ed9fddcd93ba62e459bf2211262ae4" />
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server