Merge pull request #766 from taigaio/enhancement/4356/import-gzipped-jsons

Enhancement#4356: Add gzipped dumps import support
remotes/origin/issue/4795/notification_even_they_are_disabled
Alejandro 2016-06-28 09:30:59 +02:00 committed by GitHub
commit 3cadc652ed
2 changed files with 6 additions and 1 deletions

View File

@ -18,7 +18,9 @@
- Add a new permissions to allow add comments instead of use the existent modify permission for this purpose. - 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 - 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) - 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 ### Misc
- [API] Improve performance of some calls over list. - [API] Improve performance of some calls over list.

View File

@ -318,6 +318,9 @@ class ProjectImporterViewSet(mixins.ImportThrottlingPolicyMixin, CreateModelMixi
if not dump: if not dump:
raise exc.WrongArguments(_("Needed dump file")) raise exc.WrongArguments(_("Needed dump file"))
if dump.content_type == "application/gzip":
dump = gzip.GzipFile(fileobj=dump)
reader = codecs.getreader("utf-8") reader = codecs.getreader("utf-8")
try: try: