Removed code deprecated from Django 1.2