def main():
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "all_settings")
# Load django models. This is needed to populate the DB before using it.
django.setup()
if platform.system() == 'Windows':
try:
import win32file
win32file._setmaxstdio(2048)
except ImportError:
print "Cannot find package 'win32file'. Installing it is "\
"recommended before running the UT " \
"(you can do so using 'pip install pypiwin32')"
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
评论列表
文章目录