Python 3 support

- Django 1.4.5 does not support Python 3, oops
- Fixed urlencode import for Python 3