add admin for RelatedHost

This commit is contained in:
Thomas Waldmann 2014-11-02 00:53:06 +01:00
parent 1726fb5c7d
commit c7b1404c78

View File

@ -4,7 +4,7 @@ register our models for Django's admin
from django.contrib import admin
from .models import Host, Domain, BlacklistedHost, ServiceUpdater, ServiceUpdaterHostConfig
from .models import Host, RelatedHost, Domain, BlacklistedHost, ServiceUpdater, ServiceUpdaterHostConfig
@admin.register(Domain)
@ -21,6 +21,12 @@ class HostAdmin(admin.ModelAdmin):
search_fields = ("name", "created_by__username", "created_by__email")
@admin.register(RelatedHost)
class RelatedHostAdmin(admin.ModelAdmin):
list_display = ("name", "main_host", "available", "comment")
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")