Windows XPでプロジェクトサンプルとアプリsampappを作成しました。コマンドを使用しようとするとsqlall
、次のエラーが発生します。
C:\ Python27 \ Django-1.3.1 \ django \ bin> django-admin.py sqlall sampapp
Traceback (most recent call last): File
"C:\Python27\Django-1.3.1\django\bin\django-admin.py", line 5, in
<module > management.execute_from_command_line() File
"C:\Python27\lib\site-packages\django\core\management\__init__.py",
line 429, in execute_from_command_line utility.execute() File
"C:\Python27\lib\site-packages\django\core\management\__init__.py",
line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv) File
"C:\Python27\lib\site-packages\django\core\management\__init__.py",
line 261, in fetch_command klass = load_command_class(app_name,
subcommand) File
"C:\Python27\lib\site-packages\django\core\management\__init__.py",
line 67, in load_command_class module =
import_module('%s.management.commands.%s' % (app_name, name)) File
"C:\Python27\lib\site-packages\django\utils\importlib.py", line 35, in
im port_module __import__(name) File
"C:\Python27\lib\site-packages\django\core\management\commands\sqlall.py"
, line 4, in <module> from django.core.management.sql import sql_all
File "C:\Python27\lib\site-packages\django\core\management\sql.py",
line 6, in <module> from django.db import models File
"C:\Python27\lib\site-packages\django\db\__init__.py", line 14, in
<modul e> if not settings.DATABASES: File
"C:\Python27\lib\site-packages\django\utils\functional.py", line 276,
in __getattr__ self._setup() File
"C:\Python27\lib\site-packages\django\conf\__init__.py", line 40, in
_set up raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENT_VARIABLE)
ImportError: Settings cannot be imported, because environment variable
DJANGO_SE TTINGS_MODULE is undefined.
誰かが私がこれを解決するのを手伝ってくれる?