使用 TGAdmin 重命名 TurboGears 2 的 Repoze 字段

发布于 2024-08-31 10:03:38 字数 1391 浏览 5 评论 0原文

我一直致力于将 TurboGears 2 的 Repoze 'groups' 字段重命名为 'roles' 以释放命名空间和数据库表以用于其他目的。另外,角色对我来说比分组更有意义,因为我有很强的 Drupal 背景。

现在我找到了一些文档来执行此操作,例如:

http://www.turbogears.org/2.1/docs/main/Auth/Customization.html#customizing-the-model-struct-assumed-by-the -quickstart

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://www.turbogears.org/2.1/docs/main/Auth/Customization.html#customizing-the-model-structure-assumed-by-the-quickstart

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独木成林 2024-09-07 10:03:38

为什么要与 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文