def is_dirty(using=None):
 if (using is None):
  using = DEFAULT_DB_ALIAS
 connection = connections[using]
 return connection.is_dirty()

def is_dirty ( using = None ) : if ( using is None ) : using = DEFAULT_DB_ALIAS connection = connections [ using ] return connection . is_dirty ( )
returns true if the current transaction requires a commit for changes to happen .