Hi,
On 1/21/07, natebeaty <[EMAIL PROTECTED]> wrote:
> Wait, can't you just use post.tags.all in your object_detail template
> without any wrappers (for all tags related to a post)? Django will
> auto-populate such a related list in a generic view:
>
> {% if post.tags.all %}
> tags: {% for tag in post.tags.all %}
> <a href="/tag/{{ tag.norm_value }}">{{ tag.value
> }}</a>
> {% endfor %}
> {% endif %}
Yes, works.
The error was that I used __str__ instead of __repr__. So I got [] and
thought it was empty.
> Nate.
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---