Skip to content

'Settings' object has no attribute 'OAUTH2_PROVIDER_ID_TOKEN_MODEL' #1017

@mjamalil

Description

@mjamalil

Describe the bug
makemigrations gives this error:
'Settings' object has no attribute 'OAUTH2_PROVIDER_ID_TOKEN_MODEL'
setting OAUTH2_PROVIDER_ID_TOKEN_MODEL to oauth2_provider.IDToken resolves the error
then when applying migration it will give this error
Related model 'oauth2_provider.IDToken' cannot be resolved

To Reproduce
override these
OAUTH2_PROVIDER_APPLICATION_MODEL = "oauth.MyApplication"
OAUTH2_PROVIDER_REFRESH_TOKEN_MODEL = "oauth.MyRefreshToken"
OAUTH2_PROVIDER_GRANT_MODEL = "oauth.MyGrant"
OAUTH2_PROVIDER_ACCESS_TOKEN_MODEL = "oauth.MyAccessToken"

Expected behavior
Shouldn't need everything to be overridden

Version
1.5.0

  • I have tested with the latest published release and it's still a problem.
  • I have tested with the master branch and it's still a problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions