在项目下面的模块用python shell测试
sys.path.append(r"C:\Users\TK\Envs\django\djangotest\stock")将stock项目添加到path
查看path
sys.path
导入包和模块
from stock.items import StockItem
product = StockItem(name='Desktop PC', price=1000)
print(product)
在项目下面的模块用python shell测试
sys.path.append(r"C:\Users\TK\Envs\django\djangotest\stock")将stock项目添加到path
查看path
sys.path
导入包和模块
from stock.items import StockItem
product = StockItem(name='Desktop PC', price=1000)
print(product)