class MyModel(object):
# ...
@hybrid_property
def my_property(self):
# Do some stuff at the instance level
@my_property.expression
def my_property(cls):
# Do some stuff at the class level
class MyModel(object):
# ...
@hybrid_method
def my_property(self):
# Do some stuff at the instance level
@my_property.expression
def my_property_expression(cls):
# Do some stuff at the class level