django-ttag 2.4

A template tag constructor library for Django.

TTag is a template tag constructor library for Django created for the purpose of making writing template tags easier.

The tag syntax is modelled on Django's friendly syntaxes for models and forms. Here is a full example tag:

class Welcome(ttag.Tag)
    user = ttag.Arg()
    fallback = ttag.Arg(named=True, default='Hi!')

    def output(self, data)
        name = data['user'].get_full_name()
        if name:
            return 'Hi, %s!' % name
        return data['fallback']

This would produce a tag named welcome which can be used like this:

{% welcome current_user fallback "Hello, anonymous." %}

More comprehensive usage and reference documentation can be found in the docs directory, or at http://packages.python.org/django-ttag/.

MIT

Author

Chris Beaven

Pip

django-ttag==2.4

Classifiers

  • Environment :: Web Environment
  • Framework :: Django
  • Intended Audience :: Developers
  • Operating System :: OS Independent
  • Programming Language :: Python
  • Development Status :: 4 - Beta
  • License :: OSI Approved :: BSD License
File Type Python Version Uploaded On Downloads
django-ttag-2.4.tar.gz Source Nov. 16, 2011 16,285
Version Release Date
2.4 Nov. 16, 2011
2.3 Sept. 7, 2011
2.2 Aug. 3, 2011
2.1.1 July 28, 2011
2.0 July 5, 2011
1.0 May 27, 2011
1.0-alpha-4 April 1, 2011
1.0-alpha-3 March 2, 2011
1.0-alpha-2 Feb. 1, 2011
1.0-alpha Dec. 13, 2010
Date Package Version Action
Aug. 26, 2015, 12:29 a.m. django-ttag 2.4 Release Created
Aug. 26, 2015, 12:29 a.m. django-ttag 1.0-alpha-4 Release Created
Aug. 26, 2015, 12:29 a.m. django-ttag 2.1.1 Release Created
Aug. 26, 2015, 12:29 a.m. django-ttag 1.0-alpha-2 Release Created
Aug. 26, 2015, 12:29 a.m. django-ttag 2.2 Release Created
Aug. 26, 2015, 12:29 a.m. django-ttag 2.3 Release Created
Aug. 26, 2015, 12:29 a.m. django-ttag 1.0-alpha Release Created
Aug. 26, 2015, 12:29 a.m. django-ttag 1.0-alpha-3 Release Created
Aug. 26, 2015, 12:29 a.m. django-ttag 1.0 Release Created
Aug. 26, 2015, 12:29 a.m. django-ttag 2.0 Release Created
Aug. 26, 2015, 12:29 a.m. django-ttag Package Created