fix caching of anonymous pages could reveal CSRF token
fix MySQL typecasting issue

backport of 1.4.x patch provided by upstream
[PATCH] Fixed #22486 -- Reverse raises AttributeError on partial functions

Create the lookup_str from the original function whenever a partial
is provided as an argument to a url pattern.
Merge pull request #2 from wen-aa/backport_ubuntu_patches

Backport ubuntu patches