Skip to content

Commit

Permalink
Add content history
Browse files Browse the repository at this point in the history
  • Loading branch information
filippomc committed Jul 8, 2024
1 parent 65a9414 commit fe60913
Show file tree
Hide file tree
Showing 6 changed files with 476 additions and 8 deletions.
7 changes: 4 additions & 3 deletions applications/portal/backend/api/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from django.utils.html import escape, format_html, format_html_join, mark_safe
from django.utils.text import format_lazy
from import_export.admin import ImportExportModelAdmin
from simple_history.admin import SimpleHistoryAdmin
from keycloak.exceptions import KeycloakGetError
from cloudharness_django.models import Member

Expand Down Expand Up @@ -112,7 +113,7 @@ class AntibodyFilesAdmin(admin.TabularInline):
)

@admin.register(Antibody)
class AntibodyAdmin(ImportExportModelAdmin):
class AntibodyAdmin(ImportExportModelAdmin, SimpleHistoryAdmin):

change_form_template = "admin/antibody_change_form.html"

Expand Down Expand Up @@ -340,7 +341,7 @@ def queryset(self, request, queryset):


@admin.register(VendorDomain)
class VendorDomainAdmin(admin.ModelAdmin):
class VendorDomainAdmin(admin.ModelAdmin, SimpleHistoryAdmin):
list_display = (
"base_url",
"vendor",
Expand All @@ -351,7 +352,7 @@ class VendorDomainAdmin(admin.ModelAdmin):
list_filter = [CommercialTypeFilter]

@admin.register(Vendor)
class VendorAdmin(admin.ModelAdmin):
class VendorAdmin(admin.ModelAdmin, SimpleHistoryAdmin):
delete_confirmation_template = "admin/vendor/delete_confirmation.html"
search_fields = ("name",)
list_display = ("id", "name", "commercial_type", "nif_id", "eu_id")
Expand Down
Loading

0 comments on commit fe60913

Please sign in to comment.