Skip to content

Commit

Permalink
Add missing docstrings for registration views (#619)
Browse files Browse the repository at this point in the history
* Add missing docstrings for registration views

The missing docstrings are annoying when using autogenerated schemas with swagger or similar api documentation tools

* Appease flake8 requirement
  • Loading branch information
rhaeyx authored Nov 3, 2024
1 parent 99f1a3a commit 6c4a2a0
Showing 1 changed file with 15 additions and 0 deletions.
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 @@ -94,6 +99,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 @@ -113,6 +123,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 6c4a2a0

Please sign in to comment.