Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent typing install in Python 3.6+ #126

Merged
merged 4 commits into from
Jan 9, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply django import_string helper function
  • Loading branch information
damienallen committed Jan 3, 2021
commit 4c1f166fa7da34b02461e2afe8d5f4680f7a5149
3 changes: 2 additions & 1 deletion rest_registration/checks.py
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
from django.core.checks import register
from django.core.exceptions import ImproperlyConfigured
from django.db.models import Model
from django.utils.module_loading import import_string
from rest_framework.settings import api_settings

from rest_registration.auth_token_managers import AbstractAuthTokenManager
@@ -114,7 +115,7 @@ def _is_auth_token_manager_auth_class_enabled() -> bool:
auth_token_manager = _get_auth_token_manager()
auth_cls = auth_token_manager.get_authentication_class()
return any(
issubclass(cls, auth_cls)
issubclass(import_string(cls), auth_cls)
for cls in api_settings.DEFAULT_AUTHENTICATION_CLASSES
)