ветка
This commit is contained in:
1 parent
2df9a3e6e6
commit
bca102a060
8 files changed
+299
-303
No files matched your search
@@ -8,6 +8,7 @@ class CountVisitor(models.Model):
|
||||
visitdate = models.DateField()
|
||||
user = models.ForeignKey(User, null=True, blank=True, on_delete=models.PROTECT)
|
||||
count = models.IntegerField(default=0)
|
||||
fullPath = models.CharField(max_length=255)
|
||||
|
||||
def __str__(self):
|
||||
return str(self.page)
|
||||
@@ -17,7 +18,7 @@ class CountVisitor(models.Model):
|
||||
class Meta:
|
||||
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['page', 'user', 'visitdate'], name='unique appversion')
|
||||
models.UniqueConstraint(fields=['page', 'user', 'visitdate', 'fullPath'], name='unique appversion')
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user