Django ORM でデータベースを呼び出したいです。私はこの問題を抱えています:
*@*:~/standAlone$ python manage.py sql MyApp
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/*/django/core/management/__init__.py", line 443, in execute_fr om_command_line
utility.execute()
File "/home/*/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/*/django/core/management/__init__.py", line 261, in fetch_comm and
klass = load_command_class(app_name, subcommand)
File "/home/*/django/core/management/__init__.py", line 69, in load_comman d_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/home/*/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/home/*/django/core/management/commands/sql.py", line 4, in <module>
from django.core.management.sql import sql_create
File "/home/*/django/core/management/sql.py", line 6, in <module>
from django.db import models
File "/home/*/django/db/__init__.py", line 11, in <module>
if DEFAULT_DB_ALIAS not in settings.DATABASES:
File "/home/*/django/utils/functional.py", line 184, in inner
self._setup()
File "/home/*/django/conf/__init__.py", line 42, in _setup
self._wrapped = Settings(settings_module)
File "/home/*/django/conf/__init__.py", line 95, in __init__
raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
ImportError: Could not import settings '{{ project_name }}.settings' (Is it on s