Added urlpattern steps in Installation and changed rest_accounts to rest-auth in README.md

This commit is contained in:
Silin Na 2014-04-30 17:54:29 -07:00
parent c0da444b06
commit 4be5debc5f

View File

@ -46,38 +46,45 @@ Installation
REST_REGISTRATION_BACKEND = 'rest_auth.backends.rest_registration.RESTRegistrationView' REST_REGISTRATION_BACKEND = 'rest_auth.backends.rest_registration.RESTRegistrationView'
REST_PROFILE_MODULE = 'accounts.UserProfile' REST_PROFILE_MODULE = 'accounts.UserProfile'
6. You're good to go now! 6. Add rest_auth urls in your project root urls.py
urlpatterns = patterns('',
...,
(r'^rest-auth/', include('rest_auth.urls')),
)
7. You're good to go now!
API endpoints without Authentication API endpoints without Authentication
------------------------------------ ------------------------------------
1. /rest\_accounts/register/ 1. /rest-auth/register/
- POST - POST
- username - username
- password - password
- email - email
- first\_name - first\_name
- last\_name - last\_name
2. /rest\_accounts/password/reset/ 2. /rest-auth/password/reset/
- POST - POST
- email - email
3. /rest\_accounts/password/reset/confirm/{uidb64}/{token}/ 3. /rest-auth/password/reset/confirm/{uidb64}/{token}/
- POST - POST
- new\_password1 - new\_password1
- new\_password2 - new\_password2
4. /rest\_accounts/login/ 4. /rest-auth/login/
- POST - POST
- username - username
- password - password
5. /rest\_accounts/verify-email/{activation\_key}/ 5. /rest-auth/verify-email/{activation\_key}/
- GET - GET
API endpoints with Authentication API endpoints with Authentication
--------------------------------- ---------------------------------
1. /rest\_accounts/logout/ 1. /rest-auth/logout/
- GET - GET
2. /rest\_accounts/user/ 2. /rest-auth/user/
- GET & POST - GET & POST
- POST parameters - POST parameters
- user as dictionary - user as dictionary
@ -85,7 +92,7 @@ API endpoints with Authentication
- user data example - user data example
"user": {"id": 1, "first_name": "Person", "last_name": "2"} "user": {"id": 1, "first_name": "Person", "last_name": "2"}
3. /rest\_accounts/password/change/ 3. /rest-auth/password/change/
- POST - POST
- new\_password1 - new\_password1
- new\_password2 - new\_password2