Upgrade to Django 3.0 and other dependencies (#1568)

* Upgrade Django to 3.0 and other dependencies to recent versions

* Fix otp version contsraint

* Remove six dependency

* Resolve some warnings

* Fix failing tests

* Update django-countries

* Resolve all RemovedInDjango31Warnings in test suite

* Run isort

* Fix import

* Update PostgreSQL version on travis
This commit is contained in:
Raphael Michel
2020-03-23 15:02:20 +01:00
committed by GitHub
parent 7e9c9beace
commit af23d6e4bf
174 changed files with 380 additions and 380 deletions

View File

@@ -6,7 +6,6 @@ from itertools import groupby
from django.conf import settings
from django.db.models import Prefetch, Sum
from django.utils.decorators import available_attrs
from django.utils.functional import cached_property
from django.utils.timezone import now
from django_scopes import scopes_disabled
@@ -282,7 +281,7 @@ def allow_frame_if_namespaced(view_func):
if request.resolver_match and request.resolver_match.kwargs.get('cart_namespace'):
resp.xframe_options_exempt = True
return resp
return wraps(view_func, assigned=available_attrs(view_func))(wrapped_view)
return wraps(view_func)(wrapped_view)
def allow_cors_if_namespaced(view_func):
@@ -295,7 +294,7 @@ def allow_cors_if_namespaced(view_func):
if request.resolver_match and request.resolver_match.kwargs.get('cart_namespace'):
resp['Access-Control-Allow-Origin'] = '*'
return resp
return wraps(view_func, assigned=available_attrs(view_func))(wrapped_view)
return wraps(view_func)(wrapped_view)
def iframe_entry_view_wrapper(view_func):
@@ -321,4 +320,4 @@ def iframe_entry_view_wrapper(view_func):
resp = view_func(request, *args, **kwargs)
return resp
return wraps(view_func, assigned=available_attrs(view_func))(wrapped_view)
return wraps(view_func)(wrapped_view)