def entries_published(queryset):
 now = timezone.now()
 return queryset.filter((models.Q(start_publication__lte=now) | models.Q(start_publication=None)), (models.Q(end_publication__gt=now) | models.Q(end_publication=None)), status=PUBLISHED, sites=Site.objects.get_current())

def entries_published ( queryset ) : now = timezone . now ( ) return queryset . filter ( ( models . Q ( start_publication__lte = now ) | models . Q ( start_publication = None ) ) , ( models . Q ( end_publication__gt = now ) | models . Q ( end_publication = None ) ) , status = PUBLISHED , sites = Site . objects . get_current ( ) )
return only the entries published .