Skip to content

Commit

Permalink
Add missing docstrings for registration views
Browse files Browse the repository at this point in the history
The missing docstrings are annoying when using autogenerated schemas with swagger or similar api documentation tools
  • Loading branch information
rhaeyx committed Apr 18, 2024
1 parent b608360 commit 2aabf37
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 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,12 @@ 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 +126,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

0 comments on commit 2aabf37

Please sign in to comment.