|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
using --identity and dedicated model.pyI've used Python a lot and sqlobject and turbogears a little. I'm just now looking into the --identity option (with MySQL) and am impressed. I would like to have the same database and therefore model definitions across multiple projects without cutting and pasting the appropriate identity tables into each model.py. Does anyone know if it's possible to import the identity tables into the application's model.py using something like... from MyIdentityTables import User, Group, .... assuming of course that MyIdentityTables are on the default PYTHONPATH. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to turbogears@... To unsubscribe from this group, send email to turbogears-unsubscribe@... For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: using --identity and dedicated model.pyfred schrieb: > I've used Python a lot and sqlobject and turbogears a little. I'm > just now looking into the --identity option (with MySQL) and am > impressed. > > I would like to have the same database and therefore model definitions > across multiple projects without cutting and pasting the appropriate > identity tables into each model.py. > > Does anyone know if it's possible to import the identity tables into > the application's model.py using something like... > > from MyIdentityTables import User, Group, .... > > assuming of course that MyIdentityTables are on the default PYTHONPATH. Should work. It would have been less time to try than to write this post though :) Diez --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to turbogears@... To unsubscribe from this group, send email to turbogears-unsubscribe@... For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: using --identity and dedicated model.pyDiez B. Roggisch schrieb: >> Does anyone know if it's possible to import the identity tables into >> the application's model.py using something like... >> >> from MyIdentityTables import User, Group, .... >> >> assuming of course that MyIdentityTables are on the default PYTHONPATH. > > Should work. It would have been less time to try than to write this post > though :) I would be careful since these classes are mapped and bound to different databases. The details also depend on whether you're using SO or SA. -- Christoph --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to turbogears@... To unsubscribe from this group, send email to turbogears-unsubscribe@... For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: using --identity and dedicated model.pyOn Friday 04 July 2008 10:15:08 Christoph Zwerschke wrote: > Diez B. Roggisch schrieb: > >> Does anyone know if it's possible to import the identity tables into > >> the application's model.py using something like... > >> > >> from MyIdentityTables import User, Group, .... > >> > >> assuming of course that MyIdentityTables are on the default PYTHONPATH. > > > > Should work. It would have been less time to try than to write this post > > though :) > > I would be careful since these classes are mapped and bound to different > databases. The details also depend on whether you're using SO or SA. From what I read the OP was merely after including the same declarations in several projects. Diez --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to turbogears@... To unsubscribe from this group, send email to turbogears-unsubscribe@... For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free Forum Powered by Nabble | Forum Help |