Re: extra_context and DoesNotExist exception

2008-04-10 Thread foxbunny
Okay, solved this. It was the offending latest(). I thought it returned a QuerySet, but I was badly mistaken. I don't even know how I got the idea... :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Re: extra_context and DoesNotExist exception

2008-04-10 Thread foxbunny
Here's the custom manager code. I didn't have the latest version with me, so I try to recreate the get_hot() method below. class PublishedManager(models.Manager): def get_query_set(self): return super(PublishedManager, self).get_query_set().filter(published=True).filter(c

Re: extra_context and DoesNotExist exception

2008-04-10 Thread foxbunny
On Apr 10, 12:38 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Can your get_hot() method (is it manager?) use filter() instead of > get()? This way you would get QuerySet. Well, it is a custom manager method that uses filter(). I just named it get_hot (which, now that you mention it, may be a bit

Re: extra_context and DoesNotExist exception

2008-04-10 Thread Jarek Zgoda
foxbunny napisaƂ(a): > I'm trying to shove some custom query sets into extra context for > something like 5 generic view items. One of the QSs finds all news > items that are marked as 'hot' and is used to display those item (if > they exist) in a small list on any page along with whatever content

extra_context and DoesNotExist exception

2008-04-10 Thread foxbunny
I'm trying to shove some custom query sets into extra context for something like 5 generic view items. One of the QSs finds all news items that are marked as 'hot' and is used to display those item (if they exist) in a small list on any page along with whatever content is intended for the main col