Fix for add filter to templates
This commit is contained in:
parent
99692a0f46
commit
da87f4ca60
2 changed files with 8 additions and 2 deletions
|
|
@ -45,8 +45,8 @@ def start():
|
|||
module_base=os.path.basename(args.module)
|
||||
|
||||
lang_p=re.compile("I18n\.lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)")
|
||||
lang_t=re.compile("\${lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)\}")
|
||||
|
||||
#lang_t=re.compile("\${lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)\}")
|
||||
lang_t=re.compile("\${lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)")
|
||||
|
||||
if not os.path.isdir(path):
|
||||
|
||||
|
|
|
|||
|
|
@ -144,6 +144,8 @@ class PTemplate:
|
|||
|
||||
self.add_filter(self.headerhtml.add_header_home)
|
||||
|
||||
self.add_filter(qf)
|
||||
|
||||
self.filters['HeaderHTML']=self.headerhtml
|
||||
|
||||
self.filters['show_flash_message']=self.headerhtml.show_flash_message
|
||||
|
|
@ -366,6 +368,10 @@ def set_flash_message(message):
|
|||
|
||||
s.save()
|
||||
|
||||
def qf(text):
|
||||
|
||||
return text.replace('"', '\\"')
|
||||
|
||||
env=env_theme(__file__)
|
||||
|
||||
standard_t=PTemplate(env)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue