File tree Expand file tree Collapse file tree 2 files changed +23
-10
lines changed
Expand file tree Collapse file tree 2 files changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -113,10 +113,11 @@ Examples:
113113 items when using listing methods. See the :ref: `pagination ` section for more
114114 information.
115115
116- You can list the mandatory and optional attributes for object creation and
117- update with the manager's ``get_create_attrs() `` and ``get_update_attrs() ``
118- methods. They return 2 tuples, the first one is the list of mandatory
119- attributes, the second one is the list of optional attribute:
116+ You can list the mandatory, optional, and mutually exclusive attributes for object
117+ creation and update with the manager's ``get_create_attrs() `` and ``get_update_attrs() ``
118+ methods. They return 3 tuples. The first tuple is the list of mandatory attributes.
119+ The second tuple is the list of optional attributes. The third tuple is the mutually
120+ exclusive attributes:
120121
121122.. code-block :: python
122123
Original file line number Diff line number Diff line change 88{% if cls ._create_attrs %}
99**Object Creation**
1010{% if cls ._create_attrs [0] %}
11- Mandatory attributes:
12- {% for item in cls ._create_attrs [0] %}
11+ Mandatory attributes for object create :
12+ {% for item in cls ._create_attrs . required %}
1313- ``{{ item }}``
1414{% endfor %}
1515{% endif %}
1616{% if cls ._create_attrs [1] %}
17- Optional attributes:
18- {% for item in cls ._create_attrs [1] %}
17+ Optional attributes for object create:
18+ {% for item in cls ._create_attrs .optional %}
19+ - ``{{ item }}``
20+ {% endfor %}
21+ {% endif %}
22+ {% if cls ._create_attrs [2] %}
23+ Mutually exclusive attributes for object create:
24+ {% for item in cls ._create_attrs .exlusive %}
1925- ``{{ item }}``
2026{% endfor %}
2127{% endif %}
@@ -25,13 +31,19 @@ Optional attributes:
2531**Object update**
2632{% if cls ._update_attrs [0] %}
2733Mandatory attributes for object update:
28- {% for item in cls ._update_attrs [0] %}
34+ {% for item in cls ._update_attrs . required %}
2935- ``{{ item }}``
3036{% endfor %}
3137{% endif %}
3238{% if cls ._update_attrs [1] %}
3339Optional attributes for object update:
34- {% for item in cls ._update_attrs [1] %}
40+ {% for item in cls ._update_attrs .optional %}
41+ - ``{{ item }}``
42+ {% endfor %}
43+ {% endif %}
44+ {% if cls ._update_attrs [2] %}
45+ Mutually exclusive attributes for object update:
46+ {% for item in cls ._update_attrs .exlusive %}
3547- ``{{ item }}``
3648{% endfor %}
3749{% endif %}
You can’t perform that action at this time.
0 commit comments