def fresh_dict(m, ignore_underscore_fields=True):
    """
    Returns a dict representation of the current (unsaved)
    state of Model M.

    Like django's built-in Model.__dict__, except that seems
    to use the stored (i.e. old) rather than new/unsaved
    values. In other words, if you change some of M's values
    but haven't yet saved them, FRESH_DICT will return the
    unsaved versions, whereas django's __dict__ will return
    the saved values.

    If IGNORE_UNDERSCORE_FIELDS, throws out fields that
    start with an underscore.
    """
    d = {}
    for fieldn in [f.name for f in m._meta.fields]:
        if ignore_underscore_fields and fieldn.startswith('_'):
            continue
        d[fieldn] = getattr(m, fieldn)
    return d