def release_history(ident): try: entity = api.get_release(ident) history = api.get_release_history(ident) except ApiException as ae: abort(ae.status) return render_template('entity_history.html', page_title=entity.title, entity_type="release", entity=entity, history=history)
def release_view(ident): try: entity = api.get_release(ident) files = api.get_release_files(ident) container = None if entity.container_id is not None: container = api.get_container(entity.container_id) except ApiException as ae: abort(ae.status) authors = [c for c in entity.contribs if c.role in ('author', None)] authors = sorted(authors, key=lambda c: c.index) return render_template('release_view.html', release=entity, authors=authors, files=files, container=container)
def release_view(ident): try: entity = api.get_release(ident) files = api.get_release_files(ident) container = None if entity.container_id is not None: container = api.get_container(entity.container_id) except ApiException as ae: abort(ae.status) authors = [c for c in entity.contribs if c.role in ('author', None)] authors = sorted(authors, key=lambda c: c.index) for fe in files: # crudely filter out exact duplicates kept = [] for u in fe.urls: if not u in kept: kept.append(u) fe.urls = [u for u in kept if not '/web/None/' in u.url] return render_template('release_view.html', release=entity, authors=authors, files=files, container=container)
def release_edit_view(ident): try: entity = api.get_release(ident) except ApiException as ae: abort(ae.status) return render_template('entity_edit.html')