Browse code

Improved the code of an example

Javier Eguiluz authored on 27/09/2018 14:26:19 • GitHub committed on 27/09/2018 14:26:19
Showing 1 changed files
... ...
@@ -50,12 +50,12 @@ use more complex ``expressions`` there too:
50 50
 
51 51
 .. code-block:: jinja
52 52
 
53
-    {% if kenny.sick %}
54
-        Kenny is sick.
55
-    {% elseif kenny.dead %}
56
-        You killed Kenny! You bastard!!!
53
+    {% if product.stock > 10 %}
54
+       Available
55
+    {% elseif product.stock > 0 %}
56
+       Only {{ product.stock }} left!
57 57
     {% else %}
58
-        Kenny looks okay --- so far
58
+       Sold-out!
59 59
     {% endif %}
60 60
 
61 61
 .. note::