Little fixes

This commit is contained in:
Antonio de la Rosa 2016-07-31 23:23:42 +02:00
parent e013657963
commit b41461cc2c
3 changed files with 26 additions and 9 deletions

View file

@ -37,6 +37,8 @@ class WebModel:
webmodel=True
global_cached=False
#sqlclass=SqlClass()
#make_connection=sqlclass.connect_to_db
@ -50,6 +52,8 @@ class WebModel:
def __init__(self, sqlclass, name_field_id="id"):
cached=self.global_cached
#The name of the table
self.name=type(self).__name__.lower()
@ -987,7 +991,7 @@ class PhangoField:
self.name_form=BaseForm
# Property that define if make escape in show_formatted
# Property that define if make escape in show_formatted. This property control the html transformation of <>" characters in html entities.If false, convert.
self.escape=False
@ -1024,11 +1028,12 @@ class PhangoField:
value=str(value)
value=value.replace('<', '&lt;')
value=value.replace('>', '&gt;')
value=value.replace('"', '&quot;')
if self.escape==False:
value=value.replace('<', '&lt;')
value=value.replace('>', '&gt;')
value=value.replace('"', '&quot;')
#value=WebModel.escape_sql(value)

View file

@ -93,10 +93,19 @@ session_opts = {
}
cache_opts = {
cache_session_opts = {
}
"""
cache_opts = {
'cache.type': 'file',
'cache.data_dir': '/tmp/cache/data',
'cache.lock_dir': '/tmp/cache/lock'
}
"""
#Can be absolute or relative