Block tag decorator for Django templates
Project description
Analogue for simple_tag django decorator for making block (paired) template tags.
Works like django.template.Library.simple_tag() and based on its code. One different is first argument, that takes all content between {% tagname %} and {% endtagname %}
Installation
pip install django-simple-block-tag
Usage
template.html
{% load templatetags %} {% save_as "var_name" %}Some Content{% endsave_as %} {% mytag "foo" "bar" %} {{ var_name|lower }} {% endmytag %}
Output
foo some content bar
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-simple-block-tag-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53ea8c2c9a83ece147394a3a9814c583097649ac4abf868e8d027e551241a462 |
|
MD5 | 0c3236b138fdb6e668b90e266ebe3fbc |
|
BLAKE2b-256 | 83cf46c76fbc40d6b94539ba9e73fee89cae7a76dddcf9d44e110ac05205053b |