mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-23 07:16:36 +02:00
Improve Django-admin interface, inlines and filters
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -589,6 +589,8 @@ class Payment(models.Model):
|
||||
@property
|
||||
def team(self):
|
||||
return self.registrations.first().team
|
||||
team.fget.short_description = _("team")
|
||||
team.fget.admin_order_field = 'registrations__team__trigram'
|
||||
|
||||
@property
|
||||
def tournament(self):
|
||||
@ -596,6 +598,8 @@ class Payment(models.Model):
|
||||
from participation.models import Tournament
|
||||
return Tournament.final_tournament()
|
||||
return self.registrations.first().team.participation.tournament
|
||||
tournament.fget.short_description = _("tournament")
|
||||
tournament.fget.admin_order_field = 'registrations__team__participation__tournament'
|
||||
|
||||
def get_checkout_intent(self, none_if_link_disabled=False):
|
||||
if self.checkout_intent_id is None:
|
||||
|
Reference in New Issue
Block a user