How to set threadlocals when using peewee with Flask?
In your `DATABASE` declaration just put `'threadlocals': True` -- that's all you need to do.

I'm using Peewee with Flask (which is an awesome combination) and because I use threading I want to set `threadlocals=True`. In [the documentation](http://peewee.readthedocs.org/en/latest/peewee/cookbook.html#multi-threaded-applications), it is suggested that I use it like so:

```
concurrent_db = SqliteDatabase('stats.db', threadlocals=True)
```

In my Flask app however, I initialise the DB like this:

```
app = Flask(__name__)
app.config.from_object('config')
db = Database(app)
```

and in the config file I've got among other stuff, this to define the DB:

```
DATABASE = {
    'name': 'mydb',
    'engine': 'playhouse.postgres_ext.PostgresqlExtDatabase',
    'user': 'myuser',
    'password': 'supersecret'
}
```

I tried putting `threadlocals = True` in the config file, which doesn't give any errors, but how do I know whether it really picked it up and is using it? Is there a way to check whether I'm actually using threadlocals?

What is the proper way to set threadlocals to True when using Flask? All tips are welcome!
