Re-work access to pub/priv keys for showing
This commit is contained in:
parent
64015d9b5b
commit
44153bc562
@ -7,7 +7,7 @@ class VAPIDKeysetAdmin(DjangoLDPAdmin):
|
||||
readonly_fields = ('public_key_view', 'private_key_view')
|
||||
|
||||
def public_key_view(self, obj):
|
||||
return obj.public_key.tobytes()
|
||||
return obj.public_key
|
||||
|
||||
def private_key_view(self, obj):
|
||||
return obj.private_key.tobytes()
|
||||
|
@ -8,7 +8,7 @@ class VAPIDKeyset(models.Model):
|
||||
|
||||
def __str__(self):
|
||||
return "public_key:{}... private_key:{}...".format(
|
||||
self.public_key.tobytes()[:10],
|
||||
self.public_key[:10],
|
||||
self.private_key.tobytes()[:10]
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user