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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9b19f79fae9c52c9d71e1f7c481c51d9aa31c4c41ded839c883fade964f00a5 |
|
MD5 | 9247d8dce463d57447488e97257af0ac |
|
BLAKE2b-256 | f4bb85fcce7221e2f4a1d6773bf7ab36024a773603c0529125b9c89a917700a2 |