Leandro Lucarella, el 25 de julio a las 13:13 me escribiste:
>
> Hi! I've done a tg-admin quickinstall wiki using identity, I opened the
> toolbox and add an example user via Catwalk. Then a group, and when I
> try to add a permission I get an OperationalError: no such table:
> permission. I've chequed the database using sqlite and there is a
> tg_permission table. Now when I want to add new users or groups I get the
> same error, but complaining about missing user_group table (there is a
> tg_user_group table on the DB). Same for Visit (visit/tg_visit) and
> VisitIdentity (visit_identity/tg_visit_identity).
>
> Any ideas? (TurboGears 0.9a8)
Here's a patch with fixes for the newly quickstart generated model to use
the tg_ prefixes.
--
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
.------------------------------------------------------------------------,
\ GPG: 5F5A8D05 // F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05 /
'--------------------------------------------------------------------'
Y cuando llegamos a nuestro hogar ella saca de su bolsillo derecho un
casete de Ricardo Montaner y nos dice: "Ponelo! Ponelo!"; nos
desilusionamos un poco, pero a esa altura... Todo da igual.
-- Sidharta Kiwi
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
--- wiki/wiki/model.py 2006-07-25 13:21:00.016252872 -0300
+++ wiki.orig/wiki/model.py 2006-07-25 13:24:43.103338480 -0300
@@ -13,7 +13,7 @@
class Visit(SQLObject):
class sqlmeta:
- table="tg_visit"
+ table="visit"
visit_key= StringCol( length=40, alternateID=True,
alternateMethodName="by_visit_key" )
@@ -28,9 +28,6 @@
lookup_visit= classmethod(lookup_visit)
class VisitIdentity(SQLObject):
- class sqlmeta:
- table="tg_visit_identity"
-
visit_key = StringCol(length=40, alternateID=True,
alternateMethodName="by_visit_key")
user_id = IntCol()
@@ -52,12 +49,12 @@
created = DateTimeCol(default=datetime.now)
# collection of all users belonging to this group
- users = RelatedJoin("User", intermediateTable="tg_user_group",
+ users = RelatedJoin("User", intermediateTable="user_group",
joinColumn="group_id", otherColumn="user_id")
# collection of all permissions for this group
permissions = RelatedJoin("Permission", joinColumn="group_id",
- intermediateTable="tg_group_permission",
+ intermediateTable="group_permission",
otherColumn="permission_id")
@@ -79,7 +76,7 @@
created = DateTimeCol(default=datetime.now)
# groups this user belongs to
- groups = RelatedJoin("Group", intermediateTable="tg_user_group",
+ groups = RelatedJoin("Group", intermediateTable="user_group",
joinColumn="user_id", otherColumn="group_id")
def _get_permissions(self):
@@ -100,15 +97,12 @@
class Permission(SQLObject):
- class sqlmeta:
- table="tg_permission"
-
permission_name = UnicodeCol(length=16, alternateID=True,
alternateMethodName="by_permission_name")
description = UnicodeCol(length=255)
groups = RelatedJoin("Group",
- intermediateTable="tg_group_permission",
+ intermediateTable="group_permission",
joinColumn="permission_id",
otherColumn="group_id")