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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fed9ac0b20497cfa428312339eb1c1a6c71760d735d84d34a612ac85724aa9c |
|
MD5 | d5ed57e16ce835756524f84f1897844e |
|
BLAKE2b-256 | d9b2f5a8edc44b799981ccf513733aa00cc5c9e9149ce56b944b50e37975ef9b |