diff --git a/rest_auth/views.py b/rest_auth/views.py index d143a7d..50ee4e5 100644 --- a/rest_auth/views.py +++ b/rest_auth/views.py @@ -86,10 +86,8 @@ class Login(LoggedOutRESTAPIView, GenericAPIView): if user and user.is_authenticated(): if user.is_active: - # TODO: be able to configure this to either be - # session or token or both - # right now it's both. - login(request, user) + if getattr(settings, 'REST_SESSION_LOGIN', True): + login(request, user) # Return REST Token object with OK HTTP status token, created = self.token_model.objects.get_or_create(user=user) diff --git a/setup.py b/setup.py index 57fb444..a247e92 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ f.close() setup( name='django-rest-auth', - version='0.2.4', + version='0.2.5', author='Sumit Chachra', author_email='chachra@tivix.com', url='http://github.com/Tivix/django-rest-auth',