@property
def is_near_expiry(self):
    e = self.expiry_date
    return ((e is not None) and (timezone.now() > (e - timedelta(days=settings.VALIDATION_EXPIRY_WARNING_DAYS))))
@property
def is_near_expiry(self):
    e = self.expiry_date
    return ((e is not None) and (timezone.now() > (e - timedelta(days=settings.VALIDATION_EXPIRY_WARNING_DAYS))))