mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-15 06:19:24 +00:00
user: add subscription history
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
from datetime import date, timedelta
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
from ast import literal_eval as make_tuple
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.conf import settings
|
||||
from django.core.exceptions import ValidationError
|
||||
@ -71,6 +72,10 @@ class Subscription(models.Model):
|
||||
verbose_name=_("location"),
|
||||
)
|
||||
|
||||
def get_payment_method_display(self):
|
||||
|
||||
return _(make_tuple(self.payment_method)[1])
|
||||
|
||||
class Meta:
|
||||
ordering = ["subscription_start"]
|
||||
|
||||
|
Reference in New Issue
Block a user