Skip to content

Better overridability of the history table view #1471

@PetrDlouhy

Description

@PetrDlouhy

Problem Statement
I would like to change DATE/TIME column in the history table to display also seconds like this (now I have to have 2 columns):

Image

I can easily add columns by overriding get_history_list_display(), but I can't remove nor modify the existing ones.

Describe the solution you'd like
I would like to have full control over all fields displayed in the table. Similar to get_fields() methods in ModeAdmin or ModelForm I would like to override such function and remove/modify the fields.

Also I feel django-simple-history this could reduce complexity of the table in object_history_list.html template if all columns would be generated dynamically, same as history_list_display columns.

Describe alternatives you've considered
The solution might also be, if the template has more blocks defined and I could only override certain parts of the template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions