Fix tag population and date formatting
This commit is contained in:
@@ -190,6 +190,7 @@ class DrilldownTableView(SingleTableView):
|
||||
for k, v in self.context.items():
|
||||
if k not in context:
|
||||
context[k] = v
|
||||
context["hide"] = ["date", "time", "id", "num", "channel_nsfw", "num_users", "num_chans", "exemption", "version_sentiment"]
|
||||
|
||||
if request.method == "GET":
|
||||
if not request.htmx:
|
||||
|
||||
@@ -5,9 +5,8 @@ from django_tables2.columns.base import BoundColumn
|
||||
# Make the table column headings lowercase
|
||||
orig_Column_header = BoundColumn.header
|
||||
|
||||
|
||||
@property
|
||||
def lower_header(self):
|
||||
def format_header(self):
|
||||
header = orig_Column_header.__get__(self)
|
||||
header = header.lower()
|
||||
header = header.title()
|
||||
@@ -20,8 +19,7 @@ def lower_header(self):
|
||||
|
||||
return header
|
||||
|
||||
|
||||
BoundColumn.header = lower_header
|
||||
BoundColumn.header = format_header
|
||||
|
||||
|
||||
class DrilldownTable(Table):
|
||||
@@ -38,8 +36,8 @@ class DrilldownTable(Table):
|
||||
num = Column()
|
||||
src = Column()
|
||||
ts = Column()
|
||||
# date = Column()
|
||||
# time = Column()
|
||||
date = Column()
|
||||
time = Column()
|
||||
type = Column()
|
||||
bot = Column()
|
||||
channel = Column()
|
||||
|
||||
Reference in New Issue
Block a user