User:Kim/Stations, Skills, Resources/Flask: Difference between revisions
(Created page with "==JSON==") |
(→JSON) |
||
| Line 1: | Line 1: | ||
==JSON== | ==JSON== | ||
<h1>My field observations</h1> | |||
<div id="archive"> | |||
<!-- if there is an object in the observations array --> | |||
{% if observations %} | |||
<!-- for each observation in the array --> | |||
{% for observation in observations %} | |||
<!-- display observation in a div --> | |||
<div class="container"> | |||
<div class="place">{{ observation.place }}</div> | |||
<div class="observation">{{ observation.observation }}</div> | |||
{% if observation.sunny %} | |||
<div class="sunny">☀</div> | |||
{% endif %} | |||
{% if observation.rainy %} | |||
<div class="rainy">☁</div> | |||
{% endif %} | |||
</div> | |||
{% endfor %} | |||
{% endif %} | |||
</div> | |||
<form method="POST"> | |||
<textarea name="observation"></textarea> | |||
<input type="text" name="place"></input> | |||
<label for="place">place</label> | |||
<input type="checkbox" name="sunny" id=""> | |||
<label for="sunny">sunny</label> | |||
<input type="checkbox" name="rainy" id=""> | |||
<label for="rainy">rainy</label> | |||
<br> | |||
<input type="submit" value="Save!"> | |||
</form> | |||
Revision as of 20:02, 7 April 2026
JSON
My field observations
{% if observations %}
{% for observation in observations %}
{% if observation.sunny %}
☀
{% endif %}
{% if observation.rainy %}
☁
{% endif %}
{% endfor %}
{% endif %}
<form method="POST"> <textarea name="observation"></textarea> <input type="text" name="place"></input> <label for="place">place</label> <input type="checkbox" name="sunny" id=""> <label for="sunny">sunny</label> <input type="checkbox" name="rainy" id=""> <label for="rainy">rainy</label>
<input type="submit" value="Save!"> </form>