Fix JSON export

This commit is contained in:
Manuel Ebert 2016-08-19 21:44:12 +00:00
parent 6a53da5efd
commit f4dfecb62f

View file

@ -20,14 +20,13 @@ extension: json
{% block entry %} {% block entry %}
{ {
"title": "{{ entry.title }}", "title": "{{ entry.title }}",
"body": "{{ entry.body }}", "body": "{{ entry.body.replace("\n", "\\n") }}",
"date": "{{ entry.date.strftime('%Y-%m-%d') }}", "date": "{{ entry.date.strftime('%Y-%m-%d') }}",
"time": "{{ entry.date.strftime('%H:%M') }}", "time": "{{ entry.date.strftime('%H:%M') }}",
{% if entry.uuid %} {% if entry.uuid %}
"uuid": "{{ entry.uuid }}", "uuid": "{{ entry.uuid }}",
{% endif %} {% endif %}
"starred": {{ "true" if entry.starred else "false" }} "starred": {{ "true" if entry.starred else "false" }}
}
} }
{% endblock %} {% endblock %}