关于pinax群组页面错误“Could not determine relationship on related name topics”解决方案
2009-02-16 09:52
323 查看
安装好Pinax后,发现打开群组页面有错。于是Google一下,查到几个页面。
http://groups.google.com/group/pinax-users/browse_thread/thread/09d7d2d8aa7932eb
打开后研究了一下,大概是说版本的问题,于是更新了一下django最新版(我用的是SVN版)。
重新启动服务,发现问题依旧,于是再细看,发现老外已经给出解决方法。
===================================================================
--- apps/external_apps/things/fields.py (revision 46)
+++ apps/external_apps/things/fields.py (working copy)
@@ -123,8 +123,8 @@
children = related_manager.all().query.where.children
related_column_name = None
for child in children:
- if child[0] == related_table:
- related_column_name = child[1]
+ if child[0][0] == related_table:
+ related_column_name = child[0][1]
break
if related_column_name is None:
raise ValueError("Could not determine relationship on
related name %s" % self.field_name)
将上述地方的内容替换后解决。
其实就是新增了一段
if child[0][0] == related_table:
related_column_name = child[0][1]
至于为什么新增目前还不清楚,以后研究一下吧。先记录下来,方便查阅
http://groups.google.com/group/pinax-users/browse_thread/thread/09d7d2d8aa7932eb
打开后研究了一下,大概是说版本的问题,于是更新了一下django最新版(我用的是SVN版)。
重新启动服务,发现问题依旧,于是再细看,发现老外已经给出解决方法。
===================================================================
--- apps/external_apps/things/fields.py (revision 46)
+++ apps/external_apps/things/fields.py (working copy)
@@ -123,8 +123,8 @@
children = related_manager.all().query.where.children
related_column_name = None
for child in children:
- if child[0] == related_table:
- related_column_name = child[1]
+ if child[0][0] == related_table:
+ related_column_name = child[0][1]
break
if related_column_name is None:
raise ValueError("Could not determine relationship on
related name %s" % self.field_name)
将上述地方的内容替换后解决。
其实就是新增了一段
if child[0][0] == related_table:
related_column_name = child[0][1]
至于为什么新增目前还不清楚,以后研究一下吧。先记录下来,方便查阅
相关文章推荐
- 关于Could not reliably determine the server's fully qualified domain name
- 解决方案:httpd: Could not reliably determine the server's fully qualified domain name
- 关于Apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 fo
- 关于Apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 fo
- 关于错误 The type or namespace name `Vuforia' could not be found. Are you missing an assembly reference?
- AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::1
- Could not resolve URL for hyperlinked relationship using view name
- 启动apache遇到错误:httpd: Could not reliably determine the server's fully qualified domain name
- Could not reliably determine the server's fully qualified domain name, using LAMP1.1 for ServerName
- 关于错误could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, Public。。。。
- httpd: Could not reliably determine the server's fully qualified domain name
- 终于明白vnc登录后could not acquire name on session bus错误的原因了
- 关于EL中属性不匹配Property 'Name' not found on type
- 关于Ubuntu中Could not get lock /var/lib/dpkg/lock解决方案
- httpd: Could not determine the servers fully qualified domain name, using 127.0.
- ubuntu-Apache2: Could not reliably determine the server’s fully qualified domain name
- 关于Ubuntu中Could not get lock /var/lib/dpkg/lock解决方案
- Ubuntu 下修改 Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
- Could not reliably determine the server's fully qualified domain name, using ::1 for ServerName
- Could not reliably determine the server’s fully qualified domain name