Unverified Commit b06df00b authored by Serge S. Koval's avatar Serge S. Koval Committed by GitHub

Merge pull request #1609 from jasgrider/patch-1

Form.py - Fix issue1602 Peewee BaseModel
parents 06aebf07 a0dfc0ef
from wtforms import fields
from peewee import (CharField, DateTimeField, DateField, TimeField,
PrimaryKeyField, ForeignKeyField, BaseModel)
PrimaryKeyField, ForeignKeyField)
# Fix for Issue: #1602 & #1606
# Section below trys BaseModel (for versions of PeeWee < 3.0) and if that fails,
# load the new ModelBase as BaseModel (to not break things looking for BaseModel in flask-peewee and etc.)
try:
from peewee import BaseModel
except ImportError:
from peewee import ModelBase as BaseModel
from wtfpeewee.orm import ModelConverter, model_form
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment