Re: Default managers must contain all objects?

2008-12-12 Thread Zak Johnson
Zak Johnson wrote: > class Item(models.Model): > is_active = models.BooleanField() > objects = ActiveManager() > inactive_objects = InactiveManager() In case anyone else runs into this problem, the workaround I'm using for now is simply to add a new default manager w

Default managers must contain all objects?

2008-12-12 Thread Zak Johnson
I'm porting one of my applications to 1.0, and have come across what seems like a bug related to the Queryset refactor. Previously, it was possible to have a model's default manager filter the results; something like: class ActiveManager(models.Manager): def get_query_set(self): qs =

FilterNode and context

2007-03-15 Thread Zak Johnson
Instead of passing the complete template context to its filter, django.template.FilterNode passes a new Context instance containing only the "var" key, whose value is the rendered content of the block. In other words, this contrived example works: {{ obj|cut:request.GET.cut }} This one, ins

Re: Thinking out loud: move auth.Messages into the sessions app?

2006-12-11 Thread Zak Johnson
James Bennett wrote: > Which leads me to wonder whether it wouldn't be better to just do that > in Django itself, and move the Message model into > django.contrib.sessions. +1. Associating messages with sessions is much more intuitive to me; when first switching to Django, I was surprised they d