Add days_to_keep_date
This commit is contained in:
1 parent
a8b12338af
commit
bb73cc6c97
1 file changed
+8
@@ -460,6 +460,14 @@ class Source(models.Model):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@property
|
||||||
|
def days_to_keep_date(self):
|
||||||
|
delta = self.days_to_keep
|
||||||
|
if delta > 0:
|
||||||
|
return timezone.now() - timedelta(days=delta)
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def extension(self):
|
def extension(self):
|
||||||
'''
|
'''
|
||||||
|
|||||||
Reference in new issue
Block a user