I am reading the source code of the Django application blog at git://github.com/nathanborror/django-basic-apps.git
.
How do you read the following Django code?
{% tags_for_object object as tag_list %}
My attempt: Make the variable object of the type *tags_for_object* and rename the variable to *tag_list*.
The object apparently is based on the file blog/templates/inlines/default.html:
{% if object %}
{{ object }}
{% else %}
{% for object in object_list %}
{{ object }}
{% endfor %}
{% endif %}
What is the befefit of putting the logic to two-step procedure: run single object, else loop through a list of objects?