1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 07:08:55 +00:00

upgrade django to 2.2 (#4620)

This commit is contained in:
王健辉
2020-07-27 14:59:18 +08:00
committed by GitHub
parent e55a602d57
commit 21756be27c
223 changed files with 270 additions and 270 deletions

View File

@@ -1,4 +1,6 @@
"""Terms and Conditions Middleware"""
from django.utils.deprecation import MiddlewareMixin
from .models import TermsAndConditions
from django.conf import settings
import logging
@@ -12,7 +14,7 @@ TERMS_EXCLUDE_URL_PREFIX_LIST = getattr(settings, 'TERMS_EXCLUDE_URL_PREFIX_LIST
TERMS_EXCLUDE_URL_LIST = getattr(settings, 'TERMS_EXCLUDE_URL_LIST', {'/termsrequired/', '/accounts/logout/', '/securetoo/'})
class TermsAndConditionsRedirectMiddleware(object):
class TermsAndConditionsRedirectMiddleware(MiddlewareMixin):
"""
This middleware checks to see if the user is logged in, and if so,
if they have accepted the site terms.