convert to proper time db object, get rid of the 'str' messes

This commit is contained in:
2022-11-17 17:53:19 -05:00
parent ce1e8ed68c
commit f27749009c
5 changed files with 7 additions and 10 deletions

View File

@@ -4,7 +4,6 @@
<span><h1>{% block title %} Periods {% endblock %}</h1></span> <a class="btn btn-primary" href="/period/new" role="button">New Period </a> <br> <br>
<div>
{% for period in periods %}
{% set convertedTime = datetime.strptime(period.periodTime, "%H:%M:%S") %}
<div class="float-right">
<form method="post"
action="{{url_for('delete_period',
@@ -15,7 +14,7 @@
<div class="float-right"><a type="button" class="btn btn-primary mr-1" href="/period/edit/{{ period.period }}">Edit</a>
</div>
<div>
<p><b>Period {{ period.period }}</b> <br> Time: {{ convertedTime.strftime("%I:%M %p") }} </p>
<p><b>Period {{ period.period }}</b> <br> Time: {{ period.periodTime.strftime("%I:%M %p") }} </p>
</div>
<hr>
{% endfor %}