30 lines
867 B
Python
30 lines
867 B
Python
"""
|
|
register our models for Django's admin
|
|
"""
|
|
|
|
from django.contrib import admin
|
|
|
|
from .models import Host, Domain, BlacklistedDomain, ServiceUpdater, ServiceUpdaterHostConfig
|
|
|
|
|
|
class DomainAdmin(admin.ModelAdmin):
|
|
list_display = ("domain", "public", "available", "created_by")
|
|
list_filter = ("public", "available", "created_by")
|
|
|
|
|
|
class HostAdmin(admin.ModelAdmin):
|
|
list_display = ("subdomain", "domain", "abuse_blocked")
|
|
list_filter = ("domain", "created_by", "abuse", "abuse_blocked")
|
|
|
|
|
|
class BlacklistedDomainAdmin(admin.ModelAdmin):
|
|
list_display = ("domain", "created_by")
|
|
list_filter = ("created_by", "created")
|
|
|
|
|
|
admin.site.register(BlacklistedDomain, BlacklistedDomainAdmin)
|
|
admin.site.register(Domain, DomainAdmin)
|
|
admin.site.register(Host, HostAdmin)
|
|
admin.site.register(ServiceUpdater)
|
|
admin.site.register(ServiceUpdaterHostConfig)
|