From 6f293416587d60b9713376da093f6ed87bb59904 Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Thu, 26 Apr 2018 15:37:08 +0300 Subject: [PATCH] Add humanize school subscription end --- apps/payment/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/payment/models.py b/apps/payment/models.py index 8f1f36d8..2233093d 100644 --- a/apps/payment/models.py +++ b/apps/payment/models.py @@ -1,3 +1,5 @@ +import arrow + from paymentwall import Pingback from polymorphic.models import PolymorphicModel @@ -165,3 +167,7 @@ class SchoolPayment(Payment): discount = 0 self.amount = month_price_sum - discount super().save(*args, **kwargs) + + @property + def date_end_humanize(self): + return arrow.get(self.date_end).humanize(locale='ru')