src/cm/utils/misc.py
author raph
Thu, 22 Apr 2010 18:09:44 +0200
changeset 264 b545c82610df
parent 0 40c8f766c9b8
permissions -rw-r--r--
fix comment deletion detection when using html format (and ckeditor)


def update(obj, kwargs):
    """
    Update obj attributes with values from kwargs
    """
    for k,v in kwargs.items():
        if hasattr(obj,k):
            setattr(obj,k,v)