1

Trying to run a management command with no success. Was getting an error in terminal ImportError, and in my IDE it would not resolve the models. I found the answer and the issue was that I was not running the management command via manage.py.

The error in terminal would come up when running

../management/commands$ python import_puzzle.py

4

1 回答 1

1

Instead of calling the management command directly from it's folder. You should run it from the src folder using manage.py:

`../src$ python manage.py import_puzzle`

The reason is that import_puzzle is actually a management command and must be called using the manage.py. I'm too much of a beginner to elaborate any further! :)

于 2013-02-28T13:16:39.183 回答