aboutsummaryrefslogtreecommitdiff
path: root/app/admin/routes.py
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2019-09-23 16:01:09 +0100
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2019-09-23 16:01:09 +0100
commit69c54c4f4ab37ba72445b941ce1afd5e50b487f6 (patch)
tree1258651de9fa3795cbfef596f627228995179d15 /app/admin/routes.py
parentBump version and update changelog (diff)
downloadAnnotateChange-69c54c4f4ab37ba72445b941ce1afd5e50b487f6.tar.gz
AnnotateChange-69c54c4f4ab37ba72445b941ce1afd5e50b487f6.zip
Add annotation time to download
Diffstat (limited to 'app/admin/routes.py')
-rw-r--r--app/admin/routes.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/admin/routes.py b/app/admin/routes.py
index 98eb2fc..a6225ce 100644
--- a/app/admin/routes.py
+++ b/app/admin/routes.py
@@ -277,13 +277,24 @@ def download_annotations_csv():
)
# based on: https://stackoverflow.com/a/45111660/1154005
- header = ["DatasetID", "DatasetName", "UserID", "AnnotationIndex"]
+ header = [
+ "DatasetID",
+ "DatasetName",
+ "UserID",
+ "AnnotatedOn",
+ "AnnotationIndex",
+ ]
proxy = io.StringIO()
writer = clevercsv.writer(proxy)
writer.writerow(header)
for ann in annotations:
- row = [ann.task.dataset.id, ann.task.dataset.name, ann.task.user.id]
+ row = [
+ ann.task.dataset.id,
+ ann.task.dataset.name,
+ ann.task.user.id,
+ ann.task.annotated_on,
+ ]
if ann.cp_index is None:
row.append("no_cp")
else: