def get_last_daterange(self):
     """ Returns the last selected daterange. """
     return session.get_session(self.context, 'daterange') \
         or dates.default_daterange
 def get_last_state(self):
     """ Returns the last selected event state. """
     return session.get_session(self.context, 'state') or 'published'
 def get_last_import_source(self):
     """ Returns the last selected import source. """
     return session.get_session(self.context, 'source') \
         or ''
Exemple #4
0
def retrieve_from_session():
    return get_session(getSite(), 'events-access-token') or 'missing'
 def get_last_state(self):
     """ Returns the last selected event state. """
     return session.get_session(self.context, 'state') or 'published'
 def get_last_custom_end_date(self):
     """ Returns the last selected custom end date. """
     unused, default = getattr(dates.DateRanges(), 'custom')
     return session.get_session(self.context,
                                'custom_date_end') or default
 def get_last_custom_start_date(self):
     """ Returns the last selected custom start date. """
     default, unused = getattr(dates.DateRanges(), 'custom')
     return session.get_session(self.context,
                                'custom_date_start') or default
 def get_last_daterange(self):
     """ Returns the last selected daterange. """
     return session.get_session(self.context, 'daterange') \
         or dates.default_daterange
Exemple #9
0
def retrieve_from_session():
    return get_session(getSite(), 'events-access-token') or 'missing'