revert 8994be6ca1c44f5c9cee5ac5a2c24d8e1ac822c9ee5ac5a2c24d8e1ac822c9, fixes #198

list_display_links just links the given column to the record represented by the whole line,
NOT to the record (foreign key) represented by that individual column.
This commit is contained in:
Thomas Waldmann 2015-01-26 20:56:40 +01:00
parent 0c95fbacaf
commit a0dee62a5f

View File

@ -10,7 +10,6 @@ from .models import Host, RelatedHost, Domain, BlacklistedHost, ServiceUpdater,
@admin.register(Domain)
class DomainAdmin(admin.ModelAdmin):
list_display = ("name", "public", "available", "created_by")
list_display_links = ("created_by", )
list_filter = ("created", "public", "available")
search_fields = ("name", "created_by__username", "created_by__email")
@ -18,7 +17,6 @@ class DomainAdmin(admin.ModelAdmin):
@admin.register(Host)
class HostAdmin(admin.ModelAdmin):
list_display = ("name", "domain", "created_by", "client_faults", "abuse", "abuse_blocked")
list_display_links = ("domain", "created_by")
list_filter = ("created", "abuse", "abuse_blocked", "domain")
search_fields = ("name", "created_by__username", "created_by__email")
@ -26,26 +24,22 @@ class HostAdmin(admin.ModelAdmin):
@admin.register(RelatedHost)
class RelatedHostAdmin(admin.ModelAdmin):
list_display = ("name", "main_host", "available", "comment")
list_display_links = ("main_host", )
search_fields = ("name", "main_host__created_by__username", "main_host__created_by__email")
@admin.register(BlacklistedHost)
class BlacklistedHostAdmin(admin.ModelAdmin):
list_display = ("name_re", "created_by")
list_display_links = ("created_by", )
list_filter = ("created", )
@admin.register(ServiceUpdater)
class ServiceUpdaterAdmin(admin.ModelAdmin):
list_display = ("name", "comment", "created_by")
list_display_links = ("created_by", )
list_filter = ("created", )
@admin.register(ServiceUpdaterHostConfig)
class ServiceUpdaterHostConfigAdmin(admin.ModelAdmin):
list_display = ("host", "service", "hostname", "comment", "created_by")
list_display_links = ("created_by", )
list_filter = ("created", )