docs: remove last occurrences to jinja2

This commit is contained in:
Jens Langhammer
2020-06-05 20:18:11 +02:00
parent eeb62f543f
commit 30ca926b38
8 changed files with 18 additions and 36 deletions

View File

@ -21,8 +21,8 @@ A Prompt has the following attributes:
HTML name used for the prompt. This key is also used to later retrieve the data in expression policies:
```jinja2
{{ request.context.prompt_data.<field_key> }}
```python
request.context.get('prompt_data').get('<field_key>')
```
### `label`

View File

@ -4,13 +4,12 @@ Further validation of prompts can be done using policies.
To validate that two password fields are identical, create the following expression policy:
```jinja2
{% if request.context.prompt_data.password == request.context.prompt_data.password_repeat %}
True
{% else %}
{% do pb_message("Passwords don't match.") %}
False
{% endif %}
```python
if request.context.get('prompt_data').get('password') == request.context.get('prompt_data').get('password_repeat'):
return True
pb_message("Passwords don't match.")
return False
```
This policy expects you two have two password fields with `field_key` set to `password` and `password_repeat`.