Skip to content

Commit a50d02d

Browse files
committed
Improved documentation on bulk operations. #41 #42 #45
1 parent 9236eaa commit a50d02d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,21 @@ obj.is_sibling_of(target_obj)
414414
cls.update_tree()
415415
```
416416

417+
### Bulk Operations
418+
419+
To perform bulk operations it is recommended to turn off signals, then triggering the tree update at the end:
420+
421+
```python
422+
from treenode.signals import no_signals
423+
424+
with no_signals():
425+
# execute custom bulk operations
426+
pass
427+
428+
# trigger tree update only once
429+
YourModel.update_tree()
430+
```
431+
417432
## Testing
418433
```bash
419434
# create python virtual environment

0 commit comments

Comments
 (0)