0

I am currently using Flask and I got a counter for how many IDs are there. But how do I increase another variable whenever I delete 1 ID. So that I am able to show how many points have been deleted. E.g. If count - 1, x + 1

<div>
{% if count == 0 %}
<p>You currently have no points.</p>
{% elif count == 1 %}
<p>There is 1 point.</p>
{% else %}
<p>There are {{ count }} points.</p>
{% endif %}

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
BearyBerry
  • 39
  • 3
  • whats your expected output? – Ironkey Jan 14 '20 at 15:19
  • so you want count to go up or down when you delete an ID – Ironkey Jan 14 '20 at 15:21
  • if you want to detect a decrease in a variable just check it against itself with a while true loop. then use an if statement to check if it was a negative change and take action. – Ironkey Jan 14 '20 at 15:24
  • When I add a new data, my count increases. When I delete the data, the count decreases. But I want to have another variable "used" to be able to increase when the count decreases. I want to create another shelve, but k just get internal server error – BearyBerry Jan 15 '20 at 05:25

0 Answers0