~widelands-dev/widelands-website/django_staticfiles

1
2
3
4
5
6
7
8
9
10
11
12
from django.db.models import Manager
import datetime


class PublicManager(Manager):
    """Returns news posts that are:

       - not in the future
       - not published"""

    def published(self):
        return self.get_queryset().exclude(status=1).filter(publish__lte=datetime.datetime.now())