Renaming TurboGears 2's Repoze Fields with TGAdmin

Posted by William Chambers on Stack Overflow See other posts from Stack Overflow or by William Chambers
Published on 2010-05-03T02:24:14Z Indexed on 2010/05/03 2:28 UTC
Read the original article Hit count: 342

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about python

Related posts about turbogears2