1 # 批量创建Django app脚本 2 3 import os 4 # 切换至项目目录执行,或者脚本切换目录 5 app_list = ["user", "business", "horseman", "agency", "superuser", "order", "deposit", "permission"] 6 for i in app_list: 7 app_str = "python manage.py startapp {}".format(i) 8 os.system(app_str)