Opened 10 years ago

Closed 10 years ago

#9298 closed (invalid)

Error in tutorial part 4 : if error_message test doesn't work

Reported by: marco_2025 Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


In the template vote/detail.html, you have this test :
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}

I think this doesn't work (at least on my machine), because 'error_message' never equals 'true' (it contains a string with the error message).

Change History (1)

comment:1 Changed 10 years ago by Karen Tracey <kmtracey@…>

Resolution: invalid
Status: newclosed

The test works as written. Per the doc on the if tag:

the test evaluates to "true" if the variable argument "exists, is not empty, and is not a false boolean value".

If this is not working correctly on your machine something weird is going on.

Note: See TracTickets for help on using tickets.
Back to Top