mirror of
https://github.com/house-of-vanity/OutFleet.git
synced 2025-08-21 14:37:16 +00:00
Added indexes to logs
This commit is contained in:
@@ -48,6 +48,14 @@ class AccessLog(models.Model):
|
||||
data = models.TextField(default="", blank=True, editable=False)
|
||||
timestamp = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
class Meta:
|
||||
indexes = [
|
||||
models.Index(fields=['user']),
|
||||
models.Index(fields=['server']),
|
||||
models.Index(fields=['timestamp']),
|
||||
models.Index(fields=['action', 'timestamp']),
|
||||
]
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.action} {self.user} request for {self.server} at {self.timestamp}"
|
||||
|
||||
|
Reference in New Issue
Block a user