I finally got it to work! I wrapped the object_detail view with a view that calls the manager method as suggested by Carl.
Thank you! On 2 Feb., 16:38, Carl Meyer <carl.j.me...@gmail.com> wrote: > I think you've got the right idea of what's going wrong, but you're > looking for the problem in the wrong place. This method isn't module- > level code; it will be executed anew each time you query on this > manager. More likely is that you're storing a reference to the > returned queryset in module-level code; probably in a dictionary of > kwargs you're passing to the object_detail generic view (most likely > in your urls.py). It's that queryset that is never getting updated; > the call to your manager method is happening only once, when the > urls.py module is first loaded. > > The solution is to wrap the object_detail view with a very lightweight > view of your own that calls the manager method and passes the > resulting queryset in to object_detail. Then the queryset will be re- > created for each request. > > Carl --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---