Metadata-Version: 1.0
Name: jinjatag
Version: 0.1.1
Summary: A library to make Jinja2 Extensions Easy
Home-page: https://github.com/mankyd/jinjatag
Author: Dave Mankoff
Author-email: mankyd@gmail.com
License: GPLv3
Description: A Library to Quickly Turn Functions into Jinja2 Extensions
        ==========================================================
        
        This library is best demonstrated through example:
        
        ```python
        import jinjatag
        
        ### Configure your Jinja2 Environment:
        jinja_tag = jinjatag.JinjaTag()
        jinja2_env = Environment(extensions=[jinja_tag])
        jinja_tag.init()
        
        ### Decorate your functions
        
        @jinjatag.simple_tag()
        def mytag(foo, bar=None, **kwargs):
            return "mytag: "+foo+(bar or '')+str(kwargs)
        
        @jinjatag.simple_block()
        def myblock(body, foo, bar=None):
            return "myblock : "+body+foo+(bar or '')
        
        ```
        
        Then, in your template code, use your new tags:
        
            {% mytag foo='abc' xyz='def' %}
        
            {% myblock foo='bar' %}contents{% endmyblock %}
        
        The resulting output:
        
            mytag: abc{'xyz':'def'}
        
            myblock: contentsbar
        
        That's really all there is to it. A simple_tag is expected to accept 0 or more
        arguments and return a string. A simple_block is expected to accept at least
        one argument which will be the its rendered body.
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
