Enhancement#4356: Add gzipped dumps import support

remotes/origin/issue/4795/notification_even_they_are_disabled
Jesús Espino 2016-06-21 13:44:00 +02:00 committed by Alejandro Alonso
parent 941ab5bd9b
commit 9709e6a259
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: