fix text_factory local config

This commit is contained in:
Dingyuan Wang 2017-08-25 15:05:50 +08:00 committed by Marcel Hellkamp
parent fa8c664809
commit 6f5502f709
2 changed files with 2 additions and 1 deletions

View File

@ -67,6 +67,7 @@ The following configuration options exist for the plugin class:
* **keyword**: The keyword argument name that triggers the plugin (default: 'db'). * **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). * **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). * **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:: You can override each of these values on a per-route basis::

View File

@ -98,7 +98,7 @@ class SQLitePlugin(object):
autocommit = g('autocommit', self.autocommit) autocommit = g('autocommit', self.autocommit)
dictrows = g('dictrows', self.dictrows) dictrows = g('dictrows', self.dictrows)
keyword = g('keyword', self.keyword) 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. # Test if the original callback accepts a 'db' keyword.
# Ignore it if it does not need a database handle. # Ignore it if it does not need a database handle.