django-templatecomponents

Organize your component source in your Django templates.
Download

django-templatecomponents Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Price:
  • FREE
  • Publisher Name:
  • Filip Noetzel
  • Publisher web site:
  • http://filip.noetzel.co.uk/

django-templatecomponents Tags


django-templatecomponents Description

Organize your component source in your Django templates. django-templatecomponents is a Django plugin that makes it easy to organize your component source (JavaScript, CSS) in your Django templates.Define your JavaScript and CSS source right beneath the HTML skeleton that it's used on:template.html: {% css print %} a:after{ content: " "; } {% endcss %} {% css screen print %} #clickme { font-weight: bold; } {% endcss %} {% js client %} document.getElementById('clickme').onclick = function() { alert('Ugh! I have been clicked'); } {% endjs %} < a id='clickme' href="/click/" >Click me< /a >This would result inprint.css: /* extracted css from template '/path/to/template.html' with groups print */ a:after{ content: " "; } /* extracted css from template '/path/to/template.html' with groups print screen */ #clickme { font-weight: bold; }screen.css: /* extracted css from template '/path/to/template.html' with groups print screen */ #clickme { font-weight: bold; }client.js: /* extracted css from template '/path/to/template.html' with groups client */ document.getElementById('clickme').onclick = function() { alert('Ugh! I have been clicked'); } Requirements: · Django · Python


django-templatecomponents Related Software