Ejemplo n.º 1
0
 def get_payload(self, site, user, **kwargs):
     state = self.get_user_state()
     return {
         'facilities': [f for f in utils.get_facilities() if state is None or f['state'] == state],
         'monthly': utils.detail_stats(site, state),
         'taggable_contacts': utils.get_taggable_contacts(state, user),
     }
Ejemplo n.º 2
0
def facility_info(view):
    state = view.get_user_state()
    return [f for f in utils.get_facilities() if state is None or f['state'] == state]