ported to django1.4, to gae, few mistakes