Template Tags and Filters¶
Note
All the following examples it is understood that you have already loaded the boilerplate
template tag library, placing the code below in the beginning that each template that boilerplate
template tag library will be used. Read the Installation section on how
to accomplish this.
get_deleted_objects¶
List the related objects before delete an object
form_model_name¶
Return the model verbose name of a form model
form_model_name_plural¶
Return the model verbose name plural of a form model
form_model_url¶
Return the model list url name of a form model
form_app_name¶
Return the app name of a form model
form_app_url¶
Return the app home url of a form model
form_prefix¶
Return the form name as a prefix
formset_model_name¶
Return the model verbose name of a formset
formset_model_name_plural¶
Return the model verbose name plural of a formset
model_action¶
Tag name
model_actionReturn the full url name of an action
Usage
{% model_action object action %}
Example
{% model_action object 'update' %}
model_child_action¶
Tag name
model_child_actionReturn the full url name of an action
Usage
{% model_child_action object parent action %}
Example
{% model_child_action object parent 'update' %}
model_name¶
Return the model verbose name of an object
model_name_plural¶
Return the model verbose name plural of an object
model_app_name¶
Return the app verbose name of an object
model_app_url¶
Return the app home url of an object
model_url¶
Return the model list url name of a model
queryset_app_name¶
Return the app verbose name of a queryset
queryset_app_url¶
Return the app home url name of a queryset
queryset_model_name_plural¶
Return the app verbose name plural of a queryset
queryset_model_url¶
Return the model list url name of a queryset
queryset_action¶
Tag name
queryset_actionReturn the full url name of an action
- Parameters:
queryset: A valid queryset of objects action: A valid action name. Ex. namespace:model_action
Usage
{% queryset_action queryset action %}
Example
{% queryset_action queryset 'add' %}