John Lavoie wrote: >sqlsoup is for connecting to databases where your structure is already >defined. If you are connecting to a legacy database that you cannot >modify, sqlsoup will automatically read the database and generate all of >your ORM classes without any additional configuration. > >Of course, this assumes that you have a well defined database that has >all primary and foreign keys defined. > > > sqlalchemy already does it for me with the command:
mytable = Table(name, database.metadata, autoload=True) >John > >Jose Soares wrote: > > >>I don't understand what sqlsoup adds to sqlalchemy. :-\ >> >>jo >> >>gasolin ha scritto: >> >> >> >>>Hi: >>> >>>I found a more better way ~~Put this in your model.py: >>> >>>from turbogears.database import metadata >>>from sqlalchemy.ext.sqlsoup import SqlSoup >>> >>>soup = SqlSoup(metadata) >>> >>> >>> >>>Done! you could test it immediately: >>> >>>$ tg-admin shell >>> >>> >>> >>> >>>>>>poll = soup.poll.select() >>>>>>print poll >>>>>> >>>>>> >>>>>> >>>>>> >>>-- >>>Fred >>> >>> >>> >>> >>> >>> >>> >> >> >> >> >> > >> > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

