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)