s
This commit is contained in:
1 parent
cf662895e5
commit
ac04fad613
8 files changed
+11
-5
No files matched your search
@@ -9,6 +9,7 @@ class CountVisitor(models.Model):
|
||||
user = models.ForeignKey(User, null=True, blank=True, on_delete=models.PROTECT)
|
||||
count = models.IntegerField(default=0)
|
||||
fullPath = models.CharField(max_length=255)
|
||||
ico = models.CharField(verbose_name='Иконка', max_length=150, null=True, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return str(self.page)
|
||||
@@ -18,7 +19,7 @@ class CountVisitor(models.Model):
|
||||
class Meta:
|
||||
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['page', 'user', 'visitdate', 'fullPath'], name='unique appversion')
|
||||
models.UniqueConstraint(fields=['page', 'user', 'visitdate', 'fullPath', 'ico'], name='unique appversion')
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user