我的 django views.py 文件中有一个 dayarchiveview
class day_archive(DayArchiveView):
    model=Timer
    paginate_by=12
    allow_future =True
    allow_empty=True
    month_format = '%m'
    day_format='%d'
    date_field='start_hour'
    template_name='timer/timer_archive_date'
    def get_queryset(self):
        return Timer.objects.filter(author=self.request.user)
但我想使用 djangotables2 将返回的数据呈现为表,如下所示:
 import django_tables2 as tables
 class Job_table(tables.Table):
    class Meta: 
    model = Timer
    attrs = {"class": "paleblue"}
    fields= ('start_hour','end_hour','category','subcategory','duration')
    def render_duration(self,value):
        from timehuman import sectohour
        hh= sectohour(value)
        return hh
我如何将我的数据呈现为表格而不是呈现的列表?( django 的 context object_list ) 我如何访问要发送到 object_list 上下文的数据并修改它?