diff options
author | Pjotr Prins | 2015-03-30 09:52:42 +0200 |
---|---|---|
committer | Pjotr Prins | 2015-03-30 09:52:42 +0200 |
commit | 56177b238dc7d3b225caeda25fd558d98b17b3c6 (patch) | |
tree | 61368594122a99ee2457e57145e97f475b3a29b9 /wqflask/base/JinjaPage.py | |
parent | f651014b577f3af0c88f2669ec2f8d0260f398dd (diff) | |
parent | 1dd2981a25cdb33ab575206020490c7cf799e2da (diff) | |
download | genenetwork2-56177b238dc7d3b225caeda25fd558d98b17b3c6.tar.gz |
Merge branch 'master' of https://github.com/zsloan/genenetwork2 into zsloan
Diffstat (limited to 'wqflask/base/JinjaPage.py')
-rwxr-xr-x | wqflask/base/JinjaPage.py | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/wqflask/base/JinjaPage.py b/wqflask/base/JinjaPage.py deleted file mode 100755 index 07e485b1..00000000 --- a/wqflask/base/JinjaPage.py +++ /dev/null @@ -1,28 +0,0 @@ -import logging -logging.basicConfig(filename="/tmp/gn_log", level=logging.INFO) -_log = logging.getLogger("search") - -from pprint import pformat as pf - -import templatePage - -from utility import formatting - -import jinja2 -JinjaEnv = jinja2.Environment(loader=jinja2.FileSystemLoader('/gnshare/gn/web/webqtl/templates')) -JinjaEnv.globals['numify'] = formatting.numify - - -class JinjaPage(templatePage.templatePage): - """Class derived from our regular templatePage, but uses Jinja2 instead. - - When converting pages from Python generated templates, change the base class from templatePage - to JinjaPage - - """ - - - def write(self): - """We override the base template write so we can use Jinja2.""" - _log.info(pf(self.__dict__)) - return self.jtemplate.render(**self.__dict__) |