From 247bb50ed2699c9e723f32cfe64f351fef030a44 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 5 Jun 2018 13:18:40 -0400 Subject: [PATCH] s/django.core.urlresolvers/django.urls/g Django 1.10 deprecation fix for Hackathon XIX Addresses PLAT-1397 --- cms/djangoapps/api/v1/tests/test_views/test_course_runs.py | 2 +- cms/djangoapps/cms_user_tasks/signals.py | 2 +- cms/djangoapps/cms_user_tasks/tests.py | 2 +- cms/djangoapps/contentstore/api/tests/test_views.py | 2 +- cms/djangoapps/contentstore/courseware_index.py | 2 +- cms/djangoapps/contentstore/tests/test_course_create_rerun.py | 2 +- cms/djangoapps/contentstore/tests/test_request_event.py | 2 +- cms/djangoapps/contentstore/tests/tests.py | 2 +- cms/djangoapps/contentstore/utils.py | 2 +- cms/djangoapps/contentstore/views/course.py | 2 +- cms/djangoapps/contentstore/views/preview.py | 2 +- cms/djangoapps/contentstore/views/public.py | 2 +- cms/djangoapps/contentstore/views/tests/test_item.py | 2 +- cms/djangoapps/contentstore/views/tests/test_organizations.py | 2 +- .../contentstore/views/tests/test_transcript_settings.py | 2 +- cms/djangoapps/contentstore/views/tests/test_transcripts.py | 2 +- cms/djangoapps/contentstore/views/videos.py | 2 +- cms/djangoapps/course_creators/tests/test_views.py | 2 +- cms/djangoapps/maintenance/tests.py | 2 +- cms/lib/xblock/runtime.py | 2 +- cms/templates/accessibility.html | 2 +- cms/templates/asset_index.html | 2 +- cms/templates/course-create-rerun.html | 2 +- cms/templates/edit-tabs.html | 2 +- cms/templates/error.html | 2 +- cms/templates/export_git.html | 2 +- cms/templates/howitworks.html | 2 +- cms/templates/html_error.html | 2 +- cms/templates/login.html | 2 +- cms/templates/maintenance/base.html | 2 +- cms/templates/maintenance/container.html | 2 +- cms/templates/maintenance/index.html | 2 +- cms/templates/manage_users.html | 2 +- cms/templates/manage_users_lib.html | 2 +- cms/templates/register.html | 2 +- cms/templates/registration/activation_complete.html | 2 +- cms/templates/registration/activation_invalid.html | 2 +- cms/templates/widgets/footer.html | 2 +- cms/templates/widgets/header.html | 2 +- cms/templates/widgets/user_dropdown.html | 4 ++-- common/djangoapps/course_modes/tests/test_admin.py | 2 +- common/djangoapps/course_modes/tests/test_views.py | 2 +- common/djangoapps/course_modes/views.py | 2 +- common/djangoapps/edxmako/shortcuts.py | 2 +- common/djangoapps/edxmako/tests.py | 2 +- common/djangoapps/enrollment/tests/test_views.py | 2 +- common/djangoapps/entitlements/api/v1/tests/test_views.py | 2 +- .../microsite_configuration/tests/backends/test_filebased.py | 2 +- common/djangoapps/student/cookies.py | 2 +- common/djangoapps/student/forms.py | 2 +- common/djangoapps/student/helpers.py | 2 +- common/djangoapps/student/tests/test_activate_account.py | 2 +- common/djangoapps/student/tests/test_admin_views.py | 2 +- common/djangoapps/student/tests/test_bulk_email_settings.py | 2 +- common/djangoapps/student/tests/test_certificates.py | 2 +- .../djangoapps/student/tests/test_configuration_overrides.py | 2 +- common/djangoapps/student/tests/test_cookies.py | 2 +- common/djangoapps/student/tests/test_create_account.py | 2 +- common/djangoapps/student/tests/test_credit.py | 2 +- common/djangoapps/student/tests/test_email.py | 2 +- common/djangoapps/student/tests/test_enrollment.py | 2 +- common/djangoapps/student/tests/test_helpers.py | 2 +- common/djangoapps/student/tests/test_login.py | 2 +- .../djangoapps/student/tests/test_login_registration_forms.py | 2 +- common/djangoapps/student/tests/test_long_username_email.py | 2 +- common/djangoapps/student/tests/test_password_policy.py | 2 +- common/djangoapps/student/tests/test_recent_enrollments.py | 2 +- common/djangoapps/student/tests/test_refunds.py | 2 +- common/djangoapps/student/tests/test_reset_password.py | 2 +- common/djangoapps/student/tests/test_retirement.py | 2 +- common/djangoapps/student/tests/test_userstanding.py | 2 +- common/djangoapps/student/tests/test_verification_status.py | 2 +- common/djangoapps/student/tests/test_views.py | 2 +- common/djangoapps/student/tests/tests.py | 2 +- common/djangoapps/student/views/dashboard.py | 2 +- common/djangoapps/student/views/login.py | 2 +- common/djangoapps/student/views/management.py | 2 +- common/djangoapps/third_party_auth/admin.py | 2 +- common/djangoapps/third_party_auth/api/tests/test_views.py | 2 +- common/djangoapps/third_party_auth/decorators.py | 1 - common/djangoapps/third_party_auth/pipeline.py | 2 +- common/djangoapps/third_party_auth/tests/specs/base.py | 2 +- common/djangoapps/third_party_auth/tests/specs/test_google.py | 2 +- common/djangoapps/third_party_auth/tests/specs/test_lti.py | 2 +- common/djangoapps/third_party_auth/tests/test_admin.py | 2 +- common/djangoapps/third_party_auth/views.py | 2 +- common/djangoapps/track/tests/test_logs.py | 2 +- common/djangoapps/util/testing.py | 2 +- common/djangoapps/util/url.py | 2 +- common/test/test-theme/cms/templates/login.html | 2 +- .../test/test_sites/test_site/templates/courseware/tabs.html | 2 +- .../test_site/templates/emails/confirm_email_change.txt | 2 +- common/test/test_sites/test_site/templates/footer.html | 2 +- common/test/test_sites/test_site/templates/login-sidebar.html | 4 ++-- .../test/test_sites/test_site/templates/register-sidebar.html | 2 +- .../test_site/templates/static_templates/about.html | 2 +- .../test_site/templates/static_templates/contact.html | 2 +- .../test_sites/test_site/templates/static_templates/faq.html | 2 +- .../test_sites/test_site/templates/static_templates/tos.html | 2 +- lms/djangoapps/badges/events/course_complete.py | 2 +- lms/djangoapps/branding/api.py | 2 +- lms/djangoapps/branding/tests/test_api.py | 2 +- lms/djangoapps/branding/tests/test_page.py | 2 +- lms/djangoapps/branding/tests/test_views.py | 2 +- lms/djangoapps/branding/views.py | 2 +- lms/djangoapps/bulk_email/tasks.py | 2 +- lms/djangoapps/bulk_email/tests/test_course_optout.py | 2 +- lms/djangoapps/bulk_email/tests/test_email.py | 2 +- lms/djangoapps/bulk_email/tests/test_err_handling.py | 2 +- lms/djangoapps/bulk_email/tests/test_signals.py | 2 +- lms/djangoapps/bulk_enroll/tests/test_views.py | 2 +- lms/djangoapps/ccx/api/v0/tests/test_views.py | 2 +- lms/djangoapps/ccx/tests/test_views.py | 2 +- lms/djangoapps/ccx/utils.py | 2 +- lms/djangoapps/ccx/views.py | 2 +- lms/djangoapps/certificates/api.py | 2 +- lms/djangoapps/certificates/apis/v0/tests/test_views.py | 2 +- lms/djangoapps/certificates/queue.py | 2 +- lms/djangoapps/certificates/tests/test_api.py | 2 +- lms/djangoapps/certificates/tests/test_support_views.py | 2 +- lms/djangoapps/certificates/tests/test_views.py | 2 +- lms/djangoapps/certificates/tests/test_webview_views.py | 2 +- lms/djangoapps/class_dashboard/tests/test_dashboard_data.py | 2 +- lms/djangoapps/commerce/api/v0/tests/test_views.py | 2 +- lms/djangoapps/commerce/api/v0/views.py | 2 +- lms/djangoapps/commerce/api/v1/tests/test_views.py | 2 +- lms/djangoapps/commerce/tests/test_views.py | 2 +- lms/djangoapps/commerce/utils.py | 2 +- lms/djangoapps/course_api/blocks/tests/test_views.py | 2 +- lms/djangoapps/course_api/serializers.py | 2 +- lms/djangoapps/course_api/tests/test_views.py | 2 +- lms/djangoapps/course_goals/tests/test_api.py | 2 +- lms/djangoapps/course_wiki/tests/tests.py | 2 +- lms/djangoapps/courseware/courses.py | 2 +- lms/djangoapps/courseware/date_summary.py | 2 +- lms/djangoapps/courseware/features/common.py | 2 +- lms/djangoapps/courseware/module_render.py | 2 +- lms/djangoapps/courseware/tests/helpers.py | 2 +- lms/djangoapps/courseware/tests/test_about.py | 2 +- lms/djangoapps/courseware/tests/test_access.py | 2 +- lms/djangoapps/courseware/tests/test_course_info.py | 2 +- lms/djangoapps/courseware/tests/test_course_survey.py | 2 +- lms/djangoapps/courseware/tests/test_courses.py | 2 +- lms/djangoapps/courseware/tests/test_credit_requirements.py | 2 +- lms/djangoapps/courseware/tests/test_date_summary.py | 2 +- lms/djangoapps/courseware/tests/test_discussion_xblock.py | 2 +- lms/djangoapps/courseware/tests/test_entrance_exam.py | 2 +- lms/djangoapps/courseware/tests/test_i18n.py | 2 +- lms/djangoapps/courseware/tests/test_lti_integration.py | 2 +- lms/djangoapps/courseware/tests/test_masquerade.py | 2 +- lms/djangoapps/courseware/tests/test_microsites.py | 2 +- lms/djangoapps/courseware/tests/test_module_render.py | 2 +- lms/djangoapps/courseware/tests/test_navigation.py | 2 +- lms/djangoapps/courseware/tests/test_password_history.py | 2 +- lms/djangoapps/courseware/tests/test_split_module.py | 2 +- lms/djangoapps/courseware/tests/test_submitting_problems.py | 2 +- lms/djangoapps/courseware/tests/test_tabs.py | 2 +- lms/djangoapps/courseware/tests/test_view_authentication.py | 2 +- lms/djangoapps/courseware/tests/test_views.py | 2 +- lms/djangoapps/courseware/tests/tests.py | 2 +- lms/djangoapps/courseware/url_helpers.py | 2 +- lms/djangoapps/courseware/views/index.py | 2 +- lms/djangoapps/courseware/views/views.py | 2 +- lms/djangoapps/dashboard/tests/test_sysadmin.py | 2 +- .../templates/discussion/discussion_board_fragment.html | 2 +- .../templates/discussion/discussion_profile_page.html | 2 +- lms/djangoapps/discussion/tests/test_views.py | 2 +- lms/djangoapps/discussion/views.py | 2 +- lms/djangoapps/discussion_api/api.py | 2 +- lms/djangoapps/discussion_api/serializers.py | 2 +- lms/djangoapps/discussion_api/tests/test_views.py | 2 +- .../django_comment_client/base/event_transformers.py | 2 +- lms/djangoapps/django_comment_client/base/tests.py | 2 +- lms/djangoapps/django_comment_client/tests/test_utils.py | 2 +- lms/djangoapps/django_comment_client/utils.py | 2 +- lms/djangoapps/edxnotes/helpers.py | 2 +- lms/djangoapps/edxnotes/tests.py | 2 +- lms/djangoapps/edxnotes/views.py | 2 +- lms/djangoapps/experiments/tests/test_views.py | 2 +- lms/djangoapps/grades/api/tests/test_views.py | 2 +- lms/djangoapps/grades/api/v1/tests/test_views.py | 2 +- lms/djangoapps/instructor/enrollment.py | 2 +- lms/djangoapps/instructor/tests/test_api.py | 2 +- .../instructor/tests/test_api_email_localization.py | 2 +- lms/djangoapps/instructor/tests/test_certificates.py | 2 +- lms/djangoapps/instructor/tests/test_ecommerce.py | 2 +- lms/djangoapps/instructor/tests/test_email.py | 2 +- lms/djangoapps/instructor/tests/test_proctoring.py | 2 +- lms/djangoapps/instructor/tests/test_registration_codes.py | 2 +- lms/djangoapps/instructor/tests/test_spoc_gradebook.py | 2 +- .../instructor/tests/views/test_instructor_dashboard.py | 2 +- lms/djangoapps/instructor/views/api.py | 2 +- lms/djangoapps/instructor/views/gradebook_api.py | 2 +- lms/djangoapps/instructor/views/instructor_dashboard.py | 2 +- lms/djangoapps/instructor/views/registration_codes.py | 2 +- lms/djangoapps/instructor_analytics/basic.py | 2 +- lms/djangoapps/instructor_analytics/tests/test_basic.py | 2 +- lms/djangoapps/instructor_task/tests/test_base.py | 2 +- lms/djangoapps/instructor_task/tests/test_integration.py | 2 +- lms/djangoapps/instructor_task/tests/test_tasks_helper.py | 2 +- lms/djangoapps/learner_dashboard/programs.py | 2 +- lms/djangoapps/learner_dashboard/tests/test_programs.py | 2 +- lms/djangoapps/lms_xblock/runtime.py | 2 +- lms/djangoapps/lti_provider/tests/test_views.py | 2 +- lms/djangoapps/mobile_api/testutils.py | 2 +- lms/djangoapps/notes/models.py | 2 +- lms/djangoapps/notes/tests.py | 2 +- lms/djangoapps/notification_prefs/tests.py | 2 +- lms/djangoapps/rss_proxy/tests/test_views.py | 2 +- lms/djangoapps/shoppingcart/api.py | 2 +- lms/djangoapps/shoppingcart/models.py | 2 +- .../shoppingcart/tests/test_configuration_overrides.py | 2 +- lms/djangoapps/shoppingcart/tests/test_models.py | 2 +- lms/djangoapps/shoppingcart/tests/test_views.py | 2 +- lms/djangoapps/shoppingcart/views.py | 2 +- lms/djangoapps/static_template_view/tests/test_views.py | 2 +- lms/djangoapps/staticbook/tests.py | 2 +- lms/djangoapps/student_account/test/test_views.py | 2 +- lms/djangoapps/student_account/views.py | 2 +- lms/djangoapps/support/tests/test_views.py | 2 +- lms/djangoapps/support/views/enrollments.py | 2 +- lms/djangoapps/support/views/index.py | 2 +- lms/djangoapps/support/views/manage_user.py | 2 +- lms/djangoapps/survey/tests/test_views.py | 2 +- lms/djangoapps/survey/views.py | 2 +- lms/djangoapps/teams/tests/test_views.py | 2 +- lms/djangoapps/verify_student/models.py | 2 +- lms/djangoapps/verify_student/services.py | 2 +- lms/djangoapps/verify_student/tests/fake_software_secure.py | 2 +- lms/djangoapps/verify_student/tests/test_integration.py | 2 +- lms/djangoapps/verify_student/tests/test_views.py | 2 +- lms/djangoapps/verify_student/views.py | 2 +- lms/lib/courseware_search/lms_result_processor.py | 2 +- lms/templates/api_admin/catalogs/edit.html | 2 +- lms/templates/api_admin/catalogs/list.html | 2 +- lms/templates/api_admin/catalogs/search.html | 2 +- lms/templates/api_admin/terms_of_service.html | 2 +- lms/templates/bookmark_button.html | 2 +- lms/templates/calculator/toggle_calculator.html | 2 +- lms/templates/ccx/coach_dashboard.html | 2 +- lms/templates/class_dashboard/all_section_metrics.js | 4 ++-- lms/templates/conditional_module.html | 2 +- lms/templates/course.html | 2 +- lms/templates/course_modes/choose.html | 2 +- lms/templates/courseware/accordion.html | 2 +- lms/templates/courseware/course_about.html | 2 +- lms/templates/courseware/course_about_sidebar_header.html | 2 +- lms/templates/courseware/course_navigation.html | 2 +- lms/templates/courseware/courseware.html | 2 +- lms/templates/courseware/gradebook.html | 2 +- lms/templates/courseware/info.html | 2 +- lms/templates/courseware/program_marketing.html | 2 +- lms/templates/courseware/progress.html | 2 +- lms/templates/courseware/tabs.html | 2 +- lms/templates/dashboard.html | 2 +- lms/templates/dashboard/_dashboard_course_listing.html | 2 +- lms/templates/dashboard/_dashboard_entitlement_actions.html | 2 +- lms/templates/dashboard/_dashboard_status_verification.html | 2 +- lms/templates/edxnotes/toggle_notes.html | 2 +- lms/templates/email_change_successful.html | 2 +- lms/templates/emails/confirm_email_change.txt | 2 +- lms/templates/financial-assistance/financial-assistance.html | 2 +- lms/templates/footer.html | 2 +- lms/templates/forgot_password_modal.html | 2 +- lms/templates/header/brand.html | 2 +- lms/templates/header/header.html | 2 +- lms/templates/header/navbar-authenticated.html | 2 +- lms/templates/header/navbar-logo-header.html | 2 +- lms/templates/header/navbar-not-authenticated.html | 2 +- lms/templates/header/user_dropdown.html | 2 +- lms/templates/help_modal.html | 2 +- lms/templates/index.html | 2 +- .../instructor/instructor_dashboard_2/add_coupon_modal.html | 2 +- .../instructor/instructor_dashboard_2/edit_coupon_modal.html | 2 +- .../generate_registarion_codes_modal.html | 2 +- .../instructor_dashboard_2/instructor_dashboard_2.html | 2 +- .../invalidate_registration_code_modal.html | 2 +- .../instructor_dashboard_2/set_course_mode_price_modal.html | 2 +- lms/templates/login-sidebar.html | 2 +- lms/templates/login.html | 2 +- lms/templates/main.html | 2 +- lms/templates/manage_user_standing.html | 2 +- lms/templates/modal/_modal-settings-language.html | 2 +- lms/templates/navigation/bootstrap/navbar-authenticated.html | 2 +- lms/templates/navigation/navbar-authenticated.html | 2 +- lms/templates/navigation/navbar-logo-header.html | 2 +- lms/templates/navigation/navbar-not-authenticated.html | 2 +- lms/templates/navigation/navigation.html | 2 +- lms/templates/notes.html | 2 +- lms/templates/provider/authorize.html | 2 +- lms/templates/register-shib.html | 2 +- lms/templates/register-sidebar.html | 2 +- lms/templates/register.html | 2 +- lms/templates/resubscribe.html | 2 +- lms/templates/shoppingcart/billing_details.html | 2 +- lms/templates/shoppingcart/download_report.html | 2 +- lms/templates/shoppingcart/error.html | 2 +- lms/templates/shoppingcart/receipt.html | 2 +- lms/templates/shoppingcart/registration_code_receipt.html | 2 +- lms/templates/shoppingcart/registration_code_redemption.html | 2 +- lms/templates/shoppingcart/shopping_cart.html | 2 +- lms/templates/signup_modal.html | 2 +- lms/templates/student_account/account_settings.html | 2 +- lms/templates/support/certificates.html | 2 +- lms/templates/support/contact_us.html | 2 +- lms/templates/support/index.html | 2 +- lms/templates/survey/survey.html | 2 +- lms/templates/sysadmin_dashboard.html | 2 +- lms/templates/sysadmin_dashboard_gitlogs.html | 2 +- lms/templates/unsubscribe.html | 2 +- lms/templates/user_dropdown.html | 2 +- lms/templates/verify_student/reverify_not_allowed.html | 2 +- lms/templates/wiki/includes/article_menu.html | 2 +- lms/templates/wiki/includes/breadcrumbs.html | 2 +- lms/tests.py | 2 +- openedx/core/djangoapps/ace_common/template_context.py | 2 +- openedx/core/djangoapps/api_admin/admin.py | 2 +- openedx/core/djangoapps/api_admin/decorators.py | 2 +- openedx/core/djangoapps/api_admin/models.py | 2 +- openedx/core/djangoapps/api_admin/tests/test_views.py | 2 +- openedx/core/djangoapps/api_admin/views.py | 2 +- openedx/core/djangoapps/api_admin/widgets.py | 2 +- openedx/core/djangoapps/auth_exchange/tests/test_views.py | 2 +- openedx/core/djangoapps/bookmarks/tests/test_views.py | 2 +- .../core/djangoapps/cache_toolbox/tests/test_middleware.py | 2 +- openedx/core/djangoapps/cors_csrf/tests/test_views.py | 2 +- openedx/core/djangoapps/course_groups/views.py | 2 +- openedx/core/djangoapps/credit/email_utils.py | 2 +- openedx/core/djangoapps/credit/tests/test_views.py | 2 +- openedx/core/djangoapps/embargo/middleware.py | 2 +- openedx/core/djangoapps/embargo/models.py | 2 +- openedx/core/djangoapps/embargo/test_utils.py | 2 +- openedx/core/djangoapps/embargo/tests/test_middleware.py | 2 +- openedx/core/djangoapps/embargo/tests/test_views.py | 2 +- openedx/core/djangoapps/external_auth/login_and_register.py | 2 +- .../djangoapps/external_auth/tests/test_openid_provider.py | 2 +- openedx/core/djangoapps/external_auth/tests/test_shib.py | 2 +- openedx/core/djangoapps/external_auth/tests/test_ssl.py | 2 +- openedx/core/djangoapps/external_auth/views.py | 2 +- openedx/core/djangoapps/heartbeat/tests/test_heartbeat.py | 2 +- openedx/core/djangoapps/lang_pref/tests/test_middleware.py | 2 +- openedx/core/djangoapps/lang_pref/tests/test_views.py | 2 +- .../oauth_dispatch/tests/test_client_credentials.py | 2 +- openedx/core/djangoapps/oauth_dispatch/tests/test_views.py | 2 +- openedx/core/djangoapps/oauth_dispatch/views.py | 2 +- openedx/core/djangoapps/profile_images/tests/test_views.py | 2 +- openedx/core/djangoapps/programs/tests/test_utils.py | 2 +- openedx/core/djangoapps/programs/utils.py | 2 +- openedx/core/djangoapps/schedules/admin.py | 2 +- openedx/core/djangoapps/schedules/resolvers.py | 2 +- openedx/core/djangoapps/service_status/test.py | 2 +- .../djangoapps/theming/tests/test_theme_style_overrides.py | 2 +- openedx/core/djangoapps/user_api/accounts/serializers.py | 2 +- openedx/core/djangoapps/user_api/accounts/tests/test_views.py | 2 +- openedx/core/djangoapps/user_api/api.py | 2 +- .../core/djangoapps/user_api/preferences/tests/test_views.py | 2 +- openedx/core/djangoapps/user_api/tests/test_views.py | 2 +- .../core/djangoapps/user_api/validation/tests/test_views.py | 2 +- .../djangoapps/user_api/verification_api/tests/test_views.py | 2 +- openedx/core/djangoapps/zendesk_proxy/tests/test_v0_views.py | 2 +- openedx/core/djangoapps/zendesk_proxy/tests/test_v1_views.py | 2 +- openedx/core/lib/gating/api.py | 2 +- .../xblock_discussion/xblock_discussion/__init__.py | 2 +- openedx/core/lib/xblock_utils/__init__.py | 2 +- openedx/features/course_bookmarks/plugins.py | 2 +- openedx/features/course_bookmarks/views/course_bookmarks.py | 2 +- openedx/features/course_experience/plugins.py | 2 +- .../templates/course_experience/course-home-fragment.html | 2 +- .../course_experience/tests/views/test_course_dates.py | 2 +- .../course_experience/tests/views/test_course_home.py | 2 +- .../course_experience/tests/views/test_course_outline.py | 2 +- .../course_experience/tests/views/test_course_updates.py | 2 +- .../course_experience/tests/views/test_welcome_message.py | 2 +- openedx/features/course_experience/views/course_home.py | 2 +- openedx/features/course_experience/views/course_reviews.py | 2 +- openedx/features/course_experience/views/course_updates.py | 2 +- openedx/features/course_experience/views/welcome_message.py | 2 +- .../templates/course_search/course-search-fragment.html | 2 +- openedx/features/course_search/views/course_search.py | 2 +- openedx/features/enterprise_support/api.py | 2 +- .../features/enterprise_support/tests/mixins/enterprise.py | 2 +- openedx/features/enterprise_support/tests/test_api.py | 2 +- openedx/features/enterprise_support/tests/test_middleware.py | 2 +- openedx/features/learner_analytics/views.py | 2 +- .../templates/learner_profile/learner_profile.html | 2 +- .../learner_profile/tests/views/test_learner_profile.py | 2 +- openedx/features/learner_profile/views/learner_profile.py | 2 +- openedx/tests/completion_integration/test_views.py | 2 +- openedx/tests/xblock_integration/test_crowdsource_hinter.py | 2 +- openedx/tests/xblock_integration/test_recommender.py | 2 +- openedx/tests/xblock_integration/test_review_xblock.py | 2 +- openedx/tests/xblock_integration/xblock_testcase.py | 2 +- themes/edx.org/cms/templates/widgets/sock.html | 2 +- themes/edx.org/lms/templates/course_modes/choose.html | 2 +- themes/edx.org/lms/templates/dashboard.html | 2 +- themes/edx.org/lms/templates/header/navbar-authenticated.html | 2 +- .../lms/templates/header/navbar-not-authenticated.html | 2 +- themes/red-theme/cms/templates/login.html | 2 +- themes/red-theme/lms/templates/footer.html | 2 +- themes/stanford-style/lms/templates/footer.html | 2 +- themes/stanford-style/lms/templates/register-shib.html | 2 +- themes/stanford-style/lms/templates/register-sidebar.html | 2 +- 402 files changed, 404 insertions(+), 405 deletions(-) diff --git a/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py b/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py index 62b09ccf7e..61e18e77e6 100644 --- a/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py +++ b/cms/djangoapps/api/v1/tests/test_views/test_course_runs.py @@ -3,7 +3,7 @@ import datetime import ddt import pytz from django.core.files.uploadedfile import SimpleUploadedFile -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import RequestFactory from opaque_keys.edx.keys import CourseKey from openedx.core.lib.courses import course_image_url diff --git a/cms/djangoapps/cms_user_tasks/signals.py b/cms/djangoapps/cms_user_tasks/signals.py index 6640ab2a18..f4761264df 100644 --- a/cms/djangoapps/cms_user_tasks/signals.py +++ b/cms/djangoapps/cms_user_tasks/signals.py @@ -5,7 +5,7 @@ from __future__ import absolute_import, print_function, unicode_literals import logging -from django.core.urlresolvers import reverse +from django.urls import reverse from django.dispatch import receiver from user_tasks.models import UserTaskArtifact from user_tasks.signals import user_task_stopped diff --git a/cms/djangoapps/cms_user_tasks/tests.py b/cms/djangoapps/cms_user_tasks/tests.py index 4672fc4915..0ec1fb1d41 100644 --- a/cms/djangoapps/cms_user_tasks/tests.py +++ b/cms/djangoapps/cms_user_tasks/tests.py @@ -12,7 +12,7 @@ from boto.exception import NoAuthHandlerFound from django.conf import settings from django.contrib.auth.models import User from django.core import mail -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import override_settings from rest_framework.test import APITestCase from user_tasks.models import UserTaskArtifact, UserTaskStatus diff --git a/cms/djangoapps/contentstore/api/tests/test_views.py b/cms/djangoapps/contentstore/api/tests/test_views.py index 20a49a9751..710663498d 100644 --- a/cms/djangoapps/contentstore/api/tests/test_views.py +++ b/cms/djangoapps/contentstore/api/tests/test_views.py @@ -8,7 +8,7 @@ import tempfile from datetime import datetime from urllib import urlencode -from django.core.urlresolvers import reverse +from django.urls import reverse from path import Path as path from mock import patch from rest_framework import status diff --git a/cms/djangoapps/contentstore/courseware_index.py b/cms/djangoapps/contentstore/courseware_index.py index 29ad2487f5..f5f67fc7cb 100644 --- a/cms/djangoapps/contentstore/courseware_index.py +++ b/cms/djangoapps/contentstore/courseware_index.py @@ -7,7 +7,7 @@ from abc import ABCMeta, abstractmethod from datetime import timedelta from django.conf import settings -from django.core.urlresolvers import resolve +from django.urls import resolve from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_lazy from search.search_engine_base import SearchEngine diff --git a/cms/djangoapps/contentstore/tests/test_course_create_rerun.py b/cms/djangoapps/contentstore/tests/test_course_create_rerun.py index 9912416c9c..a1019fa40a 100644 --- a/cms/djangoapps/contentstore/tests/test_course_create_rerun.py +++ b/cms/djangoapps/contentstore/tests/test_course_create_rerun.py @@ -4,7 +4,7 @@ Test view handler for rerun (and eventually create) from datetime import datetime import ddt -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.client import RequestFactory from mock import patch from opaque_keys.edx.keys import CourseKey diff --git a/cms/djangoapps/contentstore/tests/test_request_event.py b/cms/djangoapps/contentstore/tests/test_request_event.py index 529fe4abb2..da0f0c7246 100644 --- a/cms/djangoapps/contentstore/tests/test_request_event.py +++ b/cms/djangoapps/contentstore/tests/test_request_event.py @@ -1,6 +1,6 @@ """Tests for CMS's requests to logs""" import mock -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from contentstore.views.helpers import event as cms_user_track diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py index b34d02fc21..14fd564e1e 100644 --- a/cms/djangoapps/contentstore/tests/tests.py +++ b/cms/djangoapps/contentstore/tests/tests.py @@ -11,7 +11,7 @@ from ddt import data, ddt, unpack from django.conf import settings from django.contrib.auth.models import User from django.core.cache import cache -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from django.test.utils import override_settings from freezegun import freeze_time diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 70451ff0b4..e9f886605f 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -6,7 +6,7 @@ import logging from datetime import datetime from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from opaque_keys.edx.keys import CourseKey, UsageKey from pytz import UTC diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index d88375b65a..6e7833f992 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -14,7 +14,7 @@ from ccx_keys.locator import CCXLocator from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied, ValidationError -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404, HttpResponse, HttpResponseBadRequest, HttpResponseNotFound from django.shortcuts import redirect from django.utils.translation import ugettext as _ diff --git a/cms/djangoapps/contentstore/views/preview.py b/cms/djangoapps/contentstore/views/preview.py index a962ac450f..0b2f0a297e 100644 --- a/cms/djangoapps/contentstore/views/preview.py +++ b/cms/djangoapps/contentstore/views/preview.py @@ -5,7 +5,7 @@ from functools import partial from django.conf import settings from django.contrib.auth.decorators import login_required -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404, HttpResponseBadRequest from django.utils.translation import ugettext as _ from opaque_keys.edx.keys import UsageKey diff --git a/cms/djangoapps/contentstore/views/public.py b/cms/djangoapps/contentstore/views/public.py index 0a7e568ac7..6306a11427 100644 --- a/cms/djangoapps/contentstore/views/public.py +++ b/cms/djangoapps/contentstore/views/public.py @@ -3,7 +3,7 @@ Public views """ from django.conf import settings from django.template.context_processors import csrf -from django.core.urlresolvers import reverse +from django.urls import reverse from django.shortcuts import redirect from django.views.decorators.clickjacking import xframe_options_deny from django.views.decorators.csrf import ensure_csrf_cookie diff --git a/cms/djangoapps/contentstore/views/tests/test_item.py b/cms/djangoapps/contentstore/views/tests/test_item.py index ea7b8fcf7f..9b979c94fd 100644 --- a/cms/djangoapps/contentstore/views/tests/test_item.py +++ b/cms/djangoapps/contentstore/views/tests/test_item.py @@ -4,7 +4,7 @@ from datetime import datetime, timedelta import ddt from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404 from django.test import TestCase from django.test.client import RequestFactory diff --git a/cms/djangoapps/contentstore/views/tests/test_organizations.py b/cms/djangoapps/contentstore/views/tests/test_organizations.py index d8137a47d9..4a16f9f155 100644 --- a/cms/djangoapps/contentstore/views/tests/test_organizations.py +++ b/cms/djangoapps/contentstore/views/tests/test_organizations.py @@ -1,7 +1,7 @@ """Tests covering the Organizations listing on the Studio home.""" import json -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from mock import patch diff --git a/cms/djangoapps/contentstore/views/tests/test_transcript_settings.py b/cms/djangoapps/contentstore/views/tests/test_transcript_settings.py index da838b1806..8d55c02bb9 100644 --- a/cms/djangoapps/contentstore/views/tests/test_transcript_settings.py +++ b/cms/djangoapps/contentstore/views/tests/test_transcript_settings.py @@ -5,7 +5,7 @@ from io import BytesIO from mock import Mock, patch, ANY from django.test.testcases import TestCase -from django.core.urlresolvers import reverse +from django.urls import reverse from edxval import api from contentstore.tests.utils import CourseTestCase diff --git a/cms/djangoapps/contentstore/views/tests/test_transcripts.py b/cms/djangoapps/contentstore/views/tests/test_transcripts.py index 0fae175fd9..c47da48437 100644 --- a/cms/djangoapps/contentstore/views/tests/test_transcripts.py +++ b/cms/djangoapps/contentstore/views/tests/test_transcripts.py @@ -10,7 +10,7 @@ import textwrap from uuid import uuid4 from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from edxval.api import create_video from opaque_keys.edx.keys import UsageKey diff --git a/cms/djangoapps/contentstore/views/videos.py b/cms/djangoapps/contentstore/views/videos.py index 4ed1880956..36df3f74cb 100644 --- a/cms/djangoapps/contentstore/views/videos.py +++ b/cms/djangoapps/contentstore/views/videos.py @@ -15,7 +15,7 @@ from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.staticfiles.storage import staticfiles_storage from django.core.files.images import get_image_dimensions -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import HttpResponse, HttpResponseNotFound from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_noop diff --git a/cms/djangoapps/course_creators/tests/test_views.py b/cms/djangoapps/course_creators/tests/test_views.py index fa951643cd..6169f60ef3 100644 --- a/cms/djangoapps/course_creators/tests/test_views.py +++ b/cms/djangoapps/course_creators/tests/test_views.py @@ -5,7 +5,7 @@ Tests course_creators.views.py. import mock from django.contrib.auth.models import User from django.core.exceptions import PermissionDenied -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from course_creators.views import ( diff --git a/cms/djangoapps/maintenance/tests.py b/cms/djangoapps/maintenance/tests.py index ada6274050..981f1b2c70 100644 --- a/cms/djangoapps/maintenance/tests.py +++ b/cms/djangoapps/maintenance/tests.py @@ -5,7 +5,7 @@ import json import ddt from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from contentstore.management.commands.utils import get_course_versions from student.tests.factories import AdminFactory, UserFactory diff --git a/cms/lib/xblock/runtime.py b/cms/lib/xblock/runtime.py index 299f81b036..53d2c08bb8 100644 --- a/cms/lib/xblock/runtime.py +++ b/cms/lib/xblock/runtime.py @@ -2,7 +2,7 @@ XBlock runtime implementations for edX Studio """ -from django.core.urlresolvers import reverse +from django.urls import reverse def handler_url(block, handler_name, suffix='', query='', thirdparty=False): diff --git a/cms/templates/accessibility.html b/cms/templates/accessibility.html index 80f4a421a7..07e30120ac 100644 --- a/cms/templates/accessibility.html +++ b/cms/templates/accessibility.html @@ -2,7 +2,7 @@ <%inherit file="base.html" /> <%def name="online_help_token()"><% return "accessibility" %> <%! - from django.core.urlresolvers import reverse + from django.urls import reverse from django.utils.translation import ugettext as _ from openedx.core.djangolib.markup import HTML, Text from openedx.core.djangolib.js_utils import js_escaped_string, dump_js_escaped_json diff --git a/cms/templates/asset_index.html b/cms/templates/asset_index.html index 5777b86bda..b68e1fbd3b 100644 --- a/cms/templates/asset_index.html +++ b/cms/templates/asset_index.html @@ -2,7 +2,7 @@ <%inherit file="base.html" /> <%def name="online_help_token()"><% return "files" %> <%! - from django.core.urlresolvers import reverse + from django.urls import reverse from django.utils.translation import ugettext as _ from openedx.core.djangolib.markup import HTML, Text from openedx.core.djangolib.js_utils import js_escaped_string, dump_js_escaped_json diff --git a/cms/templates/course-create-rerun.html b/cms/templates/course-create-rerun.html index 300153bde8..c8114a56a9 100644 --- a/cms/templates/course-create-rerun.html +++ b/cms/templates/course-create-rerun.html @@ -3,7 +3,7 @@ <%def name="online_help_token()"><% return "course_rerun" %> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse from openedx.core.djangolib.js_utils import js_escaped_string %> diff --git a/cms/templates/edit-tabs.html b/cms/templates/edit-tabs.html index 9541f07c35..c356155f6d 100644 --- a/cms/templates/edit-tabs.html +++ b/cms/templates/edit-tabs.html @@ -4,7 +4,7 @@ <%namespace name='static' file='static_content.html'/> <%! from django.utils.translation import ugettext as _ - from django.core.urlresolvers import reverse + from django.urls import reverse from xmodule.tabs import StaticTab from openedx.core.djangolib.js_utils import js_escaped_string %> diff --git a/cms/templates/error.html b/cms/templates/error.html index 87df8232bd..25aed65f88 100644 --- a/cms/templates/error.html +++ b/cms/templates/error.html @@ -2,7 +2,7 @@ <%inherit file="base.html" /> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse from django.conf import settings %> <%block name="bodyclass">error diff --git a/cms/templates/export_git.html b/cms/templates/export_git.html index 584cb2270d..65c8c3e08b 100644 --- a/cms/templates/export_git.html +++ b/cms/templates/export_git.html @@ -3,7 +3,7 @@ <%namespace name='static' file='static_content.html'/> <%! - from django.core.urlresolvers import reverse + from django.urls import reverse from django.utils.translation import ugettext as _ %> <%block name="title">${_("Export Course to Git")} diff --git a/cms/templates/howitworks.html b/cms/templates/howitworks.html index f1b9ad88ac..0e0349a755 100644 --- a/cms/templates/howitworks.html +++ b/cms/templates/howitworks.html @@ -3,7 +3,7 @@ <%def name="online_help_token()"><% return "welcome" %> <%namespace name='static' file='static_content.html'/> <%! - from django.core.urlresolvers import reverse + from django.urls import reverse from django.utils.translation import ugettext as _ from openedx.core.djangolib.markup import HTML, Text %> diff --git a/cms/templates/html_error.html b/cms/templates/html_error.html index 6b80a6a1ff..5cf980d73d 100644 --- a/cms/templates/html_error.html +++ b/cms/templates/html_error.html @@ -1,5 +1,5 @@ <%! from django.utils.translation import ugettext as _ %> -<%! from django.core.urlresolvers import reverse %> +<%! from django.urls import reverse %> <%block name="content">
diff --git a/cms/templates/login.html b/cms/templates/login.html index c4966f8b66..7b980cee2f 100644 --- a/cms/templates/login.html +++ b/cms/templates/login.html @@ -3,7 +3,7 @@ <%inherit file="base.html" /> <%def name="online_help_token()"><% return "login" %> <%! -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from openedx.core.djangolib.js_utils import js_escaped_string %> diff --git a/cms/templates/maintenance/base.html b/cms/templates/maintenance/base.html index d0691063c2..867e6e8c17 100644 --- a/cms/templates/maintenance/base.html +++ b/cms/templates/maintenance/base.html @@ -3,7 +3,7 @@ <%def name='online_help_token()'><% return 'maintenance' %> <%namespace name='static' file='../static_content.html'/> <%! -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ %> <%block name="content"> diff --git a/cms/templates/maintenance/container.html b/cms/templates/maintenance/container.html index c72f6b00e4..417471a1bd 100644 --- a/cms/templates/maintenance/container.html +++ b/cms/templates/maintenance/container.html @@ -2,7 +2,7 @@ <%inherit file="base.html" /> <%namespace name='static' file='../static_content.html'/> <%! -from django.core.urlresolvers import reverse +from django.urls import reverse from openedx.core.djangolib.js_utils import js_escaped_string %> <%block name="title">${view['name']} diff --git a/cms/templates/maintenance/index.html b/cms/templates/maintenance/index.html index f1f3224fe1..41c84223d2 100644 --- a/cms/templates/maintenance/index.html +++ b/cms/templates/maintenance/index.html @@ -3,7 +3,7 @@ <%namespace name='static' file='../static_content.html'/> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse %> <%block name="title">${_('Maintenance Dashboard')} <%block name="viewcontent"> diff --git a/cms/templates/manage_users.html b/cms/templates/manage_users.html index 858e66f33e..50b7a9e3df 100644 --- a/cms/templates/manage_users.html +++ b/cms/templates/manage_users.html @@ -1,7 +1,7 @@ <%inherit file="base.html" /> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse from openedx.core.djangolib.js_utils import ( dump_js_escaped_json, js_escaped_string diff --git a/cms/templates/manage_users_lib.html b/cms/templates/manage_users_lib.html index db5fb303dc..4d9e4e1aa2 100644 --- a/cms/templates/manage_users_lib.html +++ b/cms/templates/manage_users_lib.html @@ -1,7 +1,7 @@ <%inherit file="base.html" /> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse from openedx.core.djangolib.js_utils import ( dump_js_escaped_json, js_escaped_string diff --git a/cms/templates/register.html b/cms/templates/register.html index 86f639056e..3af9949bb6 100644 --- a/cms/templates/register.html +++ b/cms/templates/register.html @@ -2,7 +2,7 @@ <%def name="online_help_token()"><% return "register" %> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse %> <%block name="title">${_("Sign Up")} diff --git a/cms/templates/registration/activation_complete.html b/cms/templates/registration/activation_complete.html index f3bc1d68c8..86592dded3 100644 --- a/cms/templates/registration/activation_complete.html +++ b/cms/templates/registration/activation_complete.html @@ -1,7 +1,7 @@ <%inherit file="../base.html" /> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse %> <%namespace name='static' file='../static_content.html'/> diff --git a/cms/templates/registration/activation_invalid.html b/cms/templates/registration/activation_invalid.html index 5160b46449..27bd753343 100644 --- a/cms/templates/registration/activation_invalid.html +++ b/cms/templates/registration/activation_invalid.html @@ -3,7 +3,7 @@ <%namespace name='static' file='../static_content.html'/> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse from openedx.core.djangolib.markup import HTML, Text %> diff --git a/cms/templates/widgets/footer.html b/cms/templates/widgets/footer.html index a48fbdd9a3..53a96538f2 100644 --- a/cms/templates/widgets/footer.html +++ b/cms/templates/widgets/footer.html @@ -1,6 +1,6 @@ <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse from datetime import datetime from django.conf import settings import pytz diff --git a/cms/templates/widgets/header.html b/cms/templates/widgets/header.html index 512078e088..8fcf07ceb5 100644 --- a/cms/templates/widgets/header.html +++ b/cms/templates/widgets/header.html @@ -2,7 +2,7 @@ <%namespace name='static' file='../static_content.html'/> <%! from django.conf import settings - from django.core.urlresolvers import reverse + from django.urls import reverse from django.utils.translation import ugettext as _ from openedx.core.djangoapps.lang_pref.api import header_language_selector_is_enabled, released_languages %> diff --git a/cms/templates/widgets/user_dropdown.html b/cms/templates/widgets/user_dropdown.html index 773c43d5e0..d39d1ac4e2 100644 --- a/cms/templates/widgets/user_dropdown.html +++ b/cms/templates/widgets/user_dropdown.html @@ -2,7 +2,7 @@ <%namespace name='static' file='../static_content.html'/> <%! from django.conf import settings - from django.core.urlresolvers import reverse + from django.urls import reverse from django.utils.translation import ugettext as _ from student.roles import GlobalStaff %> @@ -57,4 +57,4 @@
-% endif \ No newline at end of file +% endif diff --git a/common/djangoapps/course_modes/tests/test_admin.py b/common/djangoapps/course_modes/tests/test_admin.py index 7bd230e7cb..0827c5b258 100644 --- a/common/djangoapps/course_modes/tests/test_admin.py +++ b/common/djangoapps/course_modes/tests/test_admin.py @@ -6,7 +6,7 @@ from datetime import datetime, timedelta import ddt from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from pytz import UTC, timezone from course_modes.admin import CourseModeForm diff --git a/common/djangoapps/course_modes/tests/test_views.py b/common/djangoapps/course_modes/tests/test_views.py index 4a576c3776..b2a9979f55 100644 --- a/common/djangoapps/course_modes/tests/test_views.py +++ b/common/djangoapps/course_modes/tests/test_views.py @@ -11,7 +11,7 @@ import freezegun import httpretty import pytz from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from mock import patch from nose.plugins.attrib import attr diff --git a/common/djangoapps/course_modes/views.py b/common/djangoapps/course_modes/views.py index 00a50ed8b4..0943493a52 100644 --- a/common/djangoapps/course_modes/views.py +++ b/common/djangoapps/course_modes/views.py @@ -9,7 +9,7 @@ import urllib import waffle from babel.dates import format_datetime from django.contrib.auth.decorators import login_required -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import transaction from django.http import HttpResponse, HttpResponseBadRequest from django.shortcuts import redirect diff --git a/common/djangoapps/edxmako/shortcuts.py b/common/djangoapps/edxmako/shortcuts.py index f8045347e3..d187cd3540 100644 --- a/common/djangoapps/edxmako/shortcuts.py +++ b/common/djangoapps/edxmako/shortcuts.py @@ -16,7 +16,7 @@ import logging from urlparse import urljoin from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import HttpResponse from django.template import engines diff --git a/common/djangoapps/edxmako/tests.py b/common/djangoapps/edxmako/tests.py index 6406b0f563..23e3065705 100644 --- a/common/djangoapps/edxmako/tests.py +++ b/common/djangoapps/edxmako/tests.py @@ -2,7 +2,7 @@ import unittest import ddt from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import HttpResponse from django.test import TestCase from django.test.client import RequestFactory diff --git a/common/djangoapps/enrollment/tests/test_views.py b/common/djangoapps/enrollment/tests/test_views.py index e1c91c0473..ef50c57b1d 100644 --- a/common/djangoapps/enrollment/tests/test_views.py +++ b/common/djangoapps/enrollment/tests/test_views.py @@ -13,7 +13,7 @@ from django.conf import settings from django.core.cache import cache from django.core.exceptions import ImproperlyConfigured from django.core.handlers.wsgi import WSGIRequest -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import Client from django.test.utils import override_settings from mock import patch diff --git a/common/djangoapps/entitlements/api/v1/tests/test_views.py b/common/djangoapps/entitlements/api/v1/tests/test_views.py index 4423f93334..0135aa7264 100644 --- a/common/djangoapps/entitlements/api/v1/tests/test_views.py +++ b/common/djangoapps/entitlements/api/v1/tests/test_views.py @@ -8,7 +8,7 @@ from courseware.models import ( DynamicUpgradeDeadlineConfiguration ) from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.timezone import now from mock import patch from opaque_keys.edx.locator import CourseKey diff --git a/common/djangoapps/microsite_configuration/tests/backends/test_filebased.py b/common/djangoapps/microsite_configuration/tests/backends/test_filebased.py index c1d978fd25..a7d169a189 100644 --- a/common/djangoapps/microsite_configuration/tests/backends/test_filebased.py +++ b/common/djangoapps/microsite_configuration/tests/backends/test_filebased.py @@ -6,7 +6,7 @@ from mock import patch from django.test import TestCase from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from microsite_configuration.backends.base import ( BaseMicrositeBackend, diff --git a/common/djangoapps/student/cookies.py b/common/djangoapps/student/cookies.py index a2103877e1..c064a3daf0 100644 --- a/common/djangoapps/student/cookies.py +++ b/common/djangoapps/student/cookies.py @@ -9,7 +9,7 @@ import time import six from django.conf import settings from django.contrib.auth.models import User -from django.core.urlresolvers import NoReverseMatch, reverse +from django.urls import NoReverseMatch, reverse from django.dispatch import Signal from django.utils.http import cookie_date diff --git a/common/djangoapps/student/forms.py b/common/djangoapps/student/forms.py index a5c9054dcc..82a4305383 100644 --- a/common/djangoapps/student/forms.py +++ b/common/djangoapps/student/forms.py @@ -12,7 +12,7 @@ from django.contrib.auth.models import User from django.contrib.auth.tokens import default_token_generator from django.contrib.sites.models import Site from django.core.exceptions import ValidationError -from django.core.urlresolvers import reverse +from django.urls import reverse from django.core.validators import RegexValidator, slug_re from django.forms import widgets from django.utils.http import int_to_base36 diff --git a/common/djangoapps/student/helpers.py b/common/djangoapps/student/helpers.py index 32f98e6dd2..b31651acad 100644 --- a/common/djangoapps/student/helpers.py +++ b/common/djangoapps/student/helpers.py @@ -11,7 +11,7 @@ from datetime import datetime import django from django.conf import settings from django.core.exceptions import PermissionDenied -from django.core.urlresolvers import NoReverseMatch, reverse +from django.urls import NoReverseMatch, reverse from django.core.validators import ValidationError from django.contrib.auth import load_backend from django.contrib.auth.models import User diff --git a/common/djangoapps/student/tests/test_activate_account.py b/common/djangoapps/student/tests/test_activate_account.py index e32f6c78b4..099516b53a 100644 --- a/common/djangoapps/student/tests/test_activate_account.py +++ b/common/djangoapps/student/tests/test_activate_account.py @@ -3,7 +3,7 @@ import unittest from uuid import uuid4 from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase, override_settings from mock import patch diff --git a/common/djangoapps/student/tests/test_admin_views.py b/common/djangoapps/student/tests/test_admin_views.py index 0ee14a5691..bd52275dcd 100644 --- a/common/djangoapps/student/tests/test_admin_views.py +++ b/common/djangoapps/student/tests/test_admin_views.py @@ -3,7 +3,7 @@ Tests student admin.py """ from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from mock import Mock diff --git a/common/djangoapps/student/tests/test_bulk_email_settings.py b/common/djangoapps/student/tests/test_bulk_email_settings.py index 3f7fad07d5..43d9c6268f 100644 --- a/common/djangoapps/student/tests/test_bulk_email_settings.py +++ b/common/djangoapps/student/tests/test_bulk_email_settings.py @@ -7,7 +7,7 @@ Course Auth is turned on. import unittest from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse # This import is for an lms djangoapp. # Its testcases are only run under lms. diff --git a/common/djangoapps/student/tests/test_certificates.py b/common/djangoapps/student/tests/test_certificates.py index 64485634dc..d6a1260244 100644 --- a/common/djangoapps/student/tests/test_certificates.py +++ b/common/djangoapps/student/tests/test_certificates.py @@ -6,7 +6,7 @@ import datetime import ddt import mock from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from mock import patch from pytz import UTC diff --git a/common/djangoapps/student/tests/test_configuration_overrides.py b/common/djangoapps/student/tests/test_configuration_overrides.py index 01fefe3a09..6ce67ec1c7 100644 --- a/common/djangoapps/student/tests/test_configuration_overrides.py +++ b/common/djangoapps/student/tests/test_configuration_overrides.py @@ -5,7 +5,7 @@ import json import mock from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from student.models import UserSignupSource diff --git a/common/djangoapps/student/tests/test_cookies.py b/common/djangoapps/student/tests/test_cookies.py index 20577a91a1..0479fa5fbe 100644 --- a/common/djangoapps/student/tests/test_cookies.py +++ b/common/djangoapps/student/tests/test_cookies.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals import six from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import RequestFactory from openedx.core.djangoapps.user_api.accounts.utils import retrieve_last_sitewide_block_completed diff --git a/common/djangoapps/student/tests/test_create_account.py b/common/djangoapps/student/tests/test_create_account.py index 8a531f2bcf..a1c235ecba 100644 --- a/common/djangoapps/student/tests/test_create_account.py +++ b/common/djangoapps/student/tests/test_create_account.py @@ -10,7 +10,7 @@ import mock import pytz from django.conf import settings from django.contrib.auth.models import AnonymousUser, User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase, TransactionTestCase from django.test.client import RequestFactory from django.test.utils import override_settings diff --git a/common/djangoapps/student/tests/test_credit.py b/common/djangoapps/student/tests/test_credit.py index 68a45ffa69..ad47f09dfa 100644 --- a/common/djangoapps/student/tests/test_credit.py +++ b/common/djangoapps/student/tests/test_credit.py @@ -7,7 +7,7 @@ import unittest import ddt import pytz from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from mock import patch diff --git a/common/djangoapps/student/tests/test_email.py b/common/djangoapps/student/tests/test_email.py index fdff0ea4af..38824a1f47 100644 --- a/common/djangoapps/student/tests/test_email.py +++ b/common/djangoapps/student/tests/test_email.py @@ -5,7 +5,7 @@ import unittest from django.conf import settings from django.contrib.auth.models import User from django.core import mail -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import transaction from django.http import HttpResponse from django.test import override_settings, TransactionTestCase diff --git a/common/djangoapps/student/tests/test_enrollment.py b/common/djangoapps/student/tests/test_enrollment.py index ed69ffec10..da8f26be6d 100644 --- a/common/djangoapps/student/tests/test_enrollment.py +++ b/common/djangoapps/student/tests/test_enrollment.py @@ -5,7 +5,7 @@ import unittest import ddt from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from mock import patch from nose.plugins.attrib import attr diff --git a/common/djangoapps/student/tests/test_helpers.py b/common/djangoapps/student/tests/test_helpers.py index c366a3262e..a8aec32f0f 100644 --- a/common/djangoapps/student/tests/test_helpers.py +++ b/common/djangoapps/student/tests/test_helpers.py @@ -5,7 +5,7 @@ import logging import ddt from django.conf import settings from django.contrib.sessions.middleware import SessionMiddleware -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from django.test.client import RequestFactory from django.test.utils import override_settings diff --git a/common/djangoapps/student/tests/test_login.py b/common/djangoapps/student/tests/test_login.py index 9da1e8cbd9..089cbb15af 100644 --- a/common/djangoapps/student/tests/test_login.py +++ b/common/djangoapps/student/tests/test_login.py @@ -8,7 +8,7 @@ import httpretty from django.conf import settings from django.contrib.auth.models import User from django.core.cache import cache -from django.core.urlresolvers import NoReverseMatch, reverse +from django.urls import NoReverseMatch, reverse from django.http import HttpResponse, HttpResponseBadRequest from django.test import TestCase from django.test.client import Client diff --git a/common/djangoapps/student/tests/test_login_registration_forms.py b/common/djangoapps/student/tests/test_login_registration_forms.py index 3ddd0ed402..842525af1b 100644 --- a/common/djangoapps/student/tests/test_login_registration_forms.py +++ b/common/djangoapps/student/tests/test_login_registration_forms.py @@ -4,7 +4,7 @@ import urllib import ddt from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from mock import patch from third_party_auth.tests.testutil import ThirdPartyAuthTestMixin diff --git a/common/djangoapps/student/tests/test_long_username_email.py b/common/djangoapps/student/tests/test_long_username_email.py index 73ffd882dc..094a5fe1cf 100644 --- a/common/djangoapps/student/tests/test_long_username_email.py +++ b/common/djangoapps/student/tests/test_long_username_email.py @@ -2,7 +2,7 @@ import json -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from openedx.core.djangoapps.user_api.accounts import USERNAME_BAD_LENGTH_MSG diff --git a/common/djangoapps/student/tests/test_password_policy.py b/common/djangoapps/student/tests/test_password_policy.py index a6691d740d..00e67648cb 100644 --- a/common/djangoapps/student/tests/test_password_policy.py +++ b/common/djangoapps/student/tests/test_password_policy.py @@ -7,7 +7,7 @@ from importlib import import_module from django.conf import settings from django.contrib.auth.models import AnonymousUser -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from django.test.client import RequestFactory from django.test.utils import override_settings diff --git a/common/djangoapps/student/tests/test_recent_enrollments.py b/common/djangoapps/student/tests/test_recent_enrollments.py index 8050992cbd..52e85d1924 100644 --- a/common/djangoapps/student/tests/test_recent_enrollments.py +++ b/common/djangoapps/student/tests/test_recent_enrollments.py @@ -6,7 +6,7 @@ import unittest import ddt from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.timezone import now from nose.plugins.attrib import attr from opaque_keys.edx import locator diff --git a/common/djangoapps/student/tests/test_refunds.py b/common/djangoapps/student/tests/test_refunds.py index ee10756a0b..033c6397e3 100644 --- a/common/djangoapps/student/tests/test_refunds.py +++ b/common/djangoapps/student/tests/test_refunds.py @@ -11,7 +11,7 @@ import pytz # Explicitly import the cache from ConfigurationModel so we can reset it after each test from config_models.models import cache from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.client import Client from django.test.utils import override_settings from mock import patch diff --git a/common/djangoapps/student/tests/test_reset_password.py b/common/djangoapps/student/tests/test_reset_password.py index 1c80cd6a78..77ad5c0075 100644 --- a/common/djangoapps/student/tests/test_reset_password.py +++ b/common/djangoapps/student/tests/test_reset_password.py @@ -12,7 +12,7 @@ from django.contrib.auth.models import User from django.contrib.auth.tokens import default_token_generator from django.core.cache import cache from django.core import mail -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.client import RequestFactory from django.test.utils import override_settings from django.utils.http import int_to_base36 diff --git a/common/djangoapps/student/tests/test_retirement.py b/common/djangoapps/student/tests/test_retirement.py index 3f5e28e597..73e9a52f94 100644 --- a/common/djangoapps/student/tests/test_retirement.py +++ b/common/djangoapps/student/tests/test_retirement.py @@ -7,7 +7,7 @@ import ddt from django.apps import apps from django.conf import settings from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase import pytest diff --git a/common/djangoapps/student/tests/test_userstanding.py b/common/djangoapps/student/tests/test_userstanding.py index 011019dfc0..03a4328d06 100644 --- a/common/djangoapps/student/tests/test_userstanding.py +++ b/common/djangoapps/student/tests/test_userstanding.py @@ -5,7 +5,7 @@ that students with disabled accounts are unable to access the courseware. import unittest from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import Client, TestCase from student.models import UserStanding diff --git a/common/djangoapps/student/tests/test_verification_status.py b/common/djangoapps/student/tests/test_verification_status.py index f320be7aa2..57da86a971 100644 --- a/common/djangoapps/student/tests/test_verification_status.py +++ b/common/djangoapps/student/tests/test_verification_status.py @@ -4,7 +4,7 @@ from datetime import datetime, timedelta import ddt from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import override_settings from mock import patch from nose.plugins.attrib import attr diff --git a/common/djangoapps/student/tests/test_views.py b/common/djangoapps/student/tests/test_views.py index 6a47a230d9..7f1c1d400a 100644 --- a/common/djangoapps/student/tests/test_views.py +++ b/common/djangoapps/student/tests/test_views.py @@ -10,7 +10,7 @@ from datetime import timedelta import ddt from completion.test_utils import submit_completions_for_testing, CompletionWaffleTestMixin from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import RequestFactory, TestCase from django.test.utils import override_settings from django.utils.timezone import now diff --git a/common/djangoapps/student/tests/tests.py b/common/djangoapps/student/tests/tests.py index 0a8c3e27db..3255ec723e 100644 --- a/common/djangoapps/student/tests/tests.py +++ b/common/djangoapps/student/tests/tests.py @@ -12,7 +12,7 @@ import pytz from config_models.models import cache from django.conf import settings from django.contrib.auth.models import AnonymousUser, User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase, override_settings from django.test.client import Client from markupsafe import escape diff --git a/common/djangoapps/student/views/dashboard.py b/common/djangoapps/student/views/dashboard.py index cc7d42ef0b..27e89f6a7a 100644 --- a/common/djangoapps/student/views/dashboard.py +++ b/common/djangoapps/student/views/dashboard.py @@ -11,7 +11,7 @@ from completion.utilities import get_key_to_last_completed_course_block from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import login_required -from django.core.urlresolvers import reverse +from django.urls import reverse from django.shortcuts import redirect from django.utils.translation import ugettext as _ from django.views.decorators.csrf import ensure_csrf_cookie diff --git a/common/djangoapps/student/views/login.py b/common/djangoapps/student/views/login.py index 960a6a0440..30a50be211 100644 --- a/common/djangoapps/student/views/login.py +++ b/common/djangoapps/student/views/login.py @@ -18,7 +18,7 @@ from django.contrib.auth import authenticate, load_backend, login as django_logi from django.contrib.auth.decorators import login_required from django.contrib.auth.models import AnonymousUser, User from django.core.exceptions import ObjectDoesNotExist, PermissionDenied -from django.core.urlresolvers import NoReverseMatch, reverse, reverse_lazy +from django.urls import NoReverseMatch, reverse, reverse_lazy from django.core.validators import ValidationError, validate_email from django.http import Http404, HttpResponse, HttpResponseBadRequest, HttpResponseForbidden from django.shortcuts import redirect diff --git a/common/djangoapps/student/views/management.py b/common/djangoapps/student/views/management.py index 98199bab1a..3e3f03995e 100644 --- a/common/djangoapps/student/views/management.py +++ b/common/djangoapps/student/views/management.py @@ -20,7 +20,7 @@ from django.contrib.auth.decorators import login_required from django.contrib.auth.models import AnonymousUser, User from django.contrib.auth.views import password_reset_confirm from django.core import mail -from django.core.urlresolvers import reverse +from django.urls import reverse from django.core.validators import ValidationError, validate_email from django.db import transaction from django.db.models.signals import post_save diff --git a/common/djangoapps/third_party_auth/admin.py b/common/djangoapps/third_party_auth/admin.py index f6ebab7a47..703196e19e 100644 --- a/common/djangoapps/third_party_auth/admin.py +++ b/common/djangoapps/third_party_auth/admin.py @@ -5,7 +5,7 @@ Admin site configuration for third party authentication from config_models.admin import KeyedConfigurationModelAdmin from django import forms from django.contrib import admin -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import DatabaseError, transaction from django.utils.translation import ugettext_lazy as _ diff --git a/common/djangoapps/third_party_auth/api/tests/test_views.py b/common/djangoapps/third_party_auth/api/tests/test_views.py index fa58a97f4f..6dd5367eaa 100644 --- a/common/djangoapps/third_party_auth/api/tests/test_views.py +++ b/common/djangoapps/third_party_auth/api/tests/test_views.py @@ -5,7 +5,7 @@ Tests for the Third Party Auth REST API import unittest import ddt -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import QueryDict from mock import patch from provider.constants import CONFIDENTIAL diff --git a/common/djangoapps/third_party_auth/decorators.py b/common/djangoapps/third_party_auth/decorators.py index 5f0f3e6b40..c897004a95 100644 --- a/common/djangoapps/third_party_auth/decorators.py +++ b/common/djangoapps/third_party_auth/decorators.py @@ -4,7 +4,6 @@ Decorators that can be used to interact with third_party_auth. from functools import wraps from django.conf import settings -from django.core.urlresolvers import reverse from django.shortcuts import redirect from django.utils.decorators import available_attrs diff --git a/common/djangoapps/third_party_auth/pipeline.py b/common/djangoapps/third_party_auth/pipeline.py index da5875cf6d..444db04c18 100644 --- a/common/djangoapps/third_party_auth/pipeline.py +++ b/common/djangoapps/third_party_auth/pipeline.py @@ -70,7 +70,7 @@ import analytics from django.conf import settings from django.contrib.auth.models import User from django.core.mail.message import EmailMessage -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import HttpResponseBadRequest from django.shortcuts import redirect import social_django diff --git a/common/djangoapps/third_party_auth/tests/specs/base.py b/common/djangoapps/third_party_auth/tests/specs/base.py index ee22535ae3..2842c56fa0 100644 --- a/common/djangoapps/third_party_auth/tests/specs/base.py +++ b/common/djangoapps/third_party_auth/tests/specs/base.py @@ -14,7 +14,7 @@ from django.contrib import auth from django.contrib.auth import models as auth_models from django.contrib.messages.storage import fallback from django.contrib.sessions.backends import cache -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import utils as django_utils from django.conf import settings as django_settings from social_core import actions, exceptions diff --git a/common/djangoapps/third_party_auth/tests/specs/test_google.py b/common/djangoapps/third_party_auth/tests/specs/test_google.py index cd9666a05b..cb66121dc0 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_google.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_google.py @@ -3,7 +3,7 @@ import base64 import hashlib import hmac from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse import json from mock import patch from openedx.tests.util import expected_redirect_url diff --git a/common/djangoapps/third_party_auth/tests/specs/test_lti.py b/common/djangoapps/third_party_auth/tests/specs/test_lti.py index e09428bc30..08390afefb 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_lti.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_lti.py @@ -5,7 +5,7 @@ import unittest import django from django.conf import settings from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from oauthlib.oauth1.rfc5849 import Client, SIGNATURE_TYPE_BODY from openedx.tests.util import expected_redirect_url from third_party_auth.tests import testutil diff --git a/common/djangoapps/third_party_auth/tests/test_admin.py b/common/djangoapps/third_party_auth/tests/test_admin.py index c16bbe8ed8..32fe1377c8 100644 --- a/common/djangoapps/third_party_auth/tests/test_admin.py +++ b/common/djangoapps/third_party_auth/tests/test_admin.py @@ -5,7 +5,7 @@ import unittest from django.contrib.admin.sites import AdminSite from django.core.files.uploadedfile import SimpleUploadedFile -from django.core.urlresolvers import reverse +from django.urls import reverse from django.forms import models from student.tests.factories import UserFactory diff --git a/common/djangoapps/third_party_auth/views.py b/common/djangoapps/third_party_auth/views.py index 2324d1539c..4360bef5ad 100644 --- a/common/djangoapps/third_party_auth/views.py +++ b/common/djangoapps/third_party_auth/views.py @@ -2,7 +2,7 @@ Extra views required for SSO """ from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404, HttpResponse, HttpResponseNotAllowed, HttpResponseServerError from django.shortcuts import redirect, render from django.views.decorators.csrf import csrf_exempt diff --git a/common/djangoapps/track/tests/test_logs.py b/common/djangoapps/track/tests/test_logs.py index 3b66a45329..b6d6acd730 100644 --- a/common/djangoapps/track/tests/test_logs.py +++ b/common/djangoapps/track/tests/test_logs.py @@ -3,7 +3,7 @@ import unittest import mock from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from track.models import TrackingLog diff --git a/common/djangoapps/util/testing.py b/common/djangoapps/util/testing.py index e179497e50..8113e499a3 100644 --- a/common/djangoapps/util/testing.py +++ b/common/djangoapps/util/testing.py @@ -6,7 +6,7 @@ import json import sys from django.conf import settings -from django.core.urlresolvers import clear_url_caches, resolve +from django.urls import clear_url_caches, resolve from django.test import TestCase from mock import patch diff --git a/common/djangoapps/util/url.py b/common/djangoapps/util/url.py index 38d6f35012..e8ece69c66 100644 --- a/common/djangoapps/util/url.py +++ b/common/djangoapps/util/url.py @@ -6,7 +6,7 @@ import sys from importlib import import_module from django.conf import settings -from django.core.urlresolvers import set_urlconf +from django.urls import set_urlconf def reload_django_url_config(): diff --git a/common/test/test-theme/cms/templates/login.html b/common/test/test-theme/cms/templates/login.html index 4e13b5cdc9..4617c1e3b4 100644 --- a/common/test/test-theme/cms/templates/login.html +++ b/common/test/test-theme/cms/templates/login.html @@ -4,7 +4,7 @@ <%inherit file="base.html" /> <%def name="online_help_token()"><% return "login" %> <%! -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from openedx.core.djangolib.js_utils import js_escaped_string %> diff --git a/common/test/test_sites/test_site/templates/courseware/tabs.html b/common/test/test_sites/test_site/templates/courseware/tabs.html index 2597ca2db9..8077ba73f0 100644 --- a/common/test/test_sites/test_site/templates/courseware/tabs.html +++ b/common/test/test_sites/test_site/templates/courseware/tabs.html @@ -2,7 +2,7 @@ <%namespace name='static' file='/static_content.html'/> <%! from django.utils.translation import ugettext as _ - from django.core.urlresolvers import reverse + from django.urls import reverse %> <%page args="tab_list, active_page, default_tab, tab_image" expression_filter="h" /> diff --git a/common/test/test_sites/test_site/templates/emails/confirm_email_change.txt b/common/test/test_sites/test_site/templates/emails/confirm_email_change.txt index 8886280c30..50ddb80927 100644 --- a/common/test/test_sites/test_site/templates/emails/confirm_email_change.txt +++ b/common/test/test_sites/test_site/templates/emails/confirm_email_change.txt @@ -1,4 +1,4 @@ -<%! from django.core.urlresolvers import reverse %> +<%! from django.urls import reverse %> <%! from django.conf import settings %> <%! from edxmako.shortcuts import render_to_string, marketing_link %> diff --git a/common/test/test_sites/test_site/templates/footer.html b/common/test/test_sites/test_site/templates/footer.html index 06c4072c77..45194e2067 100644 --- a/common/test/test_sites/test_site/templates/footer.html +++ b/common/test/test_sites/test_site/templates/footer.html @@ -2,7 +2,7 @@ <%page expression_filter="h"/> <%namespace name='static' file='static_content.html'/> <%! -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ %> diff --git a/common/test/test_sites/test_site/templates/login-sidebar.html b/common/test/test_sites/test_site/templates/login-sidebar.html index dcee7d3810..43f23e5301 100644 --- a/common/test/test_sites/test_site/templates/login-sidebar.html +++ b/common/test/test_sites/test_site/templates/login-sidebar.html @@ -1,7 +1,7 @@ <%page expression_filter="h"/> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse %>
@@ -16,4 +16,4 @@ from django.core.urlresolvers import reverse

Custom text

- \ No newline at end of file + diff --git a/common/test/test_sites/test_site/templates/register-sidebar.html b/common/test/test_sites/test_site/templates/register-sidebar.html index b8edbd2ba5..bdf9f81531 100644 --- a/common/test/test_sites/test_site/templates/register-sidebar.html +++ b/common/test/test_sites/test_site/templates/register-sidebar.html @@ -1,7 +1,7 @@ <%page expression_filter="h"/> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse %> <%namespace file='../../main.html' import="login_query"/> <%namespace name='static' file='../../static_content.html'/> diff --git a/common/test/test_sites/test_site/templates/static_templates/about.html b/common/test/test_sites/test_site/templates/static_templates/about.html index 5dfbfaf7ad..c4840e95e8 100644 --- a/common/test/test_sites/test_site/templates/static_templates/about.html +++ b/common/test/test_sites/test_site/templates/static_templates/about.html @@ -1,5 +1,5 @@ <%page expression_filter="h"/> -<%! from django.core.urlresolvers import reverse %> +<%! from django.urls import reverse %> <%namespace name='static' file='../../../static_content.html'/> <%inherit file="../../../main.html" /> diff --git a/common/test/test_sites/test_site/templates/static_templates/contact.html b/common/test/test_sites/test_site/templates/static_templates/contact.html index a360a2563e..3cd9120e9a 100644 --- a/common/test/test_sites/test_site/templates/static_templates/contact.html +++ b/common/test/test_sites/test_site/templates/static_templates/contact.html @@ -3,7 +3,7 @@ <%namespace name='static' file='../static_content.html'/> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse %> <%block name="title">${_("Contact {platform_name}").format(platform_name=settings.PLATFORM_NAME)} diff --git a/common/test/test_sites/test_site/templates/static_templates/faq.html b/common/test/test_sites/test_site/templates/static_templates/faq.html index c13f375348..8723f73871 100644 --- a/common/test/test_sites/test_site/templates/static_templates/faq.html +++ b/common/test/test_sites/test_site/templates/static_templates/faq.html @@ -3,7 +3,7 @@ <%namespace name='static' file='../static_content.html'/> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse %> <%block name="title">${_("FAQ")} diff --git a/common/test/test_sites/test_site/templates/static_templates/tos.html b/common/test/test_sites/test_site/templates/static_templates/tos.html index 1d918c2085..607dd9daec 100644 --- a/common/test/test_sites/test_site/templates/static_templates/tos.html +++ b/common/test/test_sites/test_site/templates/static_templates/tos.html @@ -3,7 +3,7 @@ <%namespace name='static' file='../static_content.html'/> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse %> <%block name="pagetitle">${_("Terms of Service")} diff --git a/lms/djangoapps/badges/events/course_complete.py b/lms/djangoapps/badges/events/course_complete.py index 7cb9e4986c..38ff2f1782 100644 --- a/lms/djangoapps/badges/events/course_complete.py +++ b/lms/djangoapps/badges/events/course_complete.py @@ -4,7 +4,7 @@ Helper functions for the course complete event that was originally included with import hashlib import logging -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.text import slugify from django.utils.translation import ugettext_lazy as _ diff --git a/lms/djangoapps/branding/api.py b/lms/djangoapps/branding/api.py index b1efafb39e..59823e423d 100644 --- a/lms/djangoapps/branding/api.py +++ b/lms/djangoapps/branding/api.py @@ -17,7 +17,7 @@ import urlparse from django.conf import settings from django.contrib.staticfiles.storage import staticfiles_storage -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from branding.models import BrandingApiConfig diff --git a/lms/djangoapps/branding/tests/test_api.py b/lms/djangoapps/branding/tests/test_api.py index 828d5fe1af..336ce3bd46 100644 --- a/lms/djangoapps/branding/tests/test_api.py +++ b/lms/djangoapps/branding/tests/test_api.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals import mock from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from django.test.utils import override_settings diff --git a/lms/djangoapps/branding/tests/test_page.py b/lms/djangoapps/branding/tests/test_page.py index ce8b14151a..867170c8ca 100644 --- a/lms/djangoapps/branding/tests/test_page.py +++ b/lms/djangoapps/branding/tests/test_page.py @@ -5,7 +5,7 @@ import datetime from django.conf import settings from django.contrib.auth.models import AnonymousUser -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import HttpResponseRedirect from django.test.client import RequestFactory from django.test.utils import override_settings diff --git a/lms/djangoapps/branding/tests/test_views.py b/lms/djangoapps/branding/tests/test_views.py index 7a2f923a3e..599a9a9b7a 100644 --- a/lms/djangoapps/branding/tests/test_views.py +++ b/lms/djangoapps/branding/tests/test_views.py @@ -8,7 +8,7 @@ import mock from config_models.models import cache from django.conf import settings from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from branding.models import BrandingApiConfig diff --git a/lms/djangoapps/branding/views.py b/lms/djangoapps/branding/views.py index 6a9f271c10..bde3416fd3 100644 --- a/lms/djangoapps/branding/views.py +++ b/lms/djangoapps/branding/views.py @@ -5,7 +5,7 @@ import urllib from django.conf import settings from django.contrib.staticfiles.storage import staticfiles_storage from django.core.cache import cache -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import transaction from django.http import Http404, HttpResponse from django.shortcuts import redirect diff --git a/lms/djangoapps/bulk_email/tasks.py b/lms/djangoapps/bulk_email/tasks.py index a92112a78b..3526303d3c 100644 --- a/lms/djangoapps/bulk_email/tasks.py +++ b/lms/djangoapps/bulk_email/tasks.py @@ -30,7 +30,7 @@ from django.conf import settings from django.contrib.auth.models import User from django.core.mail import EmailMultiAlternatives, get_connection from django.core.mail.message import forbid_multi_line_headers -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import override as override_language from django.utils.translation import ugettext as _ from markupsafe import escape diff --git a/lms/djangoapps/bulk_email/tests/test_course_optout.py b/lms/djangoapps/bulk_email/tests/test_course_optout.py index 91a640c437..61a18f146b 100644 --- a/lms/djangoapps/bulk_email/tests/test_course_optout.py +++ b/lms/djangoapps/bulk_email/tests/test_course_optout.py @@ -6,7 +6,7 @@ import json from django.core import mail from django.core.management import call_command -from django.core.urlresolvers import reverse +from django.urls import reverse from mock import Mock, patch from nose.plugins.attrib import attr from six import text_type diff --git a/lms/djangoapps/bulk_email/tests/test_email.py b/lms/djangoapps/bulk_email/tests/test_email.py index 1b07e81b61..9476039af9 100644 --- a/lms/djangoapps/bulk_email/tests/test_email.py +++ b/lms/djangoapps/bulk_email/tests/test_email.py @@ -11,7 +11,7 @@ from django.conf import settings from django.core import mail from django.core.mail.message import forbid_multi_line_headers from django.core.management import call_command -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from django.utils.translation import get_language from markupsafe import escape diff --git a/lms/djangoapps/bulk_email/tests/test_err_handling.py b/lms/djangoapps/bulk_email/tests/test_err_handling.py index f5f5d0f6b1..14186b8af6 100644 --- a/lms/djangoapps/bulk_email/tests/test_err_handling.py +++ b/lms/djangoapps/bulk_email/tests/test_err_handling.py @@ -10,7 +10,7 @@ import ddt from celery.states import RETRY, SUCCESS # pylint: disable=no-name-in-module, import-error from django.conf import settings from django.core.management import call_command -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import DatabaseError from mock import Mock, patch from nose.plugins.attrib import attr diff --git a/lms/djangoapps/bulk_email/tests/test_signals.py b/lms/djangoapps/bulk_email/tests/test_signals.py index 427708bd32..18969de2e6 100644 --- a/lms/djangoapps/bulk_email/tests/test_signals.py +++ b/lms/djangoapps/bulk_email/tests/test_signals.py @@ -5,7 +5,7 @@ import json from django.core import mail from django.core.management import call_command -from django.core.urlresolvers import reverse +from django.urls import reverse from mock import Mock, patch from nose.plugins.attrib import attr from six import text_type diff --git a/lms/djangoapps/bulk_enroll/tests/test_views.py b/lms/djangoapps/bulk_enroll/tests/test_views.py index 00a92b569b..45a84b290a 100644 --- a/lms/djangoapps/bulk_enroll/tests/test_views.py +++ b/lms/djangoapps/bulk_enroll/tests/test_views.py @@ -6,7 +6,7 @@ import json from django.conf import settings from django.contrib.auth.models import User from django.core import mail -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from rest_framework.test import APIRequestFactory, APITestCase, force_authenticate diff --git a/lms/djangoapps/ccx/api/v0/tests/test_views.py b/lms/djangoapps/ccx/api/v0/tests/test_views.py index 1ad89d9ecb..d89c01780d 100644 --- a/lms/djangoapps/ccx/api/v0/tests/test_views.py +++ b/lms/djangoapps/ccx/api/v0/tests/test_views.py @@ -14,7 +14,7 @@ import mock from ccx_keys.locator import CCXLocator from django.conf import settings from django.contrib.auth.models import User -from django.core.urlresolvers import Resolver404, resolve, reverse +from django.urls import Resolver404, resolve, reverse from django.utils.timezone import now from nose.plugins.attrib import attr from oauth2_provider import models as dot_models diff --git a/lms/djangoapps/ccx/tests/test_views.py b/lms/djangoapps/ccx/tests/test_views.py index c3f4f7ce0a..a9e607ae8e 100644 --- a/lms/djangoapps/ccx/tests/test_views.py +++ b/lms/djangoapps/ccx/tests/test_views.py @@ -9,7 +9,7 @@ import urlparse import ddt from ccx_keys.locator import CCXLocator from django.conf import settings -from django.core.urlresolvers import resolve, reverse +from django.urls import resolve, reverse from django.test import RequestFactory from django.test.utils import override_settings from pytz import UTC diff --git a/lms/djangoapps/ccx/utils.py b/lms/djangoapps/ccx/utils.py index f45336ac34..f059759fed 100644 --- a/lms/djangoapps/ccx/utils.py +++ b/lms/djangoapps/ccx/utils.py @@ -11,7 +11,7 @@ from smtplib import SMTPException import pytz from django.contrib.auth.models import User from django.core.exceptions import ValidationError -from django.core.urlresolvers import reverse +from django.urls import reverse from django.core.validators import validate_email from django.utils.translation import ugettext as _ diff --git a/lms/djangoapps/ccx/views.py b/lms/djangoapps/ccx/views.py index 81e32a34bd..162086be6c 100644 --- a/lms/djangoapps/ccx/views.py +++ b/lms/djangoapps/ccx/views.py @@ -14,7 +14,7 @@ from ccx_keys.locator import CCXLocator from django.conf import settings from django.contrib import messages from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import transaction from django.http import Http404, HttpResponse, HttpResponseForbidden from django.shortcuts import redirect diff --git a/lms/djangoapps/certificates/api.py b/lms/djangoapps/certificates/api.py index 3da013851a..7e29360ffc 100644 --- a/lms/djangoapps/certificates/api.py +++ b/lms/djangoapps/certificates/api.py @@ -7,7 +7,7 @@ rather than importing Django models directly. import logging from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db.models import Q from opaque_keys.edx.django.models import CourseKeyField from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/certificates/apis/v0/tests/test_views.py b/lms/djangoapps/certificates/apis/v0/tests/test_views.py index 1aa9aefc6b..38f82c51b8 100644 --- a/lms/djangoapps/certificates/apis/v0/tests/test_views.py +++ b/lms/djangoapps/certificates/apis/v0/tests/test_views.py @@ -3,7 +3,7 @@ Tests for the Certificate REST APIs. """ from datetime import datetime, timedelta -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils import timezone from freezegun import freeze_time from oauth2_provider import models as dot_models diff --git a/lms/djangoapps/certificates/queue.py b/lms/djangoapps/certificates/queue.py index e6faf4102f..613e19ab06 100644 --- a/lms/djangoapps/certificates/queue.py +++ b/lms/djangoapps/certificates/queue.py @@ -6,7 +6,7 @@ from uuid import uuid4 import lxml.html from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.client import RequestFactory from lxml.etree import ParserError, XMLSyntaxError from requests.auth import HTTPBasicAuth diff --git a/lms/djangoapps/certificates/tests/test_api.py b/lms/djangoapps/certificates/tests/test_api.py index 13b1f252ec..3033162d63 100644 --- a/lms/djangoapps/certificates/tests/test_api.py +++ b/lms/djangoapps/certificates/tests/test_api.py @@ -8,7 +8,7 @@ from datetime import datetime from datetime import timedelta from config_models.models import cache from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import RequestFactory, TestCase from django.test.utils import override_settings from django.utils import timezone diff --git a/lms/djangoapps/certificates/tests/test_support_views.py b/lms/djangoapps/certificates/tests/test_support_views.py index 959841a5e7..144ee08f0d 100644 --- a/lms/djangoapps/certificates/tests/test_support_views.py +++ b/lms/djangoapps/certificates/tests/test_support_views.py @@ -6,7 +6,7 @@ import json import ddt from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/certificates/tests/test_views.py b/lms/djangoapps/certificates/tests/test_views.py index 527a183000..7762988e43 100644 --- a/lms/djangoapps/certificates/tests/test_views.py +++ b/lms/djangoapps/certificates/tests/test_views.py @@ -7,7 +7,7 @@ import ddt import datetime from django.conf import settings from django.core.cache import cache -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.client import Client from django.test.utils import override_settings from nose.plugins.attrib import attr diff --git a/lms/djangoapps/certificates/tests/test_webview_views.py b/lms/djangoapps/certificates/tests/test_webview_views.py index 81a256c801..c3a37d4f22 100644 --- a/lms/djangoapps/certificates/tests/test_webview_views.py +++ b/lms/djangoapps/certificates/tests/test_webview_views.py @@ -8,7 +8,7 @@ from urllib import urlencode from uuid import uuid4 from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.client import Client, RequestFactory from django.test.utils import override_settings from django.utils import translation diff --git a/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py b/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py index 630dc4cdeb..2b0dad8b17 100644 --- a/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py +++ b/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py @@ -4,7 +4,7 @@ Tests for class dashboard (Metrics tab in instructor dashboard) import json -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.client import RequestFactory from mock import patch from nose.plugins.attrib import attr diff --git a/lms/djangoapps/commerce/api/v0/tests/test_views.py b/lms/djangoapps/commerce/api/v0/tests/test_views.py index 88608a09ef..07f412da07 100644 --- a/lms/djangoapps/commerce/api/v0/tests/test_views.py +++ b/lms/djangoapps/commerce/api/v0/tests/test_views.py @@ -8,7 +8,7 @@ import ddt import mock import pytz from django.conf import settings -from django.core.urlresolvers import reverse, reverse_lazy +from django.urls import reverse, reverse_lazy from django.test import TestCase from django.test.utils import override_settings from edx_rest_api_client import exceptions diff --git a/lms/djangoapps/commerce/api/v0/views.py b/lms/djangoapps/commerce/api/v0/views.py index a50e2afee8..e4657cbdf9 100644 --- a/lms/djangoapps/commerce/api/v0/views.py +++ b/lms/djangoapps/commerce/api/v0/views.py @@ -2,7 +2,7 @@ import logging from courseware import courses -from django.core.urlresolvers import reverse +from django.urls import reverse from edx_rest_api_client import exceptions from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/commerce/api/v1/tests/test_views.py b/lms/djangoapps/commerce/api/v1/tests/test_views.py index 9252dcec40..2a27e58945 100644 --- a/lms/djangoapps/commerce/api/v1/tests/test_views.py +++ b/lms/djangoapps/commerce/api/v1/tests/test_views.py @@ -7,7 +7,7 @@ import ddt import pytz from django.conf import settings from django.contrib.auth.models import Permission -from django.core.urlresolvers import reverse, reverse_lazy +from django.urls import reverse, reverse_lazy from django.test import TestCase from django.test.utils import override_settings from edx_rest_api_client import exceptions diff --git a/lms/djangoapps/commerce/tests/test_views.py b/lms/djangoapps/commerce/tests/test_views.py index 601c13a743..9f30d07e8f 100644 --- a/lms/djangoapps/commerce/tests/test_views.py +++ b/lms/djangoapps/commerce/tests/test_views.py @@ -4,7 +4,7 @@ import json import ddt import mock -from django.core.urlresolvers import reverse +from django.urls import reverse from nose.plugins.attrib import attr from course_modes.models import CourseMode diff --git a/lms/djangoapps/commerce/utils.py b/lms/djangoapps/commerce/utils.py index d40c289fbb..0589bd78c3 100644 --- a/lms/djangoapps/commerce/utils.py +++ b/lms/djangoapps/commerce/utils.py @@ -8,7 +8,7 @@ import requests import waffle from django.conf import settings from django.contrib.auth import get_user_model -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from openedx.core.djangoapps.commerce.utils import ecommerce_api_client, is_commerce_service_configured diff --git a/lms/djangoapps/course_api/blocks/tests/test_views.py b/lms/djangoapps/course_api/blocks/tests/test_views.py index 7c3f1c5a81..427b85fdcc 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_views.py +++ b/lms/djangoapps/course_api/blocks/tests/test_views.py @@ -6,7 +6,7 @@ from string import join from urllib import urlencode from urlparse import urlunparse -from django.core.urlresolvers import reverse +from django.urls import reverse from opaque_keys.edx.locator import CourseLocator from student.models import CourseEnrollment diff --git a/lms/djangoapps/course_api/serializers.py b/lms/djangoapps/course_api/serializers.py index 7c8f2ee853..544339b445 100644 --- a/lms/djangoapps/course_api/serializers.py +++ b/lms/djangoapps/course_api/serializers.py @@ -4,7 +4,7 @@ Course API Serializers. Representing course catalog data import urllib -from django.core.urlresolvers import reverse +from django.urls import reverse from rest_framework import serializers from openedx.core.djangoapps.models.course_details import CourseDetails diff --git a/lms/djangoapps/course_api/tests/test_views.py b/lms/djangoapps/course_api/tests/test_views.py index 0f2618c720..ad243c1a5a 100644 --- a/lms/djangoapps/course_api/tests/test_views.py +++ b/lms/djangoapps/course_api/tests/test_views.py @@ -3,7 +3,7 @@ Tests for Course API views. """ from hashlib import md5 -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import RequestFactory from django.test.utils import override_settings from nose.plugins.attrib import attr diff --git a/lms/djangoapps/course_goals/tests/test_api.py b/lms/djangoapps/course_goals/tests/test_api.py index 5593ce9d96..edca8d9fa5 100644 --- a/lms/djangoapps/course_goals/tests/test_api.py +++ b/lms/djangoapps/course_goals/tests/test_api.py @@ -4,7 +4,7 @@ Unit tests for course_goals.api methods. import mock from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from lms.djangoapps.course_goals.models import CourseGoal from rest_framework.test import APIClient diff --git a/lms/djangoapps/course_wiki/tests/tests.py b/lms/djangoapps/course_wiki/tests/tests.py index a18f051a45..02a79cb761 100644 --- a/lms/djangoapps/course_wiki/tests/tests.py +++ b/lms/djangoapps/course_wiki/tests/tests.py @@ -2,7 +2,7 @@ Tests for course wiki """ -from django.core.urlresolvers import reverse +from django.urls import reverse from mock import patch from nose.plugins.attrib import attr from six import text_type diff --git a/lms/djangoapps/courseware/courses.py b/lms/djangoapps/courseware/courses.py index cef3e7dd71..0738d1c525 100644 --- a/lms/djangoapps/courseware/courses.py +++ b/lms/djangoapps/courseware/courses.py @@ -21,7 +21,7 @@ from courseware.date_summary import ( from courseware.model_data import FieldDataCache from courseware.module_render import get_module from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404, QueryDict from enrollment.api import get_course_enrollment_details from edxmako.shortcuts import render_to_string diff --git a/lms/djangoapps/courseware/date_summary.py b/lms/djangoapps/courseware/date_summary.py index 85dda38074..20ca88ac85 100644 --- a/lms/djangoapps/courseware/date_summary.py +++ b/lms/djangoapps/courseware/date_summary.py @@ -9,7 +9,7 @@ import datetime from babel.dates import format_timedelta from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.formats import date_format from django.utils.functional import cached_property from django.utils.translation import get_language, to_locale, ugettext_lazy diff --git a/lms/djangoapps/courseware/features/common.py b/lms/djangoapps/courseware/features/common.py index 160bba983b..79e17f4816 100644 --- a/lms/djangoapps/courseware/features/common.py +++ b/lms/djangoapps/courseware/features/common.py @@ -7,7 +7,7 @@ import time from logging import getLogger from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from lettuce import step, world from lettuce.django import django_url diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index a48307ddd1..dd38fa8af9 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -15,7 +15,7 @@ from django.contrib.auth.models import User from django.core.cache import cache from django.template.context_processors import csrf from django.core.exceptions import PermissionDenied -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404, HttpResponse, HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt from edx_proctoring.services import ProctoringService diff --git a/lms/djangoapps/courseware/tests/helpers.py b/lms/djangoapps/courseware/tests/helpers.py index 6387faa28e..7b163f3357 100644 --- a/lms/djangoapps/courseware/tests/helpers.py +++ b/lms/djangoapps/courseware/tests/helpers.py @@ -5,7 +5,7 @@ import json from django.contrib import messages from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from django.test.client import Client, RequestFactory from six import text_type diff --git a/lms/djangoapps/courseware/tests/test_about.py b/lms/djangoapps/courseware/tests/test_about.py index 9aa1b70f92..88350f45b3 100644 --- a/lms/djangoapps/courseware/tests/test_about.py +++ b/lms/djangoapps/courseware/tests/test_about.py @@ -6,7 +6,7 @@ import ddt import pytz from ccx_keys.locator import CCXLocator from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from milestones.tests.utils import MilestonesTestCaseMixin from mock import patch diff --git a/lms/djangoapps/courseware/tests/test_access.py b/lms/djangoapps/courseware/tests/test_access.py index 66ae0a6d73..6dabede671 100644 --- a/lms/djangoapps/courseware/tests/test_access.py +++ b/lms/djangoapps/courseware/tests/test_access.py @@ -9,7 +9,7 @@ import ddt import pytz from ccx_keys.locator import CCXLocator from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from django.test.client import RequestFactory from milestones.tests.utils import MilestonesTestCaseMixin diff --git a/lms/djangoapps/courseware/tests/test_course_info.py b/lms/djangoapps/courseware/tests/test_course_info.py index 04ec1bf688..60fa76eef2 100644 --- a/lms/djangoapps/courseware/tests/test_course_info.py +++ b/lms/djangoapps/courseware/tests/test_course_info.py @@ -5,7 +5,7 @@ Test the course_info xblock import ddt import mock from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import QueryDict from django.test.utils import override_settings diff --git a/lms/djangoapps/courseware/tests/test_course_survey.py b/lms/djangoapps/courseware/tests/test_course_survey.py index 9ac5032532..c51e8abb2a 100644 --- a/lms/djangoapps/courseware/tests/test_course_survey.py +++ b/lms/djangoapps/courseware/tests/test_course_survey.py @@ -6,7 +6,7 @@ from collections import OrderedDict from copy import deepcopy from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from nose.plugins.attrib import attr from common.test.utils import XssTestMixin diff --git a/lms/djangoapps/courseware/tests/test_courses.py b/lms/djangoapps/courseware/tests/test_courses.py index 41512357c9..92454ee202 100644 --- a/lms/djangoapps/courseware/tests/test_courses.py +++ b/lms/djangoapps/courseware/tests/test_courses.py @@ -9,7 +9,7 @@ import ddt import mock import pytz from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.client import RequestFactory from django.test.utils import override_settings from nose.plugins.attrib import attr diff --git a/lms/djangoapps/courseware/tests/test_credit_requirements.py b/lms/djangoapps/courseware/tests/test_credit_requirements.py index 416fe25874..e539b2d2da 100644 --- a/lms/djangoapps/courseware/tests/test_credit_requirements.py +++ b/lms/djangoapps/courseware/tests/test_credit_requirements.py @@ -4,7 +4,7 @@ Tests for credit requirement display on the progress page. import ddt from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from mock import patch from course_modes.models import CourseMode diff --git a/lms/djangoapps/courseware/tests/test_date_summary.py b/lms/djangoapps/courseware/tests/test_date_summary.py index 5ddb17704a..b58195f864 100644 --- a/lms/djangoapps/courseware/tests/test_date_summary.py +++ b/lms/djangoapps/courseware/tests/test_date_summary.py @@ -5,7 +5,7 @@ from datetime import datetime, timedelta import ddt import waffle from django.contrib.messages.middleware import MessageMiddleware -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import RequestFactory from freezegun import freeze_time from mock import patch diff --git a/lms/djangoapps/courseware/tests/test_discussion_xblock.py b/lms/djangoapps/courseware/tests/test_discussion_xblock.py index 05db1e5a36..f01a3ddcc8 100644 --- a/lms/djangoapps/courseware/tests/test_discussion_xblock.py +++ b/lms/djangoapps/courseware/tests/test_discussion_xblock.py @@ -11,7 +11,7 @@ import uuid import ddt import mock -from django.core.urlresolvers import reverse +from django.urls import reverse from web_fragments.fragment import Fragment from xblock.field_data import DictFieldData diff --git a/lms/djangoapps/courseware/tests/test_entrance_exam.py b/lms/djangoapps/courseware/tests/test_entrance_exam.py index b56e1e074f..eeeab157a4 100644 --- a/lms/djangoapps/courseware/tests/test_entrance_exam.py +++ b/lms/djangoapps/courseware/tests/test_entrance_exam.py @@ -1,7 +1,7 @@ """ Tests use cases related to LMS Entrance Exam behavior, such as gated content access (TOC) """ -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.client import RequestFactory from mock import Mock, patch diff --git a/lms/djangoapps/courseware/tests/test_i18n.py b/lms/djangoapps/courseware/tests/test_i18n.py index 71e1c8f779..939cc69793 100644 --- a/lms/djangoapps/courseware/tests/test_i18n.py +++ b/lms/djangoapps/courseware/tests/test_i18n.py @@ -7,7 +7,7 @@ import re from django.conf import settings from django.contrib.auth.models import User -from django.core.urlresolvers import reverse, reverse_lazy +from django.urls import reverse, reverse_lazy from django.test import TestCase from django.test.client import Client from django.utils import translation diff --git a/lms/djangoapps/courseware/tests/test_lti_integration.py b/lms/djangoapps/courseware/tests/test_lti_integration.py index b6be3737a8..74a92ffefc 100644 --- a/lms/djangoapps/courseware/tests/test_lti_integration.py +++ b/lms/djangoapps/courseware/tests/test_lti_integration.py @@ -7,7 +7,7 @@ from collections import OrderedDict import mock import pytest from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse import oauthlib from courseware.tests.helpers import BaseTestXmodule diff --git a/lms/djangoapps/courseware/tests/test_masquerade.py b/lms/djangoapps/courseware/tests/test_masquerade.py index d2e494ae41..7a7d1ae3dd 100644 --- a/lms/djangoapps/courseware/tests/test_masquerade.py +++ b/lms/djangoapps/courseware/tests/test_masquerade.py @@ -6,7 +6,7 @@ import pickle from datetime import datetime from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from mock import patch from pytz import UTC diff --git a/lms/djangoapps/courseware/tests/test_microsites.py b/lms/djangoapps/courseware/tests/test_microsites.py index 46d35e3c53..2ba2f627aa 100644 --- a/lms/djangoapps/courseware/tests/test_microsites.py +++ b/lms/djangoapps/courseware/tests/test_microsites.py @@ -6,7 +6,7 @@ import pytest from bs4 import BeautifulSoup from contextlib import contextmanager from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from mock import patch from nose.plugins.attrib import attr diff --git a/lms/djangoapps/courseware/tests/test_module_render.py b/lms/djangoapps/courseware/tests/test_module_render.py index 0a454cf77b..366cb42a31 100644 --- a/lms/djangoapps/courseware/tests/test_module_render.py +++ b/lms/djangoapps/courseware/tests/test_module_render.py @@ -15,7 +15,7 @@ from completion.models import BlockCompletion from completion import waffle as completion_waffle from django.conf import settings from django.contrib.auth.models import AnonymousUser -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404, HttpResponse from django.test.client import RequestFactory from django.test.utils import override_settings diff --git a/lms/djangoapps/courseware/tests/test_navigation.py b/lms/djangoapps/courseware/tests/test_navigation.py index d3abde6e82..e5f61a34c5 100644 --- a/lms/djangoapps/courseware/tests/test_navigation.py +++ b/lms/djangoapps/courseware/tests/test_navigation.py @@ -4,7 +4,7 @@ This test file will run through some LMS test scenarios regarding access and nav import time from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from mock import patch from nose.plugins.attrib import attr diff --git a/lms/djangoapps/courseware/tests/test_password_history.py b/lms/djangoapps/courseware/tests/test_password_history.py index 8a4e5a87f9..05d6ad72ff 100644 --- a/lms/djangoapps/courseware/tests/test_password_history.py +++ b/lms/djangoapps/courseware/tests/test_password_history.py @@ -8,7 +8,7 @@ from uuid import uuid4 import ddt from django.contrib.auth.models import User from django.contrib.auth.tokens import default_token_generator -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from django.utils import timezone from django.utils.http import int_to_base36 diff --git a/lms/djangoapps/courseware/tests/test_split_module.py b/lms/djangoapps/courseware/tests/test_split_module.py index bc837e696e..41b1fd9142 100644 --- a/lms/djangoapps/courseware/tests/test_split_module.py +++ b/lms/djangoapps/courseware/tests/test_split_module.py @@ -1,7 +1,7 @@ """ Test for split test XModule """ -from django.core.urlresolvers import reverse +from django.urls import reverse from mock import MagicMock from nose.plugins.attrib import attr from six import text_type diff --git a/lms/djangoapps/courseware/tests/test_submitting_problems.py b/lms/djangoapps/courseware/tests/test_submitting_problems.py index bfd2ca66b8..5505520ad1 100644 --- a/lms/djangoapps/courseware/tests/test_submitting_problems.py +++ b/lms/djangoapps/courseware/tests/test_submitting_problems.py @@ -12,7 +12,7 @@ from textwrap import dedent import ddt from django.conf import settings from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from django.test.client import RequestFactory from django.utils.timezone import now diff --git a/lms/djangoapps/courseware/tests/test_tabs.py b/lms/djangoapps/courseware/tests/test_tabs.py index 121adf99c9..de7fc6f771 100644 --- a/lms/djangoapps/courseware/tests/test_tabs.py +++ b/lms/djangoapps/courseware/tests/test_tabs.py @@ -4,7 +4,7 @@ Test cases for tabs. import pytest from django.contrib.auth.models import AnonymousUser -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404 from milestones.tests.utils import MilestonesTestCaseMixin from mock import MagicMock, Mock, patch diff --git a/lms/djangoapps/courseware/tests/test_view_authentication.py b/lms/djangoapps/courseware/tests/test_view_authentication.py index e9ab065bb0..c0bd58c735 100644 --- a/lms/djangoapps/courseware/tests/test_view_authentication.py +++ b/lms/djangoapps/courseware/tests/test_view_authentication.py @@ -1,7 +1,7 @@ import datetime import pytz -from django.core.urlresolvers import reverse +from django.urls import reverse from mock import patch from nose.plugins.attrib import attr from six import text_type diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index d4db7e8dde..c28f4e300a 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -13,7 +13,7 @@ from uuid import uuid4 import ddt from django.conf import settings from django.contrib.auth.models import AnonymousUser -from django.core.urlresolvers import reverse, reverse_lazy +from django.urls import reverse, reverse_lazy from django.http import Http404, HttpResponseBadRequest from django.test import TestCase from django.test.client import Client, RequestFactory diff --git a/lms/djangoapps/courseware/tests/tests.py b/lms/djangoapps/courseware/tests/tests.py index 92dde53e45..384d7a92e1 100644 --- a/lms/djangoapps/courseware/tests/tests.py +++ b/lms/djangoapps/courseware/tests/tests.py @@ -5,7 +5,7 @@ from textwrap import dedent from unittest import TestCase import mock -from django.core.urlresolvers import reverse +from django.urls import reverse from nose.plugins.attrib import attr from opaque_keys.edx.keys import CourseKey from six import text_type diff --git a/lms/djangoapps/courseware/url_helpers.py b/lms/djangoapps/courseware/url_helpers.py index 25ac8e4915..2c82f2a653 100644 --- a/lms/djangoapps/courseware/url_helpers.py +++ b/lms/djangoapps/courseware/url_helpers.py @@ -3,7 +3,7 @@ Module to define url helpers functions """ from urllib import urlencode -from django.core.urlresolvers import reverse +from django.urls import reverse from xmodule.modulestore.django import modulestore from xmodule.modulestore.search import navigation_index, path_to_location diff --git a/lms/djangoapps/courseware/views/index.py b/lms/djangoapps/courseware/views/index.py index f6ad873cf9..50f0d82a69 100644 --- a/lms/djangoapps/courseware/views/index.py +++ b/lms/djangoapps/courseware/views/index.py @@ -10,7 +10,7 @@ import urllib from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.views import redirect_to_login -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404 from django.template.context_processors import csrf from django.utils.decorators import method_decorator diff --git a/lms/djangoapps/courseware/views/views.py b/lms/djangoapps/courseware/views/views.py index 31e2a635cf..3496788e0b 100644 --- a/lms/djangoapps/courseware/views/views.py +++ b/lms/djangoapps/courseware/views/views.py @@ -12,7 +12,7 @@ from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.auth.models import AnonymousUser, User from django.core.exceptions import PermissionDenied -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import transaction from django.db.models import Q from django.http import Http404, HttpResponse, HttpResponseBadRequest, HttpResponseForbidden diff --git a/lms/djangoapps/dashboard/tests/test_sysadmin.py b/lms/djangoapps/dashboard/tests/test_sysadmin.py index 10a65e27c7..fe3304a0ad 100644 --- a/lms/djangoapps/dashboard/tests/test_sysadmin.py +++ b/lms/djangoapps/dashboard/tests/test_sysadmin.py @@ -11,7 +11,7 @@ from uuid import uuid4 import mongoengine from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.client import Client from django.test.utils import override_settings from pytz import UTC diff --git a/lms/djangoapps/discussion/templates/discussion/discussion_board_fragment.html b/lms/djangoapps/discussion/templates/discussion/discussion_board_fragment.html index 82863b484c..0adb14423d 100644 --- a/lms/djangoapps/discussion/templates/discussion/discussion_board_fragment.html +++ b/lms/djangoapps/discussion/templates/discussion/discussion_board_fragment.html @@ -8,7 +8,7 @@ import json from django.utils.translation import ugettext as _ from django.template.defaultfilters import escapejs -from django.core.urlresolvers import reverse +from django.urls import reverse from django_comment_client.permissions import has_permission from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string diff --git a/lms/djangoapps/discussion/templates/discussion/discussion_profile_page.html b/lms/djangoapps/discussion/templates/discussion/discussion_profile_page.html index f6e3bdf60f..e28b32599f 100644 --- a/lms/djangoapps/discussion/templates/discussion/discussion_profile_page.html +++ b/lms/djangoapps/discussion/templates/discussion/discussion_profile_page.html @@ -8,7 +8,7 @@ import json from django.utils.translation import ugettext as _, ungettext from django.template.defaultfilters import escapejs -from django.core.urlresolvers import reverse +from django.urls import reverse from django_comment_client.permissions import has_permission from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string diff --git a/lms/djangoapps/discussion/tests/test_views.py b/lms/djangoapps/discussion/tests/test_views.py index efabd929a4..e454e19e22 100644 --- a/lms/djangoapps/discussion/tests/test_views.py +++ b/lms/djangoapps/discussion/tests/test_views.py @@ -3,7 +3,7 @@ import logging from datetime import datetime import ddt -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404 from django.test.client import Client, RequestFactory from django.test.utils import override_settings diff --git a/lms/djangoapps/discussion/views.py b/lms/djangoapps/discussion/views.py index b123a148e3..eedbc34156 100644 --- a/lms/djangoapps/discussion/views.py +++ b/lms/djangoapps/discussion/views.py @@ -10,7 +10,7 @@ from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.contrib.staticfiles.storage import staticfiles_storage from django.template.context_processors import csrf -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404, HttpResponseServerError from django.shortcuts import render_to_response from django.template.loader import render_to_string diff --git a/lms/djangoapps/discussion_api/api.py b/lms/djangoapps/discussion_api/api.py index eeb30fc271..6c26e9af6b 100644 --- a/lms/djangoapps/discussion_api/api.py +++ b/lms/djangoapps/discussion_api/api.py @@ -7,7 +7,7 @@ from urllib import urlencode from urlparse import urlunparse from django.core.exceptions import ValidationError -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404 from enum import Enum from opaque_keys import InvalidKeyError diff --git a/lms/djangoapps/discussion_api/serializers.py b/lms/djangoapps/discussion_api/serializers.py index 4f7c1d14ff..9c8f7dd50a 100644 --- a/lms/djangoapps/discussion_api/serializers.py +++ b/lms/djangoapps/discussion_api/serializers.py @@ -6,7 +6,7 @@ from urlparse import urlunparse from django.contrib.auth.models import User as DjangoUser from django.core.exceptions import ValidationError -from django.core.urlresolvers import reverse +from django.urls import reverse from rest_framework import serializers from discussion_api.permissions import NON_UPDATABLE_COMMENT_FIELDS, NON_UPDATABLE_THREAD_FIELDS, get_editable_fields diff --git a/lms/djangoapps/discussion_api/tests/test_views.py b/lms/djangoapps/discussion_api/tests/test_views.py index 421d282ce7..9504e2bf84 100644 --- a/lms/djangoapps/discussion_api/tests/test_views.py +++ b/lms/djangoapps/discussion_api/tests/test_views.py @@ -10,7 +10,7 @@ from urlparse import urlparse import ddt import httpretty import mock -from django.core.urlresolvers import reverse +from django.urls import reverse from nose.plugins.attrib import attr from pytz import UTC from rest_framework.parsers import JSONParser diff --git a/lms/djangoapps/django_comment_client/base/event_transformers.py b/lms/djangoapps/django_comment_client/base/event_transformers.py index 736f344f46..1441ca9a7b 100644 --- a/lms/djangoapps/django_comment_client/base/event_transformers.py +++ b/lms/djangoapps/django_comment_client/base/event_transformers.py @@ -2,7 +2,7 @@ Transformers for Discussion-related events. """ from django.contrib.auth.models import User -from django.core.urlresolvers import reverse, NoReverseMatch +from django.urls import reverse, NoReverseMatch from eventtracking.processors.exceptions import EventEmissionExit from opaque_keys import InvalidKeyError diff --git a/lms/djangoapps/django_comment_client/base/tests.py b/lms/djangoapps/django_comment_client/base/tests.py index 603f0c37eb..3203087819 100644 --- a/lms/djangoapps/django_comment_client/base/tests.py +++ b/lms/djangoapps/django_comment_client/base/tests.py @@ -9,7 +9,7 @@ import ddt import pytest from django.contrib.auth.models import User from django.core.management import call_command -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.client import RequestFactory from eventtracking.processors.exceptions import EventEmissionExit from mock import ANY, Mock, patch diff --git a/lms/djangoapps/django_comment_client/tests/test_utils.py b/lms/djangoapps/django_comment_client/tests/test_utils.py index 4e237df82c..d46a04c2bc 100644 --- a/lms/djangoapps/django_comment_client/tests/test_utils.py +++ b/lms/djangoapps/django_comment_client/tests/test_utils.py @@ -6,7 +6,7 @@ import ddt import mock import pytest -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import RequestFactory, TestCase from mock import Mock, patch from nose.plugins.attrib import attr diff --git a/lms/djangoapps/django_comment_client/utils.py b/lms/djangoapps/django_comment_client/utils.py index 24c928c349..abcbf5fa63 100644 --- a/lms/djangoapps/django_comment_client/utils.py +++ b/lms/djangoapps/django_comment_client/utils.py @@ -5,7 +5,7 @@ from datetime import datetime from django.conf import settings from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import connection from django.http import HttpResponse from pytz import UTC diff --git a/lms/djangoapps/edxnotes/helpers.py b/lms/djangoapps/edxnotes/helpers.py index 4c981d9d70..e01c0cc539 100644 --- a/lms/djangoapps/edxnotes/helpers.py +++ b/lms/djangoapps/edxnotes/helpers.py @@ -13,7 +13,7 @@ import requests from dateutil.parser import parse as dateutil_parse from django.conf import settings from django.core.exceptions import ImproperlyConfigured -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from opaque_keys.edx.keys import UsageKey from provider.oauth2.models import Client diff --git a/lms/djangoapps/edxnotes/tests.py b/lms/djangoapps/edxnotes/tests.py index 4b45d6bba3..173c696871 100644 --- a/lms/djangoapps/edxnotes/tests.py +++ b/lms/djangoapps/edxnotes/tests.py @@ -13,7 +13,7 @@ import jwt from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.core.exceptions import ImproperlyConfigured -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.client import RequestFactory from django.test.utils import override_settings from edx_oauth2_provider.tests.factories import ClientFactory diff --git a/lms/djangoapps/edxnotes/views.py b/lms/djangoapps/edxnotes/views.py index bf4ed68e28..512beca9d2 100644 --- a/lms/djangoapps/edxnotes/views.py +++ b/lms/djangoapps/edxnotes/views.py @@ -6,7 +6,7 @@ import logging from django.conf import settings from django.contrib.auth.decorators import login_required -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404, HttpResponse from django.views.decorators.http import require_GET from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/experiments/tests/test_views.py b/lms/djangoapps/experiments/tests/test_views.py index 71dbb64828..d3b48d4abc 100644 --- a/lms/djangoapps/experiments/tests/test_views.py +++ b/lms/djangoapps/experiments/tests/test_views.py @@ -3,7 +3,7 @@ import unittest from django.conf import settings from django.core.handlers.wsgi import WSGIRequest -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from mock import patch from rest_framework.test import APITestCase diff --git a/lms/djangoapps/grades/api/tests/test_views.py b/lms/djangoapps/grades/api/tests/test_views.py index caaef711a0..311ad02044 100644 --- a/lms/djangoapps/grades/api/tests/test_views.py +++ b/lms/djangoapps/grades/api/tests/test_views.py @@ -5,7 +5,7 @@ from datetime import datetime from urllib import urlencode import ddt -from django.core.urlresolvers import reverse +from django.urls import reverse from edx_oauth2_provider.tests.factories import AccessTokenFactory, ClientFactory from mock import patch from opaque_keys import InvalidKeyError diff --git a/lms/djangoapps/grades/api/v1/tests/test_views.py b/lms/djangoapps/grades/api/v1/tests/test_views.py index e73361bf9e..7ffb728376 100644 --- a/lms/djangoapps/grades/api/v1/tests/test_views.py +++ b/lms/djangoapps/grades/api/v1/tests/test_views.py @@ -4,7 +4,7 @@ Tests for v1 views from datetime import datetime import ddt -from django.core.urlresolvers import reverse +from django.urls import reverse from mock import MagicMock, patch from opaque_keys import InvalidKeyError from pytz import UTC diff --git a/lms/djangoapps/instructor/enrollment.py b/lms/djangoapps/instructor/enrollment.py index 6e8977e90c..3fabe4630f 100644 --- a/lms/djangoapps/instructor/enrollment.py +++ b/lms/djangoapps/instructor/enrollment.py @@ -12,7 +12,7 @@ import pytz from django.conf import settings from django.contrib.auth.models import User from django.core.mail import send_mail -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import override as override_language from six import text_type diff --git a/lms/djangoapps/instructor/tests/test_api.py b/lms/djangoapps/instructor/tests/test_api.py index 8704181323..5275f8d6c0 100644 --- a/lms/djangoapps/instructor/tests/test_api.py +++ b/lms/djangoapps/instructor/tests/test_api.py @@ -16,7 +16,7 @@ from django.conf import settings from django.contrib.auth.models import User from django.core import mail from django.core.files.uploadedfile import SimpleUploadedFile -from django.core.urlresolvers import reverse as django_reverse +from django.urls import reverse as django_reverse from django.http import HttpRequest, HttpResponse from django.test import RequestFactory, TestCase from django.test.utils import override_settings diff --git a/lms/djangoapps/instructor/tests/test_api_email_localization.py b/lms/djangoapps/instructor/tests/test_api_email_localization.py index c48f843f49..a6c3e0a641 100644 --- a/lms/djangoapps/instructor/tests/test_api_email_localization.py +++ b/lms/djangoapps/instructor/tests/test_api_email_localization.py @@ -4,7 +4,7 @@ Unit tests for the localization of emails sent by instructor.api methods. """ from django.core import mail -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from nose.plugins.attrib import attr from six import text_type diff --git a/lms/djangoapps/instructor/tests/test_certificates.py b/lms/djangoapps/instructor/tests/test_certificates.py index e6fe57cae2..54345f14ab 100644 --- a/lms/djangoapps/instructor/tests/test_certificates.py +++ b/lms/djangoapps/instructor/tests/test_certificates.py @@ -11,7 +11,7 @@ from config_models.models import cache from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.core.files.uploadedfile import SimpleUploadedFile -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from nose.plugins.attrib import attr diff --git a/lms/djangoapps/instructor/tests/test_ecommerce.py b/lms/djangoapps/instructor/tests/test_ecommerce.py index 2bc2f6b19c..a9bbbe3a86 100644 --- a/lms/djangoapps/instructor/tests/test_ecommerce.py +++ b/lms/djangoapps/instructor/tests/test_ecommerce.py @@ -5,7 +5,7 @@ Unit tests for Ecommerce feature flag in new instructor dashboard. import datetime import pytz -from django.core.urlresolvers import reverse +from django.urls import reverse from nose.plugins.attrib import attr from six import text_type diff --git a/lms/djangoapps/instructor/tests/test_email.py b/lms/djangoapps/instructor/tests/test_email.py index a889f62b6c..f2f3be05f5 100644 --- a/lms/djangoapps/instructor/tests/test_email.py +++ b/lms/djangoapps/instructor/tests/test_email.py @@ -5,7 +5,7 @@ non-Mongo backed courses, regardless of email feature flag, and that the view is conditionally available when Course Auth is turned on. """ -from django.core.urlresolvers import reverse +from django.urls import reverse from nose.plugins.attrib import attr from opaque_keys.edx.keys import CourseKey from six import text_type diff --git a/lms/djangoapps/instructor/tests/test_proctoring.py b/lms/djangoapps/instructor/tests/test_proctoring.py index ef1506cec2..a7746dffcf 100644 --- a/lms/djangoapps/instructor/tests/test_proctoring.py +++ b/lms/djangoapps/instructor/tests/test_proctoring.py @@ -4,7 +4,7 @@ Unit tests for Edx Proctoring feature flag in new instructor dashboard. import ddt from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from mock import patch from nose.plugins.attrib import attr from six import text_type diff --git a/lms/djangoapps/instructor/tests/test_registration_codes.py b/lms/djangoapps/instructor/tests/test_registration_codes.py index 9c7e7bde73..52c85afdbd 100644 --- a/lms/djangoapps/instructor/tests/test_registration_codes.py +++ b/lms/djangoapps/instructor/tests/test_registration_codes.py @@ -3,7 +3,7 @@ Test for the registration code status information. """ import json -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from django.utils.translation import ugettext as _ from nose.plugins.attrib import attr diff --git a/lms/djangoapps/instructor/tests/test_spoc_gradebook.py b/lms/djangoapps/instructor/tests/test_spoc_gradebook.py index ec16a13dc3..df0110c865 100644 --- a/lms/djangoapps/instructor/tests/test_spoc_gradebook.py +++ b/lms/djangoapps/instructor/tests/test_spoc_gradebook.py @@ -2,7 +2,7 @@ Tests of the instructor dashboard spoc gradebook """ -from django.core.urlresolvers import reverse +from django.urls import reverse from nose.plugins.attrib import attr from six import text_type diff --git a/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py b/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py index 102d6c4a20..cfc8045381 100644 --- a/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py +++ b/lms/djangoapps/instructor/tests/views/test_instructor_dashboard.py @@ -6,7 +6,7 @@ import datetime import ddt from django.conf import settings from django.contrib.sites.models import Site -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.client import RequestFactory from django.test.utils import override_settings from mock import patch diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index 00886585f3..434ca59a7f 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -25,7 +25,7 @@ from django.core.exceptions import ( ValidationError ) from django.core.mail.message import EmailMessage -from django.core.urlresolvers import reverse +from django.urls import reverse from django.core.validators import validate_email from django.db import IntegrityError, transaction from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, HttpResponseNotFound diff --git a/lms/djangoapps/instructor/views/gradebook_api.py b/lms/djangoapps/instructor/views/gradebook_api.py index aa690eddda..922d351d08 100644 --- a/lms/djangoapps/instructor/views/gradebook_api.py +++ b/lms/djangoapps/instructor/views/gradebook_api.py @@ -5,7 +5,7 @@ which is currently use by ccx and instructor apps. import math from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import transaction from django.views.decorators.cache import cache_control from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index 97ac3eaec3..65bfdb7b06 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -9,7 +9,7 @@ import uuid import pytz from django.conf import settings from django.contrib.auth.decorators import login_required -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404, HttpResponseServerError from django.utils.html import escape from django.utils.translation import ugettext as _ diff --git a/lms/djangoapps/instructor/views/registration_codes.py b/lms/djangoapps/instructor/views/registration_codes.py index ad8c00fe6e..357de69be6 100644 --- a/lms/djangoapps/instructor/views/registration_codes.py +++ b/lms/djangoapps/instructor/views/registration_codes.py @@ -3,7 +3,7 @@ E-commerce Tab Instructor Dashboard Query Registration Code Status. """ import logging -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from django.views.decorators.cache import cache_control from django.views.decorators.http import require_GET, require_POST diff --git a/lms/djangoapps/instructor_analytics/basic.py b/lms/djangoapps/instructor_analytics/basic.py index 0851f4a6ac..3a5130c116 100644 --- a/lms/djangoapps/instructor_analytics/basic.py +++ b/lms/djangoapps/instructor_analytics/basic.py @@ -10,7 +10,7 @@ from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from django.core.serializers.json import DjangoJSONEncoder -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db.models import Count, Q from edx_proctoring.api import get_exam_violation_report from opaque_keys.edx.keys import UsageKey diff --git a/lms/djangoapps/instructor_analytics/tests/test_basic.py b/lms/djangoapps/instructor_analytics/tests/test_basic.py index 6d2b616e52..1d85160986 100644 --- a/lms/djangoapps/instructor_analytics/tests/test_basic.py +++ b/lms/djangoapps/instructor_analytics/tests/test_basic.py @@ -6,7 +6,7 @@ import datetime import json import pytz -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db.models import Q from edx_proctoring.api import create_exam from edx_proctoring.models import ProctoredExamStudentAttempt diff --git a/lms/djangoapps/instructor_task/tests/test_base.py b/lms/djangoapps/instructor_task/tests/test_base.py index 1bd6277bd4..80bad8b4c5 100644 --- a/lms/djangoapps/instructor_task/tests/test_base.py +++ b/lms/djangoapps/instructor_task/tests/test_base.py @@ -12,7 +12,7 @@ from uuid import uuid4 import unicodecsv from celery.states import FAILURE, SUCCESS from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from mock import Mock, patch from opaque_keys.edx.locations import Location from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/instructor_task/tests/test_integration.py b/lms/djangoapps/instructor_task/tests/test_integration.py index 092f0107b5..1c2ea4ec28 100644 --- a/lms/djangoapps/instructor_task/tests/test_integration.py +++ b/lms/djangoapps/instructor_task/tests/test_integration.py @@ -13,7 +13,7 @@ from collections import namedtuple import ddt from celery.states import FAILURE, SUCCESS from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from mock import patch from nose.plugins.attrib import attr from six import text_type diff --git a/lms/djangoapps/instructor_task/tests/test_tasks_helper.py b/lms/djangoapps/instructor_task/tests/test_tasks_helper.py index 5efde29c06..502d83adc1 100644 --- a/lms/djangoapps/instructor_task/tests/test_tasks_helper.py +++ b/lms/djangoapps/instructor_task/tests/test_tasks_helper.py @@ -22,7 +22,7 @@ from course_modes.models import CourseMode from course_modes.tests.factories import CourseModeFactory from courseware.tests.factories import InstructorFactory from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.utils import override_settings from freezegun import freeze_time from instructor_analytics.basic import UNAVAILABLE, list_problem_responses diff --git a/lms/djangoapps/learner_dashboard/programs.py b/lms/djangoapps/learner_dashboard/programs.py index 82a88b128e..d08e40b255 100644 --- a/lms/djangoapps/learner_dashboard/programs.py +++ b/lms/djangoapps/learner_dashboard/programs.py @@ -6,7 +6,7 @@ import json from django.http import Http404 from django.template.loader import render_to_string from django.utils.translation import get_language_bidi -from django.core.urlresolvers import reverse +from django.urls import reverse from web_fragments.fragment import Fragment diff --git a/lms/djangoapps/learner_dashboard/tests/test_programs.py b/lms/djangoapps/learner_dashboard/tests/test_programs.py index 5387b733aa..627893bd03 100644 --- a/lms/djangoapps/learner_dashboard/tests/test_programs.py +++ b/lms/djangoapps/learner_dashboard/tests/test_programs.py @@ -10,7 +10,7 @@ from uuid import uuid4 import mock from bs4 import BeautifulSoup from django.conf import settings -from django.core.urlresolvers import reverse, reverse_lazy +from django.urls import reverse, reverse_lazy from django.test import override_settings from lms.envs.test import CREDENTIALS_PUBLIC_SERVICE_URL diff --git a/lms/djangoapps/lms_xblock/runtime.py b/lms/djangoapps/lms_xblock/runtime.py index 52179f10e0..ce3b8cf221 100644 --- a/lms/djangoapps/lms_xblock/runtime.py +++ b/lms/djangoapps/lms_xblock/runtime.py @@ -3,7 +3,7 @@ Module implementing `xblock.runtime.Runtime` functionality for the LMS """ from completion.services import CompletionService from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse import xblock.reference.plugins from badges.service import BadgingService diff --git a/lms/djangoapps/lti_provider/tests/test_views.py b/lms/djangoapps/lti_provider/tests/test_views.py index d4dd15ec4c..64461be81b 100644 --- a/lms/djangoapps/lti_provider/tests/test_views.py +++ b/lms/djangoapps/lti_provider/tests/test_views.py @@ -3,7 +3,7 @@ Tests for the LTI provider views """ import pytest -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from django.test.client import RequestFactory from mock import MagicMock, patch diff --git a/lms/djangoapps/mobile_api/testutils.py b/lms/djangoapps/mobile_api/testutils.py index 3739e5c0d1..b1af12a70e 100644 --- a/lms/djangoapps/mobile_api/testutils.py +++ b/lms/djangoapps/mobile_api/testutils.py @@ -14,7 +14,7 @@ Test utilities for mobile API tests: import ddt import datetime from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils import timezone from mock import patch from opaque_keys.edx.keys import CourseKey diff --git a/lms/djangoapps/notes/models.py b/lms/djangoapps/notes/models.py index 60776d7b63..4515b27249 100644 --- a/lms/djangoapps/notes/models.py +++ b/lms/djangoapps/notes/models.py @@ -2,7 +2,7 @@ import json from django.contrib.auth.models import User from django.core.exceptions import ValidationError -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import models from django.utils.html import strip_tags from opaque_keys.edx.django.models import CourseKeyField diff --git a/lms/djangoapps/notes/tests.py b/lms/djangoapps/notes/tests.py index b32b99910d..2ee2e263b3 100644 --- a/lms/djangoapps/notes/tests.py +++ b/lms/djangoapps/notes/tests.py @@ -6,7 +6,7 @@ import json from django.contrib.auth.models import User from django.core.exceptions import ValidationError -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import RequestFactory, TestCase from django.test.client import Client from mock import Mock, patch diff --git a/lms/djangoapps/notification_prefs/tests.py b/lms/djangoapps/notification_prefs/tests.py index 8aac28453e..85bc646876 100644 --- a/lms/djangoapps/notification_prefs/tests.py +++ b/lms/djangoapps/notification_prefs/tests.py @@ -2,7 +2,7 @@ import json from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import Http404 from django.test import TestCase from django.test.client import RequestFactory diff --git a/lms/djangoapps/rss_proxy/tests/test_views.py b/lms/djangoapps/rss_proxy/tests/test_views.py index ae5abea07d..2d89dccb0f 100644 --- a/lms/djangoapps/rss_proxy/tests/test_views.py +++ b/lms/djangoapps/rss_proxy/tests/test_views.py @@ -1,7 +1,7 @@ """ Tests for the rss_proxy views """ -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from mock import Mock, patch diff --git a/lms/djangoapps/shoppingcart/api.py b/lms/djangoapps/shoppingcart/api.py index b8157cab37..f466bd6159 100644 --- a/lms/djangoapps/shoppingcart/api.py +++ b/lms/djangoapps/shoppingcart/api.py @@ -1,7 +1,7 @@ """ API for for getting information about the user's shopping cart. """ -from django.core.urlresolvers import reverse +from django.urls import reverse from shoppingcart.models import OrderItem from xmodule.modulestore.django import ModuleI18nService diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index 54edf2df70..809f08414d 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -20,7 +20,7 @@ from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from django.core.mail import send_mail from django.core.mail.message import EmailMessage -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import models, transaction from django.db.models import Count, F, Q, Sum from django.db.models.signals import post_delete, post_save diff --git a/lms/djangoapps/shoppingcart/tests/test_configuration_overrides.py b/lms/djangoapps/shoppingcart/tests/test_configuration_overrides.py index 3ecfb38b95..ed9849a740 100644 --- a/lms/djangoapps/shoppingcart/tests/test_configuration_overrides.py +++ b/lms/djangoapps/shoppingcart/tests/test_configuration_overrides.py @@ -2,7 +2,7 @@ """ Dashboard with Shopping Cart History tests with configuration overrides. """ -from django.core.urlresolvers import reverse +from django.urls import reverse from mock import patch from course_modes.models import CourseMode diff --git a/lms/djangoapps/shoppingcart/tests/test_models.py b/lms/djangoapps/shoppingcart/tests/test_models.py index 6c085870ae..b64f786162 100644 --- a/lms/djangoapps/shoppingcart/tests/test_models.py +++ b/lms/djangoapps/shoppingcart/tests/test_models.py @@ -15,7 +15,7 @@ from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.core import mail from django.core.mail.message import EmailMessage -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import DatabaseError from django.test import TestCase from django.test.utils import override_settings diff --git a/lms/djangoapps/shoppingcart/tests/test_views.py b/lms/djangoapps/shoppingcart/tests/test_views.py index cc44487943..ad34161f52 100644 --- a/lms/djangoapps/shoppingcart/tests/test_views.py +++ b/lms/djangoapps/shoppingcart/tests/test_views.py @@ -15,7 +15,7 @@ from django.contrib.auth.models import Group, User from django.contrib.messages.storage.fallback import FallbackStorage from django.core import mail from django.core.cache import cache -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import HttpRequest from django.test import TestCase from django.test.utils import override_settings diff --git a/lms/djangoapps/shoppingcart/views.py b/lms/djangoapps/shoppingcart/views.py index 966790754f..2781a8b947 100644 --- a/lms/djangoapps/shoppingcart/views.py +++ b/lms/djangoapps/shoppingcart/views.py @@ -8,7 +8,7 @@ from config_models.decorators import require_config from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.auth.models import Group -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db.models import Q from django.http import ( Http404, diff --git a/lms/djangoapps/static_template_view/tests/test_views.py b/lms/djangoapps/static_template_view/tests/test_views.py index ff062605d6..ed8f00e488 100644 --- a/lms/djangoapps/static_template_view/tests/test_views.py +++ b/lms/djangoapps/static_template_view/tests/test_views.py @@ -2,7 +2,7 @@ Tests for static templates """ from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from openedx.core.djangoapps.site_configuration.tests.test_util import with_site_configuration_context diff --git a/lms/djangoapps/staticbook/tests.py b/lms/djangoapps/staticbook/tests.py index e4347f1618..e8c62ac321 100644 --- a/lms/djangoapps/staticbook/tests.py +++ b/lms/djangoapps/staticbook/tests.py @@ -6,7 +6,7 @@ import textwrap import mock import requests -from django.core.urlresolvers import NoReverseMatch, reverse +from django.urls import NoReverseMatch, reverse from six import text_type from student.tests.factories import CourseEnrollmentFactory, UserFactory diff --git a/lms/djangoapps/student_account/test/test_views.py b/lms/djangoapps/student_account/test/test_views.py index e5f2b207ec..30b69f6983 100644 --- a/lms/djangoapps/student_account/test/test_views.py +++ b/lms/djangoapps/student_account/test/test_views.py @@ -17,7 +17,7 @@ from django.contrib.messages.middleware import MessageMiddleware from django.contrib.sessions.middleware import SessionMiddleware from django.core import mail from django.core.files.uploadedfile import SimpleUploadedFile -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import HttpRequest from django.test import TestCase from django.test.client import RequestFactory diff --git a/lms/djangoapps/student_account/views.py b/lms/djangoapps/student_account/views.py index 38f9be8d99..bec05327ce 100644 --- a/lms/djangoapps/student_account/views.py +++ b/lms/djangoapps/student_account/views.py @@ -10,7 +10,7 @@ from django.contrib import messages from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required from django.contrib.sites.models import Site -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import HttpRequest, HttpResponse, HttpResponseBadRequest, HttpResponseForbidden from django.shortcuts import redirect from django.utils.translation import ugettext as _ diff --git a/lms/djangoapps/support/tests/test_views.py b/lms/djangoapps/support/tests/test_views.py index 587f112630..0e778930a9 100644 --- a/lms/djangoapps/support/tests/test_views.py +++ b/lms/djangoapps/support/tests/test_views.py @@ -11,7 +11,7 @@ from datetime import datetime, timedelta import ddt import pytest from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db.models import signals from nose.plugins.attrib import attr from pytz import UTC diff --git a/lms/djangoapps/support/views/enrollments.py b/lms/djangoapps/support/views/enrollments.py index 87e4041f2f..c6f7fcdcd8 100644 --- a/lms/djangoapps/support/views/enrollments.py +++ b/lms/djangoapps/support/views/enrollments.py @@ -2,7 +2,7 @@ Support tool for changing course enrollments. """ from django.contrib.auth.models import User -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import transaction from django.db.models import Q from django.http import HttpResponseBadRequest diff --git a/lms/djangoapps/support/views/index.py b/lms/djangoapps/support/views/index.py index 4bc51d0b1d..8b6630fe5e 100644 --- a/lms/djangoapps/support/views/index.py +++ b/lms/djangoapps/support/views/index.py @@ -1,7 +1,7 @@ """ Index view for the support app. """ -from django.core.urlresolvers import reverse_lazy +from django.urls import reverse_lazy from django.utils.translation import ugettext_lazy as _ from edxmako.shortcuts import render_to_response diff --git a/lms/djangoapps/support/views/manage_user.py b/lms/djangoapps/support/views/manage_user.py index 17101299ac..02ce16ef5f 100644 --- a/lms/djangoapps/support/views/manage_user.py +++ b/lms/djangoapps/support/views/manage_user.py @@ -2,7 +2,7 @@ Support tool for disabling user accounts. """ from django.contrib.auth import get_user_model -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db.models import Q from django.utils.decorators import method_decorator from django.utils.translation import ugettext as _ diff --git a/lms/djangoapps/survey/tests/test_views.py b/lms/djangoapps/survey/tests/test_views.py index 61438f2420..6e1e5bde0e 100644 --- a/lms/djangoapps/survey/tests/test_views.py +++ b/lms/djangoapps/survey/tests/test_views.py @@ -5,7 +5,7 @@ Python tests for the Survey views import json from collections import OrderedDict -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test.client import Client from student.tests.factories import UserFactory diff --git a/lms/djangoapps/survey/views.py b/lms/djangoapps/survey/views.py index db54ddf891..93fe837014 100644 --- a/lms/djangoapps/survey/views.py +++ b/lms/djangoapps/survey/views.py @@ -7,7 +7,7 @@ import logging from django.conf import settings from django.contrib.auth.decorators import login_required -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import HttpResponse, HttpResponseNotFound, HttpResponseRedirect from django.utils.html import escape from django.views.decorators.http import require_POST diff --git a/lms/djangoapps/teams/tests/test_views.py b/lms/djangoapps/teams/tests/test_views.py index 36a0e55adf..6000d5b39c 100644 --- a/lms/djangoapps/teams/tests/test_views.py +++ b/lms/djangoapps/teams/tests/test_views.py @@ -9,7 +9,7 @@ import pytest import pytz from dateutil import parser from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db.models.signals import post_save from django.utils import translation from elasticsearch.exceptions import ConnectionError diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index 6502e68006..29dc0dc9c3 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -25,7 +25,7 @@ from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.core.cache import cache from django.core.files.base import ContentFile -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import models from django.dispatch import receiver from django.utils.functional import cached_property diff --git a/lms/djangoapps/verify_student/services.py b/lms/djangoapps/verify_student/services.py index 3105db64db..8e8cbc026a 100644 --- a/lms/djangoapps/verify_student/services.py +++ b/lms/djangoapps/verify_student/services.py @@ -6,7 +6,7 @@ import logging from itertools import chain from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from course_modes.models import CourseMode diff --git a/lms/djangoapps/verify_student/tests/fake_software_secure.py b/lms/djangoapps/verify_student/tests/fake_software_secure.py index fab26690d2..cbae6181e8 100644 --- a/lms/djangoapps/verify_student/tests/fake_software_secure.py +++ b/lms/djangoapps/verify_student/tests/fake_software_secure.py @@ -4,7 +4,7 @@ Fake Software Secure page for use in acceptance tests. from django.conf import settings from django.contrib.auth.decorators import login_required -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.decorators import method_decorator from django.views.generic.base import View diff --git a/lms/djangoapps/verify_student/tests/test_integration.py b/lms/djangoapps/verify_student/tests/test_integration.py index 35d5ef23c3..7c8eec40cb 100644 --- a/lms/djangoapps/verify_student/tests/test_integration.py +++ b/lms/djangoapps/verify_student/tests/test_integration.py @@ -2,7 +2,7 @@ Integration tests of the payment flow, including course mode selection. """ -from django.core.urlresolvers import reverse +from django.urls import reverse from course_modes.tests.factories import CourseModeFactory from student.models import CourseEnrollment diff --git a/lms/djangoapps/verify_student/tests/test_views.py b/lms/djangoapps/verify_student/tests/test_views.py index 2b8882adf5..d9c1416c71 100644 --- a/lms/djangoapps/verify_student/tests/test_views.py +++ b/lms/djangoapps/verify_student/tests/test_views.py @@ -18,7 +18,7 @@ import requests from bs4 import BeautifulSoup from django.conf import settings from django.core import mail -from django.core.urlresolvers import reverse +from django.urls import reverse from django.test import TestCase from django.test.client import Client, RequestFactory from django.test.utils import override_settings diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index b81c86dfc1..7d2a63e420 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -13,7 +13,7 @@ from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.staticfiles.storage import staticfiles_storage from django.core.mail import send_mail -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db import transaction from django.http import Http404, HttpResponse, HttpResponseBadRequest from django.shortcuts import redirect diff --git a/lms/lib/courseware_search/lms_result_processor.py b/lms/lib/courseware_search/lms_result_processor.py index 633528c03e..89e1fa0d00 100644 --- a/lms/lib/courseware_search/lms_result_processor.py +++ b/lms/lib/courseware_search/lms_result_processor.py @@ -3,7 +3,7 @@ This file contains implementation override of SearchResultProcessor which will a * Blends in "location" property * Confirms user access to object """ -from django.core.urlresolvers import reverse +from django.urls import reverse from opaque_keys.edx.keys import CourseKey, UsageKey from search.result_processor import SearchResultProcessor diff --git a/lms/templates/api_admin/catalogs/edit.html b/lms/templates/api_admin/catalogs/edit.html index f66590d332..a12dca712b 100644 --- a/lms/templates/api_admin/catalogs/edit.html +++ b/lms/templates/api_admin/catalogs/edit.html @@ -2,7 +2,7 @@ <%page expression_filter="h"/> <%inherit file="../../main.html"/> <%! -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ %> diff --git a/lms/templates/api_admin/catalogs/list.html b/lms/templates/api_admin/catalogs/list.html index ddf20f3159..843b710294 100644 --- a/lms/templates/api_admin/catalogs/list.html +++ b/lms/templates/api_admin/catalogs/list.html @@ -2,7 +2,7 @@ <%page expression_filter="h"/> <%inherit file="../../main.html"/> <%! -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ %> diff --git a/lms/templates/api_admin/catalogs/search.html b/lms/templates/api_admin/catalogs/search.html index 36db13b7e0..9b3d2881ea 100644 --- a/lms/templates/api_admin/catalogs/search.html +++ b/lms/templates/api_admin/catalogs/search.html @@ -2,7 +2,7 @@ <%page expression_filter="h"/> <%inherit file="../../main.html"/> <%! -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ %> diff --git a/lms/templates/api_admin/terms_of_service.html b/lms/templates/api_admin/terms_of_service.html index 1bbcac0a29..82bb53bd40 100644 --- a/lms/templates/api_admin/terms_of_service.html +++ b/lms/templates/api_admin/terms_of_service.html @@ -2,7 +2,7 @@ <%page expression_filter="h"/> <%inherit file="../main.html"/> <%! -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ %> diff --git a/lms/templates/bookmark_button.html b/lms/templates/bookmark_button.html index 21fe05420e..57cba749dd 100644 --- a/lms/templates/bookmark_button.html +++ b/lms/templates/bookmark_button.html @@ -1,7 +1,7 @@ <%page expression_filter="h" args="bookmark_id, is_bookmarked" /> <%! -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ %> diff --git a/lms/templates/calculator/toggle_calculator.html b/lms/templates/calculator/toggle_calculator.html index 287e090cd1..3a08016443 100644 --- a/lms/templates/calculator/toggle_calculator.html +++ b/lms/templates/calculator/toggle_calculator.html @@ -2,7 +2,7 @@ <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse from openedx.core.djangolib.markup import HTML, Text %> diff --git a/lms/templates/ccx/coach_dashboard.html b/lms/templates/ccx/coach_dashboard.html index acea0a12f2..498a8d583a 100644 --- a/lms/templates/ccx/coach_dashboard.html +++ b/lms/templates/ccx/coach_dashboard.html @@ -3,7 +3,7 @@ <%namespace name='static' file='/static_content.html'/> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse from openedx.core.djangolib.js_utils import ( dump_js_escaped_json, js_escaped_string ) diff --git a/lms/templates/class_dashboard/all_section_metrics.js b/lms/templates/class_dashboard/all_section_metrics.js index 16c8f89c42..05edde730f 100644 --- a/lms/templates/class_dashboard/all_section_metrics.js +++ b/lms/templates/class_dashboard/all_section_metrics.js @@ -1,7 +1,7 @@ <%page args="id_opened_prefix, id_grade_prefix, id_attempt_prefix, id_tooltip_prefix, course_id, allSubsectionTooltipArr, allProblemTooltipArr, **kwargs"/> <%! import json - from django.core.urlresolvers import reverse + from django.urls import reverse from six import text_type %> @@ -105,4 +105,4 @@ $(function () { }); -}); \ No newline at end of file +}); diff --git a/lms/templates/conditional_module.html b/lms/templates/conditional_module.html index a35a822bcb..a4667b8b66 100644 --- a/lms/templates/conditional_module.html +++ b/lms/templates/conditional_module.html @@ -1,5 +1,5 @@ <%! -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from six import text_type %> diff --git a/lms/templates/course.html b/lms/templates/course.html index 1d438e5968..295101da82 100644 --- a/lms/templates/course.html +++ b/lms/templates/course.html @@ -2,7 +2,7 @@ <%namespace name='static' file='static_content.html'/> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse from six import text_type %> <%page args="course" expression_filter="h"/> diff --git a/lms/templates/course_modes/choose.html b/lms/templates/course_modes/choose.html index 0555183163..9d0cafd9d7 100644 --- a/lms/templates/course_modes/choose.html +++ b/lms/templates/course_modes/choose.html @@ -2,7 +2,7 @@ <%inherit file="../main.html" /> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse from openedx.core.djangolib.js_utils import js_escaped_string from openedx.core.djangolib.markup import HTML, Text %> diff --git a/lms/templates/courseware/accordion.html b/lms/templates/courseware/accordion.html index 0fd6c9a4c3..a1a3e1290b 100644 --- a/lms/templates/courseware/accordion.html +++ b/lms/templates/courseware/accordion.html @@ -1,7 +1,7 @@ <%page expression_filter="h"/> <%namespace name='static' file='../static_content.html'/> <%! - from django.core.urlresolvers import reverse + from django.urls import reverse from django.utils.translation import ugettext as _ from django.conf import settings from openedx.core.djangolib.markup import HTML, Text diff --git a/lms/templates/courseware/course_about.html b/lms/templates/courseware/course_about.html index d9b495df89..6fb28f0084 100644 --- a/lms/templates/courseware/course_about.html +++ b/lms/templates/courseware/course_about.html @@ -2,7 +2,7 @@ <%! from django.utils.translation import ugettext as _ from django.utils.translation import pgettext -from django.core.urlresolvers import reverse +from django.urls import reverse from courseware.courses import get_course_about_section from django.conf import settings from six import text_type diff --git a/lms/templates/courseware/course_about_sidebar_header.html b/lms/templates/courseware/course_about_sidebar_header.html index 520226b75e..ee39af0a65 100644 --- a/lms/templates/courseware/course_about_sidebar_header.html +++ b/lms/templates/courseware/course_about_sidebar_header.html @@ -3,7 +3,7 @@ import urllib from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse from django.conf import settings from six import text_type %> diff --git a/lms/templates/courseware/course_navigation.html b/lms/templates/courseware/course_navigation.html index 8babf99804..141957db04 100644 --- a/lms/templates/courseware/course_navigation.html +++ b/lms/templates/courseware/course_navigation.html @@ -6,7 +6,7 @@ <%! from courseware.tabs import get_course_tab_list from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ %> diff --git a/lms/templates/courseware/courseware.html b/lms/templates/courseware/courseware.html index c54a73e2c5..77ae67c3c0 100644 --- a/lms/templates/courseware/courseware.html +++ b/lms/templates/courseware/courseware.html @@ -6,7 +6,7 @@ import waffle from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from edxnotes.helpers import is_feature_enabled as is_edxnotes_enabled diff --git a/lms/templates/courseware/gradebook.html b/lms/templates/courseware/gradebook.html index db1545b8a2..ebf1b5586b 100644 --- a/lms/templates/courseware/gradebook.html +++ b/lms/templates/courseware/gradebook.html @@ -2,7 +2,7 @@ <%namespace name='static' file='/static_content.html'/> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse from six import text_type %> diff --git a/lms/templates/courseware/info.html b/lms/templates/courseware/info.html index 1798241d29..29067cfecb 100644 --- a/lms/templates/courseware/info.html +++ b/lms/templates/courseware/info.html @@ -6,7 +6,7 @@ from datetime import datetime from pytz import timezone, utc -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from courseware.courses import get_course_info_section, get_course_date_blocks diff --git a/lms/templates/courseware/program_marketing.html b/lms/templates/courseware/program_marketing.html index 3103147bd5..8889d054ac 100644 --- a/lms/templates/courseware/program_marketing.html +++ b/lms/templates/courseware/program_marketing.html @@ -5,7 +5,7 @@ <%! from datetime import datetime -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from mako import exceptions diff --git a/lms/templates/courseware/progress.html b/lms/templates/courseware/progress.html index f80738146b..1ea48d838b 100644 --- a/lms/templates/courseware/progress.html +++ b/lms/templates/courseware/progress.html @@ -7,7 +7,7 @@ from course_modes.models import CourseMode from lms.djangoapps.certificates.models import CertificateStatuses from django.utils.translation import ugettext as _ from openedx.core.djangolib.markup import HTML, Text -from django.core.urlresolvers import reverse +from django.urls import reverse from django.conf import settings from django.utils.http import urlquote_plus from six import text_type diff --git a/lms/templates/courseware/tabs.html b/lms/templates/courseware/tabs.html index bf68f8baad..8dd79f22bb 100644 --- a/lms/templates/courseware/tabs.html +++ b/lms/templates/courseware/tabs.html @@ -3,7 +3,7 @@ <%namespace name='static' file='/static_content.html'/> <%! from django.utils.translation import ugettext as _ - from django.core.urlresolvers import reverse + from django.urls import reverse %> <%page args="tab_list, active_page, default_tab, tab_image" expression_filter="h" /> diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index 5369c2e9f2..1fc45e6c1e 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -5,7 +5,7 @@ <%! import pytz from datetime import datetime, timedelta -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from django.template import RequestContext from entitlements.models import CourseEntitlement diff --git a/lms/templates/dashboard/_dashboard_course_listing.html b/lms/templates/dashboard/_dashboard_course_listing.html index 17628ff53b..680bd640c9 100644 --- a/lms/templates/dashboard/_dashboard_course_listing.html +++ b/lms/templates/dashboard/_dashboard_course_listing.html @@ -5,7 +5,7 @@ import urllib from django.utils.translation import ugettext as _ from django.utils.translation import ungettext -from django.core.urlresolvers import reverse +from django.urls import reverse from course_modes.models import CourseMode from course_modes.helpers import enrollment_mode_display from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string diff --git a/lms/templates/dashboard/_dashboard_entitlement_actions.html b/lms/templates/dashboard/_dashboard_entitlement_actions.html index 5316c53648..0c3a61c028 100644 --- a/lms/templates/dashboard/_dashboard_entitlement_actions.html +++ b/lms/templates/dashboard/_dashboard_entitlement_actions.html @@ -2,7 +2,7 @@ <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse %> <% diff --git a/lms/templates/dashboard/_dashboard_status_verification.html b/lms/templates/dashboard/_dashboard_status_verification.html index 8ed8899a8f..fa7e09c567 100644 --- a/lms/templates/dashboard/_dashboard_status_verification.html +++ b/lms/templates/dashboard/_dashboard_status_verification.html @@ -1,7 +1,7 @@ <%page expression_filter="h"/> <%namespace name='static' file='../static_content.html'/> <%! -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ %> diff --git a/lms/templates/edxnotes/toggle_notes.html b/lms/templates/edxnotes/toggle_notes.html index 90ef42b220..47533dcee4 100644 --- a/lms/templates/edxnotes/toggle_notes.html +++ b/lms/templates/edxnotes/toggle_notes.html @@ -1,7 +1,7 @@ <%page args="course" expression_filter="h"/> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string %> <%namespace name='static' file='/static_content.html'/> diff --git a/lms/templates/email_change_successful.html b/lms/templates/email_change_successful.html index 764e58576f..b58972785c 100644 --- a/lms/templates/email_change_successful.html +++ b/lms/templates/email_change_successful.html @@ -1,7 +1,7 @@ <%inherit file="main.html" /> <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse %>
diff --git a/lms/templates/emails/confirm_email_change.txt b/lms/templates/emails/confirm_email_change.txt index 2890c54f48..8f5df7083e 100644 --- a/lms/templates/emails/confirm_email_change.txt +++ b/lms/templates/emails/confirm_email_change.txt @@ -1,4 +1,4 @@ -<%! from django.core.urlresolvers import reverse %> +<%! from django.urls import reverse %> <%! from django.utils.translation import ugettext as _ %> <%! from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers %> <%! from edxmako.shortcuts import render_to_string, marketing_link %> diff --git a/lms/templates/financial-assistance/financial-assistance.html b/lms/templates/financial-assistance/financial-assistance.html index c6582ec240..3418260d2a 100644 --- a/lms/templates/financial-assistance/financial-assistance.html +++ b/lms/templates/financial-assistance/financial-assistance.html @@ -1,6 +1,6 @@ <%inherit file="../main.html"/> <% -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from edxmako.shortcuts import marketing_link diff --git a/lms/templates/footer.html b/lms/templates/footer.html index 743599be27..bf76031d26 100644 --- a/lms/templates/footer.html +++ b/lms/templates/footer.html @@ -1,7 +1,7 @@ ## mako <%page expression_filter="h"/> <%! - from django.core.urlresolvers import reverse + from django.urls import reverse from django.utils.translation import ugettext as _ from branding.api import get_footer from openedx.core.djangoapps.lang_pref.api import footer_language_selector_is_enabled diff --git a/lms/templates/forgot_password_modal.html b/lms/templates/forgot_password_modal.html index a18db5db4a..15e6bd362a 100644 --- a/lms/templates/forgot_password_modal.html +++ b/lms/templates/forgot_password_modal.html @@ -2,7 +2,7 @@ <%! from django.utils.translation import ugettext as _ -from django.core.urlresolvers import reverse +from django.urls import reverse %>