filter_horizontal = () readonly_fields = ['last_login'] class SignupCodeAdmin(admin.ModelAdmin): list_display = ["code", "max_uses", "use_count", "expiry", "created"] search_fields = ["code", "email"] list_filter = ["created"] raw_id_fields = ["inviter"] class AccountAdmin(admin.ModelAdmin): raw_id_fields = ["user"] class AccountDeletionAdmin(AccountAdmin): list_display = ["email", "date_requested", "date_expunged"] class EmailAddressAdmin(AccountAdmin): list_display = ["user", "email", "verified", "primary"] search_fields = ["email", "user__username"] list_filter = ["user"] main_admin_site.register(User, UsrAdmin) main_admin_site.register(Account, AccountAdmin) main_admin_site.register(SignupCode, SignupCodeAdmin) main_admin_site.register(AccountDeletion, AccountDeletionAdmin) main_admin_site.register(EmailAddress, EmailAddressAdmin)
from django.contrib import admin from ela.sites import main_admin_site from django.contrib.sites.models import Site class SiteAdmin(admin.ModelAdmin): list_display = ("domain", "name") search_fields = ("domain", "name") main_admin_site.register(Site, SiteAdmin)