attribute: Phillie Casablanca

How do I make category list links



I'm trying to add a sidebar of links that provides a list of categories from my posts.
The categories are dynamic so I don't want to hard code the category names.

I found what I think is a solution to the urls.py side of the issue (*maybe*) here:
http://www.b-list.org/weblog/2006/nov/16/django-tips-get-most-out-generic-views/

Basically, the solution involves creating a wrapper function to a generic view to provide added filtering via category.

I think that does what I want to actually display the categories by date, but now to add the actual links themselves to the template.

The only thing is, now I don't see how to provide a queryset result to the template.
I see that somehow the "latest" object magically appears in my main archive template, but how do I give it a filtered query set? (At least I think that's what I want)

As I understand, latest will only give me a subset of my posts, so I won't be able to get all possible categories. Actually getting a full set of data seems wasteful, but I assume there's some kind of filter I can do on the queryset that will give me the category list. It would seem pretty trivial from an sql perspective.

Oh well, the search continues...


monkut // June 11, 2008 // 11:53 a.m.