def container_history(ident): try: entity = api.get_container(ident) history = api.get_container_history(ident) except ApiException as ae: abort(ae.status) #print(history) return render_template('entity_history.html', page_title=entity.name, entity_type="container", 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 container_view(ident): try: entity = api.get_container(ident) except ApiException as ae: abort(ae.status) return render_template('container_view.html', container=entity)