On Tue, Mar 17, 2009 at 8:41 PM, Daniel Fetchinson <[email protected]> wrote: > >> I have begun work on our new extensions methodology. (Some call this >> component architecture). I am working with Jorge and Jon to try and >> get a handle on how to extend TG's database system. We are developing >> a light weight CMS called Pages. > > This is good to hear! Just one comment: call it something else than > Pages, otherwise it will be a pain to search for any related > information on google. > well it's really called tgext.pages :) and it ones was wportal, but names suggestions are welcome. We may change again :)
> Cheers, > Daniel > >> I have been working on a new paster command for pages which will allow >> us to create the necessary database tables and inject the model into >> an existing TG2 application. The problem here is that the creation of >> the db schema and the addition of the bootstrap data is too coupled. >> When you call paster setup-app, it runs both, always. I think we need >> to separate the two, perhaps creating a second command which only >> updates the db schema. This would also require a separation of the >> websetup code. I propose a new folder with the following layout: >> >> websetup/ >> __init__.py : contains setup_app which will be a combination of >> bootstrap and schema setup >> bootstrap.py: contains a way to bootstrap a clear database >> schema_setup.py: contains the method for setting up a new database >> schema, including modifying an existing one. >> >> The problem has been that because of the internals of SA, a duplicate >> record with a unique field *sometimes* causes db schema creation to >> fail. By separating the concerns, we pave the way for more flexible >> solutions. >> >> cheers. >> -chris > > > > -- > Psss, psss, put it down! - http://www.cafepress.com/putitdown > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
