Skip to content

Commit

Permalink
Display history attribute in admin panel (#300)
Browse files Browse the repository at this point in the history
- Display history attribute
- Allow to sort by history attribute
- Allow to filter by history attribute
  • Loading branch information
kofrezo committed Mar 23, 2023
1 parent 50f024f commit 57c061d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion serveradmin/serverdb/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ class AttributeAdmin(admin.ModelAdmin):
'multi',
'readonly',
'clone',
'history',
]
search_fields = ['attribute_id', ]
list_filter = ['type', 'group', 'multi', 'readonly', 'clone', ]
list_filter = ['type', 'group', 'multi', 'readonly', 'clone', 'history', ]

def get_readonly_fields(self, request, obj=None):
fields = super().get_readonly_fields(request, obj)
Expand Down

0 comments on commit 57c061d

Please sign in to comment.