From 707770a5b4be5573b6b5ad723ade60f61e721e13 Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Tue, 25 Feb 2020 22:55:27 +0100 Subject: [PATCH] fix #28 --- apps/member/views.py | 7 ++++--- templates/base.html | 2 +- templates/member/profile_detail.html | 16 ++++++++-------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/apps/member/views.py b/apps/member/views.py index 6f982c64..6d82a6cc 100644 --- a/apps/member/views.py +++ b/apps/member/views.py @@ -114,12 +114,13 @@ class UserDetailView(LoginRequiredMixin, DetailView): """ Affiche les informations sur un utilisateur, sa note, ses clubs... """ - model = Profile - context_object_name = "profile" + model = User + context_object_name = "user_object" + template_name = "member/profile_detail.html" def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) - user = context['profile'].user + user = context['user_object'] history_list = \ Transaction.objects.all().filter(Q(source=user.note) | Q(destination=user.note)) context['history_list'] = HistoryTable(history_list) diff --git a/templates/base.html b/templates/base.html index 4b5f9872..477ebdaf 100644 --- a/templates/base.html +++ b/templates/base.html @@ -87,7 +87,7 @@ SPDX-License-Identifier: GPL-3.0-or-later