def get_all_latest_builds_for_user(user): app_ids = [(domain, app_id) for domain in user.domains for app_id in get_built_app_ids(domain)] return [ get_app(app_id[0], app_id[1], latest=True, target="release") for app_id in app_ids ]
def set_app_id_choices(self): app_ids = get_built_app_ids(self.domain) choices = [] for app_doc in iter_docs(Application.get_db(), app_ids): # This will return both Application and RemoteApp docs, but # they both have a name attribute choices.append((app_doc['_id'], app_doc['name'])) choices.sort(key=lambda x: x[1]) self.fields['app_id'].choices = choices
def set_app_id_choices(self): app_ids = get_built_app_ids(self.domain) choices = [] for app_doc in iter_docs(Application.get_db(), app_ids): # This will return both Application and RemoteApp docs, but # they both have a name attribute choices.append((app_doc['_id'], app_doc['name'])) choices.sort(key=lambda x: x[1]) self.fields['app_id'].choices = choices