diff --git a/tournaments/models/failed_api_call.py b/tournaments/models/failed_api_call.py index 8426a73..34e174e 100644 --- a/tournaments/models/failed_api_call.py +++ b/tournaments/models/failed_api_call.py @@ -2,7 +2,7 @@ from django.db import models from . import BaseModel, CustomUser import uuid -class FailedApiCall(BaseModel): +class FailedApiCall(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=True) date = models.DateTimeField() user = models.ForeignKey(CustomUser, blank=True, null=True, on_delete=models.SET_NULL, related_name='failed_api_calls') @@ -13,7 +13,7 @@ class FailedApiCall(BaseModel): authentication = models.TextField(blank=True, null=True) def __str__(self): - datetime = self.date.strftime("%Y-%m-%d %H:%M") + # datetime = self.date.strftime("%Y-%m-%d %H:%M") if self.user: return f"{self.user.username} | {self.type} : {self.error}" else: diff --git a/tournaments/models/log.py b/tournaments/models/log.py index 30577f9..fe36ce6 100644 --- a/tournaments/models/log.py +++ b/tournaments/models/log.py @@ -2,7 +2,7 @@ from django.db import models from . import BaseModel, CustomUser import uuid -class Log(BaseModel): +class Log(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=True) date = models.DateTimeField() user = models.ForeignKey(CustomUser, blank=True, null=True, on_delete=models.SET_NULL, related_name='logs')