def callable_bool(value):
    """ A compatibility wrapper for pre Django 1.10 User model API that used
    is_authenticated() and is_anonymous() methods instead of attributes
    """
    if callable(value):
        return value()
    else:
        return value
