Google App Engine python code to rewirte entry URL