~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to news/managers.py

  • Committer: Holger Rapp
  • Date: 2009-02-21 18:24:02 UTC
  • Revision ID: sirver@kallisto.local-20090221182402-k3tuf5c4gjwslbjf
Main Page contains now the same informations as before

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
 
5
5
class PublicManager(Manager):
6
 
    """Returns news posts that are:
7
 
 
8
 
       - not in the future
9
 
       - not published"""
10
 
 
 
6
    """Returns published posts that are not in the future."""
 
7
    
11
8
    def published(self):
12
 
        return self.get_queryset().exclude(status=1).filter(publish__lte=datetime.datetime.now())
 
9
        return self.get_query_set().filter(status__gte=2, publish__lte=datetime.datetime.now())
 
 
b'\\ No newline at end of file'