Until now I was using TG1.0 with sqlobject. I am trying to switch to TG1.1
and I am having problems with sessions in sqlalchemy. The following test has
been done from things I have read on sqlalchemy website on this page (
http://www.sqlalchemy.org/docs/04/ormtutorial.html#datamapping_setting)

Why are the data not saved in the database. I have also try session.commit()
after save but it doesn't work either.

Also the doc on turbogears 1 and turbogears 2 websites, on how to use
sqlalchemy is not really clear.

Thanks for your help.

Script started on Thu Oct 30 22:42:45 2008
473:0-> tg-admin quickstart tgtest
Enter package name [tgtest]:
Do you need Identity (usernames/passwords) in this project? [no] yes
Selected and implied templates:
  TurboGears#tgbase      tg base template
  TurboGears#turbogears  web framework
...
...

474:0-> cd tgtest
/tmp/tgtest

475:0-> tg-admin sql create
Creating tables at sqlite:////tmp/tgtest/devdata.sqlite

476:0-> tg-admin shell
Python 2.5.2 (r252:60911, Mar 18 2008, 09:13:49)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(CustomShell)
>>> u=User(user_name=u'max', password=u'foobar', display_name=u'max max',
email_address=u'[EMAIL PROTECTED] <[EMAIL PROTECTED]>')
Loading: tgtest.model.VisitIdentity
>>> u.session.save(u)
>>> for user in session.query(User):
...     print user.user_name
...
>>>
>>> Do you wish to commit your database changes? [yes]
477:0-> exit

Script done on Thu Oct 30 22:45:35 2008

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