From 9709e6a2593f1579bb5a3f44fab2f550eaf123f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Tue, 21 Jun 2016 13:44:00 +0200 Subject: [PATCH] Enhancement#4356: Add gzipped dumps import support --- CHANGELOG.md | 4 +++- taiga/export_import/api.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4bdf62a..76ed1d66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,9 @@ - Add a new permissions to allow add comments instead of use the existent modify permission for this purpose. - Include created, modified and finished dates for tasks in CSV reports - User stories and tasks listing API call support extra params to include more data (tasks and attachemnts and attachments, respectively) - +- Import/Export: + - Gzip export/import support. + - Export performance improvements. ### Misc - [API] Improve performance of some calls over list. diff --git a/taiga/export_import/api.py b/taiga/export_import/api.py index a8a1dddd..d8453ad5 100644 --- a/taiga/export_import/api.py +++ b/taiga/export_import/api.py @@ -318,6 +318,9 @@ class ProjectImporterViewSet(mixins.ImportThrottlingPolicyMixin, CreateModelMixi if not dump: raise exc.WrongArguments(_("Needed dump file")) + if dump.content_type == "application/gzip": + dump = gzip.GzipFile(fileobj=dump) + reader = codecs.getreader("utf-8") try: