diff options
Diffstat (limited to 'app/admin')
| -rw-r--r-- | app/admin/routes.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/admin/routes.py b/app/admin/routes.py index f8d72d2..bed0d18 100644 --- a/app/admin/routes.py +++ b/app/admin/routes.py @@ -168,6 +168,23 @@ def add_dataset(): return render_template("admin/add.html", title="Add Dataset", form=form) +@bp.route("/annotations", methods=("GET",)) +@admin_required +def view_annotations(): + annotations = ( + Annotation.query.join(Task, Annotation.task) + .join(User, Task.user) + .join(Dataset, Task.dataset) + .order_by(Dataset.name, User.username, Annotation.cp_index) + .all() + ) + return render_template( + "admin/annotations.html", + title="View Annotations", + annotations=annotations, + ) + + @bp.route("/", methods=("GET",)) @admin_required def index(): |
