The declared_attr attributes are called by the metaclass for IceCream before
the creation of the IceCream class is complete, and therefore available in the
module namespace, so you need to rely on cls to get at the appropriate
contextbut if you want Edible, you're probably best saying that
Hi, I'm trying to call the base class attributes from a declared_attr
definition.
Something like:
class Edible(Base):
__tablename__ = 'edible'
brand = Column(String(20), primary_key=True)
edible_type = Column(String(20), primary_key=True)
__mapper_args__ = {'polymorphic_on': edib