def GET_happening_now(self): current_thread_id = NamedGlobals.get(HAPPENING_NOW_KEY, None) if current_thread_id: current_thread = LiveUpdateEvent._byID(current_thread_id) else: current_thread = None return AdminPage(content=pages.HappeningNowAdmin(current_thread), title='live: happening now', nav_menus=[]).render()
def GET_happening_now(self): featured_event_ids = NamedGlobals.get(HAPPENING_NOW_KEY, None) or {} featured_events = {} for target, event_id in featured_event_ids.iteritems(): event = LiveUpdateEvent._byID(event_id) featured_events[target] = event return AdminPage(content=pages.HappeningNowAdmin(featured_events), title='live: happening now', nav_menus=[]).render()
def GET_happening_now(self): featured_event_fullnames = get_all_featured_events() featured_events = {} for target, event_id in featured_event_fullnames.iteritems(): event = LiveUpdateEvent._by_fullname(event_id) featured_events[target] = event return AdminPage(content=pages.HappeningNowAdmin(featured_events), title='live: happening now', nav_menus=[]).render()