diff --git a/src/rest_framework_api_key/admin.py b/src/rest_framework_api_key/admin.py index a368b45..2a04d78 100644 --- a/src/rest_framework_api_key/admin.py +++ b/src/rest_framework_api_key/admin.py @@ -54,8 +54,3 @@ def save_model( messages.add_message(request, messages.WARNING, message) else: obj.save() - - -admin.site.register(APIKey, APIKeyModelAdmin) - -APIKeyAdmin = APIKeyModelAdmin # Compatibility with <1.3 diff --git a/src/rest_framework_api_key/models.py b/src/rest_framework_api_key/models.py index 034ea6d..55b7c53 100644 --- a/src/rest_framework_api_key/models.py +++ b/src/rest_framework_api_key/models.py @@ -109,6 +109,7 @@ class AbstractAPIKey(models.Model): class Meta: # noqa abstract = True + app_label = 'rest_framework_api_key' ordering = ("-created",) verbose_name = "API key" verbose_name_plural = "API keys"