I'm experiencing a strange problem with my model module after just
installing "Plissken", TG 1.1b1 with SQLAlchemy-0.5.0rc1.  I have the
standard identity model definitions included by default after
generating a project skeleton with tg-admin --identity --sqlalchemy,
and they work just fine when I don't add any other mappings to the
model file.  However, when I added a simple table "experiments_table"
and an object "Experiments" and mapped them together, the tg-admin
shell tells me my Experiments object has only one __init__ argument,
yet I clearly defined 3 arguments:

experiments_table = Table('experiments', metadata,
   Column('name', Unicode(30), primary_key=True),
   Column('desc', Text)
)

class Experiment(object):
   def __init__(self, name, desc):
      self.name = name
      self.desc = desc

mapper(Experiment, experiments_table)

Experiment(u'1', 'one')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call
last)

/home/ce/smplab/<ipython console> in <module>()

TypeError: __init__() takes exactly 1 argument (3 given)


Also, If I remove all the identity definitions and use the same
Experiment object above, it works just fine.  Or If i simply put the
mapper statement for the Experiment before the identity mapper
statements, then the Experiment objects work and the identity one's
don't.   I only have this problem when both the identity objects/
tables and Experiment object/table are mapped simultaneously.  Does
anyone have a clue what's happening?  I'd greatly appreciate any
help.  Thank you for your time.

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to