[Flask] FLASK_Sqlalchemy

Ben Duncan linux4ms at gmail.com
Tue Sep 3 11:25:25 EDT 2019


Ok, been trying to figure this out. Maybe someone could help.

Where in flask_sqlalcehmy on can do the following to get a predefined table
schema returned:

class comp_table(pgdb.Model):
    __table__ = pgdb.Model.metadata.tables['company']

I'm trying to the same WITHOUT having to do a class along the lines of:

comp_table = pgdb.Model.metadata.tables['company']
but it is not working. Is this possible and and if so, how do you code it?

Thanks ..

*Ben Duncan*
DBA / Chief Software Architect
Mississippi State Supreme Court
Electronic Filing Division
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20190903/53411ba4/attachment.html>


More information about the Flask mailing list