add REST_SESSION_LOGIN setting, v0.2.5

This commit is contained in:
Mateusz Sikora 2014-08-27 14:05:07 +02:00
parent dc63dd4541
commit 4c611afd7f
2 changed files with 3 additions and 5 deletions

View File

@ -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)

View File

@ -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',