bugfix
This commit is contained in:
parent
e99823714a
commit
03dc50d01b
@ -4,7 +4,7 @@ try:
|
|||||||
import ujson as json
|
import ujson as json
|
||||||
except:
|
except:
|
||||||
import json
|
import json
|
||||||
from jinja2 import Environment,FileSystemLoader
|
from jinja2 import Environment,FileSystemLoader, BaseLoader
|
||||||
import codecs
|
import codecs
|
||||||
from appPublic.argsConvert import ArgsConvert
|
from appPublic.argsConvert import ArgsConvert
|
||||||
from appPublic.dictObject import DictObject
|
from appPublic.dictObject import DictObject
|
||||||
@ -12,6 +12,10 @@ def isNone(obj):
|
|||||||
return obj is None
|
return obj is None
|
||||||
|
|
||||||
|
|
||||||
|
def string_template_render(tmp_string, data):
|
||||||
|
rtemplate = Environment(loader=BaseLoader()).from_string(myString)
|
||||||
|
return rtemplate.render(**data)
|
||||||
|
|
||||||
class MyTemplateEngine:
|
class MyTemplateEngine:
|
||||||
def __init__(self,pathList,file_coding='utf-8',out_coding='utf-8'):
|
def __init__(self,pathList,file_coding='utf-8',out_coding='utf-8'):
|
||||||
self.file_coding = file_coding
|
self.file_coding = file_coding
|
||||||
|
Loading…
Reference in New Issue
Block a user