Table Of Contents

Dummy Kid Template for DebuggingΒΆ

Here is a dummy Kid template that will display any variable that you send to it, so later on you or a designer can replace it with the real template and see what placeholders can be used:

def template_locals(template):
    for name, value in template.__dict__.iteritems():
      if (not name.startswith('_')
            and not name.startswith('tg')
            and name != 'std'):
        yield name, repr(value)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" xmlns:py="">
    <li py:for="key, value in template_locals(self)">
      $key = $value

Please note that the template_locals() function may filter out whatever you like. All that needs to be done is to add more conditions to the if clause.