Worked like a charm. In case anyone's wondering: def blog_index(request, blog_slug): qs = Entry.objects.filter(blog__slug__exact=blog_slug) blog_name = Blog.objects.get(slug=blog_slug).title extra = {'blog_name': blog_name} return archive_index(request, qs, 'date', extra_context=extra)
Thanks so much! -Justin On Jul 17, 12:49 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > You are making the assumption that the queryset will be recreated anew > each time and that this will only happen after the blog_slug value has > been determined. Both assumptions aren't correct and this is what is > causing the error. The Python dictionary containing the queryset is > being evaluated as soon as that file is imported (and only then) and the > requisite information to create the queryset doesn't exist at that point > in time. > > So, instead of trying to do this directly, you need to create the > queryset properly and then call the generic view. Do this by writing a > Python function that wraps up the call to the generic view. An example > can be found > here:http://www.pointy-stick.com/blog/2006/06/29/django-tips-extending-gen... > > That's almost two years old now, but the logic (and even most of the > code) is still valid. > > Regards, > Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---