Yes, of course - it all makes sense now after some sleep.

Thanks for the hint on ipython Luke, I've had it installed for ages wth
django, and it is *extremely* helpful, but I just couldn't see the wood
for the trees.

For the record for anyone else doing this, here's how I did it with
generic views and magic removal

urls.py
info_dict = {'queryset': Tag.objects.select_related(), 'slug_field':
'slug', 'template_name':'electives/tag_list'}
...
(r'^electives/tag/(?P<slug>[0-9A-Za-z-]+)',
'django.views.generic.list_detail.object_detail', info_dict),

and electives/tag_list is (essentially);

{% for post in object.post_set.all %}
        <h2><a href="{{ post.get_absolute_url }}">{{ post.title
}}</a></h2>

        {% if post.image %}<img align="right" src="{{
post.get_image_url }}" /> {% endif %}

        <p>{{ post.description|truncatewords:80 }}</p>

        <div class="article_menu"><b>Posted on {{ post.postdate|date:"F
j, Y" }}</b> <br />Tags: {% for tag in post.tag_set.all %}{% if not
forloop.first %}, {% endif %}{{ tag.title }}{% endfor %}</div>

{% endfor %}

Thanks a lot for the help, it's much appreciated,
Tone.


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to