@register.filter
def is_smartobject(obj):
    return hasattr(obj, 'is_active')
Returns whether the passed in object is a smart object
dataset/ETHPy150Open nyaruka/smartmin/smartmin/templatetags/smartmin.py/is_smartobject