Hi, There are a few ways you could do this.
You could make a controller that handles your CRUD and gets instantiated with the model it should use. Then, you just attach two different instances to your root controller and have Apache/lighttpd proxy to a different one of those depending on the named virtual host that you're coming in on. Kevin On Aug 12, 2006, at 11:58 PM, Bernardo Torres wrote: > > Hi, > > I'm making a CRUD system that depending on the URL you access the > system, it uses different models. > > For example, if you go to http://www.addressbook.com/ it uses the > class > Address, and Person. > If you go to http://www.autoshop.com/ it uses Car, Customer, Sale, for > example. > > What's the best way of doing this? In model.py? In controllers.py? Can > I have the classes ready (maybe with a controller for each URL)? > > I could keep the classes in a dictionary in model.py and check for > each > in controller.py, but I'm concerned about the speed issue. > > Thanks, > > Bernardo > > > > -- Kevin Dangoor TurboGears / Zesty News email: [EMAIL PROTECTED] company: http://www.BlazingThings.com blog: http://www.BlueSkyOnMars.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

