admin.py 326 Bytes
Newer Older
1 2 3 4
from django.contrib import admin
from sshkey.models import UserKey

class UserKeyAdmin(admin.ModelAdmin):
5 6 7 8 9 10
  list_display = [
    '__unicode__',
    'user',
    'name',
    'fingerprint',
  ]
11 12 13
  search_fields = [
    'user__username',
  ]
14 15 16
  readonly_fields = [
    'fingerprint',
  ]
17 18

admin.site.register(UserKey, UserKeyAdmin)