From 9aa7e62d0f77f27590dac1cae5603e8f7efb891f Mon Sep 17 00:00:00 2001 From: Nicolas Vanvyve Date: Mon, 13 Jan 2020 21:17:55 +0100 Subject: Import previously exported json data (#518) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #417 * New tab upload * Extract data from JSON * Add users * Black format * Try to add bill * Import bills * Add french translation msg * Black reformat missing * Deactivated users are supported * Test import * Remove temp file in upload_json() * Incomplete tests * tests import * Update ihatemoney/translations/fr/LC_MESSAGES/messages.po Co-Authored-By: Rémy HUBSCHER * Remove useless variable and check json format * Use String.IO and test for wrong json * Remove coma Co-authored-by: Rémy HUBSCHER --- ihatemoney/templates/forms.html | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ihatemoney/templates/forms.html') diff --git a/ihatemoney/templates/forms.html b/ihatemoney/templates/forms.html index 61127ce..95606e5 100644 --- a/ihatemoney/templates/forms.html +++ b/ihatemoney/templates/forms.html @@ -85,6 +85,15 @@ {% endmacro %} +{% macro upload_json(form) %} + {% include "display_errors.html" %} + {{ form.hidden_tag() }} + {{ form.file }} +
+ +
+{% endmacro %} + {% macro add_bill(form, edit=False, title=True) %}
-- cgit v1.1