tools
management.tools
¤
Functions¤
get_deleted_objects(objs)
¤
Return information about related objects to be deleted.
How to do this has been taken from https://stackoverflow.com/a/39533619/3778792
Parameters:
Name | Type | Description | Default |
---|---|---|---|
objs |
list[Model]
|
List of objects to be deleted. |
required |
Returns:
Type | Description |
---|---|
tuple[list[str], dict[str, int], list[str]]
|
tuple[list[str], dict[str, int], list[str]]: Tuple containing the following: - List of strings representing the objects to be deleted. - Dictionary containing the count of objects to be deleted for each model. - List of strings representing the objects that are protected from deletion |
Source code in management\tools.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|