Hi guys, I'm working on an idea: I wish to be able to setup the kid template without edit it. Suppose I want to do a database connection using sqlobject, to do the select I need to do (correct me if I'm wrong):
<? from lib.database import DatabaseObject myObjectList = DatabaseObject.select() ?> ... Work with the template is task for the designer, I prefer to work with servlets, I thinking on the following code: from KidKit.KidPage import KidPage from lib.database import DatabaseObject class MyPage(KidPage): def setup(self): self.myObjectList = DatabaseObject.select() With the construction above I can give database information to the designer without edit his template. The KidPage doesn't exists, so I thinking on create something like this, this servlet's goal is to load the template on the fly, if my servlet is named MyPage it can search for MyPage.kid... I thinking on some issues, I should use the cache of KidKit (the one stored in %(WebKitPath)s/Cache/KidKit/), I couldn't use the cache stored on the same path of the template, I'll take a look with more attention on the error in the future. The KidPage will have a function called setup() called before the template is rendered and a function called teardown() called after the rendering. I think reather than just printing the template to the servlet I must return it on a function and then write the result, this way I can control the output and can filter through formencode in example. For now I have a questions, what do you guys use to do form validation with kid? I use cheetah + formencode. I try to use formencode with kid without sucess... Is there any effort on something like I said before, do you agree with me: separate the template from the more elaborated code? Thanks in advance, -- Michel Thadeu Sabchuk Curitiba - Brasil ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 _______________________________________________ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss