Allows easy creation of template tags that define a context variable
The "tag function" returns a value which, when called inside a template, is stored in a
variable or displayed directly.
Example:
@definition_tag(register=register)
def top_players(context):
return TopScores.objects.order_by('-elo')[:20]
Inside the template, we could call {% top_players %} to output the data, or we could call
{% top_players as foo %} {{ foo }}.
The "tag function" returns a value which, when called inside a template, is stored in a
variable or displayed directly.
Example:
@definition_tag(register=register)
def top_players(context):
return TopScores.objects.order_by('-elo')[:20]
Inside the template, we could call {% top_players %} to output the data, or we could call
{% top_players as foo %} {{ foo }}.
Release files for django-definition-tag 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-definition-tag-0.1.0.tar.gz | 1.4 kB | Details |
Release files / django-definition-tag-0.1.0.tar.gz
| Download URL | django-definition-tag-0.1.0.tar.gz |
|---|---|
| Size | 1.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd009340c2bed7fb50e2c6eb13671fb083804366234e6c5cd7a4b8dbefdfc089
|
|
BLAKE2b-256 checksum How to use checksums |
3487be0212af10cef11d268225a49a24378eb3efac88dbd0d665a7b78939c470
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |