Minor typo
Updated Django's versions.
Ensure Token.generate_key returns a string.
Python < 3 compatibility.
Better Python < 3 compatibility.