diff --git a/README.rst b/README.rst index 1d0047f..01c863b 100644 --- a/README.rst +++ b/README.rst @@ -67,6 +67,7 @@ The following configuration options exist for the plugin class: * **keyword**: The keyword argument name that triggers the plugin (default: 'db'). * **autocommit**: Whether or not to commit outstanding transactions at the end of the request cycle (default: True). * **dictrows**: Whether or not to support dict-like access to row objects (default: True). +* **text_factory**: The text_factory for the connection (default: unicode). You can override each of these values on a per-route basis:: diff --git a/bottle_sqlite.py b/bottle_sqlite.py index c4014a9..62cb826 100755 --- a/bottle_sqlite.py +++ b/bottle_sqlite.py @@ -98,7 +98,7 @@ class SQLitePlugin(object): autocommit = g('autocommit', self.autocommit) dictrows = g('dictrows', self.dictrows) keyword = g('keyword', self.keyword) - text_factory = g('keyword', self.text_factory) + text_factory = g('text_factory', self.text_factory) # Test if the original callback accepts a 'db' keyword. # Ignore it if it does not need a database handle.