Petr Jakeš schrieb: > Trying to add following rows in my kid template > <?python > def formatData(dataType,cellContent): > if dataType == float: > pass > ?> > throws this error:
You must define the function on the document level (outside the root element, i.e. between <!DOCTYPE> and <HTML>). Or even better define the function outside in a Python module and only pass the module or function name to the template. Put only as much code as necessary inside the template. It's alsways good to have a separation of code and layout, and it's easier to edit and test code in a Python file than in a Kid file. -- Christoph ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ kid-template-discuss mailing list kid-template-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kid-template-discuss
