"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:

> On a related note, what is the reasoning behind having the template
> HTML in the python source files? This violates the MVC pattern at a
> fundamental level and I'm trying to work out how to separate the widget
> templates into .kid files so that front-end developers can change them.
>
> I'm guessing there must be a good reason, but I obviously don't know
> enough about TG and Kid to spot it.

I believe that it is to save us from the multitude of Kid templates for
widgets, specially from the ones where the template is a one-line string. 

Anyway, you can pass the template attribute and point to a Kid template where
you changed something from the standard template.

For example:

================================================================================
# Standard Grid for this project
class ProjectStandardGrid(datawidgets.FastDataGrid):
    template = "project.templates.generic_grid_template"
================================================================================

is all what is needed to replace the standard template with a custom one.


-- 
Jorge Godoy      <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to