usr bin python coding utf-8 import cgi cgitb from jinja2 import Templa

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/python
# -*- coding: utf-8 -*-
import cgi, cgitb
from jinja2 import Template
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('/www/site/templates/'))
print "Content-type:text/html\n"
cgitb.enable()
templ = env.get_template("index.html")
print templ.render()