File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ In your main `models.py` module:
1515``` python
1616from aboutcode.api_auth import AbstractAPIToken
1717
18+
1819class APIToken (AbstractAPIToken ):
1920 class Meta :
2021 verbose_name = " API Token"
@@ -40,9 +41,7 @@ Declare the `APITokenAuthentication` authentication class as one of the
4041
4142``` python
4243REST_FRAMEWORK = {
43- " DEFAULT_AUTHENTICATION_CLASSES" : (
44- " aboutcode.api_auth.APITokenAuthentication" ,
45- ),
44+ " DEFAULT_AUTHENTICATION_CLASSES" : (" aboutcode.api_auth.APITokenAuthentication" ,),
4645}
4746```
4847
@@ -64,9 +63,7 @@ from aboutcode.api_auth.views import BaseRevokeAPIKeyView
6463
6564class GenerateAPIKeyView (LoginRequiredMixin , BaseGenerateAPIKeyView ):
6665 success_url = reverse_lazy(" profile" )
67- success_message = (
68- " Copy your API key now, it will not be shown again: <pre>{plain_key} </pre>"
69- )
66+ success_message = " Copy your API key now, it will not be shown again: <pre>{plain_key} </pre>"
7067
7168
7269class RevokeAPIKeyView (LoginRequiredMixin , BaseRevokeAPIKeyView ):
You can’t perform that action at this time.
0 commit comments