Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris committed Aug 24, 2022
1 parent 1e87582 commit ca96028
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,8 @@ Radio widgets work a bit differently:
.. code-block:: javascript
// forminputs.my_radio is a RadioNodeList, not a single <input>, so you need to loop:
// forminputs.my_radio is a RadioNodeList, not a single <input>
// so you need to loop over all 3 options:
for (let radio of forminputs.my_radio) {
radio.required = '';
}
Expand Down
12 changes: 12 additions & 0 deletions source/templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ With an 'else':
negative
{{ endif }}
Complex example:

.. code-block:: django
{{ if a or b }}
.....
{{ elif c and d }}
.....
{{ else }}
.....
{{ endif }}
Loops ("for")
~~~~~~~~~~~~~

Expand Down

0 comments on commit ca96028

Please sign in to comment.