#!/usr/bin/python from django.core.management import setup_environ import settings setup_environ(settings) # do your stuff