Not without a little work, atleast as far as I know. A custom manger
is what you want. Then you could do something like

model.current.filter(otherstuff) or make an extra method on the
manager and chain

model.objects.is_current().filter(otherstuff)

class CustManager(models.Manager):
    def is_current(self):
        # build the actual filter args here
        f={'from_date__lte': today,
           'to_date__gte': today}
        return super(CustManager,self).filter(**f)

http://www.djangoproject.com/documentation/models/custom_managers/



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to