Login

Snippets by jeffar

Snippet List

Template tag for compressed CSS & JS (GAE version)

Extension of the idea from [WuzHere example from Google IO](http://code.google.com/p/wuzhere/) about creating one compressed js or css file. Original code used not very elegant if statements. I've changed it to template tags. On production server it will also use current version id. Insert code in *cssjs.py* file in *templatetags* dir in your application and use as below (more details in docs): `<script type="text/javascript" src="/media/jsmergefile.js"></script>` **This code does not compress CSS and JS on the fly, because GAE is read-only and using Datastore is too heavy.**

  • templatetag
  • google-app-engine
Read More

jeffar has posted 2 snippets.