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:
113
113
items when using listing methods. See the :ref: `pagination ` section for more
114
114
information.
115
115
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:
120
121
121
122
.. code-block :: python
122
123
Original file line number Diff line number Diff line change 8
8
{% if cls ._create_attrs %}
9
9
**Object Creation**
10
10
{% 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 %}
13
13
- ``{{ item }}``
14
14
{% endfor %}
15
15
{% endif %}
16
16
{% 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 %}
19
25
- ``{{ item }}``
20
26
{% endfor %}
21
27
{% endif %}
@@ -25,13 +31,19 @@ Optional attributes:
25
31
**Object update**
26
32
{% if cls ._update_attrs [0] %}
27
33
Mandatory attributes for object update:
28
- {% for item in cls ._update_attrs [0] %}
34
+ {% for item in cls ._update_attrs . required %}
29
35
- ``{{ item }}``
30
36
{% endfor %}
31
37
{% endif %}
32
38
{% if cls ._update_attrs [1] %}
33
39
Optional 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 %}
35
47
- ``{{ item }}``
36
48
{% endfor %}
37
49
{% endif %}
You can’t perform that action at this time.
0 commit comments