Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要以编程方式创建新的空(或不)项目。我怎样才能做到这一点?然后我使用import-json创建组件。
文档有import-project命令,但是
<project> 命名一个现有的项目,组件应该被导入到该项目中。
我可以用weblate shell或./manage.py shell做到这一点
from weblate.trans.models import Project project = Project.objects.create( name='Test', slug='test', web='https://weblate.org/' ) project.save()
您也可以从文件中执行脚本
weblate 外壳 < create_project.py