user_permissions = MultipleJoin('UserPagePermissi
on', joinColumn='page_id')
On 6/1/06, Ed Singleton <[EMAIL PROTECTED]> wrote:
I want to be able to assign a user a permission on a page. I assumed
the best way to do this would be a related join using all three
tables.
What I've got so far is:
class Page(SQLObject):
title = UnicodeCol(length=64)
body = UnicodeCol(default=None)
user_permissions = MultipleJoin('UserPagePermission', joinColumn='page')
class UserPagePermission(SQLObject):
user = ForeignKey('User')
permission = ForeignKey('Permission')
page = ForeignKey('Page')
That's using the default TG Users, Groups and Permissions.
If I try and access apage.user_permissions I get the error:
OperationalError: (1054, "Unknown column 'page' in 'where clause'")
Does anyone have any advice on this?
Thanks
Ed
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

