【问题标题】:Installation error in with byteflow-0.7byteflow-0.7 中的安装错误
【发布时间】:2011-10-18 19:33:39
【问题描述】:

我在 windows7(64 位)上使用 django 1.3 在 python 2.6.5 上安装 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'

我需要做什么?

【问题讨论】:

    标签: python django python-2.6 django-1.3


    【解决方案1】:

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

    PS。在forked repo 中找到fix

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-26
      • 1970-01-01
      • 1970-01-01
      • 2020-12-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多