[tg-trunk] Re: init_model changes in tg2 template

2008-12-19 Thread Alberto Valverde
percious wrote: So, I did some experimentation tonight using the engine as an identifier. The problem is that I have no way of knowing which class is mapped to which engine without binding them. Maybe I'm missing something here... from sqlalchemy import orm mapper =

[tg-trunk] Re: init_model changes in tg2 template

2008-12-19 Thread percious
Yes, and I am doing that. The problem becomes when you have two models that have the same named classes. I check to make sure the mapper points to the proper metadata before returning the class. Question: why is it ok to bind the DBSession, and not the metadata? This seems contradictory in

[tg-trunk] chameleon.genshi in TG2?

2008-12-19 Thread Florent Aide
Mark, I have seen that chameleon.genshi is supporting xinclude (since 2 weeks) ! Are you ok if I add a chameleon.genshi renderer to TG2 ? :p It would be optional (since chameleon.core has a lot of dependencies: lxml, zope.*) but I think it would be nice to have such an addition to our framework.

[tg-trunk] Re: init_model changes in tg2 template

2008-12-19 Thread Alberto Valverde
On Dec 19, 2008, at 15:36, percious ch...@percious.com wrote: Yes, and I am doing that. The problem becomes when you have two models that have the same named classes. How is that? AFAIK, as long as they're declared in different modules, two classes with the same name are different

[tg-trunk] Re: init_model changes in tg2 template

2008-12-19 Thread percious
No, right now that part of it is table-based (this is going to change in the near future). Therefore it uses the table objects, and hence select, insert, etc. need to have bindings. Maybe i'll just pass in the dbsession, get the binding from that, and simply reflect the tables... options

[tg-trunk] Re: chameleon.genshi in TG2?

2008-12-19 Thread Jorge Vargas
On Fri, Dec 19, 2008 at 10:16 AM, Florent Aide florent.a...@gmail.com wrote: Mark, I have seen that chameleon.genshi is supporting xinclude (since 2 weeks) ! Are you ok if I add a chameleon.genshi renderer to TG2 ? :p It would be optional (since chameleon.core has a lot of dependencies:

[tg-trunk] Re: chameleon.genshi in TG2?

2008-12-19 Thread Florent Aide
On Fri, Dec 19, 2008 at 9:40 PM, Jorge Vargas jorge.var...@gmail.com wrote: That sounds like a nice addition, from the first time I head about chameleon I was impress by it. don't we need pylons to support it too? done in tg2. Now we can see how we propose this to the pylons folks. But

[tg-trunk] repoze.what 1.0rc2 / XML plugin

2008-12-19 Thread Gustavo Narea
Hello, everybody. There's a new release candidate for repoze.what. Changelog = * Fixed the constructor of the Not predicate, which didn't call its parent and therefore it was not possible to specify a custom message. * From now on, predicates that are not met will have only *one*

[tg-trunk] Re: login box

2008-12-19 Thread Lukasz Szybalski
I've reopened 2033, http://trac.turbogears.org/attachment/ticket/2033/login_handler.diff The new template in tg.devtools is missing few tg.url. I'm attaching a patch to fixes it in templates but after a user logs in the page gets redirected to '/' instead of tg.url('/'). I cannot find where in