Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

TTag

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(positional=True)
    fallback = ttag.Arg(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.

Metadata

Release files for django-ttag 1.0-alpha

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-ttag 1.0-alpha
File Size Uploaded
django-ttag-1.0-alpha.tar.gz 122.6 kB Details

Release files / django-ttag-1.0-alpha.tar.gz

Download URL django-ttag-1.0-alpha.tar.gz
Size 122.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ca2a5808d76de6d5eb788fddc49a3df864705c1367efdbd340dc16971031897b
BLAKE2b-256 checksum
How to use checksums
4219fb48441f8671fda46f5457e98bcccf689d75b6441c05da039caa0f13b7b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page