{% if logs and page_info.prev_last_id %}
{% set prev_args = request.args.to_dict() %}
{% do prev_args.update({'last_id': page_info.prev_last_id, 'direction': 'prev'}) %}
Previous
{% endif %}
{% if page_info.has_next_page %}
{% set next_args = request.args.to_dict() %}
{% do next_args.update({'last_id': page_info.next_last_id}) %}
Next
{% endif %}