Skip to content

Commit f79537d

Browse files
committed
Update API endpoints docs and docstring
#280
1 parent 6812dee commit f79537d

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

docs/api_endpoints.rst

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ Basic
66

77
- /rest-auth/login/ (POST)
88

9-
- username (string)
10-
- email (string)
11-
- password (string)
9+
- username
10+
- email
11+
- password
1212

13+
Returns Token Object's key
1314

14-
- /rest-auth/logout/ (POST, GET)
15-
16-
- token
15+
- /rest-auth/logout/ (POST)
1716

1817
.. 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
1918

@@ -35,20 +34,17 @@ Basic
3534
- new_password1
3635
- new_password2
3736
- old_password
38-
- token
3937

4038
.. note:: ``OLD_PASSWORD_FIELD_ENABLED = True`` to use old_password.
4139
.. note:: ``LOGOUT_ON_PASSWORD_CHANGE = False`` to keep the user logged in after password change
4240

43-
- /rest-auth/user/ (GET)
44-
45-
- /rest-auth/user/ (PUT/PATCH)
41+
- /rest-auth/user/ (GET, PUT, PATCH)
4642

4743
- username
4844
- first_name
4945
- last_name
50-
- email
51-
- token
46+
47+
Returns pk, username, email, first_name, last_name
5248

5349

5450
Registration

rest_auth/views.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,11 @@ def post(self, request, *args, **kwargs):
158158

159159
class PasswordResetConfirmView(GenericAPIView):
160160
"""
161-
Password reset e-mail link is confirmed, therefore this resets the user's password.
161+
Password reset e-mail link is confirmed, therefore
162+
this resets the user's password.
162163
163-
Accepts the following POST parameters: new_password1, new_password2
164-
Accepts the following Django URL arguments: token, uid
164+
Accepts the following POST parameters: token, uid,
165+
new_password1, new_password2
165166
Returns the success/fail message.
166167
"""
167168

0 commit comments

Comments
 (0)