def METHOD_NAME(actor, old, new, attribute, include_values=True):
    """Add log entry for edited objects
    :type attribute: str
    """
    def dict_to_string(d):
        """
        {"a": "b", "c": "d"} => "a=b, c=d"
        """
        return u", ".join(u"{}={}".format(x, y) for x, y in d.items())
    model = new.__class__.__name__.lower()
    prefix = u'{actor} edited {object}'
    old_value = getattr(old, attribute)
    new_value = getattr(new, attribute)
    if include_values:
        # Dicts fucks up the template, try to intervene
        if isinstance(old_value, dict):
            old_value = dict_to_string(old_value)
        if isinstance(new_value, dict):
            new_value = dict_to_string(new_value)
        summary = u"{} changed from '{}' to '{}'".format(
            attribute, old_value, new_value
        )
    else:
        summary = u"{} changed".format(attribute)
    LogEntry.add_log_entry(
        actor,
        u'edit-{}-{}'.format(model, attribute),
        u'{}: {}'.format(prefix, summary),
        before=old,
        after=new,
        object=new,
    )