Switch to Django with visitor tracking and server info footnote
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
This commit is contained in:
12
core/models.py
Normal file
12
core/models.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Visit(models.Model):
|
||||
ip = models.GenericIPAddressField()
|
||||
timestamp = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ['-timestamp']
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.ip} @ {self.timestamp}"
|
||||
Reference in New Issue
Block a user