13 lines
276 B
Python
13 lines
276 B
Python
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}"
|