1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-27 07:44:50 +00:00

upgrade django to 3.2

This commit is contained in:
王健辉
2021-08-27 12:01:13 +08:00
parent 45e2dd059a
commit e805feca95
28 changed files with 53 additions and 110 deletions

View File

@@ -5,7 +5,6 @@ except ImportError:
from urllib.parse import urlparse, urlunparse
from functools import wraps
from django.http import HttpResponseRedirect, QueryDict
from django.utils.decorators import available_attrs
from .models import TermsAndConditions
from .middleware import ACCEPT_TERMS_PATH
@@ -15,7 +14,7 @@ def terms_required(view_func):
This decorator checks to see if the user is logged in, and if so, if they have accepted the site terms.
"""
@wraps(view_func, assigned=available_attrs(view_func))
@wraps(view_func)
def _wrapped_view(request, *args, **kwargs):
"""Method to wrap the view passed in"""
if not request.user.is_authenticated or TermsAndConditions.agreed_to_latest(request.user):