Skip to content

Commit

Permalink
Make rest_framework_api_key app optional to include into INSTALLED_APPS
Browse files Browse the repository at this point in the history
The reason: florimondmanca#180
  • Loading branch information
onedayyoumay committed Aug 19, 2024
1 parent 15ffd45 commit 11b0906
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions src/rest_framework_api_key/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions src/rest_framework_api_key/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 11b0906

Please sign in to comment.