move from django1.4 to django1.5, fix bugs