def save_child_position(seq_module, child_name):
 for (position, child) in enumerate(seq_module.get_display_items(), start=1):
  if (child.location.name == child_name):
   if (position != seq_module.position):
    seq_module.position = position
 seq_module.save()

def save_child_position ( seq_module , child_name ) : for ( position , child ) in enumerate ( seq_module . get_display_items ( ) , start = 1 ) : if ( child . location . name == child_name ) : if ( position != seq_module . position ) : seq_module . position = position seq_module . save ( )
child_name: url_name of the child .