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

Add missing docstrings for registration views #619

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
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
15 changes: 15 additions & 0 deletions dj_rest_auth/registration/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@


class RegisterView(CreateAPIView):
"""
Registers a new user.

Accepts the following POST parameters: username, email, password1, password2.
"""
serializer_class = api_settings.REGISTER_SERIALIZER
permission_classes = api_settings.REGISTER_PERMISSION_CLASSES
token_model = TokenModel
Expand Down Expand Up @@ -96,6 +101,11 @@ def perform_create(self, serializer):


class VerifyEmailView(APIView, ConfirmEmailView):
"""
Verifies the email associated with the provided key.

Accepts the following POST parameter: key.
"""
permission_classes = (AllowAny,)
allowed_methods = ('POST', 'OPTIONS', 'HEAD')

Expand All @@ -115,6 +125,11 @@ def post(self, request, *args, **kwargs):


class ResendEmailVerificationView(CreateAPIView):
"""
Resends another email to an unverified email.

Accepts the following POST parameter: email.
"""
permission_classes = (AllowAny,)
serializer_class = ResendEmailVerificationSerializer
queryset = EmailAddress.objects.all()
Expand Down