fix last process updates run view
This commit is contained in:
parent
59db4cdd1e
commit
991dedc3ee
2 changed files with 8 additions and 6 deletions
|
@ -25,11 +25,13 @@
|
|||
<p>{% trans 'Map updates are currently not processed automatically.' %}</p>
|
||||
{% endif %}
|
||||
{% if last_processed %}
|
||||
{% trans 'Last run:' %}
|
||||
{% if not last_processed_success %}
|
||||
<strong class="red">{% trans '(failed)' %}</strong>
|
||||
{% endif %}
|
||||
{{ last_processed|date:"SHORT_DATETIME_FORMAT" }}
|
||||
<p>
|
||||
{% trans 'Last run:' %}
|
||||
{% if not last_processed_success %}
|
||||
<strong class="red">{% trans '(failed)' %}</strong>
|
||||
{% endif %}
|
||||
{{ last_processed|date:"SHORT_DATETIME_FORMAT" }}
|
||||
</p>
|
||||
{% endif %}
|
||||
<button type="submit" name="process_updates" value="1">{% trans 'Process map updates now' %}</button>
|
||||
</form>
|
||||
|
|
|
@ -392,7 +392,7 @@ def map_updates(request):
|
|||
|
||||
last_processed, last_processed_success = cache.get('mapdata:last_process_updates_run', (None, None))
|
||||
if last_processed:
|
||||
make_aware(datetime.fromtimestamp(last_processed))
|
||||
last_processed = make_aware(datetime.fromtimestamp(last_processed))
|
||||
|
||||
return render(request, 'control/map_updates.html', {
|
||||
'last_processed': last_processed,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue