def _track_class(cls, fields):
    """ Track fields on the specified model """
    # Small tests to ensure everything is all right
    assert not getattr(cls, '_is_tracked', False)

    for field in fields:
        _track_class_field(cls, field)

    _add_signals_to_cls(cls)

    # Mark the class as tracked
    cls._is_tracked = True
    # Do not directly track related fields (tracked on related model)
    # or m2m fields (tracked by another signal)
    cls._tracked_fields = [
        field for field in fields
        if '__' not in field
    ]
def _track_class ( cls , fields ) : assert not getattr ( cls , '_is_tracked' , False ) for field in fields : _track_class_field ( cls , field ) _add_signals_to_cls ( cls ) cls . _is_tracked = True cls . _tracked_fields = [ field for field in fields if '__' not in field ]
Track fields on the specified model