croach / Flask-Fixtures

A simple library for adding database fixtures for unit tests using nothing but JSON or YAML.
MIT License
63 stars 30 forks source link

class level model didn't work #23

Open guyskk opened 8 years ago

guyskk commented 8 years ago

app.py

class model(object):

    class Book(db.Model):
        bookid = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.Unicode, nullable=False)

bookdata.json

{
    "model": "app.model.Book",
    "records": []
}

the error is module app.model not exists.

perhaps use new sytanx app:model.Book can solve this problem.