Fix upload for python3 rebased

This is https://github.com/django-wiki/django-wiki/pull/308 but rebased for master. It seems unlikely the django1.7 branch is going to be merged now (especially as it has DB migrations that conflict with master).

Cheers!