coleifer/flask-peewee — pull request #145 by thomdixon (2014-07-09 00:23:58+00:00)
Title: Use singleton for db.Model

This change uses a singleton for db.Model, permitting sane subclass behavior.
That is, rather than

```python
BaseModel = db.Model
class Foo(BaseModel):
def __init__(self, *args, **kwargs):
super(BaseModel, self).__init__(*args, **kwargs)

def extra(self):
pass
```

one can simply write

```python
class Foo(db.Model):
def __init__(self, *args, **kwargs):
super(db.Model, self).__init__(*args, **kwargs)

def extra(self):
pass
```

as you would expect.