'django.contrib.auth.middleware.AuthenticationMiddleware'
if "django.contrib.auth" in INSTALLED_APPS else None,
'django_cas.middleware.CASMiddleware'
if "django_cas" in INSTALLED_APPS else None,
'django.contrib.messages.middleware.MessageMiddleware'
if "django.contrib.messages" in INSTALLED_APPS else None,
'django.contrib.auth.middleware.AuthenticationMiddleware'
if "django.contrib.auth" in INSTALLED_APPS else None,
'django_cas.middleware.CASMiddleware'
if "django_cas" in INSTALLED_APPS else None,
'django.contrib.messages.middleware.MessageMiddleware'
if "django.contrib.messages" in INSTALLED_APPS else None,