update for django1.5 compatibility