ToscaWidgets is a really handy python form framework that saves lots of typing when it comes to creating forms. I decided to use it for my BiosImg project to get a feel for things, but I ran into a small problem.
Even after I had enabled the tosca middleware, it still wanted to use genshi rendering. This is a problem because I want to use mako for the project and having two template libraries would be pointless.
After some help fromĀ twillis andĀ mcdonc in the freenode #repoze channel, I was given the solution. I promised to blog it to help others with the same problem, so here’s the relevant part of the ini file.
[pipeline:main]
pipeline =
egg:Paste#evalerror
tosca
egg:repoze.tm2#tm
sql
[filter:tosca]
use = egg:toscawidgets#middleware
toscawidgets.framework.default_view = mako
stack_registry=True
As always, please be sure to comment if this was helpful to you. Also feel free to suggest any fixes/updates that may be needed.


