On Nov 7, 2005, at 3:30 AM, Shalabh Chaturvedi wrote: > I'm trying to write Quixote applications that can be re-used > easily. So I do not want to bind the PTL templates tightly with my > site header, footer and other standard 'pieces' of a page. My > current strategy is to use: > > import pageui > > def someview [html] (): > pageui.header() > > ... > > pageui.footer() > > And not include pageui.ptl in this package at all. The user of this > app then has to create pageui.ptl and make sure it is in the > pythonpath. This allows me (and others) to re-use the application > with different headers, footers and such. > > 1. Is this a good approach? Dulcinea uses a pattern pretty much like this one. The site-specific module there is called "local_ui". It works fine. If you use this pattern, I would suggest that you also provide (as Dulcinea does not) clear documentation of what the pageui module must provide, and maybe even some method of verifying that a given pageui module really does provide the functions that it should.