Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0f607f6

Browse files
authored
Merge pull request#2057 from walterrowe/main
docs: update docs to reflect addition of mutually exclusive attributes
2 parentsaebf9c8 +24b720e commit0f607f6

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

‎docs/api-usage.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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

‎docs/ext/manager_tmpl.j2

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,20 @@
88
{%ifcls._create_attrs%}
99
**Object Creation**
1010
{%ifcls._create_attrs[0]%}
11-
Mandatory attributes:
12-
{%foritemincls._create_attrs[0]%}
11+
Mandatory attributes for object create:
12+
{%foritemincls._create_attrs.required%}
1313
- ``{{ item }}``
1414
{%endfor%}
1515
{%endif%}
1616
{%ifcls._create_attrs[1]%}
17-
Optional attributes:
18-
{%foritemincls._create_attrs[1]%}
17+
Optional attributes for object create:
18+
{%foritemincls._create_attrs.optional%}
19+
- ``{{ item }}``
20+
{%endfor%}
21+
{%endif%}
22+
{%ifcls._create_attrs[2]%}
23+
Mutually exclusive attributes for object create:
24+
{%foritemincls._create_attrs.exlusive%}
1925
- ``{{ item }}``
2026
{%endfor%}
2127
{%endif%}
@@ -25,13 +31,19 @@ Optional attributes:
2531
**Object update**
2632
{%ifcls._update_attrs[0]%}
2733
Mandatory attributes for object update:
28-
{%foritemincls._update_attrs[0]%}
34+
{%foritemincls._update_attrs.required%}
2935
- ``{{ item }}``
3036
{%endfor%}
3137
{%endif%}
3238
{%ifcls._update_attrs[1]%}
3339
Optional attributes for object update:
34-
{%foritemincls._update_attrs[1]%}
40+
{%foritemincls._update_attrs.optional%}
41+
- ``{{ item }}``
42+
{%endfor%}
43+
{%endif%}
44+
{%ifcls._update_attrs[2]%}
45+
Mutually exclusive attributes for object update:
46+
{%foritemincls._update_attrs.exlusive%}
3547
- ``{{ item }}``
3648
{%endfor%}
3749
{%endif%}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp