X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/2f9cb34a07fcd98effda2fa900e48c31813f14c8..2babb45aa286a7f64a3580a060a234a60c3d4d5a:/apps/dvcs/storage.py diff --git a/apps/dvcs/storage.py b/apps/dvcs/storage.py index 4bf292bc..045b780a 100755 --- a/apps/dvcs/storage.py +++ b/apps/dvcs/storage.py @@ -1,7 +1,11 @@ +# -*- coding: utf-8 -*- +# +# This file is part of MIL/PEER, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from __future__ import unicode_literals -import os -from django.core.files.base import ContentFile, File +from django.core.files.base import ContentFile from django.core.files.storage import FileSystemStorage try: @@ -32,7 +36,7 @@ class GzipFileSystemStorage(FileSystemStorage): content = ContentFile(compress(content.read())) return super(GzipFileSystemStorage, self)._save(name, content) - def get_available_name(self, name): + def get_available_name(self, name, max_length=None): if self.exists(name): self.delete(name) - return name \ No newline at end of file + return name