SQLALchemy 扩展

Code:

  1. from flask_dashed.ext.sqlalchemy import ModelAdminModule
  2. class BookModule(ModelAdminModule):
  3. model = Book
  4. db_session = db.session
  5. book_module = admin.register_module(BookModule, '/books', 'books',
  6. 'book management')

Api