On Jan 1, 2:42 pm, waltbrad <waltb...@hotmail.com> wrote:
> Let me try this again, I'm not sure my other post was understood very
> well.
>
> In Bennett's book he wants the Coltrane blog to allow browsing of
> entries and links by tag.  So, I'm trying to write the tag templates
> to that end. But I don't see how this can be done with the code from
> the book.

Okay, I'm getting closer.  By using this code:

     {% for tag in object_list %}
          <a href="/weblog/tags/entries/{{tag.name|slugify}}/">
{{ tag.name }}</a> <br />
     {% endfor %}

I'm able to call up the proper template and display the entries for
the tag.  Likewise by changing the path from "entries" to "links"  I'd
get the proper template for displaying links.

But how do I get the code to choose whether the tag is referencing an
entry or a link?  And what if an entry and a link are both referenced
by the same tag?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to