From b41461cc2cc8a6912e4167a9645cae98a0123847 Mon Sep 17 00:00:00 2001 From: Antonio de la Rosa Date: Sun, 31 Jul 2016 23:23:42 +0200 Subject: [PATCH] Little fixes --- README.md | 7 +++++-- paramecio/cromosoma/webmodel.py | 17 +++++++++++------ paramecio/settings/config.py.sample | 11 ++++++++++- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2ce86c0..1877beb 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ In Debian and Ubuntu you can install MariaDB using the next command: `apt-get in In Fedora and other Red Hat derived distros you can use `yum install mariadb-server`. In RedHat/Centos 6 probably you need install adittional repositories for get latest versions of mariadb, but with MySQL 5.5, Pastafari should work fine. -When you will install the mysql server, you should create a new user amd database for Paramecio. +When you will install the mysql server, you should create a new user and database for Paramecio. ### Pip @@ -53,4 +53,7 @@ Pastafari need a web framework called Paramecio. You can install this framework This command will install in your server paramecio framework with its dependencies. -When Paramecio finish the installing, a command called `paramecio` can be used for install Pastafari. +When Paramecio finish the installing, you can create your first paramecio site with `paramecio` command. + + + diff --git a/paramecio/cromosoma/webmodel.py b/paramecio/cromosoma/webmodel.py index ed12254..6ef53ec 100644 --- a/paramecio/cromosoma/webmodel.py +++ b/paramecio/cromosoma/webmodel.py @@ -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('<', '<') - - value=value.replace('>', '>') - - value=value.replace('"', '"') + if self.escape==False: + value=value.replace('<', '<') + + value=value.replace('>', '>') + + value=value.replace('"', '"') #value=WebModel.escape_sql(value) diff --git a/paramecio/settings/config.py.sample b/paramecio/settings/config.py.sample index bd9a43c..1d2c53b 100644 --- a/paramecio/settings/config.py.sample +++ b/paramecio/settings/config.py.sample @@ -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