Django shell非交互模式运行

Django的数据库ORM模型很是好用,但是众多demo中都只是在Django shell交互模式中使用,如何使普通的python程序在非交互模式中使用喃?python 很是简单,在你的py脚本中加入如下几行代码shell import os,sys sys.path.append("../") from django.core.management import setup_environ im
相关文章
相关标签/搜索