~widelands-dev/widelands-website/django_staticfiles

17 by Holger Rapp
Main Page contains now the same informations as before
1
from django.db.models import Manager
2
import datetime
3
4
5
class PublicManager(Manager):
429.4.2 by franku
cleanups and fixes
6
    """Returns news posts that are:
7
8
       - not in the future
9
       - not published"""
10
17 by Holger Rapp
Main Page contains now the same informations as before
11
    def published(self):
429.4.2 by franku
cleanups and fixes
12
        return self.get_queryset().exclude(status=1).filter(publish__lte=datetime.datetime.now())