requirements: Upgrade django-sendfile2 from 0.4.3 to 0.5.1.

The module was renamed from sendfile to django_sendfile.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2020-02-04 22:27:45 -08:00
committed by Tim Abbott
parent b8f01f9cda
commit 4d49a20430
7 changed files with 10 additions and 10 deletions

View File

@@ -258,8 +258,8 @@ django-phonenumber-field==1.3.0 \
django-pylibmc==0.6.1 \
--hash=sha256:02b591933a029eb552388cced713028f3c6cbb021639fc8de388bd1ca87981d4 \
--hash=sha256:9cffdee703aaf9ebc029d9dbdee8abdd0723564b95e4b2ac59e4a668b8e58f93
django-sendfile2==0.4.3 \
--hash=sha256:267cdd817a5fe7e649df9139ac3efbe8675c61ccdab43146d1e8cbd9bab70554
django-sendfile2==0.5.1 \
--hash=sha256:695c635bdc26fe35e22565f046c92126a03fafb587e11415baec6da9df1be04e
django-statsd-mozilla==0.4.0 \
--hash=sha256:0d87cb63de8107279cbb748caad9aa74c6a44e7e96ccc5dbf07b89f77285a4b8 \
--hash=sha256:81084f3d426f5184f0a0f1dbfe035cc26b66f041d2184559d916a228d856f0d3

View File

@@ -178,8 +178,8 @@ django-phonenumber-field==1.3.0 \
django-pylibmc==0.6.1 \
--hash=sha256:02b591933a029eb552388cced713028f3c6cbb021639fc8de388bd1ca87981d4 \
--hash=sha256:9cffdee703aaf9ebc029d9dbdee8abdd0723564b95e4b2ac59e4a668b8e58f93
django-sendfile2==0.4.3 \
--hash=sha256:267cdd817a5fe7e649df9139ac3efbe8675c61ccdab43146d1e8cbd9bab70554
django-sendfile2==0.5.1 \
--hash=sha256:695c635bdc26fe35e22565f046c92126a03fafb587e11415baec6da9df1be04e
django-statsd-mozilla==0.4.0 \
--hash=sha256:0d87cb63de8107279cbb748caad9aa74c6a44e7e96ccc5dbf07b89f77285a4b8 \
--hash=sha256:81084f3d426f5184f0a0f1dbfe035cc26b66f041d2184559d916a228d856f0d3

View File

@@ -26,4 +26,4 @@ LATEST_RELEASE_ANNOUNCEMENT = "https://blog.zulip.org/2019/12/13/zulip-2-1-relea
# historical commits sharing the same major version, in which case a
# minor version bump suffices.
PROVISION_VERSION = '69.1'
PROVISION_VERSION = '70.0'

View File

@@ -56,7 +56,7 @@ import shutil
import re
import datetime
from django.utils.timezone import now as timezone_now
from sendfile import _get_sendfile
from django_sendfile.sendfile import _get_sendfile
def destroy_uploads() -> None:
if os.path.exists(settings.LOCAL_UPLOADS_DIR):
@@ -688,7 +688,7 @@ class FileUploadTest(UploadSerializeMixin, ZulipTestCase):
def test_serve_local(self) -> None:
def check_xsend_links(name: str, name_str_for_test: str,
content_disposition: str='') -> None:
with self.settings(SENDFILE_BACKEND='sendfile.backends.nginx'):
with self.settings(SENDFILE_BACKEND='django_sendfile.backends.nginx'):
_get_sendfile.clear() # To clearout cached version of backend from djangosendfile
self.login(self.example_email("hamlet"))
fp = StringIO("zulip!")

View File

@@ -9,7 +9,7 @@ from zerver.lib.upload import upload_message_image_from_request, get_local_file_
get_signed_upload_url, check_upload_within_quota, INLINE_MIME_TYPES
from zerver.models import UserProfile, validate_attachment_request
from django.conf import settings
from sendfile import sendfile
from django_sendfile import sendfile
from mimetypes import guess_type
def serve_s3(request: HttpRequest, url_path: str) -> HttpResponse:

View File

@@ -88,7 +88,7 @@ TWO_FACTOR_CALL_GATEWAY = 'two_factor.gateways.fake.Fake'
TWO_FACTOR_SMS_GATEWAY = 'two_factor.gateways.fake.Fake'
# Make sendfile use django to serve files in development
SENDFILE_BACKEND = 'sendfile.backends.development'
SENDFILE_BACKEND = 'django_sendfile.backends.development'
# Set this True to send all hotspots in development
ALWAYS_SEND_ALL_HOTSPOTS = False # type: bool

View File

@@ -431,7 +431,7 @@ S3_SECRET_KEY = get_secret("s3_secret_key")
if LOCAL_UPLOADS_DIR is not None:
if SENDFILE_BACKEND is None:
SENDFILE_BACKEND = 'sendfile.backends.nginx'
SENDFILE_BACKEND = 'django_sendfile.backends.nginx'
SENDFILE_ROOT = os.path.join(LOCAL_UPLOADS_DIR, "files")
SENDFILE_URL = '/serve_uploads'