update utility scripts for djang-1.4; will make them management cmds later

This commit is contained in:
ichuang
2012-08-17 15:20:19 -04:00
parent a6c6d0f4d1
commit f7d4831939
3 changed files with 89 additions and 10 deletions

View File

@@ -9,17 +9,20 @@ import os, sys, string, re
sys.path.append(os.path.abspath('.'))
os.environ['DJANGO_SETTINGS_MODULE'] = 'lms.envs.dev'
try:
from lms.envs.dev import *
except Exception as err:
print "Run this script from the top-level mitx directory (mitx_all/mitx), not a subdirectory."
sys.exit(-1)
#try:
# from lms.envs.dev import *
#except Exception as err:
# print "Run this script from the top-level mitx directory (mitx_all/mitx), not a subdirectory."
# sys.exit(-1)
from django.conf import settings
from django.contrib.auth.models import User, Group
from path import path
from lxml import etree
print "configured=",settings.configured
print settings.SETTINGS_MODULE
data_dir = settings.DATA_DIR
print "data_dir = %s" % data_dir