Fix the error for "shell with django environment" with Django 1.6