尝试在Windows 7系统上安装django non-rel时出错

时间:2013-08-03 20:29:05

标签: django python-2.7 django-nonrel

我在Windows 7上安装django-nonrel 1.4,使用python 2.73,GoogleAppEngine-1.8.2.msi

我已将django-testapp-testapp-1.4文件夹重命名为django-testapp

然后我将以下文件夹复制到django-testapp

autoload,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>

我希望有人理解这一点,并告诉我哪里出错了。

1 个答案:

答案 0 :(得分:1)

DatabaseOperations由django定义,并由djangotoolbox和djangoappengine使用。

看起来djangoappengine中的代码与django中的代码不匹配。

确保您已安装相应的每个版本。我的猜测是你有最新的djangoappengine但不是最新版本的djangon-nonrel。