diff --git a/cms/djangoapps/api/v1/serializers/course_runs.py b/cms/djangoapps/api/v1/serializers/course_runs.py index 3ba33f1a0793..01074965bbbf 100644 --- a/cms/djangoapps/api/v1/serializers/course_runs.py +++ b/cms/djangoapps/api/v1/serializers/course_runs.py @@ -3,7 +3,7 @@ from django.contrib.auth import get_user_model from django.db import transaction -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from opaque_keys import InvalidKeyError from rest_framework import serializers from rest_framework.fields import empty diff --git a/cms/djangoapps/contentstore/admin.py b/cms/djangoapps/contentstore/admin.py index 013c987f3994..cd70873b4b19 100644 --- a/cms/djangoapps/contentstore/admin.py +++ b/cms/djangoapps/contentstore/admin.py @@ -7,7 +7,7 @@ from config_models.admin import ConfigurationModelAdmin from django.contrib import admin from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from edx_django_utils.admin.mixins import ReadOnlyAdminMixin from cms.djangoapps.contentstore.models import VideoUploadConfig diff --git a/cms/djangoapps/contentstore/course_group_config.py b/cms/djangoapps/contentstore/course_group_config.py index 33ed74f722f2..cf5b1dab508e 100644 --- a/cms/djangoapps/contentstore/course_group_config.py +++ b/cms/djangoapps/contentstore/course_group_config.py @@ -7,7 +7,7 @@ import logging from collections import defaultdict -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from cms.djangoapps.contentstore.utils import reverse_usage_url from common.djangoapps.util.db import MYSQL_MAX_INT, generate_int_id diff --git a/cms/djangoapps/contentstore/course_info_model.py b/cms/djangoapps/contentstore/course_info_model.py index 14d20e3162ef..0d90faa05309 100644 --- a/cms/djangoapps/contentstore/course_info_model.py +++ b/cms/djangoapps/contentstore/course_info_model.py @@ -17,7 +17,7 @@ import re from django.http import HttpResponseBadRequest -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from openedx.core.lib.xblock_utils import get_course_update_items from xmodule.html_module import CourseInfoBlock diff --git a/cms/djangoapps/contentstore/courseware_index.py b/cms/djangoapps/contentstore/courseware_index.py index 8bffd64a1fa8..5d9b627ec02f 100644 --- a/cms/djangoapps/contentstore/courseware_index.py +++ b/cms/djangoapps/contentstore/courseware_index.py @@ -7,8 +7,8 @@ from django.conf import settings from django.urls import resolve -from django.utils.translation import ugettext as _ -from django.utils.translation import ugettext_lazy +from django.utils.translation import gettext as _ +from django.utils.translation import gettext_lazy from eventtracking import tracker from search.search_engine_base import SearchEngine @@ -348,7 +348,7 @@ class CoursewareSearchIndexer(SearchIndexerBase): 'category': 'courseware_index' } - UNNAMED_MODULE_NAME = ugettext_lazy("(Unnamed)") + UNNAMED_MODULE_NAME = gettext_lazy("(Unnamed)") @classmethod def normalize_structure_key(cls, structure_key): diff --git a/cms/djangoapps/contentstore/errors.py b/cms/djangoapps/contentstore/errors.py index b1ad51f87398..7b24c3f535b5 100644 --- a/cms/djangoapps/contentstore/errors.py +++ b/cms/djangoapps/contentstore/errors.py @@ -1,7 +1,7 @@ """ User facing error messages during course import and export """ -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ COURSE_ALREADY_EXIST = _('Aborting import because a course with this id: {} already exists.') COURSE_PERMISSION_DENIED = _('Permission denied. You do not have write access to this course.') diff --git a/cms/djangoapps/contentstore/git_export_utils.py b/cms/djangoapps/contentstore/git_export_utils.py index 67ff7a970957..43c048bf691c 100644 --- a/cms/djangoapps/contentstore/git_export_utils.py +++ b/cms/djangoapps/contentstore/git_export_utils.py @@ -12,7 +12,7 @@ from django.conf import settings from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.utils import timezone -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from xmodule.contentstore.django import contentstore from xmodule.modulestore.django import modulestore diff --git a/cms/djangoapps/contentstore/management/commands/git_export.py b/cms/djangoapps/contentstore/management/commands/git_export.py index 34a2c7cd1be4..d422cbe2b1fc 100644 --- a/cms/djangoapps/contentstore/management/commands/git_export.py +++ b/cms/djangoapps/contentstore/management/commands/git_export.py @@ -17,7 +17,7 @@ import logging from django.core.management.base import BaseCommand, CommandError -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey diff --git a/cms/djangoapps/contentstore/rest_api/v0/serializers/advanced_settings.py b/cms/djangoapps/contentstore/rest_api/v0/serializers/advanced_settings.py index 9a61b32afa17..76694ac618b7 100644 --- a/cms/djangoapps/contentstore/rest_api/v0/serializers/advanced_settings.py +++ b/cms/djangoapps/contentstore/rest_api/v0/serializers/advanced_settings.py @@ -1,7 +1,7 @@ """ Serializers for course advanced settings""" from typing import Type, Dict as DictType -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from rest_framework import serializers from rest_framework.fields import Field as SerializerField from xblock.fields import ( diff --git a/cms/djangoapps/contentstore/rest_api/v0/serializers/tabs.py b/cms/djangoapps/contentstore/rest_api/v0/serializers/tabs.py index 9ee0d2e83719..ad6c1d645e57 100644 --- a/cms/djangoapps/contentstore/rest_api/v0/serializers/tabs.py +++ b/cms/djangoapps/contentstore/rest_api/v0/serializers/tabs.py @@ -1,7 +1,7 @@ """ Serializers for course tabs """ from typing import Dict -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from rest_framework import serializers from xmodule.tabs import CourseTab diff --git a/cms/djangoapps/contentstore/rest_api/v0/views/tabs.py b/cms/djangoapps/contentstore/rest_api/v0/views/tabs.py index 0f6ddd778e19..9e450a13ff0a 100644 --- a/cms/djangoapps/contentstore/rest_api/v0/views/tabs.py +++ b/cms/djangoapps/contentstore/rest_api/v0/views/tabs.py @@ -1,7 +1,7 @@ """ API Views for course tabs """ import edx_api_doc_tools as apidocs -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from opaque_keys.edx.keys import CourseKey from rest_framework import status from rest_framework.request import Request diff --git a/cms/djangoapps/contentstore/signals/signals.py b/cms/djangoapps/contentstore/signals/signals.py index b74eb415fb29..05b7424dcf7c 100644 --- a/cms/djangoapps/contentstore/signals/signals.py +++ b/cms/djangoapps/contentstore/signals/signals.py @@ -8,9 +8,8 @@ # Signal that indicates that a course grading policy has been updated. # This signal is generated when a grading policy change occurs within # modulestore for either course or subsection changes. -GRADING_POLICY_CHANGED = Signal( - providing_args=[ - 'user_id', # Integer User ID - 'course_key', # Unicode string representing the course - ] -) +# providing_args=[ +# 'user_id', # Integer User ID +# 'course_key', # Unicode string representing the course +# ] +GRADING_POLICY_CHANGED = Signal() diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 2e63fd6e2f1f..dabbd9c3dad6 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -9,7 +9,7 @@ from django.conf import settings from django.urls import reverse from django.utils import translation -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from opaque_keys.edx.keys import CourseKey, UsageKey from opaque_keys.edx.locator import LibraryLocator from pytz import UTC diff --git a/cms/djangoapps/contentstore/video_utils.py b/cms/djangoapps/contentstore/video_utils.py index a0b382ebd156..4681b2d98595 100644 --- a/cms/djangoapps/contentstore/video_utils.py +++ b/cms/djangoapps/contentstore/video_utils.py @@ -10,7 +10,7 @@ from django.conf import settings from django.core.files.images import get_image_dimensions from django.core.files.uploadedfile import SimpleUploadedFile -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from edxval.api import get_course_video_image_url, update_video_image # Youtube thumbnail sizes. diff --git a/cms/djangoapps/contentstore/views/assets.py b/cms/djangoapps/contentstore/views/assets.py index 85c3c79ab930..8af706406d3a 100644 --- a/cms/djangoapps/contentstore/views/assets.py +++ b/cms/djangoapps/contentstore/views/assets.py @@ -12,7 +12,7 @@ from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.http import HttpResponseBadRequest, HttpResponseNotFound -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.http import require_http_methods, require_POST from opaque_keys.edx.keys import AssetKey, CourseKey diff --git a/cms/djangoapps/contentstore/views/certificates.py b/cms/djangoapps/contentstore/views/certificates.py index 56f974f99513..353e71fe6289 100644 --- a/cms/djangoapps/contentstore/views/certificates.py +++ b/cms/djangoapps/contentstore/views/certificates.py @@ -30,7 +30,7 @@ from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.http import HttpResponse -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.http import require_http_methods from eventtracking import tracker diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index db965ea2d94e..1bfd5ebc62b4 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -10,7 +10,7 @@ from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.http import Http404, HttpResponseBadRequest -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.decorators.http import require_GET from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import UsageKey diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index 52e1c13db939..ed8e09f8c886 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -22,7 +22,7 @@ from django.http import Http404, HttpResponse, HttpResponseBadRequest, HttpResponseNotFound from django.shortcuts import redirect from django.urls import reverse -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.http import require_GET, require_http_methods from edx_django_utils.monitoring import function_trace diff --git a/cms/djangoapps/contentstore/views/entrance_exam.py b/cms/djangoapps/contentstore/views/entrance_exam.py index 308e216e5af0..361a728b41af 100644 --- a/cms/djangoapps/contentstore/views/entrance_exam.py +++ b/cms/djangoapps/contentstore/views/entrance_exam.py @@ -10,7 +10,7 @@ from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import HttpResponse, HttpResponseBadRequest -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.decorators.csrf import ensure_csrf_cookie from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey, UsageKey diff --git a/cms/djangoapps/contentstore/views/export_git.py b/cms/djangoapps/contentstore/views/export_git.py index e86943f96abf..aec75f37ef05 100644 --- a/cms/djangoapps/contentstore/views/export_git.py +++ b/cms/djangoapps/contentstore/views/export_git.py @@ -8,7 +8,7 @@ from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.decorators.csrf import ensure_csrf_cookie from opaque_keys.edx.keys import CourseKey diff --git a/cms/djangoapps/contentstore/views/helpers.py b/cms/djangoapps/contentstore/views/helpers.py index 6926b45f932a..ac114bfd371c 100644 --- a/cms/djangoapps/contentstore/views/helpers.py +++ b/cms/djangoapps/contentstore/views/helpers.py @@ -7,7 +7,7 @@ from django.conf import settings from django.http import HttpResponse -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from opaque_keys.edx.keys import UsageKey from xblock.core import XBlock from xmodule.modulestore.django import modulestore diff --git a/cms/djangoapps/contentstore/views/import_export.py b/cms/djangoapps/contentstore/views/import_export.py index 13c7e711cf2b..032a05b65166 100644 --- a/cms/djangoapps/contentstore/views/import_export.py +++ b/cms/djangoapps/contentstore/views/import_export.py @@ -19,7 +19,7 @@ from django.core.files.storage import FileSystemStorage from django.db import transaction from django.http import Http404, HttpResponse, HttpResponseNotFound, StreamingHttpResponse -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.http import require_GET, require_http_methods from edx_django_utils.monitoring import set_custom_attribute, set_custom_attributes_for_course_key diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index bc5cbb915887..5036723cd3c1 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -11,7 +11,7 @@ from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.core.exceptions import PermissionDenied from django.http import Http404, HttpResponse, HttpResponseBadRequest -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.decorators.http import require_http_methods from edx_proctoring.api import ( does_backend_support_onboarding, diff --git a/cms/djangoapps/contentstore/views/library.py b/cms/djangoapps/contentstore/views/library.py index b065e3e4cd89..77a2677ca0d7 100644 --- a/cms/djangoapps/contentstore/views/library.py +++ b/cms/djangoapps/contentstore/views/library.py @@ -11,7 +11,7 @@ from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.http import Http404, HttpResponseForbidden, HttpResponseNotAllowed -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.http import require_http_methods from opaque_keys import InvalidKeyError diff --git a/cms/djangoapps/contentstore/views/preview.py b/cms/djangoapps/contentstore/views/preview.py index 35bec14c3f05..be7453ced5cb 100644 --- a/cms/djangoapps/contentstore/views/preview.py +++ b/cms/djangoapps/contentstore/views/preview.py @@ -7,7 +7,7 @@ from django.contrib.auth.decorators import login_required from django.http import Http404, HttpResponseBadRequest from django.urls import reverse -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.decorators.clickjacking import xframe_options_exempt from opaque_keys.edx.keys import UsageKey from web_fragments.fragment import Fragment diff --git a/cms/djangoapps/contentstore/views/public.py b/cms/djangoapps/contentstore/views/public.py index 90db9ef47934..46799a8f848d 100644 --- a/cms/djangoapps/contentstore/views/public.py +++ b/cms/djangoapps/contentstore/views/public.py @@ -5,7 +5,7 @@ from django.conf import settings from django.shortcuts import redirect -from django.utils.http import urlquote_plus +from urllib.parse import quote_plus from waffle.decorators import waffle_switch from common.djangoapps.edxmako.shortcuts import render_to_response @@ -47,7 +47,7 @@ def _build_next_param(request): # Warning: do not use `build_absolute_uri` when `next_url` is empty because `build_absolute_uri` would # build use the login url for the next url, which would cause a login redirect loop. absolute_next_url = request.build_absolute_uri(next_url) - return '?next=' + urlquote_plus(absolute_next_url) + return '?next=' + quote_plus(absolute_next_url) return '' diff --git a/cms/djangoapps/contentstore/views/tests/test_course_index.py b/cms/djangoapps/contentstore/views/tests/test_course_index.py index b2182b9ec913..eb1ae36d31ab 100644 --- a/cms/djangoapps/contentstore/views/tests/test_course_index.py +++ b/cms/djangoapps/contentstore/views/tests/test_course_index.py @@ -14,7 +14,7 @@ from django.conf import settings from django.core.exceptions import PermissionDenied from django.test.utils import override_settings -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from opaque_keys.edx.locator import CourseLocator from search.api import perform_search diff --git a/cms/djangoapps/contentstore/views/transcript_settings.py b/cms/djangoapps/contentstore/views/transcript_settings.py index eb98ff9aaf6a..02846c05a4f3 100644 --- a/cms/djangoapps/contentstore/views/transcript_settings.py +++ b/cms/djangoapps/contentstore/views/transcript_settings.py @@ -9,7 +9,7 @@ from django.contrib.auth.decorators import login_required from django.core.files.base import ContentFile from django.http import HttpResponse, HttpResponseNotFound -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.decorators.http import require_GET, require_http_methods, require_POST from edxval.api import ( create_or_update_video_transcript, diff --git a/cms/djangoapps/contentstore/views/transcripts_ajax.py b/cms/djangoapps/contentstore/views/transcripts_ajax.py index d0d4f2ce07e7..fe4435d0be97 100644 --- a/cms/djangoapps/contentstore/views/transcripts_ajax.py +++ b/cms/djangoapps/contentstore/views/transcripts_ajax.py @@ -18,7 +18,7 @@ from django.core.exceptions import PermissionDenied from django.core.files.base import ContentFile from django.http import Http404, HttpResponse -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from edxval.api import create_external_video, create_or_update_video_transcript from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import UsageKey diff --git a/cms/djangoapps/contentstore/views/user.py b/cms/djangoapps/contentstore/views/user.py index 78532e3bf8e8..1feb1bfe04ad 100644 --- a/cms/djangoapps/contentstore/views/user.py +++ b/cms/djangoapps/contentstore/views/user.py @@ -5,7 +5,7 @@ from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.core.exceptions import PermissionDenied from django.http import HttpResponseNotFound -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.http import require_http_methods, require_POST from opaque_keys.edx.keys import CourseKey diff --git a/cms/djangoapps/contentstore/views/videos.py b/cms/djangoapps/contentstore/views/videos.py index 920d457ecf34..f7b0d91dc3d3 100644 --- a/cms/djangoapps/contentstore/views/videos.py +++ b/cms/djangoapps/contentstore/views/videos.py @@ -18,8 +18,8 @@ from django.contrib.staticfiles.storage import staticfiles_storage from django.http import FileResponse, HttpResponseNotFound from django.urls import reverse -from django.utils.translation import ugettext as _ -from django.utils.translation import ugettext_noop +from django.utils.translation import gettext as _ +from django.utils.translation import gettext_noop from django.views.decorators.http import require_GET, require_http_methods, require_POST from edx_toggles.toggles import LegacyWaffleFlagNamespace, LegacyWaffleSwitchNamespace from edxval.api import ( @@ -117,37 +117,37 @@ class StatusDisplayStrings: """ # Translators: This is the status of an active video upload - _UPLOADING = ugettext_noop("Uploading") + _UPLOADING = gettext_noop("Uploading") # Translators: This is the status for a video that the servers are currently processing - _IN_PROGRESS = ugettext_noop("In Progress") + _IN_PROGRESS = gettext_noop("In Progress") # Translators: This is the status for a video that the servers have successfully processed - _COMPLETE = ugettext_noop("Ready") + _COMPLETE = gettext_noop("Ready") # Translators: This is the status for a video that is uploaded completely - _UPLOAD_COMPLETED = ugettext_noop("Uploaded") + _UPLOAD_COMPLETED = gettext_noop("Uploaded") # Translators: This is the status for a video that the servers have failed to process - _FAILED = ugettext_noop("Failed") + _FAILED = gettext_noop("Failed") # Translators: This is the status for a video that is cancelled during upload by user - _CANCELLED = ugettext_noop("Cancelled") + _CANCELLED = gettext_noop("Cancelled") # Translators: This is the status for a video which has failed # due to being flagged as a duplicate by an external or internal CMS - _DUPLICATE = ugettext_noop("Failed Duplicate") + _DUPLICATE = gettext_noop("Failed Duplicate") # Translators: This is the status for a video which has duplicate token for youtube - _YOUTUBE_DUPLICATE = ugettext_noop("YouTube Duplicate") + _YOUTUBE_DUPLICATE = gettext_noop("YouTube Duplicate") # Translators: This is the status for a video for which an invalid # processing token was provided in the course settings - _INVALID_TOKEN = ugettext_noop("Invalid Token") + _INVALID_TOKEN = gettext_noop("Invalid Token") # Translators: This is the status for a video that was included in a course import - _IMPORTED = ugettext_noop("Imported") + _IMPORTED = gettext_noop("Imported") # Translators: This is the status for a video that is in an unknown state - _UNKNOWN = ugettext_noop("Unknown") + _UNKNOWN = gettext_noop("Unknown") # Translators: This is the status for a video that is having its transcription in progress on servers - _TRANSCRIPTION_IN_PROGRESS = ugettext_noop("Transcription in Progress") + _TRANSCRIPTION_IN_PROGRESS = gettext_noop("Transcription in Progress") # Translators: This is the status for a video whose transcription is complete - _TRANSCRIPT_READY = ugettext_noop("Transcript Ready") + _TRANSCRIPT_READY = gettext_noop("Transcript Ready") # Translators: This is the status for a video whose transcription job was failed for some languages - _PARTIAL_FAILURE = ugettext_noop("Partial Failure") + _PARTIAL_FAILURE = gettext_noop("Partial Failure") # Translators: This is the status for a video whose transcription job has failed altogether - _TRANSCRIPT_FAILED = ugettext_noop("Transcript Failed") + _TRANSCRIPT_FAILED = gettext_noop("Transcript Failed") _STATUS_MAP = { "upload": _UPLOADING, diff --git a/cms/djangoapps/course_creators/models.py b/cms/djangoapps/course_creators/models.py index 9940ee026cde..cd8d066e3680 100644 --- a/cms/djangoapps/course_creators/models.py +++ b/cms/djangoapps/course_creators/models.py @@ -8,17 +8,20 @@ from django.dispatch import Signal, receiver from django.utils import timezone -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from organizations.models import Organization # A signal that will be sent when users should be added or removed from the creator group -update_creator_state = Signal(providing_args=["caller", "user", "state", "organizations"]) +# providing_args=["caller", "user", "state", "organizations"] +update_creator_state = Signal() # A signal that will be sent when admin should be notified of a pending user request -send_admin_notification = Signal(providing_args=["user"]) +# providing_args=["user"] +send_admin_notification = Signal() # A signal that will be sent when user should be notified of change in course creator privileges -send_user_notification = Signal(providing_args=["user", "state"]) +# providing_args=["user", "state"] +send_user_notification = Signal() class CourseCreator(models.Model): diff --git a/cms/djangoapps/maintenance/views.py b/cms/djangoapps/maintenance/views.py index da60ec5e5eec..d57099000ef8 100644 --- a/cms/djangoapps/maintenance/views.py +++ b/cms/djangoapps/maintenance/views.py @@ -9,7 +9,7 @@ from django.db import transaction from django.urls import reverse, reverse_lazy from django.utils.decorators import method_decorator -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.generic import View from django.views.generic.edit import CreateView, DeleteView, UpdateView from django.views.generic.list import ListView diff --git a/cms/djangoapps/models/settings/course_metadata.py b/cms/djangoapps/models/settings/course_metadata.py index 9477bdc7f6c9..780aaafb9f4f 100644 --- a/cms/djangoapps/models/settings/course_metadata.py +++ b/cms/djangoapps/models/settings/course_metadata.py @@ -9,7 +9,7 @@ import pytz from django.conf import settings from django.core.exceptions import ValidationError -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from xblock.fields import Scope from cms.djangoapps.contentstore import toggles diff --git a/cms/envs/bok_choy.py b/cms/envs/bok_choy.py index 34f5ee641370..bd8a84298cb4 100644 --- a/cms/envs/bok_choy.py +++ b/cms/envs/bok_choy.py @@ -15,7 +15,7 @@ import logging import os -from django.utils.translation import ugettext_lazy +from django.utils.translation import gettext_lazy from path import Path as path from openedx.core.release import RELEASE_LINE @@ -63,10 +63,10 @@ # Capture the console log via template includes, until webdriver supports log capture again CAPTURE_CONSOLE_LOG = True -PLATFORM_NAME = ugettext_lazy("Γ©dX") -PLATFORM_DESCRIPTION = ugettext_lazy("Open Γ©dX Platform") -STUDIO_NAME = ugettext_lazy("Your Platform 𝓒𝓽𝓾𝓭𝓲𝓸") -STUDIO_SHORT_NAME = ugettext_lazy("𝓒𝓽𝓾𝓭𝓲𝓸") +PLATFORM_NAME = gettext_lazy("Γ©dX") +PLATFORM_DESCRIPTION = gettext_lazy("Open Γ©dX Platform") +STUDIO_NAME = gettext_lazy("Your Platform 𝓒𝓽𝓾𝓭𝓲𝓸") +STUDIO_SHORT_NAME = gettext_lazy("𝓒𝓽𝓾𝓭𝓲𝓸") ############################ STATIC FILES ############################# diff --git a/cms/envs/test.py b/cms/envs/test.py index 498887256769..772be14a2592 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -16,7 +16,7 @@ import os from uuid import uuid4 -from django.utils.translation import ugettext_lazy +from django.utils.translation import gettext_lazy from path import Path as path from openedx.core.lib.derived import derive_settings @@ -46,8 +46,8 @@ # Include a non-ascii character in STUDIO_NAME and STUDIO_SHORT_NAME to uncover possible # UnicodeEncodeErrors in tests. Also use lazy text to reveal possible json dumps errors -STUDIO_NAME = ugettext_lazy("Your Platform 𝓒𝓽𝓾𝓭𝓲𝓸") -STUDIO_SHORT_NAME = ugettext_lazy("𝓒𝓽𝓾𝓭𝓲𝓸") +STUDIO_NAME = gettext_lazy("Your Platform 𝓒𝓽𝓾𝓭𝓲𝓸") +STUDIO_SHORT_NAME = gettext_lazy("𝓒𝓽𝓾𝓭𝓲𝓸") # Allow all hosts during tests, we use a lot of different ones all over the codebase. ALLOWED_HOSTS = [ diff --git a/cms/urls.py b/cms/urls.py index d82cece189e3..05e4afc1d2f3 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -6,7 +6,7 @@ from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib.admin import autodiscover as django_autodiscover -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from auth_backends.urls import oauth2_urlpatterns from edx_api_doc_tools import make_docs_urls from ratelimitbackend import admin