diff options
author | Akihiro Motoki <amotoki@gmail.com> | 2021-02-24 21:16:30 +0900 |
---|---|---|
committer | Vishal Manchanda <manchandavishal143@gmail.com> | 2021-09-14 12:54:01 +0000 |
commit | 6dfcb901314476df95028bdc7aa536809fb1d127 (patch) | |
tree | 4796cca94725c57317ab176441eb5642cc286ccb /openstack_dashboard | |
parent | 420eaa5bace41a5d7a5313e5bd17e730d701c273 (diff) | |
download | horizon-6dfcb901314476df95028bdc7aa536809fb1d127.tar.gz |
Support Django 3.0 and 3.1 support (1)
* Django 3.0 dropped django.utils.decorators.available_attrs()
in favor of functools.WRAPPER_ASSIGNMENTS.
* Django 3.0 dropped django.utils.functional.curry()
in favor of functools.partial() or functools.partialmethod().
https://docs.djangoproject.com/en/3.1/releases/3.0/#removed-private-python-2-compatibility-apis
Change-Id: I4ab0e720a8ffe13a08f5e607a59e39f252338b90
Diffstat (limited to 'openstack_dashboard')
-rw-r--r-- | openstack_dashboard/api/rest/utils.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/openstack_dashboard/api/rest/utils.py b/openstack_dashboard/api/rest/utils.py index a9bc3ea55..8073ffa4a 100644 --- a/openstack_dashboard/api/rest/utils.py +++ b/openstack_dashboard/api/rest/utils.py @@ -17,7 +17,6 @@ import logging from django.conf import settings from django import http -from django.utils import decorators from oslo_serialization import jsonutils @@ -104,7 +103,7 @@ def ajax(authenticated=True, data_required=False, def decorator(function, authenticated=authenticated, data_required=data_required): @functools.wraps(function, - assigned=decorators.available_attrs(function)) + assigned=functools.WRAPPER_ASSIGNMENTS) def _wrapped(self, request, *args, **kw): if authenticated and not request.user.is_authenticated: return JSONResponse('not logged in', 401) |