From 9d2ff30a6d5544db38b2d9522728add3cebe19ef Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 21 Aug 2018 13:34:07 +0000 Subject: [PATCH] opti --- djing/lib/decorators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djing/lib/decorators.py b/djing/lib/decorators.py index f7c2aad..0e5221e 100644 --- a/djing/lib/decorators.py +++ b/djing/lib/decorators.py @@ -17,7 +17,7 @@ def require_ssl(view): def wrapper(request, *args, **kwargs): debug = getattr(settings, 'DEBUG', False) if not debug and not request.is_secure(): - target_url = "https://" + request.META['HTTP_HOST'] + request.path_info + target_url = "https://%s%s" % (request.META['HTTP_HOST'], request.path_info) return HttpResponseRedirect(target_url) return view(request, *args, **kwargs)