> I can do pretty much any part of the filtering by itself and it works,
> just not all together like I need it. What's the correct way to do
> this sort of a query/filter?
1. What does your model for Message look like?
2. Where in your code are you trying to add more filtering? In a
view?
-
I have added a manager so to only return active messages in my Message model:
class ActiveMessageManager(models.Manager):
def get_query_set(self):
return super(ActiveMessageManager,
self).get_query_set().filter(date_removed__isnull=True).order_by('date_sent')
That works fine as far a
2 matches
Mail list logo