original_docstring: 
      Get all published items from Django CMS Pages and
      filter them according to the actual Timetravel date.
      
docstring: Get all published items from Django CMS Pages and
  filter them according to the actual Timetravel date.
docstring_tokens: Get all published items from Django CMS Pages and filter them according to the actual Timetravel date .
code: def published(self, site=None):
      """
      Get all published items from Django CMS Pages and
      filter them according to the actual Timetravel date.
      """
      pub = self.on_site(site).filter(published=True)
      ref_date = get_timetravel_date()
  
      if settings.CMS_SHOW_START_DATE:
          pub = pub.filter(
              Q(publication_date__lt=ref_date) |
              Q(publication_date__isnull=True)
          )
  
      if settings.CMS_SHOW_END_DATE:
          pub = pub.filter(
              Q(publication_end_date__gte=ref_date) |
              Q(publication_end_date__isnull=True)
          )
  
      if settings.CMS_SHOW_START_DATE or settings.CMS_SHOW_END_DATE:
          logging.debug('Retrieving CMS Published pages with date {0}'.format(ref_date))
      else:
          warnings.warn("You must 'CMS_SHOW_START_DATE' or 'CMS_SHOW_END_DATE' to True, otherwise there isn't much to timetravel on.")
      return pub
code_tokens: def published ( self , site = None ) : pub = self . on_site ( site ) . filter ( published = True ) ref_date = get_timetravel_date ( ) if settings . CMS_SHOW_START_DATE : pub = pub . filter ( Q ( publication_date__lt = ref_date ) | Q ( publication_date__isnull = True ) ) if settings . CMS_SHOW_END_DATE : pub = pub . filter ( Q ( publication_end_date__gte = ref_date ) | Q ( publication_end_date__isnull = True ) ) if settings . CMS_SHOW_START_DATE or settings . CMS_SHOW_END_DATE : logging . debug ( 'Retrieving CMS Published pages with date {0}' . format ( ref_date ) ) else : warnings . warn ( "You must 'CMS_SHOW_START_DATE' or 'CMS_SHOW_END_DATE' to True, otherwise there isn't much to timetravel on." ) return pub
short_docstring: Get all published items from Django CMS Pages and
  filter them according to the actual Timetravel date.
short_docstring_tokens: Get all published items from Django CMS Pages and filter them according to the actual Timetravel date .
comment: """
      Get all published items from Django CMS Pages and
      filter them according to the actual Timetravel date.
      """