From 3157151d835377a4ddf80d5514ea1edc0a2a8203 Mon Sep 17 00:00:00 2001 From: Patrick Altman Date: Tue, 28 Apr 2020 21:37:23 -0500 Subject: [PATCH] Fix a 3.0 compat issue --- account/decorators.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/account/decorators.py b/account/decorators.py index 9127f84c..a4fa4a4e 100644 --- a/account/decorators.py +++ b/account/decorators.py @@ -1,7 +1,6 @@ import functools from django.contrib.auth import REDIRECT_FIELD_NAME -from django.utils.decorators import available_attrs from account.utils import handle_redirect_to_login @@ -12,7 +11,7 @@ def login_required(func=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url to the log in page if necessary. """ def decorator(view_func): - @functools.wraps(view_func, assigned=available_attrs(view_func)) + @functools.wraps(view_func, assigned=functools.WRAPPER_ASSIGNMENTS) def _wrapped_view(request, *args, **kwargs): if request.user.is_authenticated: return view_func(request, *args, **kwargs)