From f066a22a8096672211267d3c11b2d105123aff1d Mon Sep 17 00:00:00 2001 From: Mateusz Sikora Date: Fri, 10 Oct 2014 16:59:16 +0200 Subject: [PATCH 1/4] Update README.md --- README.md | 105 +++--------------------------------------------------- 1 file changed, 5 insertions(+), 100 deletions(-) diff --git a/README.md b/README.md index 225e6c6..db43306 100644 --- a/README.md +++ b/README.md @@ -1,104 +1,9 @@ -[![Build Status](https://travis-ci.org/Tivix/django-rest-auth.svg?branch=master)](https://travis-ci.org/Tivix/django-rest-auth) [![Coverage Status](https://coveralls.io/repos/Tivix/django-rest-auth/badge.png?branch=master)](https://coveralls.io/r/Tivix/django-rest-auth?branch=master) [![Requirements Status](https://requires.io/github/Tivix/django-rest-auth/requirements.png?branch=master)](https://requires.io/github/Tivix/django-rest-auth/requirements/?branch=master) - django-rest-auth ================ -Since the introduction of django-rest-framework, Django apps have been able to serve up app-level REST API endpoints. As a result, we saw a lot of instances where developers implemented their own REST registration API endpoints here and there, snippets, and so on. We aim to solve this demand by providing django-rest-auth, a set of REST API endpoints to handle User Registration and Authentication tasks. By having these API endpoints, your client apps such as AngularJS, iOS, Android, and others can communicate to your Django backend site independently via REST APIs for User Management. Of course, we'll add more API endpoints as we see the demand. +[![Build Status](https://travis-ci.org/Tivix/django-rest-auth.svg?branch=master)](https://travis-ci.org/Tivix/django-rest-auth) [![Coverage Status](https://coveralls.io/repos/Tivix/django-rest-auth/badge.png?branch=master)](https://coveralls.io/r/Tivix/django-rest-auth?branch=master) [![Requirements Status](https://requires.io/github/Tivix/django-rest-auth/requirements.png?branch=master)](https://requires.io/github/Tivix/django-rest-auth/requirements/?branch=master) [![Documentation Status](https://readthedocs.org/projects/django-rest-auth/badge/?version=latest)](https://readthedocs.org/projects/django-rest-auth/?badge=latest) + -Features --------- -1. User Registration with activation -2. Login/Logout -3. Retrieve/Update the Django User & user-defined UserProfile model -4. Password change -5. Password reset via e-mail - -Installation ------------- - -1. This project needs the following packages - - > django-registration>=1.0 - > - > djangorestframework>=2.3.13 - -2. Install this package - -3. Add rest_auth app to INSTALLED\_APPS in your django settings.py - - INSTALLED_APPS = ( - ..., - 'rest_framework', - 'rest_framework.authtoken', - 'registration', - ..., - 'rest_auth', - ) - -4. This project depends on django-rest-framework library, therefore the following REST_FRAMEWORK settings needs to be entered in your Django settings.py - - REST_FRAMEWORK = { - 'DEFAULT_AUTHENTICATION_CLASSES': ( - 'rest_framework.authentication.SessionAuthentication', - ), - - 'DEFAULT_PERMISSION_CLASSES': ( - 'rest_framework.permissions.IsAuthenticated', - ) - } - -5. (optional) Lastly, this project accepts the following Django setting values. You can set the UserProfile model (do not define it if you are not using any UserProfile model) and/or create your own REST registration backend for django-registration (default is registration.backends.simple.views.RegistrationView) - - REST_REGISTRATION_BACKEND = 'your_app.backends.rest_registration.RESTRegistrationView' - REST_PROFILE_MODULE = 'your_app.UserProfile' - -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 ------------------------------------- - -1. /rest-auth/register/ - - POST - - username - - password - - email - - first\_name - - last\_name -2. /rest-auth/password/reset/ - - POST - - email -3. /rest-auth/password/reset/confirm/{uidb64}/{token}/ - - POST - - new\_password1 - - new\_password2 -4. /rest-auth/login/ - - POST - - username - - password -5. /rest-auth/verify-email/{activation\_key}/ - - GET - -API endpoints with Authentication ---------------------------------- - -1. /rest-auth/logout/ - - GET -2. /rest-auth/user/ - - GET & POST - - POST parameters - - user as dictionary - - user-defined UserProfile model fields - - user data example - "user": {"id": 1, "first_name": "Person", "last_name": "2"} - -3. /rest-auth/password/change/ - - POST - - new\_password1 - - new\_password2 +Documentation +------------- +http://django-rest-auth.readthedocs.org/en/latest/ From c6a5b198cc421d84e79c2640f1618540b2fd0821 Mon Sep 17 00:00:00 2001 From: Mateusz Sikora Date: Fri, 10 Oct 2014 17:34:16 +0200 Subject: [PATCH 2/4] update README --- README.md | 30 ++++++++++++++++++++++++++---- setup.py | 2 +- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index db43306..1e670d7 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,31 @@ -django-rest-auth -================ +Welcome to django-rest-auth +=========================== + +.. image:: https://travis-ci.org/Tivix/django-rest-auth.png + :target: https://travis-ci.org/Tivix/django-rest-auth + + +.. image:: https://coveralls.io/repos/Tivix/django-rest-auth/badge.png + :target: https://coveralls.io/r/Tivix/django-rest-auth?branch=master + + +.. image:: https://requires.io/github/Tivix/django-rest-auth/requirements.png?branch=master + :target: https://requires.io/github/Tivix/django-rest-auth/requirements/?branch=master + + +.. image:: https://readthedocs.org/projects/django-rest-auth/badge/?version=latest + :target: https://readthedocs.org/projects/django-rest-auth/?badge=latest + + +Django-rest-auth provides a set of REST API endpoints for Authentication and Registration -[![Build Status](https://travis-ci.org/Tivix/django-rest-auth.svg?branch=master)](https://travis-ci.org/Tivix/django-rest-auth) [![Coverage Status](https://coveralls.io/repos/Tivix/django-rest-auth/badge.png?branch=master)](https://coveralls.io/r/Tivix/django-rest-auth?branch=master) [![Requirements Status](https://requires.io/github/Tivix/django-rest-auth/requirements.png?branch=master)](https://requires.io/github/Tivix/django-rest-auth/requirements/?branch=master) [![Documentation Status](https://readthedocs.org/projects/django-rest-auth/badge/?version=latest)](https://readthedocs.org/projects/django-rest-auth/?badge=latest) - Documentation ------------- http://django-rest-auth.readthedocs.org/en/latest/ + + +Source code +----------- +https://github.com/Tivix/django-rest-auth + diff --git a/setup.py b/setup.py index 883d53c..f00a6ce 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ f.close() setup( name='django-rest-auth', - version='0.2.5', + version='0.3.0', author='Sumit Chachra', author_email='chachra@tivix.com', url='http://github.com/Tivix/django-rest-auth', From 58e1f70e03b5e59611b25f2b3163fba4422ea0b1 Mon Sep 17 00:00:00 2001 From: Mateusz Sikora Date: Fri, 10 Oct 2014 17:39:29 +0200 Subject: [PATCH 3/4] change README extension --- README.md => README.rst | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README.md => README.rst (100%) diff --git a/README.md b/README.rst similarity index 100% rename from README.md rename to README.rst From 034f9f6633c7a9f1a94ec2206f659afa565338fc Mon Sep 17 00:00:00 2001 From: Mateusz Sikora Date: Fri, 10 Oct 2014 17:41:45 +0200 Subject: [PATCH 4/4] change README.md to README.rst in setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f00a6ce..5227cbc 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ except ImportError: import os here = os.path.dirname(os.path.abspath(__file__)) -f = open(os.path.join(here, 'README.md')) +f = open(os.path.join(here, 'README.rst')) long_description = f.read().strip() f.close()