From 3a89f6d871d0fab058515faecd3b2cdd953734a7 Mon Sep 17 00:00:00 2001 From: "Adrian A. Baumann" Date: Mon, 1 Dec 2025 10:55:46 +0100 Subject: [PATCH] Full name on comments --- dokumente/templates/standards/standard_detail.html | 2 +- dokumente/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dokumente/templates/standards/standard_detail.html b/dokumente/templates/standards/standard_detail.html index 6f43da3..38c2d54 100644 --- a/dokumente/templates/standards/standard_detail.html +++ b/dokumente/templates/standards/standard_detail.html @@ -297,7 +297,7 @@ document.addEventListener('DOMContentLoaded', function() {
- ${comment.user} + ${comment.user} (${comment.created_at}) ${comment.updated_at !== comment.created_at ? `(bearbeitet: ${comment.updated_at})` : ''}
${comment.text}
diff --git a/dokumente/views.py b/dokumente/views.py index 0b535dd..53e7b49 100644 --- a/dokumente/views.py +++ b/dokumente/views.py @@ -271,7 +271,7 @@ def get_vorgabe_comments(request, vorgabe_id): comments_data.append({ 'id': comment.id, 'text': escaped_text, - 'user': escape(comment.user.username), + 'user': escape(comment.user.first_name+" "+comment.user.last_name), 'created_at': comment.created_at.strftime('%d.%m.%Y %H:%M'), 'updated_at': comment.updated_at.strftime('%d.%m.%Y %H:%M'), 'is_own': comment.user == request.user