django-insert-above

These Django templatetags is a hack making possible to insert "content" in some (maybe above ...
Download

django-insert-above Ranking & Summary

Advertisement

  • Rating:
  • License:
  • WTFPL
  • Publisher Name:
  • German Ilyin
  • Publisher web site:
  • https://github.com/yunmanger1/

django-insert-above Tags


django-insert-above Description

These Django templatetags is a hack making possible to insert "content" in some (maybe above the current or parent template) places django-insert-above is a Django app that contains a hack making possible to insert 'content' in some (maybe above the current or parent template) places.More specifically, when we use these tags, there are some Nodes called 'containers' that are rendered after all other nodes are rendered, but placed in it's right posistion. Using this hack, 'containers' may render depending on variables in context that were generated by nodes placed anywhere in template (maybe after it).MOTIVATION1. Create convenient way to include media resources in head of HTML page.2. Handle repetition of resource includes.3. Make it possible to require resources from included templates.4. Keep the order of resource includes from different places.INSTALL1. (required) add 'insert_above' in INSTALLED_APPS in your settings.py2. (optional) add these two lines of code somewhere in your project wherethey will run for sure. For example in urls.pyfrom django.template.loader import add_to_builtinsadd_to_builtins('insert_above.templatetags.insert_tags') Requirements: · Python · Django


django-insert-above Related Software