toolkit.templatetags
– Toolkit template tags¶
Pagination tags¶
Append querystrings to a form as hidden fields
- Generates a Table heading with ordering paramaters based values passed
- by AbstractedListMixin that allows users to order an object_list table in a ListView by a particular column(ASC and DESC)
Generates the pagination footer in a ListView template
Method used to the page querystring and return an update url
Bootstrap tags¶
Parameters: value (Bool) – Nullable boolean value Returns html: i tag with fontawesome icon representation
Returns: appropriate html rendering of value
Templates helpers¶
Helper method for make_list
http://stackoverflow.com/questions/3715550/creating-a-list-on-the-fly-in-a-django-template
- Template tag used in a django template to check if a form field can be
- styled using bootstrap
Parameters: formfield (FormField) – Django form field Returns bool: True if the widget of the form field is one of the following - widgets.TextInput - widgets.Textarea - widgets.NumberInput - widgets.EmailInput - widgets.Select - widgets.DateInput - widgets.PasswordInput - DynamicNullBooleanSelect - widgets.URLInput - widgets.NullBooleanSelect - widgets.SelectMultiple
- Template tag used in a django template to check if a form field is a
- date field
Parameters: formfield (FormField) – Django form field Returns bool: True if FormField is a date field
- Template tag used in a django template to check if a form field is a
- datetime field
Parameters: formfield (FormField) – Django form field Returns bool: True if FormField is a datetime field
- Template tag used in a django template to check if a form field is a
- time field
Parameters: formfield (FormField) – Django form field Returns bool: True if FormField is a time field
Template tag to create a python list within a Django template
- Usage:
1
{% make_list var1 var2 var3 as some_list %}
http://stackoverflow.com/questions/3715550/creating-a-list-on-the-fly-in-a-django-template