使用 TGAdmin 重命名 TurboGears 2 的 Repoze 字段
我一直致力于将 TurboGears 2 的 Repoze 'groups' 字段重命名为 'roles' 以释放命名空间和数据库表以用于其他目的。另外,角色对我来说比分组更有意义,因为我有很强的 Drupal 背景。
现在我找到了一些文档来执行此操作,例如:
http://code.gustavonarea .net/repoze.what-quickstart/#customizing-the-model-definition
然而,这些只是其中的一部分。我已经做了(至少我很确定,我已经仔细检查了几次。)您可以在 此差异。
这似乎工作正常,但是我在 TurboGears 管理系统中遇到了一个相当大的问题。
我已经尝试过 http://turbogears.org/2.0/docs/ main/Extensions/Admin/index.html 似乎没有任何区别,但我不能 100% 确定我做得正确。
当我尝试访问 localhost/admin/permissions/ 时会出现问题。它会导致内部服务器错误并输出以下错误。 http://pastebin.com/YWMH3SiU 此错误不会发生在角色/用户页面和权限/ edit/1 也可以。
我正在运行 kubuntu 10.04 和 TG 2.1b2。 (我运行测试版主要是为了更轻松地支持 mako,这非常重要。)
任何帮助将不胜感激。
I've been working on renaming TurboGears 2's Repoze 'groups' field to 'roles' to free the namespace and db tables for other purposes. Also roles makes much more sense to me then groups because I have a strong Drupal background.
Now I have found some of the docs to do this such as these:
http://code.gustavonarea.net/repoze.what-quickstart/#customizing-the-model-definition
However these only go part of the way. I have made (I'm pretty sure at least, I've double checked a few times.) all the changes required as you can see in this diff.
This seems to work fine however I've ran into a rather major issue with the TurboGears Admin system.
I've tried http://turbogears.org/2.0/docs/main/Extensions/Admin/index.html and it didn't seem to make any difference, however I'm not 100% sure I did it correctly.
The problem occurs when I attempt to go to localhost/admin/permissions/. It causes a Internal Server Error and outputs the following error. http://pastebin.com/YWMH3SiU This error does not happen on the Roles/Users pages and the permissions /edit/1 also works.
I'm running kubuntu 10.04 with TG 2.1b2. (I'm running the beta mostly for easier mako support which is really important.)
Any help would be very appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么要与 TurboGears 邮件列表交叉发帖?
http://groups.google.com/group/turbogears/browse_thread/thread /e6040eb194880fc6/
这只会让那些试图帮助你的人重复工作,并且对于那些同时关注邮件列表和 StackOverflow 上的 Python 相关问题的人来说很烦人。
Why cross post with the TurboGears mailing list?
http://groups.google.com/group/turbogears/browse_thread/thread/e6040eb194880fc6/
This just duplicates efforts for people trying to help you and is annoying for those who follow both the mailing list and Python related questions on StackOverflow.