- From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 08 Jan 2009 21:40:01 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2008/link-testsuite/harness/lib
In directory hutz:/tmp/cvs-serv7493/harness/lib
Modified Files:
Documentation.py
Log Message:
use jinja2 for documentation
Index: Documentation.py
===================================================================
RCS file: /sources/public/2008/link-testsuite/harness/lib/Documentation.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Documentation.py 30 Jan 2008 07:05:40 -0000 1.1
+++ Documentation.py 8 Jan 2009 21:39:59 -0000 1.2
@@ -31,21 +31,21 @@
def generate(self, template_path=None):
"""pass through template engine"""
- import jinja,datetime
+ import jinja2,datetime
if template_path == None:
template_path= os.path.abspath('..')
template_path=os.path.join(template_path, "templates")
- template_engine = jinja.Environment(loader=jinja.FileSystemLoader(template_path))
+ template_engine = jinja2.Environment(loader=jinja2.FileSystemLoader(template_path))
template = template_engine.get_template(os.path.join(self.type+'.html'))
return template.render(collections=self.test_collections,
year=str(datetime.date.today().year))
class DocumentationTests(unittest.TestCase):
- def test_has_jinja(self):
+ def test_has_jinja2(self):
try:
- import jinja
+ import jinja2
except ImportError:
- self.fail("you need to install the jinja templating system -- http://jinja.pocoo.org/download")
+ self.fail("you need to install the jinja2 templating system -- http://jinja.pocoo.org/2/")
def test_init(self):
"""initialize a Documentation Generator"""
Received on Thursday, 8 January 2009 21:40:10 UTC