From 1039e9a2d3c4352f52eaad7512aaa3cf18efb419 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Sun, 29 Sep 2019 11:51:36 +0100 Subject: [PATCH] Add user pages. --- templates/list_edits.html | 2 +- templates/user_page.html | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 templates/user_page.html diff --git a/templates/list_edits.html b/templates/list_edits.html index 36d1971..3ae6ebe 100644 --- a/templates/list_edits.html +++ b/templates/list_edits.html @@ -21,7 +21,7 @@ {% for edit in edit_list %} - {{ edit.username }} + {{ edit.username }} {{ edit.painting.label }} ({{ edit.painting_qid }}) {{ edit.depicts.label }} diff --git a/templates/user_page.html b/templates/user_page.html new file mode 100644 index 0000000..f6280cc --- /dev/null +++ b/templates/user_page.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} + +{% block content %} +
+ +

{{ username }}

+ +

This user has added a total of {{ edits.count() }} depicts statements.

+ +

{{ painting_count }} paintings have been cataloged.

+ + + + + + + + + + + {% for edit in edit_list %} + + + + + + {% endfor %} + +
paintingdepictswhen
{{ edit.painting.label }} + ({{ edit.painting_qid }}){{ edit.depicts.label }} + ({{ edit.depicts_qid }}){{ edit.timestamp.strftime('%Y %b %d %H:%M') }}
+ + +
+ +{% endblock %}