admin.py 340 B

1234567891011121314151617
  1. from django.contrib import admin
  2. from rest_framework_api_key.admin import APIKeyModelAdmin
  3. from rest_framework_api_key.models import APIKey as APIKey_default
  4. from .models import APIKey
  5. admin.site.unregister(APIKey_default)
  6. @admin.register(APIKey)
  7. class ClientAPIKeyModelAdmin(APIKeyModelAdmin):
  8. pass
  9. #admin.site.register(APIKey)