Ivan Sagalaev wrote: > Actually I've forgot 'distinct' yet again: > > Tag.objects.filter(blog__id__isnull=False).distinct() > > ...or there would be dupes in the result.
Awesome, thanks so much Ivan. Another quick question, where is the best place to put this? I made the mistake of putting this in my urls.py file, as extra_context: blog_dict = { 'queryset': Blog.objects.all(), 'template_object_name': 'blog', "extra_context" : { "blog_month_list" : Blog.objects.dates("date_added", "month"), "current_issue" : Issue.objects.latest(), "tag_list" : Tag.objects.filter(blog__id__isnull=False).distinct() }, 'date_field': 'date_added', } ..but apparently this will only populate the tags once, when I start up Django, correct? Do I need to add the extra_context in a wrapper around a generic view in views.py? Or would something like this be best implemented as a template_tag? Am I correct in assuming it would be best to use a template_tag if it's needed across many views, but otherwise easier to just populate the template w/ extra_context? Thanks again, Nate. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---