public marks

PUBLIC MARKS from pvergain with tags web & sqlalchemy

11 January 2007 09:00

1.0/SQLAlchemy - TurboGears Documentation

Using SQLAlchemy in TurboGears The simplest way to get started using SQLAlchemy is to quickstart new project with --sqlalchemy switch: tg-admin quickstart --sqlalchemy (Or more briefly: tg-admin quickstart -s) This switch sets up your properly for using SQLAlchemy. If you said yes to the identity prompt, you'll get the ActiveMapper version of the identity tables. Now change the value of sqlalchemy.dburi to point to a valid database connection. To init the database schema you need to run: tg-admin sql create If you're converting a project from SQLObject to SQLAlchemy, we recommend that you quickstart a new project and then copy in the identity tables piece by piece.