<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -44,4 +44,5 @@ prefsfile = os.path.join(pootledir, 'pootle.prefs')
 
 htmldir = os.path.join(pootledir, &quot;html&quot;)
 templatedir = os.path.join(pootledir, &quot;templates&quot;)
+sys.path.append(templatedir) # So kid can find our templates
 </diff>
      <filename>filelocations.py</filename>
    </modified>
    <modified>
      <diff>@@ -561,7 +561,6 @@ class PootleServer(users.OptionalLoginAppServer, templateserver.TemplateServer):
           if ancestor is None: continue
           try:
             ancestor_str = str(ancestor)
-            #ancestor_str = kid.et.tostring(ancestor)
           except Exception, e:
             ancestor_str = &quot;(could not convert %s: %s)&quot; % (str(ancestor), str(e))
           xml_traceback.append(ancestor_str)
@@ -577,8 +576,7 @@ class PootleServer(users.OptionalLoginAppServer, templateserver.TemplateServer):
     &quot;&quot;&quot;bridge to widget code to allow templating to gradually replace it&quot;&quot;&quot;
     if kid is not None and hasattr(thepage, &quot;templatename&quot;) and hasattr(thepage, &quot;templatevars&quot;):
       # renders using templates rather than the underlying widget class
-      kid.enable_import(path=self.templatedir)
-      #template = kid.Template(os.path.join(self.templatedir, thepage.templatename + &quot;.html&quot;)) #self.gettemplate(thepage.templatename)
+      kid.enable_import()
       loadurl = getattr(thepage, &quot;loadurl&quot;, None)
       if loadurl is None:
         loadurl = getattr(self, &quot;loadurl&quot;, None)</diff>
      <filename>pootle.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e64f070c17b973845b37348ba36d21a97befbe11</id>
    </parent>
  </parents>
  <author>
    <name>winterstream</name>
    <email>winterstream@54714841-351b-0410-a198-e36a94b762f5</email>
  </author>
  <url>http://github.com/julen/pootle/commit/1c34ef12c8e2b9611db4968c31ca0c8de18b1bb3</url>
  <id>1c34ef12c8e2b9611db4968c31ca0c8de18b1bb3</id>
  <committed-date>2008-10-16T06:45:28-07:00</committed-date>
  <authored-date>2008-10-16T06:45:28-07:00</authored-date>
  <message>Modified the code to be usable with older versions of kid.

kid.enable_import(path=self.templatedir) only works with modern
kid versions.

The work around consists of simply adding the template directory
to sys.path and removing arguments from kid.enable_import().

git-svn-id: https://translate.svn.sourceforge.net/svnroot/translate/src/trunk/Pootle@8796 54714841-351b-0410-a198-e36a94b762f5</message>
  <tree>5d6d06727ea0b4934a04d958f9dc4fada18d1e53</tree>
  <committer>
    <name>winterstream</name>
    <email>winterstream@54714841-351b-0410-a198-e36a94b762f5</email>
  </committer>
</commit>
