> Ahh, I should have been more clear, the initializedDB.py file isn't > part of the webap, and should not have needed changes at all the only > place where you need to remove the commits is the controllers > themselves. > > initializeDB is mostly just there to show people how easy it is to > reuse your datamodel in command line scripts or outside of turbogears, > so it does nothing fancy at all. > > You're right that we should probably use setup_app instead, but the > goal was to show a no-magic script that used the datamodel, so we may > still want to do that somehow. > > --Mark Ramm
I'm not sure I was clear. Ignoring the use of paster setup-app, the purpose of initializeDB.py in the Wiki example is to populate the database with the schema as specified in the __init__.py file in the models directory. It is also intended to add an entry to the pages table and commit this entry to the database. The Wiki example requires that there be at least one row in the pages table. While this implementation for adding an entry to the pages table may have previously worked in older versions of 2.0, it no longer works, and the change that you suggested, commenting out DBSession.commit(), does not address this problem. I found it necessary to add the transaction.commit() line to actually commit the pages table entry to the database. Aaron Levinson --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

