-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
515 additions
and
427 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
__title__ = 'dj-rest-auth' | ||
__description__ = 'Authentication and Registration in Django Rest Framework.' | ||
__url__ = 'http://github.com/iMerica/dj-rest-auth' | ||
__version__ = '2.1.4' | ||
__version__ = '2.1.5' | ||
__author__ = '@iMerica https://github.com/iMerica' | ||
__author_email__ = '[email protected]' | ||
__license__ = 'MIT' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from django.conf import settings | ||
from django.utils.module_loading import import_string | ||
|
||
|
||
TokenModel = import_string(getattr(settings, 'REST_AUTH_TOKEN_MODEL', 'rest_framework.authtoken.models.Token')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
from dj_rest_auth.registration.serializers import \ | ||
RegisterSerializer as DefaultRegisterSerializer | ||
from django.conf import settings | ||
from rest_framework.permissions import AllowAny | ||
|
||
from dj_rest_auth.registration.serializers import ( | ||
RegisterSerializer as DefaultRegisterSerializer, | ||
) | ||
|
||
from ..utils import import_callable | ||
|
||
|
||
serializers = getattr(settings, 'REST_AUTH_REGISTER_SERIALIZERS', {}) | ||
|
||
RegisterSerializer = import_callable(serializers.get('REGISTER_SERIALIZER', DefaultRegisterSerializer)) | ||
|
||
|
||
def register_permission_classes(): | ||
permission_classes = [AllowAny, ] | ||
for klass in getattr(settings, 'REST_AUTH_REGISTER_PERMISSION_CLASSES', tuple()): | ||
permission_classes = [AllowAny] | ||
for klass in getattr(settings, 'REST_AUTH_REGISTER_PERMISSION_CLASSES', ()): | ||
permission_classes.append(import_callable(klass)) | ||
return tuple(permission_classes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.