#!/usr/bin/env python # Add the current directory to sys.path. # ====================================== # By default, the directory containing the script is added to sys.path, not # the current working directory. import os import sys sys.path[0] = os.getcwd() # Import settings. # ================ # Unlike manage.py, we'll allow ImportError to raise. We do this step before # importing execute_manager from django, so that we have a chance in settings.py # to manipulate sys.path in the case where django is not globally installed. import settings # Execute manager. # ================ from django.core.management import execute_manager execute_manager(settings)