|
|
|
@ -21,23 +21,23 @@ class WorkflowQuerySet(models.QuerySet):
|
|
|
|
|
"""Usage: qs.exclude(**self.exclude_inactive_filter())""" |
|
|
|
|
return { |
|
|
|
|
"is_published": True, |
|
|
|
|
"publication_datetime__lte": timezone.now().date(), |
|
|
|
|
"publication_datetime__lte": timezone.now(), |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@classmethod |
|
|
|
|
def active_filter(cls): |
|
|
|
|
return { |
|
|
|
|
"is_published": True, |
|
|
|
|
"publication_datetime__lte": timezone.now().date(), |
|
|
|
|
"archiving_datetime__gte": timezone.now().date(), |
|
|
|
|
"publication_datetime__lte": timezone.now(), |
|
|
|
|
"archiving_datetime__gte": timezone.now(), |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@classmethod |
|
|
|
|
def archived_filter(cls): |
|
|
|
|
return { |
|
|
|
|
"is_published": True, |
|
|
|
|
"publication_datetime__lte": timezone.now().date(), |
|
|
|
|
"archiving_datetime__lte": timezone.now().date(), |
|
|
|
|
"publication_datetime__lte": timezone.now(), |
|
|
|
|
"archiving_datetime__lte": timezone.now(), |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
def public(self): |
|
|
|
|