1
2
3
4
5
from django.core.management import setup_environ
import sys
sys.path.append('/path/to/django/project')
import settings
setup_environ(settings)