I am having trouble with quickstart, SQLAlchemy, and Identity in TG
1.0b2.

It appears that the following line is needed but not included in the
model when quickstarting a project with sqlalchemy and identity:

from sqlalchemy.ext.assignmapper import assign_mapper

The following is what I tried.  I create a new project using:

tg-admin quickstart --sqlalchemy --identity identity_test

I then then try to create the tables in my database for identity using:

tg-admin sql create

and get the following error:

Creating tables at sqlite:///devdata.sqlite
Traceback (most recent call last):
  File "C:\Python24\Scripts\tg-admin-script.py", line 7, in ?
    sys.exit(
  File
"c:\python24\lib\site-packages\TurboGears-1.0b2-py2.4.egg\turbogears\comm
and\base.py", line 358, in main
    command.run()
  File
"c:\python24\lib\site-packages\TurboGears-1.0b2-py2.4.egg\turbogears\comm
and\base.py", line 115, in run
    sacommand(command, sys.argv)
  File "<string>", line 5, in sacommand
  File
"c:\python24\lib\site-packages\TurboGears-1.0b2-py2.4.egg\turbogears\comm
and\base.py", line 69, in sacreate
    get_model()
  File
"c:\python24\lib\site-packages\TurboGears-1.0b2-py2.4.egg\turbogears\util
.py", line 119, in get_model
    package = __import__(package_name, {}, {}, ["model"])
  File "C:\esunspot\identity-test\identity_test\model.py", line 83, in
?
    assign_mapper(session.context, Visit, visits_table)
NameError: name 'assign_mapper' is not defined

When I add the following line to model.py, the database creation works
without any error:

from sqlalchemy.ext.assignmapper import assign_mapper

Do I not understand something or was this just left out in 1.0b2?

Thanks for the help and great work!

Eric


--~--~---------~--~----~------------~-------~--~----~
 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