On 1/20/07, Lee Connell <[EMAIL PROTECTED]> wrote: > > I don't want to have to create a class for each table since they are all > identical structures. > you can do that programtically although you will need to a) hardcode the names of the tables b) do some sql foo with your system db tables to get the metadata out for all the names.
I saw something like this on trac which was very handy http://trac.edgewall.org/browser/trunk/trac/web/api.py#L32 in case you got lost, they read all possible HTTP responses from the stdlib, and then loop overthem creating classes adding them to the api namespace. that way they have a class for each possible HTTP response code. In some people's minds beautiful in others a hack :) on the other hand you may want to use the fromDatabase attribute in the sqlmeta although you still need one class for each table. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

