diff --git a/apps/member/views.py b/apps/member/views.py index 487da98b..fed0c30b 100644 --- a/apps/member/views.py +++ b/apps/member/views.py @@ -18,7 +18,7 @@ from .models import Profile, Club, Membership from .forms import ProfileForm, ClubForm,MembershipForm, MemberFormSet,FormSetHelper from .tables import ClubTable from note.models.transactions import Transaction - +from note.tables import HistoryTable class UserCreateView(CreateView): """ Une vue pour inscrire un utilisateur et lui créer un profile @@ -87,10 +87,10 @@ class ClubDetailView(LoginRequiredMixin,DetailView): club = context["club"] club_transactions = \ Transaction.objects.all().filter(Q(source=club.note) | Q(destination=club.note)) - context['history_list'] = club_transactions + context['history_list'] = HistoryTable(club_transactions) club_member = \ Membership.objects.all().filter(club=club) - #TODO: consider only valid Membership + # TODO: consider only valid Membership context['member_list'] = club_member return context diff --git a/templates/member/club_detail.html b/templates/member/club_detail.html index d8e6f805..1afc5c16 100644 --- a/templates/member/club_detail.html +++ b/templates/member/club_detail.html @@ -2,6 +2,7 @@ {% load static %} {% load i18n %} {% load render_table from django_tables2 %} +{% load pretty_money %} {% block content %}

Clubs

Club {{ object.name }}

@@ -15,7 +16,7 @@
Aliases
{{ club.note.aliases_set.all }}
{% trans 'balance' %}
-
{{ club.note.balance }}
+
{{ club.note.balance | pretty_money }}