Created
September 30, 2012 03:37
-
-
Save mikelopez/3805760 to your computer and use it in GitHub Desktop.
Pre script init to use django project settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys,os, logging, re | |
#sys.path.append('/home/harrysax/sciweb/coolstuffman/') | |
os.environ['DJANGO_SETTINGS_MODULE'] ='appname.settings' | |
from django.core.management import setup_environ | |
from appname import settings | |
setup_environ(settings) | |
# | |
# your code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment