使用byteflow-0.7安装错误

时间:2011-08-03 05:18:12

标签: python django python-2.6 django-1.3

我在python 2.6.5上使用django 1.3在windows7(64位)上安装byteflow-0.7。使用的数据库是wamp 2.0服务器上的MySQL 5.0.51b。我很好地安装了所有先决条件并运行了syncdb命令。运行良好,数据库已成功创建。当我运行服务器并在浏览器上点击localhost:8000时,我看到以下内容:

Traceback (most recent call last):

  File "C:\Python26\lib\site-packages\django\core\servers\basehttp.py", line 283, in run
    self.result = application(self.environ, self.start_response)

  File "C:\Python26\lib\site-packages\django\contrib\staticfiles\handlers.py", line 68, in __call__
    return self.application(environ, start_response)

  File "C:\Python26\lib\site-packages\django\core\handlers\wsgi.py", line 250, in __call__
    self.load_middleware()

  File "C:\Python26\lib\site-packages\django\core\handlers\base.py", line 45, in load_middleware
    mod = import_module(mw_module)

  File "C:\Python26\lib\site-packages\django\utils\importlib.py", line 35, in import_module
    __import__(name)

  File "D:\djangowork\piranha-byteflow-98c3681f5a8f\apps\pingback\middleware.py", line 3, in <module>
    class PingbackMiddleware(object):

  File "D:\djangowork\piranha-byteflow-98c3681f5a8f\apps\pingback\middleware.py", line 4, in PingbackMiddleware
    xmlrpc_url = reverse('xmlrpc')

  File "C:\Python26\lib\site-packages\django\core\urlresolvers.py", line 391, in reverse
    *args, **kwargs)))

  File "C:\Python26\lib\site-packages\django\core\urlresolvers.py", line 312, in reverse
    possibilities = self.reverse_dict.getlist(lookup_view)

  File "C:\Python26\lib\site-packages\django\core\urlresolvers.py", line 229, in _get_reverse_dict
    self._populate()

  File "C:\Python26\lib\site-packages\django\core\urlresolvers.py", line 197, in _populate
    for pattern in reversed(self.url_patterns):

  File "C:\Python26\lib\site-packages\django\core\urlresolvers.py", line 279, in _get_url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)

  File "C:\Python26\lib\site-packages\django\core\urlresolvers.py", line 274, in _get_urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)

  File "C:\Python26\lib\site-packages\django\utils\importlib.py", line 35, in import_module
    __import__(name)

  File "D:\djangowork\piranha-byteflow-98c3681f5a8f\urls.py", line 45, in <module>
    url(r'^admin/(.*)', admin.site.root, name='admin'),

AttributeError: 'AdminSite' object has no attribute 'root'

我需要做什么?

1 个答案:

答案 0 :(得分:0)

在Django 1.1中似乎已将AdminSite.root标记为已弃用,显然现在已在Django 1.3中将其删除。所以你要么必须将Django降级到1.0(因为这是ByteFlow网站在要求中所说的),要么使用更新的Byteflow版本修复了这个问题。

PS。在fix中找到forked repo