【发布时间】: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