fusionbox/django-authtools — pull request #13 by rockymeza (2014-08-16 18:20:28+00:00)
Title: Login redirect fails with Python 2.7 if LOGIN_REDIRECT_URL is unicode.

To reproduce:

1) Create a django project using the following versions:
```
Python 2.7.3
Django==1.6.2
django-authtools==0.2.1
```

2) Add to your settings.py:
```
from __future__ import unicode_literals

LOGIN_REDIRECT_URL = '/'
```

3) Login via authtools.views.login

An error is produced similar to the following:
```
TypeError at /login/
Lazy object returned unexpected type
```

This appears to be because authtools/views.py defined the following:
```
resolve_url_lazy = lazy(resolve_url, str)
```

Workaround:
Either removing the unicode literals import or forcing LOGIN_REDIRECT_URL to type str causes the error to go away.