Skip to content

Commit

Permalink
#1 added get_absolute_url on Membership
Browse files Browse the repository at this point in the history
  • Loading branch information
Skrattoune committed Mar 13, 2022
1 parent 2fe4ea7 commit bfc4aa4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions openrepairplatform/templates/organization_fees.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ <h2 class="text-center pt-2">Cotisations</h2>
{% endif %}
</div>
</section>
{% comment %} <h4 class="text-center w-100">Total = {{total_fees|currency}} </h4> {% endcomment %}
<h4 class="text-center w-100">Total = {{total_fees}} </h4>
<h4 class="text-center w-100">Total = {{total_fees|currency}} </h4>
<section class="box-shadow mb-5">
<span class="">Télécharger le résultat :
<a class="btn btn-success btn-sm" href="{% querystring '_export'='csv' %}">CSV</a>
Expand Down
4 changes: 4 additions & 0 deletions openrepairplatform/user/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ class Membership(models.Model):
def __str__(self):
return f"{self.user}-{self.organization}"

def get_absolute_url(self):
# TODO: check that it is the right link to provide
return reverse("organization_fees", kwargs={"orga_slug": self.organization.slug})

def update_first_payment(self):
"""
If a new fee linked to current membership is add after the date limit
Expand Down

0 comments on commit bfc4aa4

Please sign in to comment.