#9785: Turn the unordered_list template filter into a block tag.
----------------------------------+-----------------------------------------
Reporter: equanimity | Owner: nobody
Status: new | Milestone: post-1.0
Component: Template system | Version: SVN
Keywords: unordered_list block | Stage: Unreviewed
Has_patch: 0 |
----------------------------------+-----------------------------------------
There's a problem with this tag as a filter in that one has no control
over how each element in the nested list is rendered, except by changing
it's {{{__unicode__}}} method, which isn't overly practical. For example,
say we were trying to output a list of e-mail threads:
{{{
{% unordered_list email_list as email %}
<div class="email">
{{ email.subject }}, {{ email.sent_date }}<br/>
{{ email.sender }}, {{ email.size }}
</div>
{% endunordered_list %}
}}}
In effect, the content of the block replaces the call to
{{{__unicode__}}}.
I imagine the name might need to be changed to avoid confusion.
Once there's consensus on whether it'd a good idea and the semantics I'm
happy to be the one to write the patch. (My current workaround works so I
haven't tried to do things properly yet, particularly as things may
change.)
--
Ticket URL: <http://code.djangoproject.com/ticket/9785>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---