Jorge Godoy wrote: > I believe that it will be much more productive if you take a look at TurboKid > and TurboCheetah. Both are available and required on a standard installation > of TurboGears 0.9.x. > > There you'll see how it was done in the core for two templating systems and > you'll be able to compare to what you need.
I was under the impression that the template interface was designed to allow independent implementations on both sides (e.g. the TurboGears/Buffet side and the template engine side). Color me naive and idealistic if you wish, but it seems that a goal of such a project would be documentation that allowed at least a chance at a working cleanroom design (even if implementation/debugging issues necessitated examining another implementation). This is why I have concentrated on carefully reading the documentation itself, and looking for ambiguities and inconsistencies. (I understand that people have real work to do and that the documentation is sometimes considered a necessary evil. If that's the way it is, well OK, but if not, I would like to think that my original questions could be taken as constructive criticism of the documentation.) > > 7. In the setup.py entry point section it shows "schemename = > > yourpackage.yourmodule:YourPluginClass". I would assume that it should > > really be "yourschemename" as well, but I hate making those kinds of > > assumptions. > > I am in doubt here. But remember that these are entrypoints so I believe the > variable name is really "schemaname". Well, in the web page I just quoted, it is listed as "schemename". It would appear, from other sources I have read, that it is possible to mix and match templates from multiple engines in the same TurboGears system. If that is true, a single "schemename" will not suffice, and your interpretation doesn't really make that much sense anyway, since "yourpackage.yourmodule:YourPluginClass" would be kind of a long "schemaname" anyway. And as I said, "I hate making those kinds of assumptions" so a more authoritative answer would be greatly appreciated. > > 8. There is scant discussion on caching templates. Should they always > > be cached? How are stale templates flushed out of the cache? I was > > under the impression from something I read earlier that changing a > > template would cause TurboGears to reload, but I don't see anything in > > the interface for this. > > I also believe that this is your task. Checking if the template changed and > reloading it, I mean. You might count on the mtime of the file, for example, > or do some complex MD5 rehashing every once and a while... I understand the techniques for doing this. I was (and am still) just unclear on the responsibilities, because, as I mentioned, I saw some things that indicated that a change of a template could cause the entire TurboGears process to reload. Am I mistaken about this? (Maybe I'm remembering something to do with CherryPy and the file registration system.) Killing a process is not a function that a template library should take upon itself without a specific request from a higher layer, so I am still trying to reconcile this information with the right thing to do under this interface. > > > Thanks in advance for any light you can shed on these issues. > > I am sorry for not being able to help with direct answers. I just took a look > at the templating system a while ago, but I haven't gone too far with my own > studies. Thank you for responding, but the bulk of my questions are about what the documented, correct template library behavior should be, which is not necessarily exactly the same as that embodied in a particular existing implementation (and not necessarily that easily extracted by simple code inspection, in any case). More specific answers to my original questions would be greatly appreciated. Regards, Pat Maupin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

