but from their documentation
- addRemoveName:
- In the user/role example, the methods addRole(role) and removeRole(role) are created. The Role portion of these method names can be changed by giving a string value here.
so either the names if your methods are wrong or your using that feature in a wrong way.
Also are those methods use to manipulate your SQLObjects? if so your not using the MVC as it should, those methods below in the controller.py file as non-exposed methods that load your SQLObject instances and manipulates them.
On 4/15/06, beza1e1 <[EMAIL PROTECTED]> wrote:
Could it be some conflict with MySQL Keywords or something? I used
'desc' instead of 'description' before, which is a keyword as well.
I removed the method bodies for a better overview.
# open questions
class Question(SQLObject):
text = UnicodeCol()
options = MultipleJoin('Option') # possible answers
dreffen = ForeignKey('Dreffen')
type = EnumCol(enumValues=questionTypes)
def get_decision(self): pass
def get_best_rated(self): pass
def get_no_no_votes(self): pass
class QuestionOption(SQLObject):
text = UnicodeCol()
question = ForeignKey('Question')
yesVotes = RelatedJoin('Person', intermediateTable='yes_vote_mapping',
addRemoveName='YesVotes')
noVotes = RelatedJoin('Person', intermediateTable='no_vote_mapping',
addRemoveName='NoVotes')
def get_rating(self): pass
def set_no(self, user): pass
def set_yes(self, user): pass
# open jobs
class Job(SQLObject):
description = UnicodeCol()
dreffen = ForeignKey('Dreffen')
person = ForeignKey('Person')
# the central class, a dreffen (meeting)
class Dreffen(SQLObject):
title = UnicodeCol()
description = UnicodeCol()
questions = MultipleJoin('Question')
jobs = MultipleJoin('Job')
invited = RelatedJoin('Person', intermediateTable='invitations',
addRemoveName='Invitee')
coming = RelatedJoin('Person', intermediateTable='participations',
addRemoveName='Visitor')
def invite(self, user): pass
def take_part(self, user): pass
def leave(self, user): pass
def markup_desc(self): pass
class Person(SQLObject):
email = UnicodeCol(alternateID=True, length=250)
name = UnicodeCol(default="")
password = StringCol()
yesVotes = RelatedJoin('Option', intermediateTable='yes_vote_mapping')
noVotes = RelatedJoin('Option', intermediateTable='no_vote_mapping')
invites = RelatedJoin('Dreffen', intermediateTable='invitations',
addRemoveName="Invite")
goesTo = RelatedJoin('Dreffen', intermediateTable='participations',
addRemoveName="Date")
trusts = RelatedJoin('Person', intermediateTable='trusts',
otherColumn='trusted_id', addRemoveName="Trust")
def friends(self): pass
def correct_password(self, pwd): pass
def set_password(self, pwd): pass
def display_name(self): pass
def invite(self, dreffen): pass
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

