working but not passing test_analysis
This commit is contained in:
@@ -3730,3 +3730,16 @@ class VideoAnalysis(models.Model):
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
|
||||
class ShareKey(models.Model):
|
||||
location = models.TextField() # absolute path
|
||||
token = models.CharField(max_length=40, primary_key=True)
|
||||
creation_date = models.DateTimeField(auto_now_add=True)
|
||||
expiration_seconds = models.BigIntegerField()
|
||||
|
||||
|
||||
@property
|
||||
def expired(self):
|
||||
return self.creation_date + datetime.timedelta(self.expiration_seconds) < timezone.now()
|
||||
|
||||
Reference in New Issue
Block a user