标签: python django
我如何在python文件中执行以下操作:
# django project is imported if __name__ == '__main__': python manage.py es_sync_index
答案 0 :(得分:3)
from django.core.management import call_command call_command('es_sync_index')