django-definition-tag-0.1.0
توضیحات
Allows easy creation of template tags that define a context variable
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | django-definition-tag-0.1.0 |
| نام | django-definition-tag |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Philip Gatt |
| ایمیل نویسنده | gattster@gmail.com |
| آدرس صفحه اصلی | http://github.com/defcube/django-definition-tag/ |
| آدرس اینترنتی | https://pypi.org/project/django-definition-tag/ |
| مجوز | UNKNOWN |
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 }}.
نحوه نصب
نصب پکیج whl django-definition-tag-0.1.0:
pip install django-definition-tag-0.1.0.whl
نصب پکیج tar.gz django-definition-tag-0.1.0:
pip install django-definition-tag-0.1.0.tar.gz