original_docstring: 
          Returns active objects whose publication date has passed.  This method
          can only be used with Models that have a "publish_date" field.
  
          If the Model has an "expire_date" field, then only active objects whose
          publication date has passed and whose expiration date has not passed
          will be returned.
          
docstring: Returns active objects whose publication date has passed.  This method
  can only be used with Models that have a "publish_date" field.
  
  If the Model has an "expire_date" field, then only active objects whose
  publication date has passed and whose expiration date has not passed
  will be returned.
docstring_tokens: Returns active objects whose publication date has passed . This method can only be used with Models that have a " publish_date " field . If the Model has an " expire_date " field then only active objects whose publication date has passed and whose expiration date has not passed will be returned .
code: def published(self):
          """
          Returns active objects whose publication date has passed.  This method
          can only be used with Models that have a "publish_date" field.
  
          If the Model has an "expire_date" field, then only active objects whose
          publication date has passed and whose expiration date has not passed
          will be returned.
          """
          now = datetime.now()
          objects = self.active().filter(publish_date__lte=now)
          model_field_names = [field.name for field in self.model._meta.fields]
          if "expire_date" in model_field_names:
              objects = objects.filter(
                  Q(expire_date__isnull=True) | Q(expire_date__gt=now))
          return objects
code_tokens: def published ( self ) : now = datetime . now ( ) objects = self . active ( ) . filter ( publish_date__lte = now ) model_field_names = [ field . name for field in self . model . _meta . fields ] if "expire_date" in model_field_names : objects = objects . filter ( Q ( expire_date__isnull = True ) | Q ( expire_date__gt = now ) ) return objects
short_docstring: Returns active objects whose publication date has passed.
short_docstring_tokens: Returns active objects whose publication date has passed .
comment: """
          Returns active objects whose publication date has passed.  This method
          can only be used with Models that have a "publish_date" field.
  
          If the Model has an "expire_date" field, then only active objects whose
          publication date has passed and whose expiration date has not passed
          will be returned.
          """