i want to create a widget depending on the class of the object, is there a simple way to do that in mako? for example
class A might have attributes A and B
while
class B might have attributes A, B and C
is there a pattern for this?
i want to make a super class that they but inherit, but if I have a function print and call it by calling obj.print(), but i don't want to put template code into class functions
for example, i have a widget that goes
<div>obj.a</div>
<div>obj.b</div>
<div>obj.c</div>
<div>obj.d</div>
but if it's object B, i want it to go
<div>obj.a</div>
<div>obj.b</div>
<div>obj.c</div>
etc, but was wondering if theres a clean way to do it