Update API endpoints docs and docstring

https://github.com/Tivix/django-rest-auth/issues/280
This commit is contained in:
Maxim Kukhtenkov 2016-12-07 19:12:01 -05:00
parent 6812deeeb4
commit f79537de77
2 changed files with 12 additions and 15 deletions

View File

@ -6,14 +6,13 @@ Basic
- /rest-auth/login/ (POST) - /rest-auth/login/ (POST)
- username (string) - username
- email (string) - email
- password (string) - password
Returns Token Object's key
- /rest-auth/logout/ (POST, GET) - /rest-auth/logout/ (POST)
- token
.. note:: ``ACCOUNT_LOGOUT_ON_GET = True`` to allow logout using GET - this is the exact same configuration from allauth. NOT recommended, see: http://django-allauth.readthedocs.io/en/latest/views.html#logout .. note:: ``ACCOUNT_LOGOUT_ON_GET = True`` to allow logout using GET - this is the exact same configuration from allauth. NOT recommended, see: http://django-allauth.readthedocs.io/en/latest/views.html#logout
@ -35,20 +34,17 @@ Basic
- new_password1 - new_password1
- new_password2 - new_password2
- old_password - old_password
- token
.. note:: ``OLD_PASSWORD_FIELD_ENABLED = True`` to use old_password. .. note:: ``OLD_PASSWORD_FIELD_ENABLED = True`` to use old_password.
.. note:: ``LOGOUT_ON_PASSWORD_CHANGE = False`` to keep the user logged in after password change .. note:: ``LOGOUT_ON_PASSWORD_CHANGE = False`` to keep the user logged in after password change
- /rest-auth/user/ (GET) - /rest-auth/user/ (GET, PUT, PATCH)
- /rest-auth/user/ (PUT/PATCH)
- username - username
- first_name - first_name
- last_name - last_name
- email
- token Returns pk, username, email, first_name, last_name
Registration Registration

View File

@ -158,10 +158,11 @@ class PasswordResetView(GenericAPIView):
class PasswordResetConfirmView(GenericAPIView): class PasswordResetConfirmView(GenericAPIView):
""" """
Password reset e-mail link is confirmed, therefore this resets the user's password. Password reset e-mail link is confirmed, therefore
this resets the user's password.
Accepts the following POST parameters: new_password1, new_password2 Accepts the following POST parameters: token, uid,
Accepts the following Django URL arguments: token, uid new_password1, new_password2
Returns the success/fail message. Returns the success/fail message.
""" """