我在 Windows 7 上安装 django-nonrel 1.4,使用 python 2.73,GoogleAppEngine-1.8.2.msi
我已将文件夹 django-testapp-testapp-1.4 重命名为 django-testapp
然后我将以下文件夹复制到 django-testapp 内
自动加载、dbindexer、django、djangoappengine、djangotoolbox
所以最终的文件夹结构如下所示:
django-testapp
autoload
dbindexer
django
djangoappengine
djangotoolbox
然后我运行 manage.py runserver 并得到以下错误堆栈跟踪。
C:\Users\Laurence\Documents\python_google_app_engine\django-testapp>manage.py ru
nserver
Traceback (most recent call last):
File "C:\Users\Laurence\Documents\python_google_app_engine\django-testapp\mana
ge.py", line 11, in <module>
execute_manager(settings)
File "C:\Users\Laurence\Documents\python_google_app_engine\django-testapp\djan
go\core\management\__init__.py", line 438, in execute_manager
utility.execute()
File "C:\Users\Laurence\Documents\python_google_app_engine\django-testapp\djan
go\core\management\__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\Laurence\Documents\python_google_app_engine\django-testapp\djan
go\core\management\__init__.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "C:\Users\Laurence\Documents\python_google_app_engine\django-testapp\djan
go\core\management\__init__.py", line 67, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "C:\Users\Laurence\Documents\python_google_app_engine\django-testapp\djan
go\utils\importlib.py", line 35, in import_module
__import__(name)
File "C:\Users\Laurence\Documents\python_google_app_engine\django-testapp\djan
goappengine\management\commands\runserver.py", line 5, in <module>
from django.db import connections
File "C:\Users\Laurence\Documents\python_google_app_engine\django-testapp\djan
go\db\__init__.py", line 78, in <module>
connection = connections[DEFAULT_DB_ALIAS]
File "C:\Users\Laurence\Documents\python_google_app_engine\django-testapp\djan
go\db\utils.py", line 94, in __getitem__
conn = backend.DatabaseWrapper(db, alias)
File "C:\Users\Laurence\Documents\python_google_app_engine\django-testapp\dbin
dexer\base.py", line 54, in DatabaseWrapper
return Wrapper(merged_settings, *args, **kwargs)
File "C:\Users\Laurence\Documents\python_google_app_engine\django-testapp\dbin
dexer\base.py", line 37, in __init__
super(BaseDatabaseWrapper, self).__init__(*args, **kwargs)
File "C:\Users\Laurence\Documents\python_google_app_engine\django-testapp\djan
goappengine\db\base.py", line 290, in __init__
self.ops = DatabaseOperations(self)
TypeError: __init__() takes exactly 1 argument (2 given)
C:\Users\Laurence\Documents\python_google_app_engine\django-testapp>
我希望有人能理解这一点,并能告诉我哪里出错了。