ksindi / flask-sqlacodegen

:sake: Automatic model code generator for SQLAlchemy with Flask support
Other
336 stars 60 forks source link

Wrong import generated view class #23

Closed knil-sama closed 7 years ago

knil-sama commented 7 years ago

When I generate class from a view I get

from sqlalchemy import BigInteger, Column, Index, Integer, JSON, String, Table
from sqlalchemy.ext.declarative import declarative_base

metadata = MetaData()

But it should be

from sqlalchemy import BigInteger, Column, Index, Integer, JSON, String, Table, MetaData

metadata = MetaData()

instead

@ksindi I will try to submit a PR once I solve it done #24