17 lines
400 B
Python
17 lines
400 B
Python
from django.contrib import admin
|
|
from djangoldp.admin import DjangoLDPAdmin
|
|
from .models import VAPIDKeyset
|
|
|
|
|
|
class VAPIDKeysetAdmin(DjangoLDPAdmin):
|
|
readonly_fields = ('public_key_view', 'private_key_view')
|
|
|
|
def public_key_view(self, obj):
|
|
return obj.public_key.tobytes()
|
|
|
|
def private_key_view(self, obj):
|
|
return obj.private_key.tobytes()
|
|
|
|
|
|
admin.site.register(VAPIDKeyset, VAPIDKeysetAdmin)
|