aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/models
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-10-11 19:53:21 +0200
committerGravatar Johannes Christ <[email protected]>2019-10-11 19:53:21 +0200
commit6fa19e09823680c93acd795c52f6f511a1ae9663 (patch)
tree28d949d11333753a68d3dca7ad4087da16e234d5 /pydis_site/apps/api/models
parentPluralize properly. (diff)
Use multi-column output from Django.
Diffstat (limited to 'pydis_site/apps/api/models')
-rw-r--r--pydis_site/apps/api/models/log_entry.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/pydis_site/apps/api/models/log_entry.py b/pydis_site/apps/api/models/log_entry.py
index cb7275f9..9717c700 100644
--- a/pydis_site/apps/api/models/log_entry.py
+++ b/pydis_site/apps/api/models/log_entry.py
@@ -6,10 +6,6 @@ from django.utils import timezone
from pydis_site.apps.api.models.utils import ModelReprMixin
-# Used to shorten the timestamp length in the Django Admin.
-TIMESTAMP_WITH_SECONDS_LENGTH = len('YYYY-MM-DD HH:MM:SS')
-
-
class LogEntry(ModelReprMixin, models.Model):
"""A log entry generated by one of the PyDis applications."""
@@ -55,13 +51,6 @@ class LogEntry(ModelReprMixin, models.Model):
help_text="The textual content of the log line."
)
- def __str__(self) -> str:
- timestamp = str(self.timestamp)[:TIMESTAMP_WITH_SECONDS_LENGTH]
- message = textwrap.shorten(self.message, width=140)
- level = self.level[:4].upper()
-
- return f'{timestamp} | {self.application} | {level} | {message}'
-
class Meta:
"""Customizes the default generated plural name to valid English."""