我有一个模型,其中有很多 ManyToMany 连接。我需要一种从管理面板进行管理的智能方式。创建活动模型时,我需要连接到其他模型。Websauna 有类似 Django Inline 格式的东西吗?
class Campaign(Base, BaseMixin):
name = Column(String())
created_at = Column(UTCDateTime, default=now, nullable=False)
updated_at = sa.Column(UTCDateTime, onupdate=now)
owner_id = Column(ForeignKey('users.id'))
workers = relationship('Worker',
secondary=CampaignWorker.__table__,
back_populates='campaign')
recipients = relationship('Recipient',
secondary=CampaignRecipient.__table__,
back_populates='campaign')
accounts = relationship('Account',
secondary=CampaignAccount.__table__,
back_populates='campaign')
messages = relationship('Message',
back_populates='campaign')
message_deliveries = relationship('MessageDelivery',
secondary=CampaignMessageDelivery.__table__,
back_populates='campaign')