How to use the tblib.model.db.Table function in tblib

To help you get started, we’ve selected a few tblib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shiyanlou / louplus-python / taobei / tbmall / models / shop_product.py View on Github external
from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.orm import relationship

from tblib.model import db


shop_product = db.Table(
    'shop_product',
    Column('shop_id', Integer, ForeignKey('shop.id'), primary_key=True),
    Column('product_id', Integer, ForeignKey('product.id'), primary_key=True)
)