update for django 1.5 and python 3.3.0