def list_all_forms(form_tuples, xform_base_url): template = env.get_template('form_list.xml') form_tuples = [(escape(form_name), form_id) for form_name, form_id in form_tuples] return template.render(form_tuples=form_tuples, xform_base_url=xform_base_url)
def escape_option_text(self): for option in self._dict.get(self.OPTIONS): option['text'] = escape(option['text'])
def options(self): return [(entity.short_code, escape(entity.data['name']['value'])) for entity in get_all_entities(self.dbm, [self.unique_id_type]) ]
def _get_entity_options(dbm, entity_type): return [(entity.short_code, escape(entity.data['name']['value'])) for entity in get_all_entities(dbm, [entity_type])]