from django.contrib import admin
from sshkey.models import UserKey

class UserKeyAdmin(admin.ModelAdmin):
  search_fields = [
    'user__username',
  ]

admin.site.register(UserKey, UserKeyAdmin)

from django.contrib import admin
from sshkey.models import UserKey

class UserKeyAdmin(admin.ModelAdmin):
  search_fields = [
    'user__username',
  ]
  readonly_fields = [
    'fingerprint',
  ]

admin.site.register(UserKey, UserKeyAdmin)

make fingerprint readonly in admin view