On 29 mar, 17:17, satvik chauhan <mystic.sat...@gmail.com> wrote: > I am using contrib.comments app and have a custom field xuser in the comment > model. > I want to create a list of xusers(with no duplicates ) > > {% for comment in comment_list %} > > [Some tag to add comment.xuser in the list if not already in it ] > > {% endfor %}
Is this something you want for a given view only, or is this repeated in most of your templates (like, some portlet in a sidebar or something...) ? In the first case, this belongs to the view's code. In the second one, the obvious solution is to write a custom template tag. HTH -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.