0

任何帮助将不胜感激。我收到此错误,不知道如何解决。

C:\dj_stuff\mysite> python manage.py sql polls
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 453, in execute_from_command_line
    utility.execute()
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 263, in fetch_command
    app_name = get_commands()[subcommand]
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 109, in get_commands
    apps = settings.INSTALLED_APPS
  File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 53, in __getattr__
    self._setup(name)
  File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 48, in _setup
    self._wrapped = Settings(settings_module)
  File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 132, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "C:\Python27\lib\site-packages\django\utils\importlib.py", line 35, in import_module
    __import__(name)
  File "C:\dj_stuff\mysite\mysite\settings.py", line 127
    )   'polls',
              ^
SyntaxError: invalid syntax
4

1 回答 1

0

请粘贴settings.py。
从 100 到 130 的行

但是......看看这一行:

 )   'pools',

您在元组之后添加了 appname。
您应该在 ')' 之前添加 'pools' 上一行

于 2013-08-11T09:09:17.923 回答