diff --git a/tutor/templates/apps/openedx/settings/partials/common_all.py b/tutor/templates/apps/openedx/settings/partials/common_all.py index c9b747a89f..749f33420e 100644 --- a/tutor/templates/apps/openedx/settings/partials/common_all.py +++ b/tutor/templates/apps/openedx/settings/partials/common_all.py @@ -149,9 +149,16 @@ # These warnings are visible in simple commands and init tasks import warnings -from django.utils.deprecation import RemovedInDjango40Warning, RemovedInDjango41Warning -warnings.filterwarnings("ignore", category=RemovedInDjango40Warning) -warnings.filterwarnings("ignore", category=RemovedInDjango41Warning) + +try: + from django.utils.deprecation import RemovedInDjango50Warning, RemovedInDjango51Warning + warnings.filterwarnings("ignore", category=RemovedInDjango50Warning) + warnings.filterwarnings("ignore", category=RemovedInDjango51Warning) +except ImportError: + from django.utils.deprecation import RemovedInDjango40Warning, RemovedInDjango41Warning + warnings.filterwarnings("ignore", category=RemovedInDjango40Warning) + warnings.filterwarnings("ignore", category=RemovedInDjango41Warning) + warnings.filterwarnings("ignore", category=DeprecationWarning, module="wiki.plugins.links.wiki_plugin") warnings.filterwarnings("ignore", category=DeprecationWarning, module="boto.plugin") warnings.filterwarnings("ignore", category=DeprecationWarning, module="botocore.vendored.requests.packages.urllib3._collections")