Fix admin.py
This commit is contained in:
parent
4aa1d000b9
commit
2f6a345e5c
@ -1,14 +1,8 @@
|
||||
from django.contrib import admin
|
||||
from djangoldp.admin import DjangoLDPAdmin
|
||||
from djangoldp.models import Model
|
||||
from .models import Notification, NotificationSetting, Subscription, VAPIDKeyset
|
||||
|
||||
|
||||
from .models import VAPIDKeyset
|
||||
|
||||
|
||||
class NotificationSettingAdmin(DjangoLDPAdmin):
|
||||
ordering = ['urlid']
|
||||
|
||||
|
||||
class VAPIDKeysetAdmin(DjangoLDPAdmin):
|
||||
readonly_fields = ('public_key_view', 'private_key_view')
|
||||
|
||||
@ -18,7 +12,5 @@ class VAPIDKeysetAdmin(DjangoLDPAdmin):
|
||||
def private_key_view(self, obj):
|
||||
return obj.private_key.tobytes()
|
||||
|
||||
admin.site.register(Notification, NotificationAdmin)
|
||||
admin.site.register(Subscription, SubscriptionAdmin)
|
||||
admin.site.register(NotificationSetting, NotificationSettingAdmin)
|
||||
admin.site.register(VAPIDKeyset, VAPIDKeysetAdmin)
|
||||
|
||||
admin.site.register(VAPIDKeyset, VAPIDKeysetAdmin)
|
||||
|
Reference in New Issue
Block a user