mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2025-07-01 01:53:03 +03:00
Use Knox AuthToken as default Token Model if REST_USE_KNOX is True
This commit is contained in:
parent
ea9bdec6ca
commit
ca0cbd88e6
|
@ -1,5 +1,8 @@
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
if getattr(settings, 'REST_USE_KNOX', False):
|
||||||
|
from knox.models import AuthToken as DefaultTokenModel
|
||||||
|
else:
|
||||||
from rest_framework.authtoken.models import Token as DefaultTokenModel
|
from rest_framework.authtoken.models import Token as DefaultTokenModel
|
||||||
|
|
||||||
from .utils import import_callable
|
from .utils import import_callable
|
||||||
|
|
Loading…
Reference in New Issue
Block a user