본문 바로가기

web/Django

ImportError: cannot import name execute_manager



Traceback (most recent call last):

  File "./manage.py", line 2, in <module>

    from django.core.management import execute_manager

ImportError: cannot import name execute_manager



This error is  execute_manager() Was removed after 1.4 version.

so following changes code:




import os
import sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "<app>.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)