Answer the question
In order to leave comments, you need to log in
How to create custom filter in django?
There is the following model:
class Client(models.Model):
@property
def is_defaulter(self):
if self.total_paid >= 72000:
return False
first_payment_date = self.contract_date
first_payment_date.replace(day=10,
month=first_payment_date.month + 1 if date.today().day <= 25
else first_payment_date + 2)
return ((date.today() - first_payment_date).month + 1) * 6000 > self.total_paid
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question