mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-12-02 13:53:43 +03:00
19 lines
587 B
Python
19 lines
587 B
Python
from django.conf import settings
|
|
|
|
from rest_framework.permissions import AllowAny
|
|
from dj_rest_auth.registration.serializers import (
|
|
RegisterSerializer as DefaultRegisterSerializer
|
|
)
|
|
|
|
|
|
serializers = getattr(settings, 'REST_AUTH_REGISTER_SERIALIZERS', {})
|
|
|
|
RegisterSerializer = 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.append(klass)
|
|
return tuple(permission_classes)
|