From 056225e3ac9269c0aa6cf34246d6a8b36953de13 Mon Sep 17 00:00:00 2001 From: Alison Hodges Date: Mon, 9 Nov 2015 17:26:28 -0500 Subject: [PATCH 01/87] Updates the example locations to split format --- .../instructor/instructor_dashboard_2/student_admin.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/templates/instructor/instructor_dashboard_2/student_admin.html b/lms/templates/instructor/instructor_dashboard_2/student_admin.html index a7d3b92279c4..3c1571523716 100644 --- a/lms/templates/instructor/instructor_dashboard_2/student_admin.html +++ b/lms/templates/instructor/instructor_dashboard_2/student_admin.html @@ -54,7 +54,7 @@

${_("Student-specific grade adjustment")}

## Translators: A location (string of text) follows this sentence.

${_("You must provide the complete location of the problem. In the Staff Debug viewer, the location looks like this:")}
- i4x://edX/Open_DemoX/problem/78c98390884243b89f6023745231c525

+ block-v1:edX+DemoX+2015+type@problem+block@618c5933b8b544e4a4cc103d3e508378

${_("Next, select an action to perform for the given user and problem:")} @@ -141,7 +141,7 @@

${_('Course-specific grade adjustment')}

## Translators: A location (string of text) follows this sentence.

${_("You must provide the complete location of the problem. In the Staff Debug viewer, the location looks like this:")}
- i4x://edX/Open_DemoX/problem/78c98390884243b89f6023745231c525

+ block-v1:edX+DemoX+2015+type@problem+block@618c5933b8b544e4a4cc103d3e508378

${_("Then select an action")}: From 6cb62f2697bcca1380854e139857678b2ddc35e0 Mon Sep 17 00:00:00 2001 From: Usman Khalid <2200617@gmail.com> Date: Fri, 18 Sep 2015 16:48:18 +0500 Subject: [PATCH 02/87] Rebase upgrade Django to v1.8.5 Please note that this is a squshed commit and the work of: Symbolist, macdiesel, nedbat, doctoryes, muzaffaryousaf and muhammad-ammar --- cms/djangoapps/contentstore/__init__.py | 2 - .../contentstore/context_processors.py | 2 +- .../contentstore/courseware_index.py | 6 +- .../management/commands/delete_orphans.py | 13 +- .../management/commands/export.py | 19 +- .../management/commands/fix_not_found.py | 10 +- .../management/commands/import.py | 3 +- .../commands/tests/test_delete_orphans.py | 13 +- .../management/commands/tests/test_export.py | 22 +- .../commands/tests/test_fix_not_found.py | 11 +- .../commands/tests/test_git_export.py | 60 +- .../commands/tests/test_reindex_courses.py | 43 +- .../commands/tests/test_reindex_library.py | 33 +- .../contentstore/migrations/0001_initial.py | 111 +- ...ield_videouploadconfig_status_whitelist.py | 69 - .../0003_auto__add_pushnotificationconfig.py | 80 - cms/djangoapps/contentstore/startup.py | 2 + .../contentstore/views/entrance_exam.py | 2 +- cms/djangoapps/contentstore/views/item.py | 2 +- cms/djangoapps/contentstore/views/preview.py | 2 +- .../views/tests/test_course_index.py | 6 +- .../contentstore/views/tests/test_preview.py | 2 +- .../migrations/0001_initial.py | 97 +- cms/djangoapps/course_creators/models.py | 2 +- .../course_creators/tests/test_admin.py | 6 +- cms/djangoapps/xblock_config/admin.py | 2 +- .../xblock_config/migrations/0001_initial.py | 102 +- cms/envs/acceptance.py | 3 +- cms/envs/aws.py | 19 +- cms/envs/common.py | 85 +- cms/envs/dev.py | 1 + cms/envs/dev_with_worker.py | 10 +- cms/envs/devstack.py | 2 +- cms/envs/test.py | 12 +- cms/envs/test_static_optimized.py | 1 + cms/envs/yaml_config.py | 5 - cms/startup.py | 7 +- cms/templates/base.html | 2 +- .../auth_exchange/tests/test_views.py | 13 +- common/djangoapps/cache_toolbox/core.py | 9 +- common/djangoapps/config_models/admin.py | 10 +- common/djangoapps/config_models/models.py | 10 +- common/djangoapps/config_models/views.py | 25 +- .../cors_csrf/migrations/0001_initial.py | 102 +- .../course_action_state/managers.py | 2 +- .../migrations/0001_initial.py | 128 +- .../migrations/0002_add_rerun_display_name.py | 76 - .../djangoapps/course_action_state/models.py | 2 +- common/djangoapps/course_modes/admin.py | 3 +- .../course_modes/migrations/0001_initial.py | 86 +- ...002_auto__add_field_coursemode_currency.py | 35 - ...coursemode_course_id_currency_mode_slug.py | 33 - ...o__add_field_coursemode_expiration_date.py | 36 - ...dd_field_coursemode_expiration_datetime.py | 37 - .../0006_expiration_date_to_datetime.py | 40 - .../migrations/0007_add_description.py | 44 - ...archive__chg_field_coursemode_course_id.py | 66 - ...ive_description__add_field_coursemode_s.py | 49 - .../course_modes/tests/test_admin.py | 2 +- common/djangoapps/course_modes/views.py | 11 +- common/djangoapps/dark_lang/middleware.py | 6 +- .../dark_lang/migrations/0001_initial.py | 102 +- .../0002_data__enable_on_install.py | 31 + .../migrations/0002_enable_on_install.py | 68 - common/djangoapps/dark_lang/tests.py | 4 +- .../migrations/0001_initial.py | 122 +- common/djangoapps/django_locale/__init__.py | 7 - common/djangoapps/django_locale/middleware.py | 83 - common/djangoapps/django_locale/tests.py | 157 - common/djangoapps/django_locale/trans_real.py | 131 - common/djangoapps/edxmako/makoloader.py | 26 +- .../management/commands/preprocess_assets.py | 8 +- common/djangoapps/edxmako/middleware.py | 20 + common/djangoapps/embargo/forms.py | 2 + .../embargo/migrations/0001_initial.py | 206 +- .../0002_add_country_access_models.py | 141 - .../migrations/0002_data__add_countries.py | 32 + .../embargo/migrations/0003_add_countries.py | 101 - .../migrations/0004_migrate_embargo_config.py | 129 - .../0005_add_courseaccessrulehistory.py | 114 - ...d_restrictedcourse_disable_access_check.py | 111 - common/djangoapps/embargo/tests/test_api.py | 3 +- common/djangoapps/enrollment/api.py | 2 +- .../external_auth/migrations/0001_initial.py | 122 +- common/djangoapps/external_auth/models.py | 1 + .../external_auth/tests/test_shib.py | 2 +- common/djangoapps/external_auth/views.py | 8 +- .../heartbeat/tests/test_heartbeat.py | 32 +- common/djangoapps/lang_pref/middleware.py | 4 +- .../lang_pref/tests/test_middleware.py | 4 +- common/djangoapps/monkey_patch/__init__.py | 2 +- .../monkey_patch/django_utils_translation.py | 91 - .../tests/test_django_utils_translation.py | 337 -- .../monkey_patch/third_party_auth.py | 38 + .../djangoapps/performance/views/__init__.py | 8 +- .../templates/static_content.html | 7 +- .../reverification/migrations/0001_initial.py | 36 - ...auto__del_midcoursereverificationwindow.py | 31 - common/djangoapps/service_status/views.py | 4 +- .../commands/clear_collectstatic_cache.py | 4 +- .../status/migrations/0001_initial.py | 135 +- common/djangoapps/student/admin.py | 1 + common/djangoapps/student/forms.py | 28 +- common/djangoapps/student/helpers.py | 2 +- .../management/commands/transfer_students.py | 4 +- .../student/migrations/0001_initial.py | 400 +- .../0002_text_to_varchar_and_indexes.py | 142 - .../0003_auto__add_usertestgroup.py | 123 - .../migrations/0004_add_email_index.py | 105 - .../student/migrations/0005_name_change.py | 145 - .../migrations/0006_expand_meta_field.py | 121 - .../migrations/0007_convert_to_utf8.py | 125 - .../0008__auto__add_courseregistration.py | 130 - ...ourseregistration__add_courseenrollment.py | 141 - ...o__chg_field_courseenrollment_course_id.py | 127 - ...t_user__del_unique_courseenrollment_use.py | 135 - ...der__add_field_userprofile_date_of_birt.py | 173 - .../0013_auto__chg_field_userprofile_meta.py | 133 - .../0014_auto__del_courseenrollment.py | 130 - ..._unique_courseenrollment_user_course_id.py | 142 - ...ent_date__chg_field_userprofile_country.py | 140 - .../migrations/0017_rename_date_to_created.py | 132 - .../student/migrations/0018_auto.py | 132 - ...e_approved_demographic_fields_fall_2012.py | 187 - .../migrations/0020_add_test_center_user.py | 188 - .../student/migrations/0021_remove_askbot.py | 160 - ...ed__add_unique_courseenrollmentallowed_.py | 155 - .../0023_add_test_center_registration.py | 241 -- .../migrations/0024_add_allow_certificate.py | 172 - ...eld_courseenrollmentallowed_auto_enroll.py | 173 - ...enterregistration_accommodation_request.py | 180 - ..._flag_and_mode_to_courseware_enrollment.py | 183 - .../migrations/0028_auto__add_userstanding.py | 188 - ...e_between_user_and_anonymous_student_id.py | 194 - .../student/migrations/0029_remove_pearson.py | 185 - ...field_anonymoususerid_anonymous_user_id.py | 146 - ...op_student_anonymoususerid_temp_archive.py | 132 - ...file_country_add_field_UserProfile_city.py | 146 - .../0032_auto__add_loginfailures.py | 149 - .../0033_auto__add_passwordhistory.py | 156 - .../0034_auto__add_courseaccessrole.py | 189 - .../student/migrations/0035_access_roles.py | 312 -- .../migrations/0036_access_roles_orgless.py | 278 -- .../0037_auto__add_courseregistrationcode.py | 179 - .../0038_auto__add_usersignupsource.py | 180 - .../0039_auto__del_courseregistrationcode.py | 174 - ...e_user_id__add_field_usersignupsource_u.py | 172 - .../migrations/0041_add_dashboard_config.py | 177 - .../0042_grant_sales_admin_roles.py | 184 - ...__add_linkedinaddtoprofileconfiguration.py | 187 - .../0044_linkedin_add_company_identifier.py | 183 - ...0045_add_trk_partner_to_linkedin_config.py | 184 - ...tion__add_unique_entranceexamconfigurat.py | 205 - .../student/migrations/0047_add_bio_field.py | 194 - .../0048_add_profile_image_version.py | 195 - ...add_unique_languageproficiency_code_use.py | 210 - .../0050_auto__add_manualenrollmentaudit.py | 216 -- ...051_auto__add_courseenrollmentattribute.py | 224 -- ...52_auto__add_historicalcourseenrollment.py | 242 -- ...auto__add_enrollmentrefundconfiguration.py | 245 -- common/djangoapps/student/models.py | 47 +- common/djangoapps/student/tests/test_email.py | 13 +- common/djangoapps/student/tests/test_login.py | 5 +- .../student/tests/test_password_policy.py | 2 +- .../student/tests/test_reset_password.py | 21 +- .../student/tests/test_verification_status.py | 2 +- common/djangoapps/student/tests/tests.py | 2 +- common/djangoapps/student/views.py | 42 +- common/djangoapps/third_party_auth/admin.py | 1 + .../djangoapps/third_party_auth/api/views.py | 4 +- .../migrations/0001_initial.py | 306 +- .../migrations/0002_convert_settings.py | 141 - .../migrations/0003_add_config_options.py | 161 - .../migrations/0004_lti_tool_consumers.py | 149 - ...dd_field_ltiproviderconfig_lti_hostname.py | 137 - .../migrations/0006_add_api_permission.py | 156 - common/djangoapps/third_party_auth/models.py | 10 + .../djangoapps/third_party_auth/settings.py | 8 +- .../third_party_auth/tests/test_settings.py | 11 +- .../track/migrations/0001_initial.py | 78 +- ...t__chg_field_trackinglog_event_type__ch.py | 51 - common/djangoapps/track/views/__init__.py | 15 +- common/djangoapps/util/cache.py | 2 +- common/djangoapps/util/db.py | 221 +- common/djangoapps/util/json_request.py | 35 +- .../util/migrations/0001_initial.py | 99 +- .../0002_data__default_rate_limit_config.py | 23 + .../0002_default_rate_limit_config.py | 64 - common/djangoapps/util/model_utils.py | 6 +- common/djangoapps/util/models.py | 13 +- common/djangoapps/util/testing.py | 51 + common/djangoapps/util/tests/test_db.py | 68 +- common/djangoapps/util/tests/test_file.py | 10 +- common/djangoapps/util/tests/test_memcache.py | 4 +- common/djangoapps/util/url.py | 2 +- .../xblock_django/migrations/0001_initial.py | 102 +- common/djangoapps/xblock_django/models.py | 3 + common/djangoapps/xmodule_django/models.py | 13 +- .../lib/capa/capa/tests/test_responsetypes.py | 30 +- common/lib/xmodule/xmodule/course_module.py | 4 +- .../lib/xmodule/xmodule/modulestore/django.py | 8 +- .../split_mongo/mongo_connection.py | 11 +- .../tests/test_split_modulestore.py | 4 +- common/lib/xmodule/xmodule/static_content.py | 3 + .../tests/test_course_metadata_utils.py | 19 +- .../pages/lms/instructor_dashboard.py | 4 +- .../acceptance/tests/discussion/helpers.py | 1 + .../test/acceptance/tests/lms/test_teams.py | 5 +- common/test/db_cache/bok_choy_data.json | 1 - common/test/db_cache/bok_choy_schema.sql | 3433 ----------------- common/test/db_cache/lettuce.db | Bin 654336 -> 0 bytes conf/locale/ru/LC_MESSAGES/django.po | 4 +- docs/en_us/enrollment_api/source/conf.py | 4 - docs/en_us/platform_api/source/conf.py | 4 - docs/shared/requirements.txt | 1 - .../branding/migrations/0001_initial.py | 115 +- .../0002_auto__add_brandingapiconfig.py | 80 - lms/djangoapps/branding/models.py | 6 +- lms/djangoapps/bulk_email/forms.py | 1 + .../bulk_email/migrations/0001_initial.py | 161 +- .../migrations/0002_change_field_names.py | 88 - .../0002_data__load_course_email_template.py | 25 + .../migrations/0003_add_optout_user.py | 91 - .../migrations/0004_migrate_optout_user.py | 91 - .../migrations/0005_remove_optout_email.py | 78 - .../0006_add_course_email_template.py | 87 - .../0007_load_course_email_template.py | 81 - .../0008_add_course_authorizations.py | 95 - .../0009_force_unique_course_ids.py | 90 - ...d__add_field_courseemail_template_name_.py | 125 - lms/djangoapps/bulk_email/models.py | 34 +- lms/djangoapps/ccx/migrations/0001_initial.py | 177 +- .../migrations/0002_convert_memberships.py | 102 - lms/djangoapps/ccx/models.py | 4 + lms/djangoapps/ccx/overrides.py | 23 +- lms/djangoapps/ccx/tasks.py | 2 +- lms/djangoapps/ccx/tests/factories.py | 2 +- .../ccx/tests/test_ccx_modulestore.py | 2 +- .../tests/test_field_override_performance.py | 78 +- lms/djangoapps/ccx/tests/test_overrides.py | 24 +- lms/djangoapps/ccx/tests/test_tasks.py | 6 +- lms/djangoapps/ccx/tests/test_utils.py | 6 +- lms/djangoapps/ccx/tests/test_views.py | 10 +- lms/djangoapps/ccx/utils.py | 2 +- lms/djangoapps/ccx/views.py | 12 +- lms/djangoapps/certificates/admin.py | 1 + .../0001_added_generatedcertificates.py | 93 - .../certificates/migrations/0001_initial.py | 188 + ...field_generatedcertificate_download_url.py | 91 - ...__certificatehtmlviewconfiguration_data.py | 62 + ..._add_field_generatedcertificate_enabled.py | 92 - .../migrations/0003_data__default_modes.py | 34 + ...icate_graded_certificate_id__add_field_.py | 107 - ...to__add_field_generatedcertificate_name.py | 96 - ...eld_generatedcertificate_certificate_id.py | 96 - .../0007_auto__add_revokedcertificate.py | 121 - ...el_field_generatedcertificate_name__add.py | 163 - ...icate_graded_download_url__del_field_ge.py | 95 - ...icate_enabled__add_field_generatedcerti.py | 81 - ...icate_certificate_id__add_field_generat.py | 90 - ...icate_name__add_field_generatedcertific.py | 93 - ...field_generatedcertificate_error_reason.py | 78 - .../migrations/0014_adding_whitelist.py | 89 - .../0015_adding_mode_for_verified_certs.py | 86 - .../0016_change_course_key_fields.py | 90 - ..._add_certificategenerationconfiguration.py | 96 - .../0018_add_example_cert_models.py | 159 - ...o__add_certificatehtmlviewconfiguration.py | 104 - ...0_certificatehtmlviewconfiguration_data.py | 156 - ...nique_badgeassertion_course_id_user__ad.py | 169 - .../migrations/0022_default_modes.py | 152 - ..._course_id_user__add_unique_badgeassert.py | 150 - ...add_unique_certificatetemplate_organiza.py | 197 - ...elist_created__add_field_certificatewhi.py | 177 - lms/djangoapps/certificates/models.py | 29 +- lms/djangoapps/certificates/queue.py | 2 +- .../certificates/tests/test_queue.py | 2 +- lms/djangoapps/certificates/views/support.py | 3 + lms/djangoapps/certificates/views/xqueue.py | 13 +- lms/djangoapps/class_dashboard/views.py | 6 +- lms/djangoapps/commerce/api/v1/models.py | 5 +- .../commerce/api/v1/tests/test_views.py | 2 +- lms/djangoapps/commerce/http.py | 2 +- .../0001_add_ecommerce_service_user.py | 26 - .../0001_data__add_ecommerce_service_user.py | 25 + lms/djangoapps/commerce/views.py | 2 +- lms/djangoapps/course_api/blocks/views.py | 4 +- lms/djangoapps/course_wiki/editors.py | 2 +- lms/djangoapps/courseware/date_summary.py | 2 +- lms/djangoapps/courseware/grades.py | 305 +- .../management/commands/clean_history.py | 28 +- .../management/commands/dump_course_ids.py | 5 +- .../management/commands/export_course.py | 2 +- .../commands/tests/test_clean_history.py | 15 +- .../courseware/migrations/0001_initial.py | 249 +- .../courseware/migrations/0002_add_indexes.py | 119 - .../migrations/0003_done_grade_cache.py | 117 - .../0004_add_field_studentmodule_course_id.py | 120 - ..._add_unique_offlinecomputedgrade_user_c.py | 117 - .../0006_create_student_module_history.py | 109 - .../0007_allow_null_version_in_history.py | 100 - .../migrations/0008_add_xmodule_storage.py | 185 - .../migrations/0009_add_field_default.py | 128 - ...ock_field_content_to_user_state_summary.py | 148 - .../0011_add_model_StudentFieldOverride.py | 145 - ...erride_course_id_location_student__add_.py | 138 - ...rride_created__add_field_studentfieldov.py | 155 - lms/djangoapps/courseware/models.py | 12 + lms/djangoapps/courseware/module_render.py | 6 +- lms/djangoapps/courseware/tests/__init__.py | 4 +- .../courseware/tests/test_comp_theming.py | 2 +- .../courseware/tests/test_course_info.py | 4 +- .../courseware/tests/test_date_summary.py | 4 +- .../courseware/tests/test_model_data.py | 2 +- .../courseware/tests/test_video_handlers.py | 12 +- lms/djangoapps/courseware/tests/test_views.py | 2 +- lms/djangoapps/courseware/views.py | 29 +- .../management/commands/git_add_course.py | 25 +- .../commands/tests/test_git_add_course.py | 22 +- lms/djangoapps/dashboard/sysadmin.py | 2 +- .../django_comment_client/base/tests.py | 22 +- .../django_comment_client/base/urls.py | 5 +- .../django_comment_client/forum/tests.py | 10 +- .../django_comment_client/forum/urls.py | 5 +- .../migrations/0001_initial.py | 132 - .../django_comment_client/permissions.py | 2 +- .../django_comment_client/tests/group_id.py | 2 +- .../django_comment_client/tests/test_utils.py | 2 +- lms/djangoapps/django_comment_client/urls.py | 5 +- lms/djangoapps/django_comment_client/utils.py | 4 +- .../foldit/migrations/0001_initial.py | 156 +- .../instructor/tests/test_enrollment.py | 2 +- .../instructor/tests/test_spoc_gradebook.py | 1 - lms/djangoapps/instructor/tests/test_tools.py | 2 +- lms/djangoapps/instructor/views/api.py | 55 +- lms/djangoapps/instructor/views/legacy.py | 5 +- lms/djangoapps/instructor_analytics/csvs.py | 2 +- lms/djangoapps/instructor_task/api.py | 57 - lms/djangoapps/instructor_task/api_helper.py | 26 +- .../migrations/0001_initial.py | 117 +- .../migrations/0002_add_subtask_field.py | 76 - lms/djangoapps/instructor_task/models.py | 16 +- lms/djangoapps/instructor_task/subtasks.py | 11 +- .../instructor_task/tasks_helper.py | 21 +- .../tests/test_tasks_helper.py | 4 +- .../licenses/migrations/0001_initial.py | 151 +- lms/djangoapps/licenses/models.py | 2 +- lms/djangoapps/licenses/views.py | 2 +- .../lms_xblock/migrations/0001_initial.py | 102 +- lms/djangoapps/lms_xblock/mixin.py | 7 +- lms/djangoapps/lms_xblock/models.py | 3 + lms/djangoapps/lti_provider/__init__.py | 3 - .../0001_create_lti_consumer_model.py | 37 - .../lti_provider/migrations/0001_initial.py | 72 + .../0002_create_lti_outcome_management.py | 122 - .../migrations/0003_create_lti_user_model.py | 108 - .../0004_add_version_to_graded_assignment.py | 93 - lms/djangoapps/lti_provider/models.py | 2 +- lms/djangoapps/lti_provider/startup.py | 4 + .../lti_provider/tests/test_outcomes.py | 12 +- .../lti_provider/tests/test_views.py | 2 +- lms/djangoapps/lti_provider/users.py | 23 +- .../mobile_api/migrations/0001_initial.py | 106 +- .../mobile_api/video_outlines/tests.py | 1 + .../notes/migrations/0001_initial.py | 122 +- lms/djangoapps/notes/models.py | 3 + .../staff_grading_service.py | 9 +- lms/djangoapps/open_ended_grading/views.py | 6 +- .../psychometrics/migrations/0001_initial.py | 24 + .../psychometrics/migrations/__init__.py | 0 lms/djangoapps/psychometrics/models.py | 5 +- lms/djangoapps/shoppingcart/admin.py | 4 +- .../management/commands/retire_order.py | 9 +- .../shoppingcart/migrations/0001_initial.py | 443 ++- ...__add_field_paidcourseregistration_mode.py | 112 - ...003_auto__del_field_orderitem_line_cost.py | 111 - ...uto__add_field_orderitem_fulfilled_time.py | 114 - ...nannotation__add_field_orderitem_report.py | 132 - ...time__add_field_orderitem_refund_reques.py | 131 - ...7_auto__add_field_orderitem_service_fee.py | 142 - ...demption__chg_field_certificateitem_cou.py | 189 - ...gistrationcode__add_coupon__chg_field_c.py | 216 -- ...ption__del_field_courseregistrationcode.py | 187 - ...dd_field_courseregistrationcode_invoice.py | 186 - ...ioncode_transaction_group_name__del_fie.py | 252 -- .../0013_auto__add_field_invoice_is_valid.py | 173 - ..._add_field_invoice_address_line_1__add_.py | 244 -- ...e_order_number__del_field_invoice_compa.py | 229 -- ..._email__del_field_invoice_company_refer.py | 205 - ...ioncode_order__chg_field_registrationco.py | 188 - .../migrations/0018_auto__add_donation.py | 189 - .../0019_auto__add_donationconfiguration.py | 197 - ...d_courseregcodeitemannotation__add_fiel.py | 282 -- ...m_created__add_field_orderitem_modified.py | 222 -- ...eredemption_course_enrollment__add_fiel.py | 226 -- ..._auto__add_field_coupon_expiration_date.py | 219 -- ..._field_courseregistrationcode_mode_slug.py | 218 -- .../migrations/0025_update_invoice_models.py | 310 -- .../migrations/0026_migrate_invoices.py | 270 -- .../migrations/0027_add_invoice_history.py | 262 -- ...d_field_courseregistrationcode_is_valid.py | 259 -- .../0029_better_datetime_now_default.py | 269 -- lms/djangoapps/shoppingcart/models.py | 91 +- .../shoppingcart/tests/test_microsites.py | 27 +- .../shoppingcart/tests/test_models.py | 8 +- .../shoppingcart/tests/test_reports.py | 10 +- .../shoppingcart/tests/test_views.py | 7 +- lms/djangoapps/shoppingcart/views.py | 2 +- .../student_account/test/test_views.py | 4 +- lms/djangoapps/support/tests/test_refund.py | 2 +- .../survey/migrations/0001_initial.py | 150 +- ...auto__add_field_surveyanswer_course_key.py | 80 - .../commands/reindex_course_team.py | 4 +- .../tests/test_reindex_course_team.py | 25 +- .../teams/migrations/0001_initial.py | 162 +- ...uto__add_field_courseteam_discussion_id.py | 83 - .../0003_auto__add_index_courseteam_name.py | 80 - ...ussion_topic_id__add_field_courseteam_l.py | 94 - ..._course_id_and_topic_id_composite_index.py | 82 - .../teams/migrations/0006_add_team_size.py | 98 - ...07_auto__del_field_courseteam_is_active.py | 85 - lms/djangoapps/teams/models.py | 23 +- lms/djangoapps/teams/plugins.py | 2 +- lms/djangoapps/teams/search_indexes.py | 3 +- lms/djangoapps/teams/serializers.py | 2 +- lms/djangoapps/teams/tests/factories.py | 2 +- lms/djangoapps/teams/tests/test_models.py | 9 +- lms/djangoapps/teams/tests/test_views.py | 16 +- lms/djangoapps/teams/views.py | 5 +- lms/djangoapps/verify_student/admin.py | 2 +- .../retry_failed_photo_verifications.py | 2 +- .../commands/set_software_secure_status.py | 4 +- .../commands/tests/test_verify_student.py | 14 +- .../verify_student/migrations/0001_initial.py | 241 +- ..._softwaresecurephotoverification_window.py | 88 - ...softwaresecurephotoverification_display.py | 89 - ...t__add_unique_verificationcheckpoint_co.py | 142 - ...add_incoursereverificationconfiguration.py | 117 - ...__add_unique_skippedreverification_user.py | 132 - ...dd_field_verificationstatus_location_id.py | 122 - ...ckpoint_checkpoint_name__add_field_veri.py | 153 - ...hotoverification_window_id_default_none.py | 119 - ..._softwaresecurephotoverification_window.py | 117 - .../0011_add_verification_deadline.py | 155 - .../0012_populate_verification_deadlines.py | 180 - ...urephotoverification_copy_id_photo_from.py | 134 - .../migrations/0014_set_copy_id_photo_from.py | 148 - ...auto__add_icrvstatusemailsconfiguration.py | 145 - lms/djangoapps/verify_student/models.py | 25 +- lms/djangoapps/verify_student/services.py | 2 +- .../verify_student/tests/factories.py | 2 +- .../tests/fake_software_secure.py | 2 +- .../tests/test_fake_software_secure.py | 2 +- .../verify_student/tests/test_models.py | 35 +- .../verify_student/tests/test_services.py | 4 +- .../verify_student/tests/test_ssencrypt.py | 2 +- .../verify_student/tests/test_views.py | 59 +- lms/djangoapps/verify_student/urls.py | 4 +- lms/djangoapps/verify_student/views.py | 13 +- lms/envs/acceptance.py | 1 + lms/envs/aws.py | 26 +- lms/envs/common.py | 141 +- lms/envs/dev.py | 4 +- lms/envs/dev_with_worker.py | 10 +- lms/envs/devplus.py | 1 + lms/envs/devstack.py | 4 +- lms/envs/load_test.py | 4 +- lms/envs/static.py | 1 + lms/envs/test.py | 18 +- lms/envs/test_static_optimized.py | 1 + lms/envs/test_with_mysql.py | 15 + lms/envs/yaml_config.py | 9 +- lms/startup.py | 18 +- lms/templates/navigation.html | 2 +- .../verify_student/missed_deadline.html | 2 +- .../verify_student/pay_and_verify.html | 2 +- lms/urls.py | 29 +- .../djangoapps/call_stack_manager/core.py | 6 +- .../core/djangoapps/common_views/xblock.py | 2 +- .../content/course_overviews/__init__.py | 4 - .../migrations/0001_initial.py | 128 +- .../0002_add_days_early_for_beta.py | 57 - .../0003_add_cert_html_view_enabled.py | 58 - ...04_default_lowest_passing_grade_to_None.py | 49 - .../migrations/0005_add_enrollment_fields.py | 94 - .../0006_add_version_and_timestamp.py | 75 - .../0007_auto__add_courseoverviewtab.py | 68 - .../0008_drop_course_tabs_fk_constraint.py | 63 - .../content/course_overviews/models.py | 28 +- .../content/course_overviews/startup.py | 5 + .../content/course_overviews/tests.py | 30 +- .../course_structures/api/v0/tests_api.py | 8 +- .../migrations/0001_initial.py | 64 +- ..._coursestructure_discussion_id_map_json.py | 34 - .../content/course_structures/models.py | 4 + .../commands/post_cohort_membership_fix.py | 5 +- .../tests/test_post_cohort_membership_fix.py | 2 +- .../course_groups/migrations/0001_initial.py | 177 +- ...add_model_CourseUserGroupPartitionGroup.py | 82 - ...coursecohort__add_coursecohortssettings.py | 108 - ...ttings_cohorted_discussions__add_field_.py | 91 - .../migrations/0005_cohort_membership.py | 109 - .../0006_cohort_membership_data_migrate.py | 138 - .../core/djangoapps/course_groups/models.py | 36 +- .../course_groups/tests/test_views.py | 3 - .../core/djangoapps/credit/api/provider.py | 2 +- openedx/core/djangoapps/credit/email_utils.py | 7 +- .../credit/migrations/0001_initial.py | 311 +- ...ename_credit_requirement_criteria_field.py | 76 - ...0003_add_creditrequirementstatus_reason.py | 69 - ...dd_field_creditrequirement_display_name.py | 70 - ...provider_url__add_field_creditprovider_.py | 89 - ...ique_creditrequest_username_course_prov.py | 190 - ...enable_integration__chg_field_creditpro.py | 153 - .../0008_delete_credit_provider_timestamp.py | 145 - ...o__del_field_crediteligibility_provider.py | 138 - ...010_add_creditrequirementstatus_history.py | 169 - ...auto__add_field_creditrequirement_order.py | 153 - .../0012_remove_m2m_course_and_provider.py | 172 - .../0013_add_provider_status_url.py | 153 - ...creditprovider_fulfillment_instructions.py | 154 - ...eld_creditprovider_provider_description.py | 155 - ...eligibility_email_message__add_field_cr.py | 165 - ..._add_field_creditprovider_thumbnail_url.py | 158 - openedx/core/djangoapps/credit/models.py | 17 +- .../core/djangoapps/credit/tests/test_api.py | 20 +- .../programs/migrations/0001_initial.py | 111 +- openedx/core/djangoapps/programs/models.py | 4 +- .../self_paced/migrations/0001_initial.py | 100 +- ...uration_enable_course_home_improvements.py | 69 - openedx/core/djangoapps/theming/core.py | 2 +- .../core/djangoapps/user_api/accounts/api.py | 2 +- .../user_api/accounts/serializers.py | 6 +- .../user_api/accounts/tests/test_api.py | 1 - .../user_api/accounts/tests/test_views.py | 26 +- .../djangoapps/user_api/accounts/views.py | 2 +- .../user_api/migrations/0001_initial.py | 138 +- ...nique_usercoursetags_user_course_id_key.py | 87 - .../migrations/0003_rename_usercoursetags.py | 72 - ...e_userorgtag_user_org_key__chg_field_us.py | 110 - .../user_api/preferences/tests/test_api.py | 2 +- .../djangoapps/user_api/preferences/views.py | 2 +- openedx/core/lib/django_test_client_utils.py | 53 +- pavelib/assets.py | 4 +- pavelib/docs.py | 3 +- pavelib/js_test.py | 4 +- pavelib/paver_tests/test_servers.py | 2 +- pavelib/prereqs.py | 91 +- pavelib/servers.py | 10 +- pavelib/utils/cmd.py | 2 +- pavelib/utils/test/suites/acceptance_suite.py | 2 - pavelib/utils/test/suites/bokchoy_suite.py | 2 +- pavelib/utils/test/suites/nose_suite.py | 2 +- requirements/edx/base.txt | 19 +- requirements/edx/github.txt | 39 +- scripts/reset-test-db.sh | 6 +- 556 files changed, 5113 insertions(+), 38493 deletions(-) delete mode 100644 cms/djangoapps/contentstore/migrations/0002_auto__del_field_videouploadconfig_status_whitelist.py delete mode 100644 cms/djangoapps/contentstore/migrations/0003_auto__add_pushnotificationconfig.py create mode 100644 cms/djangoapps/contentstore/startup.py delete mode 100644 common/djangoapps/course_action_state/migrations/0002_add_rerun_display_name.py delete mode 100644 common/djangoapps/course_modes/migrations/0002_auto__add_field_coursemode_currency.py delete mode 100644 common/djangoapps/course_modes/migrations/0003_auto__add_unique_coursemode_course_id_currency_mode_slug.py delete mode 100644 common/djangoapps/course_modes/migrations/0004_auto__add_field_coursemode_expiration_date.py delete mode 100644 common/djangoapps/course_modes/migrations/0005_auto__add_field_coursemode_expiration_datetime.py delete mode 100644 common/djangoapps/course_modes/migrations/0006_expiration_date_to_datetime.py delete mode 100644 common/djangoapps/course_modes/migrations/0007_add_description.py delete mode 100644 common/djangoapps/course_modes/migrations/0007_auto__add_coursemodesarchive__chg_field_coursemode_course_id.py delete mode 100644 common/djangoapps/course_modes/migrations/0008_auto__del_field_coursemodesarchive_description__add_field_coursemode_s.py create mode 100644 common/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py delete mode 100644 common/djangoapps/dark_lang/migrations/0002_enable_on_install.py delete mode 100644 common/djangoapps/django_locale/__init__.py delete mode 100644 common/djangoapps/django_locale/middleware.py delete mode 100644 common/djangoapps/django_locale/tests.py delete mode 100644 common/djangoapps/django_locale/trans_real.py delete mode 100644 common/djangoapps/embargo/migrations/0002_add_country_access_models.py create mode 100644 common/djangoapps/embargo/migrations/0002_data__add_countries.py delete mode 100644 common/djangoapps/embargo/migrations/0003_add_countries.py delete mode 100644 common/djangoapps/embargo/migrations/0004_migrate_embargo_config.py delete mode 100644 common/djangoapps/embargo/migrations/0005_add_courseaccessrulehistory.py delete mode 100644 common/djangoapps/embargo/migrations/0006_auto__add_field_restrictedcourse_disable_access_check.py delete mode 100644 common/djangoapps/monkey_patch/django_utils_translation.py delete mode 100644 common/djangoapps/monkey_patch/tests/test_django_utils_translation.py create mode 100644 common/djangoapps/monkey_patch/third_party_auth.py delete mode 100644 common/djangoapps/reverification/migrations/0001_initial.py delete mode 100644 common/djangoapps/reverification/migrations/0002_auto__del_midcoursereverificationwindow.py delete mode 100644 common/djangoapps/student/migrations/0002_text_to_varchar_and_indexes.py delete mode 100644 common/djangoapps/student/migrations/0003_auto__add_usertestgroup.py delete mode 100644 common/djangoapps/student/migrations/0004_add_email_index.py delete mode 100644 common/djangoapps/student/migrations/0005_name_change.py delete mode 100644 common/djangoapps/student/migrations/0006_expand_meta_field.py delete mode 100644 common/djangoapps/student/migrations/0007_convert_to_utf8.py delete mode 100644 common/djangoapps/student/migrations/0008__auto__add_courseregistration.py delete mode 100644 common/djangoapps/student/migrations/0009_auto__del_courseregistration__add_courseenrollment.py delete mode 100644 common/djangoapps/student/migrations/0010_auto__chg_field_courseenrollment_course_id.py delete mode 100644 common/djangoapps/student/migrations/0011_auto__chg_field_courseenrollment_user__del_unique_courseenrollment_use.py delete mode 100644 common/djangoapps/student/migrations/0012_auto__add_field_userprofile_gender__add_field_userprofile_date_of_birt.py delete mode 100644 common/djangoapps/student/migrations/0013_auto__chg_field_userprofile_meta.py delete mode 100644 common/djangoapps/student/migrations/0014_auto__del_courseenrollment.py delete mode 100644 common/djangoapps/student/migrations/0015_auto__add_courseenrollment__add_unique_courseenrollment_user_course_id.py delete mode 100644 common/djangoapps/student/migrations/0016_auto__add_field_courseenrollment_date__chg_field_userprofile_country.py delete mode 100644 common/djangoapps/student/migrations/0017_rename_date_to_created.py delete mode 100644 common/djangoapps/student/migrations/0018_auto.py delete mode 100644 common/djangoapps/student/migrations/0019_create_approved_demographic_fields_fall_2012.py delete mode 100644 common/djangoapps/student/migrations/0020_add_test_center_user.py delete mode 100644 common/djangoapps/student/migrations/0021_remove_askbot.py delete mode 100644 common/djangoapps/student/migrations/0022_auto__add_courseenrollmentallowed__add_unique_courseenrollmentallowed_.py delete mode 100644 common/djangoapps/student/migrations/0023_add_test_center_registration.py delete mode 100644 common/djangoapps/student/migrations/0024_add_allow_certificate.py delete mode 100644 common/djangoapps/student/migrations/0025_auto__add_field_courseenrollmentallowed_auto_enroll.py delete mode 100644 common/djangoapps/student/migrations/0026_auto__remove_index_student_testcenterregistration_accommodation_request.py delete mode 100644 common/djangoapps/student/migrations/0027_add_active_flag_and_mode_to_courseware_enrollment.py delete mode 100644 common/djangoapps/student/migrations/0028_auto__add_userstanding.py delete mode 100644 common/djangoapps/student/migrations/0029_add_lookup_table_between_user_and_anonymous_student_id.py delete mode 100644 common/djangoapps/student/migrations/0029_remove_pearson.py delete mode 100644 common/djangoapps/student/migrations/0030_auto__chg_field_anonymoususerid_anonymous_user_id.py delete mode 100644 common/djangoapps/student/migrations/0031_drop_student_anonymoususerid_temp_archive.py delete mode 100644 common/djangoapps/student/migrations/0032_add_field_UserProfile_country_add_field_UserProfile_city.py delete mode 100644 common/djangoapps/student/migrations/0032_auto__add_loginfailures.py delete mode 100644 common/djangoapps/student/migrations/0033_auto__add_passwordhistory.py delete mode 100644 common/djangoapps/student/migrations/0034_auto__add_courseaccessrole.py delete mode 100644 common/djangoapps/student/migrations/0035_access_roles.py delete mode 100644 common/djangoapps/student/migrations/0036_access_roles_orgless.py delete mode 100644 common/djangoapps/student/migrations/0037_auto__add_courseregistrationcode.py delete mode 100644 common/djangoapps/student/migrations/0038_auto__add_usersignupsource.py delete mode 100644 common/djangoapps/student/migrations/0039_auto__del_courseregistrationcode.py delete mode 100644 common/djangoapps/student/migrations/0040_auto__del_field_usersignupsource_user_id__add_field_usersignupsource_u.py delete mode 100644 common/djangoapps/student/migrations/0041_add_dashboard_config.py delete mode 100644 common/djangoapps/student/migrations/0042_grant_sales_admin_roles.py delete mode 100644 common/djangoapps/student/migrations/0043_auto__add_linkedinaddtoprofileconfiguration.py delete mode 100644 common/djangoapps/student/migrations/0044_linkedin_add_company_identifier.py delete mode 100644 common/djangoapps/student/migrations/0045_add_trk_partner_to_linkedin_config.py delete mode 100644 common/djangoapps/student/migrations/0046_auto__add_entranceexamconfiguration__add_unique_entranceexamconfigurat.py delete mode 100644 common/djangoapps/student/migrations/0047_add_bio_field.py delete mode 100644 common/djangoapps/student/migrations/0048_add_profile_image_version.py delete mode 100644 common/djangoapps/student/migrations/0049_auto__add_languageproficiency__add_unique_languageproficiency_code_use.py delete mode 100644 common/djangoapps/student/migrations/0050_auto__add_manualenrollmentaudit.py delete mode 100644 common/djangoapps/student/migrations/0051_auto__add_courseenrollmentattribute.py delete mode 100644 common/djangoapps/student/migrations/0052_auto__add_historicalcourseenrollment.py delete mode 100644 common/djangoapps/student/migrations/0053_auto__add_enrollmentrefundconfiguration.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0002_convert_settings.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0003_add_config_options.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0004_lti_tool_consumers.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0005_auto__add_field_ltiproviderconfig_lti_hostname.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0006_add_api_permission.py delete mode 100644 common/djangoapps/track/migrations/0002_auto__add_field_trackinglog_host__chg_field_trackinglog_event_type__ch.py create mode 100644 common/djangoapps/util/migrations/0002_data__default_rate_limit_config.py delete mode 100644 common/djangoapps/util/migrations/0002_default_rate_limit_config.py delete mode 100644 common/test/db_cache/bok_choy_data.json delete mode 100644 common/test/db_cache/bok_choy_schema.sql delete mode 100644 lms/djangoapps/branding/migrations/0002_auto__add_brandingapiconfig.py delete mode 100644 lms/djangoapps/bulk_email/migrations/0002_change_field_names.py create mode 100644 lms/djangoapps/bulk_email/migrations/0002_data__load_course_email_template.py delete mode 100644 lms/djangoapps/bulk_email/migrations/0003_add_optout_user.py delete mode 100644 lms/djangoapps/bulk_email/migrations/0004_migrate_optout_user.py delete mode 100644 lms/djangoapps/bulk_email/migrations/0005_remove_optout_email.py delete mode 100644 lms/djangoapps/bulk_email/migrations/0006_add_course_email_template.py delete mode 100644 lms/djangoapps/bulk_email/migrations/0007_load_course_email_template.py delete mode 100644 lms/djangoapps/bulk_email/migrations/0008_add_course_authorizations.py delete mode 100644 lms/djangoapps/bulk_email/migrations/0009_force_unique_course_ids.py delete mode 100644 lms/djangoapps/bulk_email/migrations/0010_auto__chg_field_optout_course_id__add_field_courseemail_template_name_.py delete mode 100644 lms/djangoapps/ccx/migrations/0002_convert_memberships.py delete mode 100644 lms/djangoapps/certificates/migrations/0001_added_generatedcertificates.py create mode 100644 lms/djangoapps/certificates/migrations/0001_initial.py delete mode 100644 lms/djangoapps/certificates/migrations/0002_auto__add_field_generatedcertificate_download_url.py create mode 100644 lms/djangoapps/certificates/migrations/0002_data__certificatehtmlviewconfiguration_data.py delete mode 100644 lms/djangoapps/certificates/migrations/0003_auto__add_field_generatedcertificate_enabled.py create mode 100644 lms/djangoapps/certificates/migrations/0003_data__default_modes.py delete mode 100644 lms/djangoapps/certificates/migrations/0004_auto__add_field_generatedcertificate_graded_certificate_id__add_field_.py delete mode 100644 lms/djangoapps/certificates/migrations/0005_auto__add_field_generatedcertificate_name.py delete mode 100644 lms/djangoapps/certificates/migrations/0006_auto__chg_field_generatedcertificate_certificate_id.py delete mode 100644 lms/djangoapps/certificates/migrations/0007_auto__add_revokedcertificate.py delete mode 100644 lms/djangoapps/certificates/migrations/0008_auto__del_revokedcertificate__del_field_generatedcertificate_name__add.py delete mode 100644 lms/djangoapps/certificates/migrations/0009_auto__del_field_generatedcertificate_graded_download_url__del_field_ge.py delete mode 100644 lms/djangoapps/certificates/migrations/0010_auto__del_field_generatedcertificate_enabled__add_field_generatedcerti.py delete mode 100644 lms/djangoapps/certificates/migrations/0011_auto__del_field_generatedcertificate_certificate_id__add_field_generat.py delete mode 100644 lms/djangoapps/certificates/migrations/0012_auto__add_field_generatedcertificate_name__add_field_generatedcertific.py delete mode 100644 lms/djangoapps/certificates/migrations/0013_auto__add_field_generatedcertificate_error_reason.py delete mode 100644 lms/djangoapps/certificates/migrations/0014_adding_whitelist.py delete mode 100644 lms/djangoapps/certificates/migrations/0015_adding_mode_for_verified_certs.py delete mode 100644 lms/djangoapps/certificates/migrations/0016_change_course_key_fields.py delete mode 100644 lms/djangoapps/certificates/migrations/0017_auto__add_certificategenerationconfiguration.py delete mode 100644 lms/djangoapps/certificates/migrations/0018_add_example_cert_models.py delete mode 100644 lms/djangoapps/certificates/migrations/0019_auto__add_certificatehtmlviewconfiguration.py delete mode 100644 lms/djangoapps/certificates/migrations/0020_certificatehtmlviewconfiguration_data.py delete mode 100644 lms/djangoapps/certificates/migrations/0021_auto__add_badgeassertion__add_unique_badgeassertion_course_id_user__ad.py delete mode 100644 lms/djangoapps/certificates/migrations/0022_default_modes.py delete mode 100644 lms/djangoapps/certificates/migrations/0023_auto__del_unique_badgeassertion_course_id_user__add_unique_badgeassert.py delete mode 100644 lms/djangoapps/certificates/migrations/0024_auto__add_certificatetemplate__add_unique_certificatetemplate_organiza.py delete mode 100644 lms/djangoapps/certificates/migrations/0025_auto__add_field_certificatewhitelist_created__add_field_certificatewhi.py delete mode 100644 lms/djangoapps/commerce/migrations/0001_add_ecommerce_service_user.py create mode 100644 lms/djangoapps/commerce/migrations/0001_data__add_ecommerce_service_user.py delete mode 100644 lms/djangoapps/courseware/migrations/0002_add_indexes.py delete mode 100644 lms/djangoapps/courseware/migrations/0003_done_grade_cache.py delete mode 100644 lms/djangoapps/courseware/migrations/0004_add_field_studentmodule_course_id.py delete mode 100644 lms/djangoapps/courseware/migrations/0005_auto__add_offlinecomputedgrade__add_unique_offlinecomputedgrade_user_c.py delete mode 100644 lms/djangoapps/courseware/migrations/0006_create_student_module_history.py delete mode 100644 lms/djangoapps/courseware/migrations/0007_allow_null_version_in_history.py delete mode 100644 lms/djangoapps/courseware/migrations/0008_add_xmodule_storage.py delete mode 100644 lms/djangoapps/courseware/migrations/0009_add_field_default.py delete mode 100644 lms/djangoapps/courseware/migrations/0010_rename_xblock_field_content_to_user_state_summary.py delete mode 100644 lms/djangoapps/courseware/migrations/0011_add_model_StudentFieldOverride.py delete mode 100644 lms/djangoapps/courseware/migrations/0012_auto__del_unique_studentfieldoverride_course_id_location_student__add_.py delete mode 100644 lms/djangoapps/courseware/migrations/0013_auto__add_field_studentfieldoverride_created__add_field_studentfieldov.py delete mode 100644 lms/djangoapps/django_comment_client/migrations/0001_initial.py delete mode 100644 lms/djangoapps/instructor_task/migrations/0002_add_subtask_field.py delete mode 100644 lms/djangoapps/lti_provider/migrations/0001_create_lti_consumer_model.py create mode 100644 lms/djangoapps/lti_provider/migrations/0001_initial.py delete mode 100644 lms/djangoapps/lti_provider/migrations/0002_create_lti_outcome_management.py delete mode 100644 lms/djangoapps/lti_provider/migrations/0003_create_lti_user_model.py delete mode 100644 lms/djangoapps/lti_provider/migrations/0004_add_version_to_graded_assignment.py create mode 100644 lms/djangoapps/lti_provider/startup.py create mode 100644 lms/djangoapps/psychometrics/migrations/0001_initial.py create mode 100644 lms/djangoapps/psychometrics/migrations/__init__.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0002_auto__add_field_paidcourseregistration_mode.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0003_auto__del_field_orderitem_line_cost.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0004_auto__add_field_orderitem_fulfilled_time.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0005_auto__add_paidcourseregistrationannotation__add_field_orderitem_report.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0006_auto__add_field_order_refunded_time__add_field_orderitem_refund_reques.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0007_auto__add_field_orderitem_service_fee.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0008_auto__add_coupons__add_couponredemption__chg_field_certificateitem_cou.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0009_auto__del_coupons__add_courseregistrationcode__add_coupon__chg_field_c.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0010_auto__add_registrationcoderedemption__del_field_courseregistrationcode.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0011_auto__add_invoice__add_field_courseregistrationcode_invoice.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0012_auto__del_field_courseregistrationcode_transaction_group_name__del_fie.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0013_auto__add_field_invoice_is_valid.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0014_auto__del_field_invoice_tax_id__add_field_invoice_address_line_1__add_.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0015_auto__del_field_invoice_purchase_order_number__del_field_invoice_compa.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0016_auto__del_field_invoice_company_email__del_field_invoice_company_refer.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0017_auto__add_field_courseregistrationcode_order__chg_field_registrationco.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0018_auto__add_donation.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0019_auto__add_donationconfiguration.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0020_auto__add_courseregcodeitem__add_courseregcodeitemannotation__add_fiel.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0021_auto__add_field_orderitem_created__add_field_orderitem_modified.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0022_auto__add_field_registrationcoderedemption_course_enrollment__add_fiel.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0023_auto__add_field_coupon_expiration_date.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0024_auto__add_field_courseregistrationcode_mode_slug.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0025_update_invoice_models.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0026_migrate_invoices.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0027_add_invoice_history.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0028_auto__add_field_courseregistrationcode_is_valid.py delete mode 100644 lms/djangoapps/shoppingcart/migrations/0029_better_datetime_now_default.py delete mode 100644 lms/djangoapps/survey/migrations/0002_auto__add_field_surveyanswer_course_key.py delete mode 100644 lms/djangoapps/teams/migrations/0002_auto__add_field_courseteam_discussion_id.py delete mode 100644 lms/djangoapps/teams/migrations/0003_auto__add_index_courseteam_name.py delete mode 100644 lms/djangoapps/teams/migrations/0004_auto__add_field_courseteam_discussion_topic_id__add_field_courseteam_l.py delete mode 100644 lms/djangoapps/teams/migrations/0005_add_course_id_and_topic_id_composite_index.py delete mode 100644 lms/djangoapps/teams/migrations/0006_add_team_size.py delete mode 100644 lms/djangoapps/teams/migrations/0007_auto__del_field_courseteam_is_active.py delete mode 100644 lms/djangoapps/verify_student/migrations/0002_auto__add_field_softwaresecurephotoverification_window.py delete mode 100644 lms/djangoapps/verify_student/migrations/0003_auto__add_field_softwaresecurephotoverification_display.py delete mode 100644 lms/djangoapps/verify_student/migrations/0004_auto__add_verificationcheckpoint__add_unique_verificationcheckpoint_co.py delete mode 100644 lms/djangoapps/verify_student/migrations/0005_auto__add_incoursereverificationconfiguration.py delete mode 100644 lms/djangoapps/verify_student/migrations/0006_auto__add_skippedreverification__add_unique_skippedreverification_user.py delete mode 100644 lms/djangoapps/verify_student/migrations/0007_auto__add_field_verificationstatus_location_id.py delete mode 100644 lms/djangoapps/verify_student/migrations/0008_auto__del_field_verificationcheckpoint_checkpoint_name__add_field_veri.py delete mode 100644 lms/djangoapps/verify_student/migrations/0009_auto__change_softwaresecurephotoverification_window_id_default_none.py delete mode 100644 lms/djangoapps/verify_student/migrations/0010_auto__del_field_softwaresecurephotoverification_window.py delete mode 100644 lms/djangoapps/verify_student/migrations/0011_add_verification_deadline.py delete mode 100644 lms/djangoapps/verify_student/migrations/0012_populate_verification_deadlines.py delete mode 100644 lms/djangoapps/verify_student/migrations/0013_auto__add_field_softwaresecurephotoverification_copy_id_photo_from.py delete mode 100644 lms/djangoapps/verify_student/migrations/0014_set_copy_id_photo_from.py delete mode 100644 lms/djangoapps/verify_student/migrations/0015_auto__add_icrvstatusemailsconfiguration.py create mode 100644 lms/envs/test_with_mysql.py delete mode 100644 openedx/core/djangoapps/content/course_overviews/migrations/0002_add_days_early_for_beta.py delete mode 100644 openedx/core/djangoapps/content/course_overviews/migrations/0003_add_cert_html_view_enabled.py delete mode 100644 openedx/core/djangoapps/content/course_overviews/migrations/0004_default_lowest_passing_grade_to_None.py delete mode 100644 openedx/core/djangoapps/content/course_overviews/migrations/0005_add_enrollment_fields.py delete mode 100644 openedx/core/djangoapps/content/course_overviews/migrations/0006_add_version_and_timestamp.py delete mode 100644 openedx/core/djangoapps/content/course_overviews/migrations/0007_auto__add_courseoverviewtab.py delete mode 100644 openedx/core/djangoapps/content/course_overviews/migrations/0008_drop_course_tabs_fk_constraint.py create mode 100644 openedx/core/djangoapps/content/course_overviews/startup.py delete mode 100644 openedx/core/djangoapps/content/course_structures/migrations/0002_auto__add_field_coursestructure_discussion_id_map_json.py delete mode 100644 openedx/core/djangoapps/course_groups/migrations/0002_add_model_CourseUserGroupPartitionGroup.py delete mode 100644 openedx/core/djangoapps/course_groups/migrations/0003_auto__add_coursecohort__add_coursecohortssettings.py delete mode 100644 openedx/core/djangoapps/course_groups/migrations/0004_auto__del_field_coursecohortssettings_cohorted_discussions__add_field_.py delete mode 100644 openedx/core/djangoapps/course_groups/migrations/0005_cohort_membership.py delete mode 100644 openedx/core/djangoapps/course_groups/migrations/0006_cohort_membership_data_migrate.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0002_rename_credit_requirement_criteria_field.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0003_add_creditrequirementstatus_reason.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0004_auto__add_field_creditrequirement_display_name.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0005_auto__add_field_creditprovider_provider_url__add_field_creditprovider_.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0006_auto__add_creditrequest__add_unique_creditrequest_username_course_prov.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0007_auto__add_field_creditprovider_enable_integration__chg_field_creditpro.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0008_delete_credit_provider_timestamp.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0009_auto__del_field_crediteligibility_provider.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0010_add_creditrequirementstatus_history.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0011_auto__add_field_creditrequirement_order.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0012_remove_m2m_course_and_provider.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0013_add_provider_status_url.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0014_auto__add_field_creditprovider_fulfillment_instructions.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0015_auto__add_field_creditprovider_provider_description.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0016_auto__add_field_creditprovider_eligibility_email_message__add_field_cr.py delete mode 100644 openedx/core/djangoapps/credit/migrations/0017_auto__add_field_creditprovider_thumbnail_url.py delete mode 100644 openedx/core/djangoapps/self_paced/migrations/0002_auto__add_field_selfpacedconfiguration_enable_course_home_improvements.py delete mode 100644 openedx/core/djangoapps/user_api/migrations/0002_auto__add_usercoursetags__add_unique_usercoursetags_user_course_id_key.py delete mode 100644 openedx/core/djangoapps/user_api/migrations/0003_rename_usercoursetags.py delete mode 100644 openedx/core/djangoapps/user_api/migrations/0004_auto__add_userorgtag__add_unique_userorgtag_user_org_key__chg_field_us.py diff --git a/cms/djangoapps/contentstore/__init__.py b/cms/djangoapps/contentstore/__init__.py index d3060371e5d8..e69de29bb2d1 100644 --- a/cms/djangoapps/contentstore/__init__.py +++ b/cms/djangoapps/contentstore/__init__.py @@ -1,2 +0,0 @@ -""" module init will register signal handlers """ -import contentstore.signals diff --git a/cms/djangoapps/contentstore/context_processors.py b/cms/djangoapps/contentstore/context_processors.py index 9d3131dd13f2..e9811c8be3e4 100644 --- a/cms/djangoapps/contentstore/context_processors.py +++ b/cms/djangoapps/contentstore/context_processors.py @@ -15,7 +15,7 @@ def doc_url(request=None): # pylint: disable=unused-argument """ - This function is added in the list of TEMPLATE_CONTEXT_PROCESSORS, which is a django setting for + This function is added in the list of TEMPLATES 'context_processors' OPTION, which is a django setting for a tuple of callables that take a request object as their argument and return a dictionary of items to be merged into the RequestContext. diff --git a/cms/djangoapps/contentstore/courseware_index.py b/cms/djangoapps/contentstore/courseware_index.py index bcf26f35725a..a3cc37542255 100644 --- a/cms/djangoapps/contentstore/courseware_index.py +++ b/cms/djangoapps/contentstore/courseware_index.py @@ -7,7 +7,7 @@ from six import add_metaclass from django.conf import settings -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy, ugettext as _ from django.core.urlresolvers import resolve from contentstore.utils import course_image_url @@ -350,7 +350,7 @@ class CoursewareSearchIndexer(SearchIndexerBase): 'category': 'courseware_index' } - UNNAMED_MODULE_NAME = _("(Unnamed)") + UNNAMED_MODULE_NAME = ugettext_lazy("(Unnamed)") @classmethod def normalize_structure_key(cls, structure_key): @@ -417,7 +417,7 @@ def supplemental_fields(cls, item): while parent is not None: path_component_name = parent.display_name if not path_component_name: - path_component_name = cls.UNNAMED_MODULE_NAME + path_component_name = unicode(cls.UNNAMED_MODULE_NAME) location_path.append(path_component_name) parent = parent.get_parent() location_path.reverse() diff --git a/cms/djangoapps/contentstore/management/commands/delete_orphans.py b/cms/djangoapps/contentstore/management/commands/delete_orphans.py index 202f8c2057a8..c0971bbc0839 100644 --- a/cms/djangoapps/contentstore/management/commands/delete_orphans.py +++ b/cms/djangoapps/contentstore/management/commands/delete_orphans.py @@ -14,18 +14,19 @@ class Command(BaseCommand): |commit|: optional argument. If not provided, will not run task. ''' - def handle(self, *args, **options): - if len(args) not in {1, 2}: - raise CommandError("delete_orphans requires one or more arguments: |commit|") + def add_arguments(self, parser): + parser.add_argument('course_id') + parser.add_argument('--commit', action='store') + def handle(self, *args, **options): try: - course_key = CourseKey.from_string(args[0]) + course_key = CourseKey.from_string(options['course_id']) except InvalidKeyError: raise CommandError("Invalid course key.") commit = False - if len(args) == 2: - commit = args[1] == 'commit' + if options['commit']: + commit = options['commit'] == 'commit' if commit: print 'Deleting orphans from the course:' diff --git a/cms/djangoapps/contentstore/management/commands/export.py b/cms/djangoapps/contentstore/management/commands/export.py index 2aa2b0fdba17..076bf944a2aa 100644 --- a/cms/djangoapps/contentstore/management/commands/export.py +++ b/cms/djangoapps/contentstore/management/commands/export.py @@ -18,23 +18,24 @@ class Command(BaseCommand): """ help = 'Export the specified data directory into the default ModuleStore' - def handle(self, *args, **options): - "Execute the command" - if len(args) != 2: - raise CommandError("export requires two arguments: ") + def add_arguments(self, parser): + parser.add_argument('course_id') + parser.add_argument('output_path') + def handle(self, *args, **options): + """Execute the command""" try: - course_key = CourseKey.from_string(args[0]) + course_key = CourseKey.from_string(options['course_id']) except InvalidKeyError: try: - course_key = SlashSeparatedCourseKey.from_deprecated_string(args[0]) + course_key = SlashSeparatedCourseKey.from_deprecated_string(options['course_id']) except InvalidKeyError: - raise CommandError("Invalid course_key: '%s'. " % args[0]) + raise CommandError("Invalid course_key: '%s'." % options['course_id']) if not modulestore().get_course(course_key): - raise CommandError("Course with %s key not found." % args[0]) + raise CommandError("Course with %s key not found." % options['course_id']) - output_path = args[1] + output_path = options['output_path'] print "Exporting course id = {0} to {1}".format(course_key, output_path) diff --git a/cms/djangoapps/contentstore/management/commands/fix_not_found.py b/cms/djangoapps/contentstore/management/commands/fix_not_found.py index 87e34061837c..c31c4d446c44 100644 --- a/cms/djangoapps/contentstore/management/commands/fix_not_found.py +++ b/cms/djangoapps/contentstore/management/commands/fix_not_found.py @@ -13,12 +13,14 @@ class Command(BaseCommand): """Fix a course's item not found errors""" help = "Fix a course's ItemNotFound errors" + def add_arguments(self, parser): + parser.add_argument('course_id') + def handle(self, *args, **options): - "Execute the command" - if len(args) != 1: - raise CommandError("requires 1 argument: ") + """Execute the command""" + course_id = options.get('course_id', None) - course_key = CourseKey.from_string(args[0]) + course_key = CourseKey.from_string(course_id) # for now only support on split mongo # pylint: disable=protected-access owning_store = modulestore()._get_modulestore_for_courselike(course_key) diff --git a/cms/djangoapps/contentstore/management/commands/import.py b/cms/djangoapps/contentstore/management/commands/import.py index 870d4eb72224..9a9483cbc1c6 100644 --- a/cms/djangoapps/contentstore/management/commands/import.py +++ b/cms/djangoapps/contentstore/management/commands/import.py @@ -1,8 +1,9 @@ """ Script for importing courseware from XML format """ +from optparse import make_option -from django.core.management.base import BaseCommand, CommandError, make_option +from django.core.management.base import BaseCommand, CommandError from django_comment_common.utils import (seed_permissions_roles, are_permissions_roles_seeded) from xmodule.modulestore.xml_importer import import_course_from_xml diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py b/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py index 9f38a8543804..502cd7b49f71 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py @@ -1,7 +1,7 @@ """Tests running the delete_orphan command""" import ddt -from django.core.management import call_command +from django.core.management import call_command, CommandError from contentstore.tests.test_orphan import TestOrphanBase from xmodule.modulestore.tests.factories import CourseFactory @@ -14,6 +14,13 @@ class TestDeleteOrphan(TestOrphanBase): Tests for running the delete_orphan management command. Inherits from TestOrphan in order to use its setUp method. """ + def test_no_args(self): + """ + Test delete_orphans command with no arguments + """ + with self.assertRaisesRegexp(CommandError, 'Error: too few arguments'): + call_command('delete_orphans') + @ddt.data(ModuleStoreEnum.Type.split, ModuleStoreEnum.Type.mongo) def test_delete_orphans_no_commit(self, default_store): """ @@ -35,7 +42,7 @@ def test_delete_orphans_commit(self, default_store): """ course = self.create_course_with_orphans(default_store) - call_command('delete_orphans', unicode(course.id), 'commit') + call_command('delete_orphans', unicode(course.id), commit='commit') # make sure this module wasn't deleted self.assertTrue(self.store.has_item(course.id.make_usage_key('html', 'multi_parent_html'))) @@ -59,7 +66,7 @@ def test_delete_orphans_published_branch_split(self): # call delete orphans, specifying the published branch # of the course - call_command('delete_orphans', unicode(published_branch), 'commit') + call_command('delete_orphans', unicode(published_branch), commit='commit') # now all orphans should be deleted self.assertOrphanCount(course.id, 0) diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_export.py b/cms/djangoapps/contentstore/management/commands/tests/test_export.py index 5ac8fb8d8359..dcb8a208aa50 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_export.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_export.py @@ -24,11 +24,9 @@ def test_no_args(self): """ Test export command with no arguments """ - errstring = "export requires two arguments: " - with self.assertRaises(SystemExit) as ex: - with self.assertRaisesRegexp(CommandError, errstring): - call_command('export') - self.assertEqual(ex.exception.code, 1) + errstring = "Error: too few arguments" + with self.assertRaisesRegexp(CommandError, errstring): + call_command('export') @ddt.ddt @@ -59,11 +57,9 @@ def test_export_course_with_directory_name(self, store): "Could not find course in {}".format(store) ) # Test `export` management command with invalid course_id - errstring = "Invalid course_key 'InvalidCourseID'." - with self.assertRaises(SystemExit) as ex: - with self.assertRaisesRegexp(CommandError, errstring): - call_command('export', "InvalidCourseID", self.temp_dir_1) - self.assertEqual(ex.exception.code, 1) + errstring = "Invalid course_key: 'InvalidCourseID'." + with self.assertRaisesRegexp(CommandError, errstring): + call_command('export', "InvalidCourseID", self.temp_dir_1) # Test `export` management command with correct course_id for output_dir in [self.temp_dir_1, self.temp_dir_2]: @@ -74,7 +70,5 @@ def test_course_key_not_found(self): Test export command with a valid course key that doesn't exist """ errstring = "Course with x/y/z key not found." - with self.assertRaises(SystemExit) as ex: - with self.assertRaisesRegexp(CommandError, errstring): - call_command('export', "x/y/z", self.temp_dir_1) - self.assertEqual(ex.exception.code, 1) + with self.assertRaisesRegexp(CommandError, errstring): + call_command('export', "x/y/z", self.temp_dir_1) diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_fix_not_found.py b/cms/djangoapps/contentstore/management/commands/tests/test_fix_not_found.py index ceff802d4637..dac5ad039309 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_fix_not_found.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_fix_not_found.py @@ -2,7 +2,7 @@ Tests for the fix_not_found management command """ -from django.core.management import call_command +from django.core.management import CommandError, call_command from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory @@ -12,12 +12,19 @@ class TestFixNotFound(ModuleStoreTestCase): """ Tests for the fix_not_found management command """ + def test_no_args(self): + """ + Test fix_not_found command with no arguments + """ + with self.assertRaisesRegexp(CommandError, "Error: too few arguments"): + call_command('fix_not_found') + def test_fix_not_found_non_split(self): """ The management command doesn't work on non split courses """ course = CourseFactory.create(default_store=ModuleStoreEnum.Type.mongo) - with self.assertRaises(SystemExit): + with self.assertRaisesRegexp(CommandError, "The owning modulestore does not support this command."): call_command("fix_not_found", unicode(course.id)) def test_fix_not_found(self): diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_git_export.py b/cms/djangoapps/contentstore/management/commands/tests/test_git_export.py index 3b98c3db4a5a..a8dfe03cd026 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_git_export.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_git_export.py @@ -56,57 +56,33 @@ def test_command(self): Test that the command interface works. Ignore stderr for clean test output. """ - with self.assertRaises(SystemExit) as ex: - with self.assertRaisesRegexp(CommandError, 'This script requires.*'): - call_command('git_export', 'blah', 'blah', 'blah', - stderr=StringIO.StringIO()) - self.assertEqual(ex.exception.code, 1) + with self.assertRaisesRegexp(CommandError, 'This script requires.*'): + call_command('git_export', 'blah', 'blah', 'blah', stderr=StringIO.StringIO()) - with self.assertRaises(SystemExit) as ex: - with self.assertRaisesRegexp(CommandError, 'This script requires.*'): - call_command('git_export', stderr=StringIO.StringIO()) - self.assertEqual(ex.exception.code, 1) + with self.assertRaisesRegexp(CommandError, 'This script requires.*'): + call_command('git_export', stderr=StringIO.StringIO()) # Send bad url to get course not exported - with self.assertRaises(SystemExit) as ex: - with self.assertRaisesRegexp(CommandError, unicode(GitExportError.URL_BAD)): - call_command('git_export', 'foo/bar/baz', 'silly', - stderr=StringIO.StringIO()) - self.assertEqual(ex.exception.code, 1) + with self.assertRaisesRegexp(CommandError, unicode(GitExportError.URL_BAD)): + call_command('git_export', 'foo/bar/baz', 'silly', stderr=StringIO.StringIO()) + # Send bad course_id to get course not exported - with self.assertRaises(SystemExit) as ex: - with self.assertRaisesRegexp(CommandError, unicode(GitExportError.BAD_COURSE)): - call_command('git_export', 'foo/bar:baz', 'silly', - stderr=StringIO.StringIO()) - self.assertEqual(ex.exception.code, 1) + with self.assertRaisesRegexp(CommandError, unicode(GitExportError.BAD_COURSE)): + call_command('git_export', 'foo/bar:baz', 'silly', stderr=StringIO.StringIO()) def test_error_output(self): """ Verify that error output is actually resolved as the correct string """ - output = StringIO.StringIO() - with self.assertRaises(SystemExit): - with self.assertRaisesRegexp(CommandError, unicode(GitExportError.BAD_COURSE)): - call_command( - 'git_export', 'foo/bar:baz', 'silly', - stdout=output, stderr=output - ) - self.assertIn('Bad course location provided', output.getvalue()) - output.close() - - output = StringIO.StringIO() - with self.assertRaises(SystemExit): - with self.assertRaisesRegexp(CommandError, unicode(GitExportError.URL_BAD)): - call_command( - 'git_export', 'foo/bar/baz', 'silly', - stdout=output, stderr=output - ) - self.assertIn( - 'Non writable git url provided. Expecting something like:' - ' git@github.com:mitocw/edx4edx_lite.git', - output.getvalue() - ) - output.close() + with self.assertRaisesRegexp(CommandError, unicode(GitExportError.BAD_COURSE)): + call_command( + 'git_export', 'foo/bar:baz', 'silly' + ) + + with self.assertRaisesRegexp(CommandError, unicode(GitExportError.URL_BAD)): + call_command( + 'git_export', 'foo/bar/baz', 'silly' + ) def test_bad_git_url(self): """ diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_reindex_courses.py b/cms/djangoapps/contentstore/management/commands/tests/test_reindex_courses.py index 6383d046b8b9..71db8f4f07d6 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_reindex_courses.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_reindex_courses.py @@ -6,7 +6,6 @@ from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from common.test.utils import nostderr from xmodule.modulestore.tests.factories import CourseFactory, LibraryFactory from contentstore.management.commands.reindex_course import Command as ReindexCommand @@ -48,36 +47,30 @@ def _build_calls(self, *courses): def test_given_no_arguments_raises_command_error(self): """ Test that raises CommandError for incorrect arguments """ - with self.assertRaises(SystemExit), nostderr(): - with self.assertRaisesRegexp(CommandError, ".* requires one or more arguments .*"): - call_command('reindex_course') + with self.assertRaisesRegexp(CommandError, ".* requires one or more arguments.*"): + call_command('reindex_course') - @ddt.data('qwerty', 'invalid_key', 'xblock-v1:qwe+rty') + @ddt.data('qwerty', 'invalid_key', 'xblockv1:qwerty') def test_given_invalid_course_key_raises_not_found(self, invalid_key): """ Test that raises InvalidKeyError for invalid keys """ - errstring = "Invalid course_key: '%s'." % invalid_key - with self.assertRaises(SystemExit) as ex: - with self.assertRaisesRegexp(CommandError, errstring): - call_command('reindex_course', invalid_key) - self.assertEqual(ex.exception.code, 1) + err_string = "Invalid course_key: '{0}'".format(invalid_key) + with self.assertRaisesRegexp(CommandError, err_string): + call_command('reindex_course', invalid_key) def test_given_library_key_raises_command_error(self): """ Test that raises CommandError if library key is passed """ - with self.assertRaises(SystemExit), nostderr(): - with self.assertRaisesRegexp(SearchIndexingError, ".* is not a course key"): - call_command('reindex_course', unicode(self._get_lib_key(self.first_lib))) - - with self.assertRaises(SystemExit), nostderr(): - with self.assertRaisesRegexp(SearchIndexingError, ".* is not a course key"): - call_command('reindex_course', unicode(self._get_lib_key(self.second_lib))) - - with self.assertRaises(SystemExit), nostderr(): - with self.assertRaisesRegexp(SearchIndexingError, ".* is not a course key"): - call_command( - 'reindex_course', - unicode(self.second_course.id), - unicode(self._get_lib_key(self.first_lib)) - ) + with self.assertRaisesRegexp(CommandError, ".* is not a course key"): + call_command('reindex_course', unicode(self._get_lib_key(self.first_lib))) + + with self.assertRaisesRegexp(CommandError, ".* is not a course key"): + call_command('reindex_course', unicode(self._get_lib_key(self.second_lib))) + + with self.assertRaisesRegexp(CommandError, ".* is not a course key"): + call_command( + 'reindex_course', + unicode(self.second_course.id), + unicode(self._get_lib_key(self.first_lib)) + ) def test_given_id_list_indexes_courses(self): """ Test that reindexes courses when given single course key or a list of course keys """ diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_reindex_library.py b/cms/djangoapps/contentstore/management/commands/tests/test_reindex_library.py index 0fab7f28e1f4..d44b8a38869d 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_reindex_library.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_reindex_library.py @@ -6,7 +6,6 @@ from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase -from common.test.utils import nostderr from xmodule.modulestore.tests.factories import CourseFactory, LibraryFactory from opaque_keys import InvalidKeyError @@ -50,9 +49,8 @@ def _build_calls(self, *libraries): def test_given_no_arguments_raises_command_error(self): """ Test that raises CommandError for incorrect arguments """ - with self.assertRaises(SystemExit), nostderr(): - with self.assertRaisesRegexp(CommandError, ".* requires one or more arguments .*"): - call_command('reindex_library') + with self.assertRaisesRegexp(CommandError, ".* requires one or more arguments.*"): + call_command('reindex_library') @ddt.data('qwerty', 'invalid_key', 'xblock-v1:qwe+rty') def test_given_invalid_lib_key_raises_not_found(self, invalid_key): @@ -62,21 +60,18 @@ def test_given_invalid_lib_key_raises_not_found(self, invalid_key): def test_given_course_key_raises_command_error(self): """ Test that raises CommandError if course key is passed """ - with self.assertRaises(SystemExit), nostderr(): - with self.assertRaisesRegexp(CommandError, ".* is not a library key"): - call_command('reindex_library', unicode(self.first_course.id)) - - with self.assertRaises(SystemExit), nostderr(): - with self.assertRaisesRegexp(CommandError, ".* is not a library key"): - call_command('reindex_library', unicode(self.second_course.id)) - - with self.assertRaises(SystemExit), nostderr(): - with self.assertRaisesRegexp(CommandError, ".* is not a library key"): - call_command( - 'reindex_library', - unicode(self.second_course.id), - unicode(self._get_lib_key(self.first_lib)) - ) + with self.assertRaisesRegexp(CommandError, ".* is not a library key"): + call_command('reindex_library', unicode(self.first_course.id)) + + with self.assertRaisesRegexp(CommandError, ".* is not a library key"): + call_command('reindex_library', unicode(self.second_course.id)) + + with self.assertRaisesRegexp(CommandError, ".* is not a library key"): + call_command( + 'reindex_library', + unicode(self.second_course.id), + unicode(self._get_lib_key(self.first_lib)) + ) def test_given_id_list_indexes_libraries(self): """ Test that reindexes libraries when given single library key or a list of library keys """ diff --git a/cms/djangoapps/contentstore/migrations/0001_initial.py b/cms/djangoapps/contentstore/migrations/0001_initial.py index e824bac7d050..88126406e34b 100644 --- a/cms/djangoapps/contentstore/migrations/0001_initial.py +++ b/cms/djangoapps/contentstore/migrations/0001_initial.py @@ -1,80 +1,43 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +from __future__ import unicode_literals +from django.db import migrations, models +import django.db.models.deletion +from django.conf import settings -class Migration(SchemaMigration): - def forwards(self, orm): - # Adding model 'VideoUploadConfig' - db.create_table('contentstore_videouploadconfig', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('profile_whitelist', self.gf('django.db.models.fields.TextField')(blank=True)), - ('status_whitelist', self.gf('django.db.models.fields.TextField')(blank=True)), - )) - db.send_create_signal('contentstore', ['VideoUploadConfig']) +class Migration(migrations.Migration): - if not db.dry_run: - orm.VideoUploadConfig.objects.create( - profile_whitelist="desktop_mp4,desktop_webm,mobile_low,youtube", - status_whitelist="Uploading,In Progress,Complete,Failed,Invalid Token,Unknown" - ) + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] - def backwards(self, orm): - # Deleting model 'VideoUploadConfig' - db.delete_table('contentstore_videouploadconfig') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contentstore.videouploadconfig': { - 'Meta': {'object_name': 'VideoUploadConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'profile_whitelist': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'status_whitelist': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['contentstore'] + operations = [ + migrations.CreateModel( + name='PushNotificationConfig', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + migrations.CreateModel( + name='VideoUploadConfig', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('profile_whitelist', models.TextField(help_text=b'A comma-separated list of names of profiles to include in video encoding downloads.', blank=True)), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + ] diff --git a/cms/djangoapps/contentstore/migrations/0002_auto__del_field_videouploadconfig_status_whitelist.py b/cms/djangoapps/contentstore/migrations/0002_auto__del_field_videouploadconfig_status_whitelist.py deleted file mode 100644 index e5fce94d8b66..000000000000 --- a/cms/djangoapps/contentstore/migrations/0002_auto__del_field_videouploadconfig_status_whitelist.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'VideoUploadConfig.status_whitelist' - db.delete_column('contentstore_videouploadconfig', 'status_whitelist') - - - def backwards(self, orm): - # Adding field 'VideoUploadConfig.status_whitelist' - db.add_column('contentstore_videouploadconfig', 'status_whitelist', - self.gf('django.db.models.fields.TextField')(default='', blank=True), - keep_default=False) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contentstore.videouploadconfig': { - 'Meta': {'object_name': 'VideoUploadConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'profile_whitelist': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['contentstore'] \ No newline at end of file diff --git a/cms/djangoapps/contentstore/migrations/0003_auto__add_pushnotificationconfig.py b/cms/djangoapps/contentstore/migrations/0003_auto__add_pushnotificationconfig.py deleted file mode 100644 index 7963916271e3..000000000000 --- a/cms/djangoapps/contentstore/migrations/0003_auto__add_pushnotificationconfig.py +++ /dev/null @@ -1,80 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'PushNotificationConfig' - db.create_table('contentstore_pushnotificationconfig', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('contentstore', ['PushNotificationConfig']) - - - def backwards(self, orm): - # Deleting model 'PushNotificationConfig' - db.delete_table('contentstore_pushnotificationconfig') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contentstore.pushnotificationconfig': { - 'Meta': {'object_name': 'PushNotificationConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'contentstore.videouploadconfig': { - 'Meta': {'object_name': 'VideoUploadConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'profile_whitelist': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['contentstore'] \ No newline at end of file diff --git a/cms/djangoapps/contentstore/startup.py b/cms/djangoapps/contentstore/startup.py new file mode 100644 index 000000000000..a19773bb3791 --- /dev/null +++ b/cms/djangoapps/contentstore/startup.py @@ -0,0 +1,2 @@ +""" will register signal handlers, moved out of __init__.py to ensure correct loading order post Django 1.7 """ +from . import signals # pylint: disable=unused-import diff --git a/cms/djangoapps/contentstore/views/entrance_exam.py b/cms/djangoapps/contentstore/views/entrance_exam.py index aaf311ba4f1e..400ce362d352 100644 --- a/cms/djangoapps/contentstore/views/entrance_exam.py +++ b/cms/djangoapps/contentstore/views/entrance_exam.py @@ -187,7 +187,7 @@ def _get_entrance_exam(request, course_key): # pylint: disable=W0613 exam_descriptor = modulestore().get_item(exam_key) return HttpResponse( escape_json_dumps({'locator': unicode(exam_descriptor.location)}), - status=200, mimetype='application/json') + status=200, content_type='application/json') except ItemNotFoundError: return HttpResponse(status=404) diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index 0eddbcb9ebfe..e0f5537bde2e 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -301,7 +301,7 @@ def xblock_view_handler(request, usage_key_string, view_name): hashed_resources = OrderedDict() for resource in fragment.resources: - hashed_resources[hash_resource(resource)] = resource + hashed_resources[hash_resource(resource)] = resource._asdict() return JsonResponse({ 'html': fragment.content, diff --git a/cms/djangoapps/contentstore/views/preview.py b/cms/djangoapps/contentstore/views/preview.py index 6e5d6dc768e5..0bc31f41c0ac 100644 --- a/cms/djangoapps/contentstore/views/preview.py +++ b/cms/djangoapps/contentstore/views/preview.py @@ -38,7 +38,7 @@ from .helpers import render_from_lms from contentstore.views.access import get_user_role -from cms.djangoapps.xblock_config.models import StudioConfig +from xblock_config.models import StudioConfig __all__ = ['preview_handler'] diff --git a/cms/djangoapps/contentstore/views/tests/test_course_index.py b/cms/djangoapps/contentstore/views/tests/test_course_index.py index 2cfeeb8e049c..0d3e5932b203 100644 --- a/cms/djangoapps/contentstore/views/tests/test_course_index.py +++ b/cms/djangoapps/contentstore/views/tests/test_course_index.py @@ -610,12 +610,12 @@ def test_negative_conditions(self): response = non_staff_client.get(index_url, {}, HTTP_ACCEPT='application/json') self.assertEqual(response.status_code, 403) - def test_content_type_none(self): + def test_empty_content_type(self): """ - Test json content type is set if none is selected + Test json content type is set if '' is selected """ index_url = reverse_course_url('course_search_index_handler', self.course.id) - response = self.client.get(index_url, {}, CONTENT_TYPE=None) + response = self.client.get(index_url, {}, CONTENT_TYPE='') # A course with the default release date should display as "Unscheduled" self.assertIn(self.SUCCESSFUL_RESPONSE, response.content) diff --git a/cms/djangoapps/contentstore/views/tests/test_preview.py b/cms/djangoapps/contentstore/views/tests/test_preview.py index 107e5dc955f2..e7a34c0957f7 100644 --- a/cms/djangoapps/contentstore/views/tests/test_preview.py +++ b/cms/djangoapps/contentstore/views/tests/test_preview.py @@ -17,7 +17,7 @@ from contentstore.views.preview import get_preview_fragment, _preview_module_system from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.test_asides import AsideTestType -from cms.djangoapps.xblock_config.models import StudioConfig +from xblock_config.models import StudioConfig from xmodule.modulestore.django import modulestore diff --git a/cms/djangoapps/course_creators/migrations/0001_initial.py b/cms/djangoapps/course_creators/migrations/0001_initial.py index a1d2c8d08a27..14b68306c763 100644 --- a/cms/djangoapps/course_creators/migrations/0001_initial.py +++ b/cms/djangoapps/course_creators/migrations/0001_initial.py @@ -1,74 +1,25 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseCreator' - db.create_table('course_creators_coursecreator', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], unique=True)), - ('state_changed', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('state', self.gf('django.db.models.fields.CharField')(default='unrequested', max_length=24)), - ('note', self.gf('django.db.models.fields.CharField')(max_length=512, blank=True)), - )) - db.send_create_signal('course_creators', ['CourseCreator']) - - - def backwards(self, orm): - # Deleting model 'CourseCreator' - db.delete_table('course_creators_coursecreator') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'course_creators.coursecreator': { - 'Meta': {'object_name': 'CourseCreator'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'note': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'default': "'unrequested'", 'max_length': '24'}), - 'state_changed': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - } - } - - complete_apps = ['course_creators'] +from __future__ import unicode_literals + +from django.db import migrations, models +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='CourseCreator', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('state_changed', models.DateTimeField(help_text='The date when state was last updated', verbose_name=b'state last updated', auto_now_add=True)), + ('state', models.CharField(default=b'unrequested', help_text='Current course creator state', max_length=24, choices=[(b'unrequested', 'unrequested'), (b'pending', 'pending'), (b'granted', 'granted'), (b'denied', 'denied')])), + ('note', models.CharField(help_text='Optional notes about this user (for example, why course creation access was denied)', max_length=512, blank=True)), + ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, help_text='Studio user')), + ], + ), + ] diff --git a/cms/djangoapps/course_creators/models.py b/cms/djangoapps/course_creators/models.py index 5138916c8894..59d28b63e1a8 100644 --- a/cms/djangoapps/course_creators/models.py +++ b/cms/djangoapps/course_creators/models.py @@ -36,7 +36,7 @@ class CourseCreator(models.Model): (DENIED, _(u'denied')), ) - user = models.ForeignKey(User, help_text=_("Studio user"), unique=True) + user = models.OneToOneField(User, help_text=_("Studio user")) state_changed = models.DateTimeField('state last updated', auto_now_add=True, help_text=_("The date when state was last updated")) state = models.CharField(max_length=24, blank=False, choices=STATES, default=UNREQUESTED, diff --git a/cms/djangoapps/course_creators/tests/test_admin.py b/cms/djangoapps/course_creators/tests/test_admin.py index 059dbc3cb6b5..45d84eed6290 100644 --- a/cms/djangoapps/course_creators/tests/test_admin.py +++ b/cms/djangoapps/course_creators/tests/test_admin.py @@ -105,7 +105,7 @@ def check_admin_message_state(state, expect_sent_to_admin, expect_sent_to_user): # message sent. Admin message will follow. base_num_emails = 1 if expect_sent_to_user else 0 if expect_sent_to_admin: - context = {'user_name': "test_user", 'user_email': 'test_user+courses@edx.org'} + context = {'user_name': "test_user", 'user_email': u'test_user+courses@edx.org'} self.assertEquals(base_num_emails + 1, len(mail.outbox), 'Expected admin message to be sent') sent_mail = mail.outbox[base_num_emails] self.assertEquals( @@ -166,10 +166,10 @@ def test_rate_limit_login(self): # try logging in 30 times, the default limit in the number of failed # login attempts in one 5 minute period before the rate gets limited for _ in xrange(30): - response = self.client.post('/admin/', post_params) + response = self.client.post('/admin/login/', post_params) self.assertEquals(response.status_code, 200) - response = self.client.post('/admin/', post_params) + response = self.client.post('/admin/login/', post_params) # Since we are using the default rate limit behavior, we are # expecting this to return a 403 error to indicate that there have # been too many attempts diff --git a/cms/djangoapps/xblock_config/admin.py b/cms/djangoapps/xblock_config/admin.py index daad91a062ed..dc837814276e 100644 --- a/cms/djangoapps/xblock_config/admin.py +++ b/cms/djangoapps/xblock_config/admin.py @@ -4,6 +4,6 @@ from django.contrib import admin from config_models.admin import ConfigurationModelAdmin -from cms.djangoapps.xblock_config.models import StudioConfig +from xblock_config.models import StudioConfig admin.site.register(StudioConfig, ConfigurationModelAdmin) diff --git a/cms/djangoapps/xblock_config/migrations/0001_initial.py b/cms/djangoapps/xblock_config/migrations/0001_initial.py index c48d02bd5710..8d3f9883cd74 100644 --- a/cms/djangoapps/xblock_config/migrations/0001_initial.py +++ b/cms/djangoapps/xblock_config/migrations/0001_initial.py @@ -1,74 +1,30 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'StudioConfig' - db.create_table('xblock_config_studioconfig', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('disabled_blocks', self.gf('django.db.models.fields.TextField')(default='about course_info static_tab')), - )) - db.send_create_signal('xblock_config', ['StudioConfig']) - - - def backwards(self, orm): - # Deleting model 'StudioConfig' - db.delete_table('xblock_config_studioconfig') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'xblock_config.studioconfig': { - 'Meta': {'object_name': 'StudioConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'disabled_blocks': ('django.db.models.fields.TextField', [], {'default': "'about course_info static_tab'"}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['xblock_config'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='StudioConfig', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('disabled_blocks', models.TextField(default=b'about course_info static_tab', help_text=b'Space-separated list of XBlocks on which XBlockAsides should never render in studio')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + ] diff --git a/cms/envs/acceptance.py b/cms/envs/acceptance.py index 92e5deca3e24..20bdeb0270d4 100644 --- a/cms/envs/acceptance.py +++ b/cms/envs/acceptance.py @@ -79,6 +79,7 @@ def seed(): 'OPTIONS': { 'timeout': 30, }, + 'ATOMIC_REQUESTS': True, } } @@ -100,7 +101,7 @@ def seed(): # Include the lettuce app for acceptance testing, including the 'harvest' django-admin command # django.contrib.staticfiles used to be loaded by lettuce, now we must add it ourselves # django.contrib.staticfiles is not added to lms as there is a ^/static$ route built in to the app -INSTALLED_APPS += ('lettuce.django', 'django.contrib.staticfiles') +INSTALLED_APPS += ('lettuce.django',) LETTUCE_APPS = ('contentstore',) LETTUCE_BROWSER = os.environ.get('LETTUCE_BROWSER', 'chrome') diff --git a/cms/envs/aws.py b/cms/envs/aws.py index e68d120d1de0..3656569a9811 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -39,7 +39,6 @@ ############### ALWAYS THE SAME ################################ DEBUG = False -TEMPLATE_DEBUG = False EMAIL_BACKEND = 'django_ses.SESBackend' SESSION_ENGINE = 'django.contrib.sessions.backends.cache' @@ -69,11 +68,6 @@ # Each worker should only fetch one message at a time CELERYD_PREFETCH_MULTIPLIER = 1 -# Skip djcelery migrations, since we don't use the database as the broker -SOUTH_MIGRATION_MODULES = { - 'djcelery': 'ignore', -} - # Rename the exchange and queues for each variant QUEUE_VARIANT = CONFIG_PREFIX.lower() @@ -130,6 +124,12 @@ SITE_NAME = ENV_TOKENS['SITE_NAME'] +ALLOWED_HOSTS = [ + # TODO: bbeggs remove this before prod, temp fix to get load testing running + "*", + ENV_TOKENS.get('CMS_BASE') +] + LOG_DIR = ENV_TOKENS['LOG_DIR'] CACHES = ENV_TOKENS['CACHES'] @@ -249,6 +249,8 @@ # Note that this is the Studio key for Segment. There is a separate key for the LMS. CMS_SEGMENT_KEY = AUTH_TOKENS.get('SEGMENT_KEY') +# SECRET_KEY = AUTH_TOKENS['SECRET_KEY'] + AWS_ACCESS_KEY_ID = AUTH_TOKENS["AWS_ACCESS_KEY_ID"] if AWS_ACCESS_KEY_ID == "": AWS_ACCESS_KEY_ID = None @@ -265,6 +267,11 @@ DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' DATABASES = AUTH_TOKENS['DATABASES'] + +# Enable automatic transaction management on all databases +for database_name in DATABASES: + DATABASES[database_name]['ATOMIC_REQUESTS'] = True + MODULESTORE = convert_module_store_setting_if_needed(AUTH_TOKENS.get('MODULESTORE', MODULESTORE)) CONTENTSTORE = AUTH_TOKENS['CONTENTSTORE'] DOC_STORE_CONFIG = AUTH_TOKENS['DOC_STORE_CONFIG'] diff --git a/cms/envs/common.py b/cms/envs/common.py index a96f8c23670a..63ae7caaa023 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -59,6 +59,11 @@ from xmodule.mixin import LicenseMixin ############################ FEATURE CONFIGURATION ############################# + + +# Dummy secret key for dev/test +SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd' + STUDIO_NAME = "Studio" STUDIO_SHORT_NAME = "Studio" FEATURES = { @@ -206,8 +211,9 @@ GEOIP_PATH = REPO_ROOT / "common/static/data/geoip/GeoIP.dat" GEOIPV6_PATH = REPO_ROOT / "common/static/data/geoip/GeoIPv6.dat" -############################# WEB CONFIGURATION ############################# -# This is where we stick our compiled template files. +############################# TEMPLATE CONFIGURATION ############################# +# Mako templating +# TODO: Move the Mako templating into a different engine in TEMPLATES below. import tempfile MAKO_MODULE_DIR = os.path.join(tempfile.gettempdir(), 'mako_cms') MAKO_TEMPLATES = {} @@ -222,25 +228,44 @@ for namespace, template_dirs in lms.envs.common.MAKO_TEMPLATES.iteritems(): MAKO_TEMPLATES['lms.' + namespace] = template_dirs -TEMPLATE_DIRS = MAKO_TEMPLATES['main'] +# Django templating +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + # Don't look for template source files inside installed applications. + 'APP_DIRS': False, + # Instead, look for template source files in these dirs. + 'DIRS': MAKO_TEMPLATES['main'], + # Options specific to this backend. + 'OPTIONS': { + 'loaders': ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', + ), + 'context_processors': ( + 'django.template.context_processors.request', + 'django.template.context_processors.static', + 'django.contrib.messages.context_processors.messages', + 'django.template.context_processors.i18n', + 'django.contrib.auth.context_processors.auth', # this is required for admin + 'django.template.context_processors.csrf', + 'dealer.contrib.django.staff.context_processor', # access git revision + 'contentstore.context_processors.doc_url', + ), + # Change 'debug' in your environment settings files - not here. + 'debug': False + } + } +] +DEFAULT_TEMPLATE_ENGINE = TEMPLATES[0] + +############################################################################## EDX_ROOT_URL = '' LOGIN_REDIRECT_URL = EDX_ROOT_URL + '/signin' LOGIN_URL = EDX_ROOT_URL + '/signin' - -TEMPLATE_CONTEXT_PROCESSORS = ( - 'django.core.context_processors.request', - 'django.core.context_processors.static', - 'django.contrib.messages.context_processors.messages', - 'django.core.context_processors.i18n', - 'django.contrib.auth.context_processors.auth', # this is required for admin - 'django.core.context_processors.csrf', - 'dealer.contrib.django.staff.context_processor', # access git revision - 'contentstore.context_processors.doc_url', -) - # use the ratelimit backend to prevent brute force attacks AUTHENTICATION_BACKENDS = ( 'ratelimitbackend.backends.RateLimitModelBackend', @@ -275,12 +300,6 @@ ################################# Middleware ################################### -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', -) - MIDDLEWARE_CLASSES = ( 'request_cache.middleware.RequestCache', 'django.middleware.cache.UpdateCacheMiddleware', @@ -304,11 +323,8 @@ 'embargo.middleware.EmbargoMiddleware', # Detects user-requested locale from 'accept-language' header in http request - # TODO: Re-import the Django version once we upgrade to Django 1.8 [PLAT-671] - # 'django.middleware.locale.LocaleMiddleware', - 'django_locale.middleware.LocaleMiddleware', + 'django.middleware.locale.LocaleMiddleware', - 'django.middleware.transaction.TransactionMiddleware', # needs to run after locale middleware (or anything that modifies the request context) 'edxmako.middleware.MakoMiddleware', @@ -383,11 +399,12 @@ } ############################ DJANGO_BUILTINS ################################ -# Change DEBUG/TEMPLATE_DEBUG in your environment settings files, not here +# Change DEBUG in your environment settings files, not here DEBUG = False -TEMPLATE_DEBUG = False SESSION_COOKIE_SECURE = False SESSION_SAVE_EVERY_REQUEST = False +SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer' + # Site info SITE_ID = 1 @@ -704,8 +721,8 @@ 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', + 'django.contrib.staticfiles', 'djcelery', - 'south', 'method_override', # Common views @@ -726,13 +743,14 @@ # For CMS 'contentstore', 'course_creators', + 'external_auth', 'student', # misleading name due to sharing with lms 'openedx.core.djangoapps.course_groups', # not used in cms (yet), but tests run 'xblock_config', # Tracking 'track', - 'eventtracking.django', + 'eventtracking.django.apps.EventTrackingConfig', # Monitoring 'datadog', @@ -740,7 +758,6 @@ # For asset pipelining 'edxmako', 'pipeline', - 'django.contrib.staticfiles', 'static_replace', 'require', @@ -793,6 +810,11 @@ # Self-paced course configuration 'openedx.core.djangoapps.self_paced', + + # These are apps that aren't strictly needed by Studio, but are imported by + # other apps that are. Django 1.8 wants to have imported models supported + # by installed apps. + 'lms.djangoapps.verify_student', ) @@ -901,9 +923,6 @@ # milestones 'milestones', - - # edX Proctoring - 'edx_proctoring', ) diff --git a/cms/envs/dev.py b/cms/envs/dev.py index ffd83d064adc..8320a7b43959 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -55,6 +55,7 @@ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ENV_ROOT / "db" / "edx.db", + 'ATOMIC_REQUESTS': True, } } diff --git a/cms/envs/dev_with_worker.py b/cms/envs/dev_with_worker.py index 40f6ed4e1ff1..44145dad9913 100644 --- a/cms/envs/dev_with_worker.py +++ b/cms/envs/dev_with_worker.py @@ -29,11 +29,5 @@ # Disable transaction management because we are using a worker. Views # that request a task and wait for the result will deadlock otherwise. - -MIDDLEWARE_CLASSES = tuple( - c for c in MIDDLEWARE_CLASSES - if c != 'django.middleware.transaction.TransactionMiddleware') - -# Note: other alternatives for disabling transactions don't work in 1.4 -# https://code.djangoproject.com/ticket/2304 -# https://code.djangoproject.com/ticket/16039 +for database_name in DATABASES: + DATABASES[database_name]['ATOMIC_REQUESTS'] = False diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index eb951edc2254..6634a202ff81 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -12,7 +12,7 @@ DEBUG = True USE_I18N = True -TEMPLATE_DEBUG = DEBUG +DEFAULT_TEMPLATE_ENGINE['OPTIONS']['debug'] = DEBUG HTTPS = 'off' ################################ LOGGERS ###################################### diff --git a/cms/envs/test.py b/cms/envs/test.py index b96e0c02b312..186d34bb0c57 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -128,9 +128,14 @@ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': TEST_ROOT / "db" / "cms.db", + 'ATOMIC_REQUESTS': True, }, } +# This hack disables migrations during tests. We want to create tables directly from the models for speed. +# See https://groups.google.com/d/msg/django-developers/PWPj3etj3-U/kCl6pMsQYYoJ. +MIGRATION_MODULES = {app: "app.migrations_not_used_in_tests" for app in INSTALLED_APPS} + LMS_BASE = "localhost:8000" FEATURES['PREVIEW_LMS_BASE'] = "preview" @@ -171,11 +176,8 @@ }, } -# Add external_auth to Installed apps for testing -INSTALLED_APPS += ('external_auth', ) - -# Add milestones to Installed apps for testing -INSTALLED_APPS += ('milestones', 'openedx.core.djangoapps.call_stack_manager') +# Add apps to Installed apps for testing +INSTALLED_APPS += ('openedx.core.djangoapps.call_stack_manager',) # hide ratelimit warnings while running tests filterwarnings('ignore', message='No request passed to the backend, unable to rate-limit') diff --git a/cms/envs/test_static_optimized.py b/cms/envs/test_static_optimized.py index 9b66e3cc45cd..c3efc3c83cf5 100644 --- a/cms/envs/test_static_optimized.py +++ b/cms/envs/test_static_optimized.py @@ -17,6 +17,7 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', + 'ATOMIC_REQUESTS': True, }, } diff --git a/cms/envs/yaml_config.py b/cms/envs/yaml_config.py index dc6463f2b71d..7b19b3567003 100644 --- a/cms/envs/yaml_config.py +++ b/cms/envs/yaml_config.py @@ -85,11 +85,6 @@ def construct_yaml_str(self, node): # Each worker should only fetch one message at a time CELERYD_PREFETCH_MULTIPLIER = 1 -# Skip djcelery migrations, since we don't use the database as the broker -SOUTH_MIGRATION_MODULES = { - 'djcelery': 'ignore', -} - # Rename the exchange and queues for each variant QUEUE_VARIANT = CONFIG_PREFIX.lower() diff --git a/cms/startup.py b/cms/startup.py index ca7d72dba313..da77a07ddb8b 100644 --- a/cms/startup.py +++ b/cms/startup.py @@ -8,7 +8,8 @@ settings.INSTALLED_APPS # pylint: disable=pointless-statement from openedx.core.lib.django_startup import autostartup -from monkey_patch import django_utils_translation +import django +from monkey_patch import third_party_auth import xmodule.x_module import cms.lib.xblock.runtime @@ -18,7 +19,9 @@ def run(): """ Executed during django startup """ - django_utils_translation.patch() + third_party_auth.patch() + + django.setup() autostartup() diff --git a/cms/templates/base.html b/cms/templates/base.html index 3feec0ad3c1f..6cd3eefd58b6 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -85,7 +85,7 @@ url_name: "${context_course.location.name | h}", org: "${context_course.location.org | h}", num: "${context_course.location.course | h}", - display_course_number: "${_(context_course.display_coursenumber)}", + display_course_number: "${_(context_course.display_number_with_default)}", revision: "${context_course.location.revision | h}", self_paced: ${escape_json_dumps(context_course.self_paced) | n} }); diff --git a/common/djangoapps/auth_exchange/tests/test_views.py b/common/djangoapps/auth_exchange/tests/test_views.py index 7b7ca5a3a1b1..5c0b7503f91c 100644 --- a/common/djangoapps/auth_exchange/tests/test_views.py +++ b/common/djangoapps/auth_exchange/tests/test_views.py @@ -130,14 +130,15 @@ def setUp(self): self.user = UserFactory() self.oauth2_client = Client.objects.create(client_type=provider.constants.CONFIDENTIAL) - def _verify_response(self, access_token, expected_status_code, expected_num_cookies): + def _verify_response(self, access_token, expected_status_code, expected_cookie_name=None): """ Calls the login_with_access_token endpoint and verifies the response given the expected values. """ url = reverse("login_with_access_token") response = self.client.post(url, HTTP_AUTHORIZATION="Bearer {0}".format(access_token)) self.assertEqual(response.status_code, expected_status_code) - self.assertEqual(len(response.cookies), expected_num_cookies) + if expected_cookie_name: + self.assertIn(expected_cookie_name, response.cookies) def test_success(self): access_token = AccessToken.objects.create( @@ -145,11 +146,9 @@ def test_success(self): client=self.oauth2_client, user=self.user, ) - self._verify_response(access_token, expected_status_code=204, expected_num_cookies=1) - self.assertEqual(len(self.client.cookies), 1) - self.assertEqual(self.client.session['_auth_user_id'], self.user.id) + self._verify_response(access_token, expected_status_code=204, expected_cookie_name='sessionid') + self.assertEqual(int(self.client.session['_auth_user_id']), self.user.id) def test_unauthenticated(self): - self._verify_response("invalid_token", expected_status_code=401, expected_num_cookies=0) - self.assertEqual(len(self.client.cookies), 0) + self._verify_response("invalid_token", expected_status_code=401) self.assertNotIn("session_key", self.client.session) diff --git a/common/djangoapps/cache_toolbox/core.py b/common/djangoapps/cache_toolbox/core.py index 6d3fac522bb6..31c853f7eb09 100644 --- a/common/djangoapps/cache_toolbox/core.py +++ b/common/djangoapps/cache_toolbox/core.py @@ -33,8 +33,8 @@ def get_instance(model, instance_or_pk, timeout=None, using=None): >>> User.objects.get(pk=1) == get_instance(User, 1) True - """ + """ pk = getattr(instance_or_pk, 'pk', instance_or_pk) key = instance_key(model, instance_or_pk) data = cache.get(key) @@ -59,7 +59,7 @@ def get_instance(model, instance_or_pk, timeout=None, using=None): # fallback and return the underlying instance cache.delete(key) - # Use the default manager so we are never filtered by a .get_query_set() + # Use the default manager so we are never filtered by a .get_queryset() # import logging # log = logging.getLogger("tracking") @@ -94,7 +94,6 @@ def delete_instance(model, *instance_or_pk): """ Purges the cache keys for the instances of this model. """ - cache.delete_many([instance_key(model, x) for x in instance_or_pk]) @@ -102,10 +101,10 @@ def instance_key(model, instance_or_pk): """ Returns the cache key for this (model, instance) pair. """ - + # pylint: disable=protected-access return '%s.%s:%d' % ( model._meta.app_label, - model._meta.module_name, + model._meta.model_name, getattr(instance_or_pk, 'pk', instance_or_pk), ) diff --git a/common/djangoapps/config_models/admin.py b/common/djangoapps/config_models/admin.py index 90d79ec32971..6003326936d0 100644 --- a/common/djangoapps/config_models/admin.py +++ b/common/djangoapps/config_models/admin.py @@ -5,14 +5,14 @@ from django.forms import models from django.contrib import admin from django.contrib.admin import ListFilter -from django.core.cache import get_cache, InvalidCacheBackendError +from django.core.cache import caches, InvalidCacheBackendError from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.utils.translation import ugettext_lazy as _ try: - cache = get_cache('configuration') # pylint: disable=invalid-name + cache = caches['configuration'] # pylint: disable=invalid-name except InvalidCacheBackendError: from django.core.cache import cache @@ -84,7 +84,7 @@ def revert(self, request, queryset): reverse( 'admin:{}_{}_change'.format( self.model._meta.app_label, - self.model._meta.module_name, + self.model._meta.model_name, ), args=(target.id,), ) @@ -142,7 +142,7 @@ class KeyedConfigurationModelAdmin(ConfigurationModelAdmin): date_hierarchy = None list_filter = (ShowHistoryFilter, ) - def queryset(self, request): + def get_queryset(self, request): """ Annote the queryset with an 'is_active' property that's true iff that row is the most recently added row for that particular set of KEY_FIELDS values. @@ -180,7 +180,7 @@ def edit_link(self, inst): """ Edit link for the change view """ if not inst.is_active: return u'--' - update_url = reverse('admin:{}_{}_add'.format(self.model._meta.app_label, self.model._meta.module_name)) + update_url = reverse('admin:{}_{}_add'.format(self.model._meta.app_label, self.model._meta.model_name)) update_url += "?source={}".format(inst.pk) return u'{}'.format(update_url, _('Update')) edit_link.allow_tags = True diff --git a/common/djangoapps/config_models/models.py b/common/djangoapps/config_models/models.py index af3ac859841f..5528f084cf55 100644 --- a/common/djangoapps/config_models/models.py +++ b/common/djangoapps/config_models/models.py @@ -3,11 +3,11 @@ """ from django.db import connection, models from django.contrib.auth.models import User -from django.core.cache import get_cache, InvalidCacheBackendError +from django.core.cache import caches, InvalidCacheBackendError from django.utils.translation import ugettext_lazy as _ try: - cache = get_cache('configuration') # pylint: disable=invalid-name + cache = caches['configuration'] # pylint: disable=invalid-name except InvalidCacheBackendError: from django.core.cache import cache @@ -37,7 +37,7 @@ def current_set(self): necessaryily mean enbled. """ assert self.model.KEY_FIELDS != (), "Just use model.current() if there are no KEY_FIELDS" - return self.get_query_set().extra( + return self.get_queryset().extra( # pylint: disable=no-member where=["id IN ({subquery})".format(subquery=self._current_ids_subquery())], select={'is_active': 1}, # This annotation is used by the admin changelist. sqlite requires '1', not 'True' ) @@ -49,11 +49,11 @@ def with_active_flag(self): """ if self.model.KEY_FIELDS: subquery = self._current_ids_subquery() - return self.get_query_set().extra( + return self.get_queryset().extra( # pylint: disable=no-member select={'is_active': "id IN ({subquery})".format(subquery=subquery)} ) else: - return self.get_query_set().extra( + return self.get_queryset().extra( # pylint: disable=no-member select={'is_active': "id = {pk}".format(pk=self.model.current().pk)} ) diff --git a/common/djangoapps/config_models/views.py b/common/djangoapps/config_models/views.py index 2efcfa80bb87..3bd693ec59cc 100644 --- a/common/djangoapps/config_models/views.py +++ b/common/djangoapps/config_models/views.py @@ -5,6 +5,7 @@ from rest_framework.permissions import DjangoModelPermissions from rest_framework.authentication import SessionAuthentication from rest_framework.serializers import ModelSerializer +from django.db import transaction class ReadableOnlyByAuthors(DjangoModelPermissions): @@ -13,7 +14,29 @@ class ReadableOnlyByAuthors(DjangoModelPermissions): perms_map['GET'] = perms_map['OPTIONS'] = perms_map['HEAD'] = perms_map['POST'] -class ConfigurationModelCurrentAPIView(CreateAPIView, RetrieveAPIView): +class AtomicMixin(object): + """Mixin to provide atomic transaction for as_view.""" + @classmethod + def create_atomic_wrapper(cls, wrapped_func): + """Returns a wrapped function.""" + def _create_atomic_wrapper(*args, **kwargs): + """Actual wrapper.""" + # When a view call fails due to a permissions error, it raises an exception. + # An uncaught exception breaks the DB transaction for any following DB operations + # unless it's wrapped in a atomic() decorator or context manager. + with transaction.atomic(): + return wrapped_func(*args, **kwargs) + + return _create_atomic_wrapper + + @classmethod + def as_view(cls, **initkwargs): + """Overrides as_view to add atomic transaction.""" + view = super(AtomicMixin, cls).as_view(**initkwargs) + return cls.create_atomic_wrapper(view) + + +class ConfigurationModelCurrentAPIView(AtomicMixin, CreateAPIView, RetrieveAPIView): """ This view allows an authenticated user with the appropriate model permissions to read and write the current configuration for the specified `model`. diff --git a/common/djangoapps/cors_csrf/migrations/0001_initial.py b/common/djangoapps/cors_csrf/migrations/0001_initial.py index bdc4e752cab7..f29fbb1d7e45 100644 --- a/common/djangoapps/cors_csrf/migrations/0001_initial.py +++ b/common/djangoapps/cors_csrf/migrations/0001_initial.py @@ -1,74 +1,30 @@ # -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'XDomainProxyConfiguration' - db.create_table('cors_csrf_xdomainproxyconfiguration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('whitelist', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('cors_csrf', ['XDomainProxyConfiguration']) - - - def backwards(self, orm): - # Deleting model 'XDomainProxyConfiguration' - db.delete_table('cors_csrf_xdomainproxyconfiguration') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'cors_csrf.xdomainproxyconfiguration': { - 'Meta': {'object_name': 'XDomainProxyConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'whitelist': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['cors_csrf'] +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='XDomainProxyConfiguration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('whitelist', models.TextField(help_text='List of domains that are allowed to make cross-domain requests to this site. Please list each domain on its own line.')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + ] diff --git a/common/djangoapps/course_action_state/managers.py b/common/djangoapps/course_action_state/managers.py index 3bda32e50113..6603e516785d 100644 --- a/common/djangoapps/course_action_state/managers.py +++ b/common/djangoapps/course_action_state/managers.py @@ -55,7 +55,7 @@ class CourseActionUIStateManager(CourseActionStateManager): """ # add transaction protection to revert changes by get_or_create if an exception is raised before the final save. - @transaction.commit_on_success + @transaction.atomic def update_state( self, course_key, new_state, should_display=True, message="", user=None, allow_not_found=False, **kwargs ): diff --git a/common/djangoapps/course_action_state/migrations/0001_initial.py b/common/djangoapps/course_action_state/migrations/0001_initial.py index a8ab6c7db3c9..c95f5f8688d6 100644 --- a/common/djangoapps/course_action_state/migrations/0001_initial.py +++ b/common/djangoapps/course_action_state/migrations/0001_initial.py @@ -1,92 +1,38 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseRerunState' - db.create_table('course_action_state_coursererunstate', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created_time', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('updated_time', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - ('created_user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='created_by_user+', null=True, on_delete=models.SET_NULL, to=orm['auth.User'])), - ('updated_user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='updated_by_user+', null=True, on_delete=models.SET_NULL, to=orm['auth.User'])), - ('course_key', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('action', self.gf('django.db.models.fields.CharField')(max_length=100, db_index=True)), - ('state', self.gf('django.db.models.fields.CharField')(max_length=50)), - ('should_display', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('message', self.gf('django.db.models.fields.CharField')(max_length=1000)), - ('source_course_key', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - )) - db.send_create_signal('course_action_state', ['CourseRerunState']) - - # Adding unique constraint on 'CourseRerunState', fields ['course_key', 'action'] - db.create_unique('course_action_state_coursererunstate', ['course_key', 'action']) - - - def backwards(self, orm): - # Removing unique constraint on 'CourseRerunState', fields ['course_key', 'action'] - db.delete_unique('course_action_state_coursererunstate', ['course_key', 'action']) - - # Deleting model 'CourseRerunState' - db.delete_table('course_action_state_coursererunstate') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'course_action_state.coursererunstate': { - 'Meta': {'unique_together': "(('course_key', 'action'),)", 'object_name': 'CourseRerunState'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '100', 'db_index': 'True'}), - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'created_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'message': ('django.db.models.fields.CharField', [], {'max_length': '1000'}), - 'should_display': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'source_course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'updated_time': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'updated_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'updated_by_user+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}) - } - } - - complete_apps = ['course_action_state'] +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +from django.conf import settings +import xmodule_django.models + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='CourseRerunState', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created_time', models.DateTimeField(auto_now_add=True)), + ('updated_time', models.DateTimeField(auto_now=True)), + ('course_key', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('action', models.CharField(max_length=100, db_index=True)), + ('state', models.CharField(max_length=50)), + ('should_display', models.BooleanField(default=False)), + ('message', models.CharField(max_length=1000)), + ('source_course_key', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('display_name', models.CharField(default=b'', max_length=255, blank=True)), + ('created_user', models.ForeignKey(related_name='created_by_user+', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True)), + ('updated_user', models.ForeignKey(related_name='updated_by_user+', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True)), + ], + ), + migrations.AlterUniqueTogether( + name='coursererunstate', + unique_together=set([('course_key', 'action')]), + ), + ] diff --git a/common/djangoapps/course_action_state/migrations/0002_add_rerun_display_name.py b/common/djangoapps/course_action_state/migrations/0002_add_rerun_display_name.py deleted file mode 100644 index 92b2cc24a048..000000000000 --- a/common/djangoapps/course_action_state/migrations/0002_add_rerun_display_name.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseRerunState.display_name' - db.add_column('course_action_state_coursererunstate', 'display_name', - self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CourseRerunState.display_name' - db.delete_column('course_action_state_coursererunstate', 'display_name') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'course_action_state.coursererunstate': { - 'Meta': {'unique_together': "(('course_key', 'action'),)", 'object_name': 'CourseRerunState'}, - 'action': ('django.db.models.fields.CharField', [], {'max_length': '100', 'db_index': 'True'}), - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'created_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'display_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'message': ('django.db.models.fields.CharField', [], {'max_length': '1000'}), - 'should_display': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'source_course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'updated_time': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'updated_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'updated_by_user+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}) - } - } - - complete_apps = ['course_action_state'] diff --git a/common/djangoapps/course_action_state/models.py b/common/djangoapps/course_action_state/models.py index 87fceebed752..6c2985018aeb 100644 --- a/common/djangoapps/course_action_state/models.py +++ b/common/djangoapps/course_action_state/models.py @@ -90,7 +90,7 @@ class Meta(object): # FIELDS # Whether or not the status should be displayed to users - should_display = models.BooleanField() + should_display = models.BooleanField(default=False) # Message related to the status message = models.CharField(max_length=MAX_MESSAGE_LENGTH) diff --git a/common/djangoapps/course_modes/admin.py b/common/djangoapps/course_modes/admin.py index f6c22551cd4c..6781227f5c52 100644 --- a/common/djangoapps/course_modes/admin.py +++ b/common/djangoapps/course_modes/admin.py @@ -26,13 +26,14 @@ # The admin page will work in both LMS and Studio, # but the test suite for Studio will fail because # the verification deadline table won't exist. -from verify_student import models as verification_models # pylint: disable=import-error +from lms.djangoapps.verify_student import models as verification_models class CourseModeForm(forms.ModelForm): class Meta(object): model = CourseMode + fields = '__all__' COURSE_MODE_SLUG_CHOICES = ( [(CourseMode.DEFAULT_MODE_SLUG, CourseMode.DEFAULT_MODE_SLUG)] + diff --git a/common/djangoapps/course_modes/migrations/0001_initial.py b/common/djangoapps/course_modes/migrations/0001_initial.py index 1818b8abea2c..a16a22cb8d61 100644 --- a/common/djangoapps/course_modes/migrations/0001_initial.py +++ b/common/djangoapps/course_modes/migrations/0001_initial.py @@ -1,40 +1,48 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseMode' - db.create_table('course_modes_coursemode', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('mode_slug', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('mode_display_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('min_price', self.gf('django.db.models.fields.IntegerField')(default=0)), - ('suggested_prices', self.gf('django.db.models.fields.CommaSeparatedIntegerField')(default='', max_length=255, blank=True)), - )) - db.send_create_signal('course_modes', ['CourseMode']) - - - def backwards(self, orm): - # Deleting model 'CourseMode' - db.delete_table('course_modes_coursemode') - - - models = { - 'course_modes.coursemode': { - 'Meta': {'object_name': 'CourseMode'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'min_price': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'mode_display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'suggested_prices': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}) - } - } - - complete_apps = ['course_modes'] +from __future__ import unicode_literals + +from django.db import migrations, models +import xmodule_django.models + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='CourseMode', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, verbose_name='Course', db_index=True)), + ('mode_slug', models.CharField(max_length=100, verbose_name='Mode')), + ('mode_display_name', models.CharField(max_length=255, verbose_name='Display Name')), + ('min_price', models.IntegerField(default=0, verbose_name='Price')), + ('currency', models.CharField(default=b'usd', max_length=8)), + ('expiration_datetime', models.DateTimeField(default=None, help_text='OPTIONAL: After this date/time, users will no longer be able to enroll in this mode. Leave this blank if users can enroll in this mode until enrollment closes for the course.', null=True, verbose_name='Upgrade Deadline', blank=True)), + ('expiration_date', models.DateField(default=None, null=True, blank=True)), + ('suggested_prices', models.CommaSeparatedIntegerField(default=b'', max_length=255, blank=True)), + ('description', models.TextField(null=True, blank=True)), + ('sku', models.CharField(help_text='OPTIONAL: This is the SKU (stock keeping unit) of this mode in the external ecommerce service. Leave this blank if the course has not yet been migrated to the ecommerce service.', max_length=255, null=True, verbose_name=b'SKU', blank=True)), + ], + ), + migrations.CreateModel( + name='CourseModesArchive', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('mode_slug', models.CharField(max_length=100)), + ('mode_display_name', models.CharField(max_length=255)), + ('min_price', models.IntegerField(default=0)), + ('suggested_prices', models.CommaSeparatedIntegerField(default=b'', max_length=255, blank=True)), + ('currency', models.CharField(default=b'usd', max_length=8)), + ('expiration_date', models.DateField(default=None, null=True, blank=True)), + ('expiration_datetime', models.DateTimeField(default=None, null=True, blank=True)), + ], + ), + migrations.AlterUniqueTogether( + name='coursemode', + unique_together=set([('course_id', 'mode_slug', 'currency')]), + ), + ] diff --git a/common/djangoapps/course_modes/migrations/0002_auto__add_field_coursemode_currency.py b/common/djangoapps/course_modes/migrations/0002_auto__add_field_coursemode_currency.py deleted file mode 100644 index 78bb5bf4fa34..000000000000 --- a/common/djangoapps/course_modes/migrations/0002_auto__add_field_coursemode_currency.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseMode.currency' - db.add_column('course_modes_coursemode', 'currency', - self.gf('django.db.models.fields.CharField')(default='usd', max_length=8), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CourseMode.currency' - db.delete_column('course_modes_coursemode', 'currency') - - - models = { - 'course_modes.coursemode': { - 'Meta': {'object_name': 'CourseMode'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'min_price': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'mode_display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'suggested_prices': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}) - } - } - - complete_apps = ['course_modes'] diff --git a/common/djangoapps/course_modes/migrations/0003_auto__add_unique_coursemode_course_id_currency_mode_slug.py b/common/djangoapps/course_modes/migrations/0003_auto__add_unique_coursemode_course_id_currency_mode_slug.py deleted file mode 100644 index 7e6bc1bd4034..000000000000 --- a/common/djangoapps/course_modes/migrations/0003_auto__add_unique_coursemode_course_id_currency_mode_slug.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding unique constraint on 'CourseMode', fields ['course_id', 'currency', 'mode_slug'] - db.create_unique('course_modes_coursemode', ['course_id', 'currency', 'mode_slug']) - - - def backwards(self, orm): - # Removing unique constraint on 'CourseMode', fields ['course_id', 'currency', 'mode_slug'] - db.delete_unique('course_modes_coursemode', ['course_id', 'currency', 'mode_slug']) - - - models = { - 'course_modes.coursemode': { - 'Meta': {'unique_together': "(('course_id', 'mode_slug', 'currency'),)", 'object_name': 'CourseMode'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'min_price': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'mode_display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'suggested_prices': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}) - } - } - - complete_apps = ['course_modes'] diff --git a/common/djangoapps/course_modes/migrations/0004_auto__add_field_coursemode_expiration_date.py b/common/djangoapps/course_modes/migrations/0004_auto__add_field_coursemode_expiration_date.py deleted file mode 100644 index 19851446c4a8..000000000000 --- a/common/djangoapps/course_modes/migrations/0004_auto__add_field_coursemode_expiration_date.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseMode.expiration_date' - db.add_column('course_modes_coursemode', 'expiration_date', - self.gf('django.db.models.fields.DateField')(default=None, null=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CourseMode.expiration_date' - db.delete_column('course_modes_coursemode', 'expiration_date') - - - models = { - 'course_modes.coursemode': { - 'Meta': {'unique_together': "(('course_id', 'mode_slug', 'currency'),)", 'object_name': 'CourseMode'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'expiration_date': ('django.db.models.fields.DateField', [], {'default': 'None', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'min_price': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'mode_display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'suggested_prices': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}) - } - } - - complete_apps = ['course_modes'] diff --git a/common/djangoapps/course_modes/migrations/0005_auto__add_field_coursemode_expiration_datetime.py b/common/djangoapps/course_modes/migrations/0005_auto__add_field_coursemode_expiration_datetime.py deleted file mode 100644 index 101c3b919be0..000000000000 --- a/common/djangoapps/course_modes/migrations/0005_auto__add_field_coursemode_expiration_datetime.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseMode.expiration_datetime' - db.add_column('course_modes_coursemode', 'expiration_datetime', - self.gf('django.db.models.fields.DateTimeField')(default=None, null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CourseMode.expiration_datetime' - db.delete_column('course_modes_coursemode', 'expiration_datetime') - - - models = { - 'course_modes.coursemode': { - 'Meta': {'unique_together': "(('course_id', 'mode_slug', 'currency'),)", 'object_name': 'CourseMode'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'expiration_date': ('django.db.models.fields.DateField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'expiration_datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'min_price': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'mode_display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'suggested_prices': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}) - } - } - - complete_apps = ['course_modes'] diff --git a/common/djangoapps/course_modes/migrations/0006_expiration_date_to_datetime.py b/common/djangoapps/course_modes/migrations/0006_expiration_date_to_datetime.py deleted file mode 100644 index 319c1b02b82f..000000000000 --- a/common/djangoapps/course_modes/migrations/0006_expiration_date_to_datetime.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - -class Migration(DataMigration): - - def forwards(self, orm): - from datetime import datetime - for course_mode in orm.CourseMode.objects.all(): - if course_mode.expiration_date is None: - course_mode.expiration_datetime = None - course_mode.save() - else: - course_mode.expiration_datetime = datetime.combine(course_mode.expiration_date, datetime.min.time()) - course_mode.save() - - def backwards(self, orm): - for course_mode in orm.CourseMode.objects.all(): - course_mode.expiration_datetime = None - course_mode.save() - - models = { - 'course_modes.coursemode': { - 'Meta': {'unique_together': "(('course_id', 'mode_slug', 'currency'),)", 'object_name': 'CourseMode'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'expiration_date': ('django.db.models.fields.DateField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'expiration_datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'min_price': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'mode_display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'suggested_prices': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}) - } - } - - complete_apps = ['course_modes'] - symmetrical = True diff --git a/common/djangoapps/course_modes/migrations/0007_add_description.py b/common/djangoapps/course_modes/migrations/0007_add_description.py deleted file mode 100644 index 98386e4bcfe8..000000000000 --- a/common/djangoapps/course_modes/migrations/0007_add_description.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseMode.description' - db.add_column('course_modes_coursemode', 'description', - self.gf('django.db.models.fields.TextField')(null=True, blank=True), - keep_default=False) - - - # Changing field 'CourseMode.course_id' - db.alter_column('course_modes_coursemode', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)) - - def backwards(self, orm): - # Deleting field 'CourseMode.description' - db.delete_column('course_modes_coursemode', 'description') - - - # Changing field 'CourseMode.course_id' - db.alter_column('course_modes_coursemode', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255)) - - models = { - 'course_modes.coursemode': { - 'Meta': {'unique_together': "(('course_id', 'mode_slug', 'currency'),)", 'object_name': 'CourseMode'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'expiration_date': ('django.db.models.fields.DateField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'expiration_datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'min_price': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'mode_display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'suggested_prices': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}) - } - } - - complete_apps = ['course_modes'] diff --git a/common/djangoapps/course_modes/migrations/0007_auto__add_coursemodesarchive__chg_field_coursemode_course_id.py b/common/djangoapps/course_modes/migrations/0007_auto__add_coursemodesarchive__chg_field_coursemode_course_id.py deleted file mode 100644 index 678f2c63becf..000000000000 --- a/common/djangoapps/course_modes/migrations/0007_auto__add_coursemodesarchive__chg_field_coursemode_course_id.py +++ /dev/null @@ -1,66 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseModesArchive' - db.create_table('course_modes_coursemodesarchive', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('mode_slug', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('mode_display_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('min_price', self.gf('django.db.models.fields.IntegerField')(default=0)), - ('suggested_prices', self.gf('django.db.models.fields.CommaSeparatedIntegerField')(default='', max_length=255, blank=True)), - ('currency', self.gf('django.db.models.fields.CharField')(default='usd', max_length=8)), - ('expiration_date', self.gf('django.db.models.fields.DateField')(default=None, null=True, blank=True)), - ('expiration_datetime', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True, blank=True)), - )) - db.send_create_signal('course_modes', ['CourseModesArchive']) - - - # Changing field 'CourseMode.course_id' - db.alter_column('course_modes_coursemode', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)) - - def backwards(self, orm): - # Deleting model 'CourseModesArchive' - db.delete_table('course_modes_coursemodesarchive') - - - # Changing field 'CourseMode.course_id' - db.alter_column('course_modes_coursemode', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255)) - - models = { - 'course_modes.coursemode': { - 'Meta': {'unique_together': "(('course_id', 'mode_slug', 'currency'),)", 'object_name': 'CourseMode'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'expiration_date': ('django.db.models.fields.DateField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'expiration_datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'min_price': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'mode_display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'suggested_prices': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}) - }, - 'course_modes.coursemodesarchive': { - 'Meta': {'object_name': 'CourseModesArchive'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'expiration_date': ('django.db.models.fields.DateField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'expiration_datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'min_price': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'mode_display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'suggested_prices': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}) - } - } - - complete_apps = ['course_modes'] diff --git a/common/djangoapps/course_modes/migrations/0008_auto__del_field_coursemodesarchive_description__add_field_coursemode_s.py b/common/djangoapps/course_modes/migrations/0008_auto__del_field_coursemodesarchive_description__add_field_coursemode_s.py deleted file mode 100644 index c096f6c6bc29..000000000000 --- a/common/djangoapps/course_modes/migrations/0008_auto__del_field_coursemodesarchive_description__add_field_coursemode_s.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseMode.sku' - db.add_column('course_modes_coursemode', 'sku', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True), - keep_default=False) - - def backwards(self, orm): - # Deleting field 'CourseMode.sku' - db.delete_column('course_modes_coursemode', 'sku') - - models = { - 'course_modes.coursemode': { - 'Meta': {'unique_together': "(('course_id', 'mode_slug', 'currency'),)", 'object_name': 'CourseMode'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'expiration_date': ('django.db.models.fields.DateField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'expiration_datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'min_price': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'mode_display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'sku': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'suggested_prices': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}) - }, - 'course_modes.coursemodesarchive': { - 'Meta': {'object_name': 'CourseModesArchive'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'expiration_date': ('django.db.models.fields.DateField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'expiration_datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'min_price': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'mode_display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'suggested_prices': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}) - } - } - - complete_apps = ['course_modes'] diff --git a/common/djangoapps/course_modes/tests/test_admin.py b/common/djangoapps/course_modes/tests/test_admin.py index 72242d14b231..f65c3a6e9f8b 100644 --- a/common/djangoapps/course_modes/tests/test_admin.py +++ b/common/djangoapps/course_modes/tests/test_admin.py @@ -21,7 +21,7 @@ # defined in the LMS and course_modes is in common. However, the benefits # of putting all this configuration in one place outweigh the downsides. # Once the course admin tool is deployed, we can remove this dependency. -from verify_student.models import VerificationDeadline # pylint: disable=import-error +from lms.djangoapps.verify_student.models import VerificationDeadline # We can only test this in the LMS because the course modes admin relies diff --git a/common/djangoapps/course_modes/views.py b/common/djangoapps/course_modes/views.py index 0dc790b7667b..331ecbd38a20 100644 --- a/common/djangoapps/course_modes/views.py +++ b/common/djangoapps/course_modes/views.py @@ -6,6 +6,7 @@ from ipware.ip import get_ip from django.core.urlresolvers import reverse +from django.db import transaction from django.http import HttpResponse, HttpResponseBadRequest from django.shortcuts import redirect from django.views.generic.base import View @@ -20,7 +21,7 @@ from student.models import CourseEnrollment from opaque_keys.edx.locations import SlashSeparatedCourseKey from opaque_keys.edx.keys import CourseKey -from util.db import commit_on_success_with_read_committed +from util.db import outer_atomic from xmodule.modulestore.django import modulestore from embargo import api as embargo_api @@ -37,7 +38,12 @@ class ChooseModeView(View): """ + @method_decorator(transaction.non_atomic_requests) + def dispatch(self, *args, **kwargs): # pylint: disable=missing-docstring + return super(ChooseModeView, self).dispatch(*args, **kwargs) + @method_decorator(login_required) + @method_decorator(transaction.atomic) def get(self, request, course_id, error=None): """Displays the course mode choice page. @@ -135,8 +141,9 @@ def get(self, request, course_id, error=None): return render_to_response("course_modes/choose.html", context) + @method_decorator(transaction.non_atomic_requests) @method_decorator(login_required) - @method_decorator(commit_on_success_with_read_committed) + @method_decorator(outer_atomic(read_committed=True)) def post(self, request, course_id): """Takes the form submission from the page and parses it. diff --git a/common/djangoapps/dark_lang/middleware.py b/common/djangoapps/dark_lang/middleware.py index 868ab0570853..d1062c7e4072 100644 --- a/common/djangoapps/dark_lang/middleware.py +++ b/common/djangoapps/dark_lang/middleware.py @@ -19,10 +19,8 @@ ) from lang_pref import LANGUAGE_KEY -# TODO re-import this once we're on Django 1.5 or greater. [PLAT-671] -# from django.utils.translation.trans_real import parse_accept_lang_header -# from django.utils.translation import LANGUAGE_SESSION_KEY -from django_locale.trans_real import parse_accept_lang_header, LANGUAGE_SESSION_KEY +from django.utils.translation.trans_real import parse_accept_lang_header +from django.utils.translation import LANGUAGE_SESSION_KEY def dark_parse_accept_lang_header(accept): diff --git a/common/djangoapps/dark_lang/migrations/0001_initial.py b/common/djangoapps/dark_lang/migrations/0001_initial.py index b2f856ac4315..1b3ac52e8930 100644 --- a/common/djangoapps/dark_lang/migrations/0001_initial.py +++ b/common/djangoapps/dark_lang/migrations/0001_initial.py @@ -1,74 +1,30 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'DarkLangConfig' - db.create_table('dark_lang_darklangconfig', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('released_languages', self.gf('django.db.models.fields.TextField')(blank=True)), - )) - db.send_create_signal('dark_lang', ['DarkLangConfig']) - - - def backwards(self, orm): - # Deleting model 'DarkLangConfig' - db.delete_table('dark_lang_darklangconfig') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'dark_lang.darklangconfig': { - 'Meta': {'object_name': 'DarkLangConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'released_languages': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - } - } - - complete_apps = ['dark_lang'] +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='DarkLangConfig', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('released_languages', models.TextField(help_text=b'A comma-separated list of language codes to release to the public.', blank=True)), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + ] diff --git a/common/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py b/common/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py new file mode 100644 index 000000000000..88939c60a77b --- /dev/null +++ b/common/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +# Converted from the original South migration 0002_enable_on_install.py +# +from django.db import migrations, models + + +def create_dark_lang_config(apps, schema_editor): + """ + Enable DarkLang by default when it is installed, to prevent accidental + release of testing languages. + """ + dark_lang_model = apps.get_model("dark_lang", "DarkLangConfig") + db_alias = schema_editor.connection.alias + + dark_lang_model.objects.using(db_alias).get_or_create(enabled=True) + +def remove_dark_lang_config(apps, schema_editor): + """Write your backwards methods here.""" + raise RuntimeError("Cannot reverse this migration.") + +class Migration(migrations.Migration): + + dependencies = [ + ('dark_lang', '0001_initial'), + ] + + operations = [ + migrations.RunPython(create_dark_lang_config, remove_dark_lang_config), + ] diff --git a/common/djangoapps/dark_lang/migrations/0002_enable_on_install.py b/common/djangoapps/dark_lang/migrations/0002_enable_on_install.py deleted file mode 100644 index c794a156ce05..000000000000 --- a/common/djangoapps/dark_lang/migrations/0002_enable_on_install.py +++ /dev/null @@ -1,68 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - -class Migration(DataMigration): - - def forwards(self, orm): - """ - Enable DarkLang by default when it is installed, to prevent accidental - release of testing languages. - """ - orm.DarkLangConfig(enabled=True).save() - - def backwards(self, orm): - "Write your backwards methods here." - raise RuntimeError("Cannot reverse this migration.") - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'dark_lang.darklangconfig': { - 'Meta': {'object_name': 'DarkLangConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'released_languages': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - } - } - - complete_apps = ['dark_lang'] - symmetrical = True diff --git a/common/djangoapps/dark_lang/tests.py b/common/djangoapps/dark_lang/tests.py index 13519b32eb0e..db529bdb8edd 100644 --- a/common/djangoapps/dark_lang/tests.py +++ b/common/djangoapps/dark_lang/tests.py @@ -11,9 +11,7 @@ from dark_lang.middleware import DarkLangMiddleware from dark_lang.models import DarkLangConfig -# TODO PLAT-671 Import from Django 1.8 -# from django.utils.translation import LANGUAGE_SESSION_KEY -from django_locale.trans_real import LANGUAGE_SESSION_KEY +from django.utils.translation import LANGUAGE_SESSION_KEY from student.tests.factories import UserFactory diff --git a/common/djangoapps/django_comment_common/migrations/0001_initial.py b/common/djangoapps/django_comment_common/migrations/0001_initial.py index f2c3ca3aee63..2eb8f7a53315 100644 --- a/common/djangoapps/django_comment_common/migrations/0001_initial.py +++ b/common/djangoapps/django_comment_common/migrations/0001_initial.py @@ -1,92 +1,42 @@ # -*- coding: utf-8 -*- -from south.v2 import SchemaMigration +from __future__ import unicode_literals +from django.db import migrations, models +from django.conf import settings +import xmodule_django.models -class Migration(SchemaMigration): -# -# cdodge: This is basically an empty migration since everything has - up to now - managed in the django_comment_client app -# But going forward we should be using this migration -# - def forwards(self, orm): - pass - def backwards(self, orm): - pass +class Migration(migrations.Migration): - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'django_comment_common.permission': { - 'Meta': {'object_name': 'Permission'}, - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'primary_key': 'True'}), - 'roles': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'permissions'", 'symmetrical': 'False', 'to': "orm['django_comment_common.Role']"}) - }, - 'django_comment_common.role': { - 'Meta': {'object_name': 'Role'}, - 'course_id': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'roles'", 'symmetrical': 'False', 'to': "orm['auth.User']"}) - } - } + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] - complete_apps = ['django_comment_common'] + operations = [ + migrations.CreateModel( + name='Permission', + fields=[ + ('name', models.CharField(max_length=30, serialize=False, primary_key=True)), + ], + options={ + 'db_table': 'django_comment_client_permission', + }, + ), + migrations.CreateModel( + name='Role', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=30)), + ('course_id', xmodule_django.models.CourseKeyField(db_index=True, max_length=255, blank=True)), + ('users', models.ManyToManyField(related_name='roles', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'db_table': 'django_comment_client_role', + }, + ), + migrations.AddField( + model_name='permission', + name='roles', + field=models.ManyToManyField(related_name='permissions', to='django_comment_common.Role'), + ), + ] diff --git a/common/djangoapps/django_locale/__init__.py b/common/djangoapps/django_locale/__init__.py deleted file mode 100644 index 655019022ead..000000000000 --- a/common/djangoapps/django_locale/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -""" -TODO: This module is imported from the stable Django 1.8 branch, as a -copy of https://github.com/django/django/blob/stable/1.8.x/django/middleware/locale.py. - -Remove this file and re-import this middleware from Django once the -codebase is upgraded with a modern version of Django. [PLAT-671] -""" diff --git a/common/djangoapps/django_locale/middleware.py b/common/djangoapps/django_locale/middleware.py deleted file mode 100644 index b0601a807eac..000000000000 --- a/common/djangoapps/django_locale/middleware.py +++ /dev/null @@ -1,83 +0,0 @@ -# TODO: This file is imported from the stable Django 1.8 branch. Remove this file -# and re-import this middleware from Django once the codebase is upgraded. [PLAT-671] -# pylint: disable=invalid-name, missing-docstring -"This is the locale selecting middleware that will look at accept headers" - -from django.conf import settings -from django.core.urlresolvers import ( - LocaleRegexURLResolver, get_resolver, get_script_prefix, is_valid_path, -) -from django.http import HttpResponseRedirect -from django.utils import translation -from django.utils.cache import patch_vary_headers -# Override the Django 1.4 implementation with the 1.8 implementation -from django_locale.trans_real import get_language_from_request - - -class LocaleMiddleware(object): - """ - This is a very simple middleware that parses a request - and decides what translation object to install in the current - thread context. This allows pages to be dynamically - translated to the language the user desires (if the language - is available, of course). - """ - response_redirect_class = HttpResponseRedirect - - def __init__(self): - self._is_language_prefix_patterns_used = False - for url_pattern in get_resolver(None).url_patterns: - if isinstance(url_pattern, LocaleRegexURLResolver): - self._is_language_prefix_patterns_used = True - break - - def process_request(self, request): - check_path = self.is_language_prefix_patterns_used() - # This call is broken in Django 1.4: - # https://github.com/django/django/blob/stable/1.4.x/django/utils/translation/trans_real.py#L399 - # (we override parse_accept_lang_header to a fixed version in dark_lang.middleware) - language = get_language_from_request( - request, check_path=check_path) - translation.activate(language) - request.LANGUAGE_CODE = translation.get_language() - - def process_response(self, request, response): - language = translation.get_language() - language_from_path = translation.get_language_from_path(request.path_info) - if (response.status_code == 404 and not language_from_path - and self.is_language_prefix_patterns_used()): - urlconf = getattr(request, 'urlconf', None) - language_path = '/%s%s' % (language, request.path_info) - path_valid = is_valid_path(language_path, urlconf) - if (not path_valid and settings.APPEND_SLASH - and not language_path.endswith('/')): - path_valid = is_valid_path("%s/" % language_path, urlconf) - - if path_valid: - script_prefix = get_script_prefix() - language_url = "%s://%s%s" % ( - request.scheme, - request.get_host(), - # insert language after the script prefix and before the - # rest of the URL - request.get_full_path().replace( - script_prefix, - '%s%s/' % (script_prefix, language), - 1 - ) - ) - return self.response_redirect_class(language_url) - - if not (self.is_language_prefix_patterns_used() - and language_from_path): - patch_vary_headers(response, ('Accept-Language',)) - if 'Content-Language' not in response: - response['Content-Language'] = language - return response - - def is_language_prefix_patterns_used(self): - """ - Returns `True` if the `LocaleRegexURLResolver` is used - at root level of the urlpatterns, else it returns `False`. - """ - return self._is_language_prefix_patterns_used diff --git a/common/djangoapps/django_locale/tests.py b/common/djangoapps/django_locale/tests.py deleted file mode 100644 index cc40ce9d4a4d..000000000000 --- a/common/djangoapps/django_locale/tests.py +++ /dev/null @@ -1,157 +0,0 @@ -# pylint: disable=invalid-name, line-too-long, super-method-not-called -""" -Tests taken from Django upstream: -https://github.com/django/django/blob/e6b34193c5c7d117ededdab04bb16caf8864f07c/tests/regressiontests/i18n/tests.py -""" -from django.conf import settings -from django.test import TestCase, RequestFactory -from django_locale.trans_real import ( - parse_accept_lang_header, get_language_from_request, LANGUAGE_SESSION_KEY -) - -# Added to test middleware around dark lang -from django.contrib.auth.models import User -from django.test.utils import override_settings -from dark_lang.models import DarkLangConfig - - -# Adding to support test differences between Django and our own settings -@override_settings(LANGUAGES=[ - ('pt', 'Portuguese'), - ('pt-br', 'Portuguese-Brasil'), - ('es', 'Spanish'), - ('es-ar', 'Spanish (Argentina)'), - ('de', 'Deutch'), - ('zh-cn', 'Chinese (China)'), - ('ar-sa', 'Arabic (Saudi Arabia)'), -]) -class MiscTests(TestCase): - """ - Tests taken from Django upstream: - https://github.com/django/django/blob/e6b34193c5c7d117ededdab04bb16caf8864f07c/tests/regressiontests/i18n/tests.py - """ - def setUp(self): - self.rf = RequestFactory() - # Added to test middleware around dark lang - user = User() - user.save() - DarkLangConfig( - released_languages='pt, pt-br, es, de, es-ar, zh-cn, ar-sa', - changed_by=user, - enabled=True - ).save() - - def test_parse_spec_http_header(self): - """ - Testing HTTP header parsing. First, we test that we can parse the - values according to the spec (and that we extract all the pieces in - the right order). - """ - p = parse_accept_lang_header - # Good headers. - self.assertEqual([('de', 1.0)], p('de')) - self.assertEqual([('en-AU', 1.0)], p('en-AU')) - self.assertEqual([('es-419', 1.0)], p('es-419')) - self.assertEqual([('*', 1.0)], p('*;q=1.00')) - self.assertEqual([('en-AU', 0.123)], p('en-AU;q=0.123')) - self.assertEqual([('en-au', 0.5)], p('en-au;q=0.5')) - self.assertEqual([('en-au', 1.0)], p('en-au;q=1.0')) - self.assertEqual([('da', 1.0), ('en', 0.5), ('en-gb', 0.25)], p('da, en-gb;q=0.25, en;q=0.5')) - self.assertEqual([('en-au-xx', 1.0)], p('en-au-xx')) - self.assertEqual([('de', 1.0), ('en-au', 0.75), ('en-us', 0.5), ('en', 0.25), ('es', 0.125), ('fa', 0.125)], p('de,en-au;q=0.75,en-us;q=0.5,en;q=0.25,es;q=0.125,fa;q=0.125')) - self.assertEqual([('*', 1.0)], p('*')) - self.assertEqual([('de', 1.0)], p('de;q=0.')) - self.assertEqual([('en', 1.0), ('*', 0.5)], p('en; q=1.0, * ; q=0.5')) - self.assertEqual([], p('')) - - # Bad headers; should always return []. - self.assertEqual([], p('en-gb;q=1.0000')) - self.assertEqual([], p('en;q=0.1234')) - self.assertEqual([], p('en;q=.2')) - self.assertEqual([], p('abcdefghi-au')) - self.assertEqual([], p('**')) - self.assertEqual([], p('en,,gb')) - self.assertEqual([], p('en-au;q=0.1.0')) - self.assertEqual([], p('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXZ,en')) - self.assertEqual([], p('da, en-gb;q=0.8, en;q=0.7,#')) - self.assertEqual([], p('de;q=2.0')) - self.assertEqual([], p('de;q=0.a')) - self.assertEqual([], p('12-345')) - self.assertEqual([], p('')) - - def test_parse_literal_http_header(self): - """ - Now test that we parse a literal HTTP header correctly. - """ - g = get_language_from_request - r = self.rf.get('/') - r.COOKIES = {} - r.META = {'HTTP_ACCEPT_LANGUAGE': 'pt-br'} - self.assertEqual('pt-br', g(r)) - - r.META = {'HTTP_ACCEPT_LANGUAGE': 'pt'} - self.assertEqual('pt', g(r)) - - r.META = {'HTTP_ACCEPT_LANGUAGE': 'es,de'} - self.assertEqual('es', g(r)) - - r.META = {'HTTP_ACCEPT_LANGUAGE': 'es-ar,de'} - self.assertEqual('es-ar', g(r)) - - # This test assumes there won't be a Django translation to a US - # variation of the Spanish language, a safe assumption. When the - # user sets it as the preferred language, the main 'es' - # translation should be selected instead. - r.META = {'HTTP_ACCEPT_LANGUAGE': 'es-us'} - self.assertEqual(g(r), 'es') - - # This tests the following scenario: there isn't a main language (zh) - # translation of Django but there is a translation to variation (zh_CN) - # the user sets zh-cn as the preferred language, it should be selected - # by Django without falling back nor ignoring it. - r.META = {'HTTP_ACCEPT_LANGUAGE': 'zh-cn,de'} - self.assertEqual(g(r), 'zh-cn') - - def test_logic_masked_by_darklang(self): - g = get_language_from_request - r = self.rf.get('/') - r.COOKIES = {} - r.META = {'HTTP_ACCEPT_LANGUAGE': 'ar-qa'} - self.assertEqual('ar-sa', g(r)) - - r.session = {LANGUAGE_SESSION_KEY: 'es'} - self.assertEqual('es', g(r)) - - def test_parse_language_cookie(self): - """ - Now test that we parse language preferences stored in a cookie correctly. - """ - g = get_language_from_request - r = self.rf.get('/') - r.COOKIES = {settings.LANGUAGE_COOKIE_NAME: 'pt-br'} - r.META = {} - self.assertEqual('pt-br', g(r)) - - r.COOKIES = {settings.LANGUAGE_COOKIE_NAME: 'pt'} - r.META = {} - self.assertEqual('pt', g(r)) - - r.COOKIES = {settings.LANGUAGE_COOKIE_NAME: 'es'} - r.META = {'HTTP_ACCEPT_LANGUAGE': 'de'} - self.assertEqual('es', g(r)) - - # This test assumes there won't be a Django translation to a US - # variation of the Spanish language, a safe assumption. When the - # user sets it as the preferred language, the main 'es' - # translation should be selected instead. - r.COOKIES = {settings.LANGUAGE_COOKIE_NAME: 'es-us'} - r.META = {} - self.assertEqual(g(r), 'es') - - # This tests the following scenario: there isn't a main language (zh) - # translation of Django but there is a translation to variation (zh_CN) - # the user sets zh-cn as the preferred language, it should be selected - # by Django without falling back nor ignoring it. - r.COOKIES = {settings.LANGUAGE_COOKIE_NAME: 'zh-cn'} - r.META = {'HTTP_ACCEPT_LANGUAGE': 'de'} - self.assertEqual(g(r), 'zh-cn') diff --git a/common/djangoapps/django_locale/trans_real.py b/common/djangoapps/django_locale/trans_real.py deleted file mode 100644 index 3ec6b6d0267b..000000000000 --- a/common/djangoapps/django_locale/trans_real.py +++ /dev/null @@ -1,131 +0,0 @@ -"""Translation helper functions.""" -# Imported from Django 1.8 -# pylint: disable=invalid-name -import re -from django.conf import settings -from django.conf.locale import LANG_INFO -from django.utils import translation - - -# Format of Accept-Language header values. From RFC 2616, section 14.4 and 3.9. -# and RFC 3066, section 2.1 -accept_language_re = re.compile(r''' - ([A-Za-z]{1,8}(?:-[A-Za-z0-9]{1,8})*|\*) # "en", "en-au", "x-y-z", "*" - (?:\s*;\s*q=(0(?:\.\d{,3})?|1(?:.0{,3})?))? # Optional "q=1.00", "q=0.8" - (?:\s*,\s*|$) # Multiple accepts per header. - ''', re.VERBOSE) - - -language_code_re = re.compile(r'^[a-z]{1,8}(?:-[a-z0-9]{1,8})*$', re.IGNORECASE) - - -LANGUAGE_SESSION_KEY = '_language' - - -def parse_accept_lang_header(lang_string): - """ - Parses the lang_string, which is the body of an HTTP Accept-Language - header, and returns a list of (lang, q-value), ordered by 'q' values. - - Any format errors in lang_string results in an empty list being returned. - """ - # parse_accept_lang_header is broken until we are on Django 1.5 or greater - # See https://code.djangoproject.com/ticket/19381 - result = [] - pieces = accept_language_re.split(lang_string) - if pieces[-1]: - return [] - for i in range(0, len(pieces) - 1, 3): - first, lang, priority = pieces[i: i + 3] - if first: - return [] - priority = priority and float(priority) or 1.0 - result.append((lang, priority)) - result.sort(key=lambda k: k[1], reverse=True) - return result - - -def get_supported_language_variant(lang_code, strict=False): - """ - Returns the language-code that's listed in supported languages, possibly - selecting a more generic variant. Raises LookupError if nothing found. - If `strict` is False (the default), the function will look for an alternative - country-specific variant when the currently checked is not found. - lru_cache should have a maxsize to prevent from memory exhaustion attacks, - as the provided language codes are taken from the HTTP request. See also - . - """ - if lang_code: - # If 'fr-ca' is not supported, try special fallback or language-only 'fr'. - possible_lang_codes = [lang_code] - try: - # TODO skip this, or import updated LANG_INFO format from __future__ - # (fallback option wasn't added until - # https://github.com/django/django/commit/5dcdbe95c749d36072f527e120a8cb463199ae0d) - possible_lang_codes.extend(LANG_INFO[lang_code]['fallback']) - except KeyError: - pass - generic_lang_code = lang_code.split('-')[0] - possible_lang_codes.append(generic_lang_code) - supported_lang_codes = dict(settings.LANGUAGES) - - for code in possible_lang_codes: - # Note: django 1.4 implementation of check_for_language is OK to use - if code in supported_lang_codes and translation.check_for_language(code): - return code - if not strict: - # if fr-fr is not supported, try fr-ca. - for supported_code in supported_lang_codes: - if supported_code.startswith(generic_lang_code + '-'): - return supported_code - raise LookupError(lang_code) - - -def get_language_from_request(request, check_path=False): - """ - Analyzes the request to find what language the user wants the system to - show. Only languages listed in settings.LANGUAGES are taken into account. - If the user requests a sublanguage where we have a main language, we send - out the main language. - If check_path is True, the URL path prefix will be checked for a language - code, otherwise this is skipped for backwards compatibility. - """ - if check_path: - # Note: django 1.4 implementation of get_language_from_path is OK to use - lang_code = translation.get_language_from_path(request.path_info) - if lang_code is not None: - return lang_code - - supported_lang_codes = dict(settings.LANGUAGES) - - if hasattr(request, 'session'): - lang_code = request.session.get(LANGUAGE_SESSION_KEY) - # Note: django 1.4 implementation of check_for_language is OK to use - if lang_code in supported_lang_codes and lang_code is not None and translation.check_for_language(lang_code): - return lang_code - - lang_code = request.COOKIES.get(settings.LANGUAGE_COOKIE_NAME) - - try: - return get_supported_language_variant(lang_code) - except LookupError: - pass - - accept = request.META.get('HTTP_ACCEPT_LANGUAGE', '') - # broken in 1.4, so defined above - for accept_lang, unused in parse_accept_lang_header(accept): - if accept_lang == '*': - break - - if not language_code_re.search(accept_lang): - continue - - try: - return get_supported_language_variant(accept_lang) - except LookupError: - continue - - try: - return get_supported_language_variant(settings.LANGUAGE_CODE) - except LookupError: - return settings.LANGUAGE_CODE diff --git a/common/djangoapps/edxmako/makoloader.py b/common/djangoapps/edxmako/makoloader.py index 33122b944f6e..994346a2ba0d 100644 --- a/common/djangoapps/edxmako/makoloader.py +++ b/common/djangoapps/edxmako/makoloader.py @@ -1,10 +1,11 @@ import logging from django.conf import settings +from django.core.exceptions import ImproperlyConfigured from django.template.base import TemplateDoesNotExist -from django.template.loader import make_origin, get_template_from_string from django.template.loaders.filesystem import Loader as FilesystemLoader from django.template.loaders.app_directories import Loader as AppDirectoriesLoader +from django.template import Engine from edxmako.template import Template @@ -50,14 +51,17 @@ def load_template(self, template_name, template_dirs=None): return template, None else: # This is a regular template - origin = make_origin(file_path, self.load_template_source, template_name, template_dirs) try: - template = get_template_from_string(source, origin, template_name) + template = Engine.get_default().from_string(source) return template, None + except ImproperlyConfigured: + # Either no DjangoTemplates engine was configured -or- multiple engines + # were configured, making the get_default() call above fail. + raise except TemplateDoesNotExist: - # If compiling the template we found raises TemplateDoesNotExist, back off to - # returning the source and display name for the template we were asked to load. - # This allows for correct identification (later) of the actual template that does + # If compiling the loaded template raises TemplateDoesNotExist, back off to + # returning the source and display name for the requested template. + # This allows for eventual correct identification of the actual template that does # not exist. return source, file_path @@ -71,13 +75,15 @@ def reset(self): class MakoFilesystemLoader(MakoLoader): is_usable = True + _accepts_engine_in_init = True - def __init__(self): - MakoLoader.__init__(self, FilesystemLoader()) + def __init__(self, *args): + MakoLoader.__init__(self, FilesystemLoader(*args)) class MakoAppDirectoriesLoader(MakoLoader): is_usable = True + _accepts_engine_in_init = True - def __init__(self): - MakoLoader.__init__(self, AppDirectoriesLoader()) + def __init__(self, *args): + MakoLoader.__init__(self, AppDirectoriesLoader(*args)) diff --git a/common/djangoapps/edxmako/management/commands/preprocess_assets.py b/common/djangoapps/edxmako/management/commands/preprocess_assets.py index 805981327e89..8d3cf5608a18 100644 --- a/common/djangoapps/edxmako/management/commands/preprocess_assets.py +++ b/common/djangoapps/edxmako/management/commands/preprocess_assets.py @@ -23,6 +23,10 @@ class Command(BaseCommand): help = "Preprocess asset template files to ready them for compilation." + def add_arguments(self, parser): + parser.add_argument('files', type=unicode, nargs='+', help='files to pre-process') + parser.add_argument('dest_dir', type=unicode, help='destination directory') + def handle(self, *args, **options): theme_name = getattr(settings, "THEME_NAME", None) use_custom_theme = settings.FEATURES.get("USE_CUSTOM_THEME", False) @@ -30,8 +34,8 @@ def handle(self, *args, **options): # No custom theme, nothing to do! return - dest_dir = args[-1] - for source_file in args[:-1]: + dest_dir = options['dest_dir'] + for source_file in options['files']: self.process_one_file(source_file, dest_dir, theme_name) def process_one_file(self, source_file, dest_dir, theme_name): diff --git a/common/djangoapps/edxmako/middleware.py b/common/djangoapps/edxmako/middleware.py index 5d9f8cbdfc80..cb67e2f1429d 100644 --- a/common/djangoapps/edxmako/middleware.py +++ b/common/djangoapps/edxmako/middleware.py @@ -13,7 +13,10 @@ # limitations under the License. import threading +from django.conf import settings from django.template import RequestContext +from django.template.context import _builtin_context_processors +from django.utils.module_loading import import_string from util.request import safe_get_host REQUEST_CONTEXT = threading.local() @@ -31,6 +34,15 @@ def process_response(self, __, response): return response +def get_template_context_processors(): + """ + Returns the context processors defined in settings.TEMPLATES. + """ + context_processors = _builtin_context_processors + context_processors += tuple(settings.DEFAULT_TEMPLATE_ENGINE['OPTIONS']['context_processors']) + return tuple(import_string(path) for path in context_processors) + + def get_template_request_context(): """ Returns the template processing context to use for the current request, @@ -42,4 +54,12 @@ def get_template_request_context(): context = RequestContext(request) context['is_secure'] = request.is_secure() context['site'] = safe_get_host(request) + + # This used to happen when a RequestContext object was initialized but was + # moved to a different part of the logic when template engines were introduced. + # Since we are not using template engines we do this here. + # https://github.com/django/django/commit/37505b6397058bcc3460f23d48a7de9641cd6ef0 + for processor in get_template_context_processors(): + context.update(processor(request)) + return context diff --git a/common/djangoapps/embargo/forms.py b/common/djangoapps/embargo/forms.py index 96f1b0c2ad97..12c845bfe272 100644 --- a/common/djangoapps/embargo/forms.py +++ b/common/djangoapps/embargo/forms.py @@ -27,6 +27,7 @@ class RestrictedCourseForm(forms.ModelForm): """ class Meta(object): model = RestrictedCourse + fields = '__all__' def clean_course_key(self): """Validate the course key. @@ -60,6 +61,7 @@ class IPFilterForm(forms.ModelForm): class Meta(object): model = IPFilter + fields = '__all__' def _is_valid_ip(self, address): """Whether or not address is a valid ipv4 address or ipv6 address""" diff --git a/common/djangoapps/embargo/migrations/0001_initial.py b/common/djangoapps/embargo/migrations/0001_initial.py index ce3a6198a00b..827928930a07 100644 --- a/common/djangoapps/embargo/migrations/0001_initial.py +++ b/common/djangoapps/embargo/migrations/0001_initial.py @@ -1,114 +1,104 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +from __future__ import unicode_literals +from django.db import migrations, models +import django_countries.fields +import django.db.models.deletion +from django.conf import settings +import xmodule_django.models -class Migration(SchemaMigration): - def forwards(self, orm): - # Adding model 'EmbargoedCourse' - db.create_table('embargo_embargoedcourse', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_id', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255, db_index=True)), - ('embargoed', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('embargo', ['EmbargoedCourse']) +class Migration(migrations.Migration): - # Adding model 'EmbargoedState' - db.create_table('embargo_embargoedstate', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('embargoed_countries', self.gf('django.db.models.fields.TextField')(blank=True)), - )) - db.send_create_signal('embargo', ['EmbargoedState']) + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] - # Adding model 'IPFilter' - db.create_table('embargo_ipfilter', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('whitelist', self.gf('django.db.models.fields.TextField')(blank=True)), - ('blacklist', self.gf('django.db.models.fields.TextField')(blank=True)), - )) - db.send_create_signal('embargo', ['IPFilter']) - - - def backwards(self, orm): - # Deleting model 'EmbargoedCourse' - db.delete_table('embargo_embargoedcourse') - - # Deleting model 'EmbargoedState' - db.delete_table('embargo_embargoedstate') - - # Deleting model 'IPFilter' - db.delete_table('embargo_ipfilter') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'embargo.embargoedcourse': { - 'Meta': {'object_name': 'EmbargoedCourse'}, - 'course_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'embargoed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.embargoedstate': { - 'Meta': {'object_name': 'EmbargoedState'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'embargoed_countries': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.ipfilter': { - 'Meta': {'object_name': 'IPFilter'}, - 'blacklist': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'whitelist': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - } - } - - complete_apps = ['embargo'] + operations = [ + migrations.CreateModel( + name='Country', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('country', django_countries.fields.CountryField(help_text='Two character ISO country code.', unique=True, max_length=2, db_index=True)), + ], + options={ + 'ordering': ['country'], + }, + ), + migrations.CreateModel( + name='CountryAccessRule', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('rule_type', models.CharField(default=b'blacklist', help_text='Whether to include or exclude the given course. If whitelist countries are specified, then ONLY users from whitelisted countries will be able to access the course. If blacklist countries are specified, then users from blacklisted countries will NOT be able to access the course.', max_length=255, choices=[(b'whitelist', b'Whitelist (allow only these countries)'), (b'blacklist', b'Blacklist (block these countries)')])), + ('country', models.ForeignKey(help_text='The country to which this rule applies.', to='embargo.Country')), + ], + ), + migrations.CreateModel( + name='CourseAccessRuleHistory', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('timestamp', models.DateTimeField(auto_now_add=True, db_index=True)), + ('course_key', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('snapshot', models.TextField(null=True, blank=True)), + ], + options={ + 'get_latest_by': 'timestamp', + }, + ), + migrations.CreateModel( + name='EmbargoedCourse', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(unique=True, max_length=255, db_index=True)), + ('embargoed', models.BooleanField(default=False)), + ], + ), + migrations.CreateModel( + name='EmbargoedState', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('embargoed_countries', models.TextField(help_text=b'A comma-separated list of country codes that fall under U.S. embargo restrictions', blank=True)), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + migrations.CreateModel( + name='IPFilter', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('whitelist', models.TextField(help_text=b'A comma-separated list of IP addresses that should not fall under embargo restrictions.', blank=True)), + ('blacklist', models.TextField(help_text=b'A comma-separated list of IP addresses that should fall under embargo restrictions.', blank=True)), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + migrations.CreateModel( + name='RestrictedCourse', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_key', xmodule_django.models.CourseKeyField(help_text='The course key for the restricted course.', unique=True, max_length=255, db_index=True)), + ('enroll_msg_key', models.CharField(default=b'default', help_text='The message to show when a user is blocked from enrollment.', max_length=255, choices=[(b'default', b'Default'), (b'embargo', b'Embargo')])), + ('access_msg_key', models.CharField(default=b'default', help_text='The message to show when a user is blocked from accessing a course.', max_length=255, choices=[(b'default', b'Default'), (b'embargo', b'Embargo')])), + ('disable_access_check', models.BooleanField(default=False, help_text='Allow users who enrolled in an allowed country to access restricted courses from excluded countries.')), + ], + ), + migrations.AddField( + model_name='countryaccessrule', + name='restricted_course', + field=models.ForeignKey(help_text='The course to which this rule applies.', to='embargo.RestrictedCourse'), + ), + migrations.AlterUniqueTogether( + name='countryaccessrule', + unique_together=set([('restricted_course', 'country')]), + ), + ] diff --git a/common/djangoapps/embargo/migrations/0002_add_country_access_models.py b/common/djangoapps/embargo/migrations/0002_add_country_access_models.py deleted file mode 100644 index e1a9efe0070b..000000000000 --- a/common/djangoapps/embargo/migrations/0002_add_country_access_models.py +++ /dev/null @@ -1,141 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Country' - db.create_table('embargo_country', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('country', self.gf('django_countries.fields.CountryField')(unique=True, max_length=2, db_index=True)), - )) - db.send_create_signal('embargo', ['Country']) - - # Adding model 'RestrictedCourse' - db.create_table('embargo_restrictedcourse', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_key', self.gf('xmodule_django.models.CourseKeyField')(unique=True, max_length=255, db_index=True)), - ('enroll_msg_key', self.gf('django.db.models.fields.CharField')(default='default', max_length=255)), - ('access_msg_key', self.gf('django.db.models.fields.CharField')(default='default', max_length=255)), - )) - db.send_create_signal('embargo', ['RestrictedCourse']) - - # Adding model 'CountryAccessRule' - db.create_table('embargo_countryaccessrule', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('rule_type', self.gf('django.db.models.fields.CharField')(default='blacklist', max_length=255)), - ('restricted_course', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['embargo.RestrictedCourse'])), - ('country', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['embargo.Country'])), - )) - db.send_create_signal('embargo', ['CountryAccessRule']) - - # Adding unique constraint on 'CountryAccessRule', fields ['restricted_course', 'country'] - db.create_unique('embargo_countryaccessrule', ['restricted_course_id', 'country_id']) - - - # Changing field 'EmbargoedCourse.course_id' - db.alter_column('embargo_embargoedcourse', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(unique=True, max_length=255)) - - def backwards(self, orm): - # Removing unique constraint on 'CountryAccessRule', fields ['restricted_course', 'country'] - db.delete_unique('embargo_countryaccessrule', ['restricted_course_id', 'country_id']) - - # Deleting model 'Country' - db.delete_table('embargo_country') - - # Deleting model 'RestrictedCourse' - db.delete_table('embargo_restrictedcourse') - - # Deleting model 'CountryAccessRule' - db.delete_table('embargo_countryaccessrule') - - - # Changing field 'EmbargoedCourse.course_id' - db.alter_column('embargo_embargoedcourse', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255, unique=True)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'embargo.country': { - 'Meta': {'ordering': "['country']", 'object_name': 'Country'}, - 'country': ('django_countries.fields.CountryField', [], {'unique': 'True', 'max_length': '2', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.countryaccessrule': { - 'Meta': {'unique_together': "(('restricted_course', 'country'),)", 'object_name': 'CountryAccessRule'}, - 'country': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['embargo.Country']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'restricted_course': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['embargo.RestrictedCourse']"}), - 'rule_type': ('django.db.models.fields.CharField', [], {'default': "'blacklist'", 'max_length': '255'}) - }, - 'embargo.embargoedcourse': { - 'Meta': {'object_name': 'EmbargoedCourse'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'embargoed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.embargoedstate': { - 'Meta': {'object_name': 'EmbargoedState'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'embargoed_countries': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.ipfilter': { - 'Meta': {'object_name': 'IPFilter'}, - 'blacklist': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'whitelist': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - }, - 'embargo.restrictedcourse': { - 'Meta': {'object_name': 'RestrictedCourse'}, - 'access_msg_key': ('django.db.models.fields.CharField', [], {'default': "'default'", 'max_length': '255'}), - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enroll_msg_key': ('django.db.models.fields.CharField', [], {'default': "'default'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['embargo'] \ No newline at end of file diff --git a/common/djangoapps/embargo/migrations/0002_data__add_countries.py b/common/djangoapps/embargo/migrations/0002_data__add_countries.py new file mode 100644 index 000000000000..ae738a2863a5 --- /dev/null +++ b/common/djangoapps/embargo/migrations/0002_data__add_countries.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +# Converted from the original South migration 0003_add_countries.py + +from django.db import migrations, models +from django_countries import countries + + +def create_embargo_countries(apps, schema_editor): + """Populate the available countries with all 2-character ISO country codes. """ + country_model = apps.get_model("embargo", "Country") + db_alias = schema_editor.connection.alias + for country_code, __ in list(countries): + country_model.objects.using(db_alias).get_or_create(country=country_code) + +def remove_embargo_countries(apps, schema_editor): + """Clear all available countries. """ + country_model = apps.get_model("embargo", "Country") + db_alias = schema_editor.connection.alias + country_model.objects.using(db_alias).all().delete() + +class Migration(migrations.Migration): + + dependencies = [ + ('embargo', '0001_initial'), + ] + + operations = [ + migrations.RunPython(create_embargo_countries, remove_embargo_countries), + ] + diff --git a/common/djangoapps/embargo/migrations/0003_add_countries.py b/common/djangoapps/embargo/migrations/0003_add_countries.py deleted file mode 100644 index a1582258af48..000000000000 --- a/common/djangoapps/embargo/migrations/0003_add_countries.py +++ /dev/null @@ -1,101 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models -from django_countries import countries - -class Migration(DataMigration): - - def forwards(self, orm): - """Populate the available countries with all 2-character ISO country codes. """ - for country_code, __ in list(countries): - orm.Country.objects.get_or_create(country=country_code) - - def backwards(self, orm): - """Clear all available countries. """ - orm.Country.objects.all().delete() - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'embargo.country': { - 'Meta': {'object_name': 'Country'}, - 'country': ('django_countries.fields.CountryField', [], {'unique': 'True', 'max_length': '2', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.countryaccessrule': { - 'Meta': {'unique_together': "(('restricted_course', 'rule_type'),)", 'object_name': 'CountryAccessRule'}, - 'country': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['embargo.Country']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'restricted_course': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['embargo.RestrictedCourse']"}), - 'rule_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'embargo.embargoedcourse': { - 'Meta': {'object_name': 'EmbargoedCourse'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'embargoed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.embargoedstate': { - 'Meta': {'object_name': 'EmbargoedState'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'embargoed_countries': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.ipfilter': { - 'Meta': {'object_name': 'IPFilter'}, - 'blacklist': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'whitelist': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - }, - 'embargo.restrictedcourse': { - 'Meta': {'object_name': 'RestrictedCourse'}, - 'access_msg_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enroll_msg_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['embargo'] - symmetrical = True diff --git a/common/djangoapps/embargo/migrations/0004_migrate_embargo_config.py b/common/djangoapps/embargo/migrations/0004_migrate_embargo_config.py deleted file mode 100644 index 6d577f39c33d..000000000000 --- a/common/djangoapps/embargo/migrations/0004_migrate_embargo_config.py +++ /dev/null @@ -1,129 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - -class Migration(DataMigration): - - def forwards(self, orm): - """Move the current course embargo configuration to the new models. """ - for old_course in orm.EmbargoedCourse.objects.all(): - new_course, __ = orm.RestrictedCourse.objects.get_or_create(course_key=old_course.course_id) - - # Set the message keys to 'embargo' - new_course.enroll_msg_key = 'embargo' - new_course.access_msg_key = 'embargo' - new_course.save() - - for country in self._embargoed_countries_list(orm): - country_model = orm.Country.objects.get(country=country) - orm.CountryAccessRule.objects.get_or_create( - country=country_model, - rule_type='blacklist', - restricted_course=new_course - ) - - def backwards(self, orm): - """No backwards migration required since the forward migration is idempotent. """ - pass - - def _embargoed_countries_list(self, orm): - """Retrieve the list of embargoed countries from the existing tables. """ - # We need to replicate some application logic here, because South - # doesn't give us access to class methods on the Django model objects. - try: - current_config = orm.EmbargoedState.objects.order_by('-change_date')[0] - if current_config.enabled and current_config.embargoed_countries: - return [ - country.strip().upper() for country - in current_config.embargoed_countries.split(',') - ] - except IndexError: - pass - - return [] - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'embargo.country': { - 'Meta': {'ordering': "['country']", 'object_name': 'Country'}, - 'country': ('django_countries.fields.CountryField', [], {'unique': 'True', 'max_length': '2', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.countryaccessrule': { - 'Meta': {'unique_together': "(('restricted_course', 'country'),)", 'object_name': 'CountryAccessRule'}, - 'country': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['embargo.Country']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'restricted_course': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['embargo.RestrictedCourse']"}), - 'rule_type': ('django.db.models.fields.CharField', [], {'default': "'blacklist'", 'max_length': '255'}) - }, - 'embargo.embargoedcourse': { - 'Meta': {'object_name': 'EmbargoedCourse'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'embargoed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.embargoedstate': { - 'Meta': {'object_name': 'EmbargoedState'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'embargoed_countries': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.ipfilter': { - 'Meta': {'object_name': 'IPFilter'}, - 'blacklist': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'whitelist': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - }, - 'embargo.restrictedcourse': { - 'Meta': {'object_name': 'RestrictedCourse'}, - 'access_msg_key': ('django.db.models.fields.CharField', [], {'default': "'default'", 'max_length': '255'}), - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enroll_msg_key': ('django.db.models.fields.CharField', [], {'default': "'default'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['embargo'] - symmetrical = True diff --git a/common/djangoapps/embargo/migrations/0005_add_courseaccessrulehistory.py b/common/djangoapps/embargo/migrations/0005_add_courseaccessrulehistory.py deleted file mode 100644 index 1f99a113be08..000000000000 --- a/common/djangoapps/embargo/migrations/0005_add_courseaccessrulehistory.py +++ /dev/null @@ -1,114 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseAccessRuleHistory' - db.create_table('embargo_courseaccessrulehistory', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('timestamp', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)), - ('course_key', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('snapshot', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - )) - db.send_create_signal('embargo', ['CourseAccessRuleHistory']) - - - def backwards(self, orm): - # Deleting model 'CourseAccessRuleHistory' - db.delete_table('embargo_courseaccessrulehistory') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'embargo.country': { - 'Meta': {'ordering': "['country']", 'object_name': 'Country'}, - 'country': ('django_countries.fields.CountryField', [], {'unique': 'True', 'max_length': '2', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.countryaccessrule': { - 'Meta': {'unique_together': "(('restricted_course', 'country'),)", 'object_name': 'CountryAccessRule'}, - 'country': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['embargo.Country']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'restricted_course': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['embargo.RestrictedCourse']"}), - 'rule_type': ('django.db.models.fields.CharField', [], {'default': "'blacklist'", 'max_length': '255'}) - }, - 'embargo.courseaccessrulehistory': { - 'Meta': {'object_name': 'CourseAccessRuleHistory'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'snapshot': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}) - }, - 'embargo.embargoedcourse': { - 'Meta': {'object_name': 'EmbargoedCourse'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'embargoed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.embargoedstate': { - 'Meta': {'object_name': 'EmbargoedState'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'embargoed_countries': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.ipfilter': { - 'Meta': {'object_name': 'IPFilter'}, - 'blacklist': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'whitelist': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - }, - 'embargo.restrictedcourse': { - 'Meta': {'object_name': 'RestrictedCourse'}, - 'access_msg_key': ('django.db.models.fields.CharField', [], {'default': "'default'", 'max_length': '255'}), - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enroll_msg_key': ('django.db.models.fields.CharField', [], {'default': "'default'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['embargo'] \ No newline at end of file diff --git a/common/djangoapps/embargo/migrations/0006_auto__add_field_restrictedcourse_disable_access_check.py b/common/djangoapps/embargo/migrations/0006_auto__add_field_restrictedcourse_disable_access_check.py deleted file mode 100644 index cfda42e042e0..000000000000 --- a/common/djangoapps/embargo/migrations/0006_auto__add_field_restrictedcourse_disable_access_check.py +++ /dev/null @@ -1,111 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'RestrictedCourse.disable_access_check' - db.add_column('embargo_restrictedcourse', 'disable_access_check', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'RestrictedCourse.disable_access_check' - db.delete_column('embargo_restrictedcourse', 'disable_access_check') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'embargo.country': { - 'Meta': {'ordering': "['country']", 'object_name': 'Country'}, - 'country': ('django_countries.fields.CountryField', [], {'unique': 'True', 'max_length': '2', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.countryaccessrule': { - 'Meta': {'unique_together': "(('restricted_course', 'country'),)", 'object_name': 'CountryAccessRule'}, - 'country': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['embargo.Country']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'restricted_course': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['embargo.RestrictedCourse']"}), - 'rule_type': ('django.db.models.fields.CharField', [], {'default': "'blacklist'", 'max_length': '255'}) - }, - 'embargo.courseaccessrulehistory': { - 'Meta': {'object_name': 'CourseAccessRuleHistory'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'snapshot': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}) - }, - 'embargo.embargoedcourse': { - 'Meta': {'object_name': 'EmbargoedCourse'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'embargoed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.embargoedstate': { - 'Meta': {'object_name': 'EmbargoedState'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'embargoed_countries': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'embargo.ipfilter': { - 'Meta': {'object_name': 'IPFilter'}, - 'blacklist': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'whitelist': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - }, - 'embargo.restrictedcourse': { - 'Meta': {'object_name': 'RestrictedCourse'}, - 'access_msg_key': ('django.db.models.fields.CharField', [], {'default': "'default'", 'max_length': '255'}), - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'disable_access_check': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'enroll_msg_key': ('django.db.models.fields.CharField', [], {'default': "'default'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['embargo'] \ No newline at end of file diff --git a/common/djangoapps/embargo/tests/test_api.py b/common/djangoapps/embargo/tests/test_api.py index ca6fcaecd1b9..16bcaae6ce19 100644 --- a/common/djangoapps/embargo/tests/test_api.py +++ b/common/djangoapps/embargo/tests/test_api.py @@ -159,7 +159,6 @@ def test_profile_country_db_null(self): # (because when we save it, it will set the database field to an empty string instead of NULL) query = "UPDATE auth_userprofile SET country = NULL WHERE id = %s" connection.cursor().execute(query, [str(self.user.profile.id)]) - transaction.commit_unless_managed() # Verify that we can check the user's access without error result = embargo_api.check_course_access(self.course.id, user=self.user, ip_address='0.0.0.0') @@ -171,7 +170,7 @@ def test_caching(self): # (restricted course, but pass all the checks) # This is the worst case, so it will hit all of the # caching code. - with self.assertNumQueries(4): + with self.assertNumQueries(3): embargo_api.check_course_access(self.course.id, user=self.user, ip_address='0.0.0.0') with self.assertNumQueries(0): diff --git a/common/djangoapps/enrollment/api.py b/common/djangoapps/enrollment/api.py index f9edd9e414c7..f7774b53a14b 100644 --- a/common/djangoapps/enrollment/api.py +++ b/common/djangoapps/enrollment/api.py @@ -3,7 +3,7 @@ course level, such as available course modes. """ -from django.utils import importlib +import importlib import logging from django.conf import settings from django.core.cache import cache diff --git a/common/djangoapps/external_auth/migrations/0001_initial.py b/common/djangoapps/external_auth/migrations/0001_initial.py index cf93c99d6ba9..f68b8f0e88a4 100644 --- a/common/djangoapps/external_auth/migrations/0001_initial.py +++ b/common/djangoapps/external_auth/migrations/0001_initial.py @@ -1,90 +1,34 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'ExternalAuthMap' - db.create_table('external_auth_externalauthmap', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('external_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('external_domain', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('external_credentials', self.gf('django.db.models.fields.TextField')(blank=True)), - ('external_email', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('external_name', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=255, blank=True)), - ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True, null=True)), - ('internal_password', self.gf('django.db.models.fields.CharField')(max_length=31, blank=True)), - ('dtcreated', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('dtsignup', self.gf('django.db.models.fields.DateTimeField')(null=True)), - )) - db.send_create_signal('external_auth', ['ExternalAuthMap']) - - # Adding unique constraint on 'ExternalAuthMap', fields ['external_id', 'external_domain'] - db.create_unique('external_auth_externalauthmap', ['external_id', 'external_domain']) - - - def backwards(self, orm): - # Removing unique constraint on 'ExternalAuthMap', fields ['external_id', 'external_domain'] - db.delete_unique('external_auth_externalauthmap', ['external_id', 'external_domain']) - - # Deleting model 'ExternalAuthMap' - db.delete_table('external_auth_externalauthmap') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'external_auth.externalauthmap': { - 'Meta': {'unique_together': "(('external_id', 'external_domain'),)", 'object_name': 'ExternalAuthMap'}, - 'dtcreated': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'dtsignup': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'external_credentials': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'external_domain': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'external_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'external_name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_password': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'null': 'True'}) - } - } - - complete_apps = ['external_auth'] +from __future__ import unicode_literals + +from django.db import migrations, models +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='ExternalAuthMap', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('external_id', models.CharField(max_length=255, db_index=True)), + ('external_domain', models.CharField(max_length=255, db_index=True)), + ('external_credentials', models.TextField(blank=True)), + ('external_email', models.CharField(max_length=255, db_index=True)), + ('external_name', models.CharField(db_index=True, max_length=255, blank=True)), + ('internal_password', models.CharField(max_length=31, blank=True)), + ('dtcreated', models.DateTimeField(auto_now_add=True, verbose_name=b'creation date')), + ('dtsignup', models.DateTimeField(null=True, verbose_name=b'signup date')), + ('user', models.OneToOneField(null=True, to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.AlterUniqueTogether( + name='externalauthmap', + unique_together=set([('external_id', 'external_domain')]), + ), + ] diff --git a/common/djangoapps/external_auth/models.py b/common/djangoapps/external_auth/models.py index 65150dea9dd6..56307257efb5 100644 --- a/common/djangoapps/external_auth/models.py +++ b/common/djangoapps/external_auth/models.py @@ -15,6 +15,7 @@ class ExternalAuthMap(models.Model): class Meta(object): + app_label = "external_auth" unique_together = (('external_id', 'external_domain'), ) external_id = models.CharField(max_length=255, db_index=True) diff --git a/common/djangoapps/external_auth/tests/test_shib.py b/common/djangoapps/external_auth/tests/test_shib.py index 5d8553fa1a96..d77bd5ffb626 100644 --- a/common/djangoapps/external_auth/tests/test_shib.py +++ b/common/djangoapps/external_auth/tests/test_shib.py @@ -13,7 +13,7 @@ from django.test.utils import override_settings from django.core.urlresolvers import reverse from django.contrib.auth.models import AnonymousUser, User -from django.utils.importlib import import_module +from importlib import import_module from edxmako.tests import mako_middleware_process_request from external_auth.models import ExternalAuthMap from external_auth.views import ( diff --git a/common/djangoapps/external_auth/views.py b/common/djangoapps/external_auth/views.py index 7c66778d451f..4edea0973cb7 100644 --- a/common/djangoapps/external_auth/views.py +++ b/common/djangoapps/external_auth/views.py @@ -195,7 +195,7 @@ def _external_login_or_signup(request, if settings.AUTHENTICATION_BACKENDS: auth_backend = settings.AUTHENTICATION_BACKENDS[0] else: - auth_backend = 'django.contrib.auth.backends.ModelBackend' + auth_backend = 'ratelimitbackend.backends.RateLimitModelBackend' user.backend = auth_backend if settings.FEATURES['SQUELCH_PII_IN_LOGS']: AUDIT_LOG.info(u'Linked user.id: {0} logged in via Shibboleth'.format(user.id)) @@ -204,7 +204,7 @@ def _external_login_or_signup(request, elif uses_certs: # Certificates are trusted, so just link the user and log the action user = internal_user - user.backend = 'django.contrib.auth.backends.ModelBackend' + user.backend = 'ratelimitbackend.backends.RateLimitModelBackend' if settings.FEATURES['SQUELCH_PII_IN_LOGS']: AUDIT_LOG.info(u'Linked user_id {0} logged in via SSL certificate'.format(user.id)) else: @@ -923,7 +923,7 @@ def provider_identity(request): response = render_to_response('identity.xml', {'url': get_xrds_url('login', request)}, - mimetype='text/xml') + content_type='text/xml') # custom XRDS header necessary for discovery process response['X-XRDS-Location'] = get_xrds_url('identity', request) @@ -937,7 +937,7 @@ def provider_xrds(request): response = render_to_response('xrds.xml', {'url': get_xrds_url('login', request)}, - mimetype='text/xml') + content_type='text/xml') # custom XRDS header necessary for discovery process response['X-XRDS-Location'] = get_xrds_url('xrds', request) diff --git a/common/djangoapps/heartbeat/tests/test_heartbeat.py b/common/djangoapps/heartbeat/tests/test_heartbeat.py index a879ebb404be..345ede2bb9d9 100644 --- a/common/djangoapps/heartbeat/tests/test_heartbeat.py +++ b/common/djangoapps/heartbeat/tests/test_heartbeat.py @@ -6,14 +6,13 @@ from django.core.urlresolvers import reverse from django.db.utils import DatabaseError from django.test.client import Client -from django.test.testcases import TestCase +from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from mock import patch from xmodule.exceptions import HeartbeatFailure -@patch('heartbeat.views.modulestore') -class HeartbeatTestCase(TestCase): +class HeartbeatTestCase(ModuleStoreTestCase): """ Test the heartbeat """ @@ -23,19 +22,20 @@ def setUp(self): self.heartbeat_url = reverse('heartbeat') return super(HeartbeatTestCase, self).setUp() - def test_success(self, mock_modulestore): # pylint: disable=unused-argument + def test_success(self): response = self.client.get(self.heartbeat_url) self.assertEqual(response.status_code, 200) - @patch('heartbeat.views.connection') - def test_sql_fail(self, mock_connection, mock_modulestore): # pylint: disable=unused-argument - mock_connection.cursor.return_value.execute.side_effect = DatabaseError - response = self.client.get(self.heartbeat_url) - self.assertEqual(response.status_code, 503) - response_dict = json.loads(response.content) - self.assertIn('SQL', response_dict) - - def test_modulestore_fail(self, mock_modulestore): # pylint: disable=unused-argument - mock_modulestore.return_value.heartbeat.side_effect = HeartbeatFailure('msg', 'service') - response = self.client.get(self.heartbeat_url) - self.assertEqual(response.status_code, 503) + def test_sql_fail(self): + with patch('heartbeat.views.connection') as mock_connection: + mock_connection.cursor.return_value.execute.side_effect = DatabaseError + response = self.client.get(self.heartbeat_url) + self.assertEqual(response.status_code, 503) + response_dict = json.loads(response.content) + self.assertIn('SQL', response_dict) + + def test_modulestore_fail(self): + with patch('heartbeat.views.modulestore') as mock_modulestore: + mock_modulestore.return_value.heartbeat.side_effect = HeartbeatFailure('msg', 'service') + response = self.client.get(self.heartbeat_url) + self.assertEqual(response.status_code, 503) diff --git a/common/djangoapps/lang_pref/middleware.py b/common/djangoapps/lang_pref/middleware.py index 1631a871a0fa..e41d7c902dde 100644 --- a/common/djangoapps/lang_pref/middleware.py +++ b/common/djangoapps/lang_pref/middleware.py @@ -4,9 +4,7 @@ from openedx.core.djangoapps.user_api.preferences.api import get_user_preference from lang_pref import LANGUAGE_KEY -# TODO PLAT-671 Import from Django 1.8 -# from django.utils.translation import LANGUAGE_SESSION_KEY -from django_locale.trans_real import LANGUAGE_SESSION_KEY +from django.utils.translation import LANGUAGE_SESSION_KEY class LanguagePreferenceMiddleware(object): diff --git a/common/djangoapps/lang_pref/tests/test_middleware.py b/common/djangoapps/lang_pref/tests/test_middleware.py index 46934db6e17b..174a888c8d78 100644 --- a/common/djangoapps/lang_pref/tests/test_middleware.py +++ b/common/djangoapps/lang_pref/tests/test_middleware.py @@ -1,9 +1,7 @@ from django.test import TestCase from django.test.client import RequestFactory from django.contrib.sessions.middleware import SessionMiddleware -# TODO PLAT-671 Import from Django 1.8 -# from django.utils.translation import LANGUAGE_SESSION_KEY -from django_locale.trans_real import LANGUAGE_SESSION_KEY +from django.utils.translation import LANGUAGE_SESSION_KEY from lang_pref.middleware import LanguagePreferenceMiddleware from openedx.core.djangoapps.user_api.preferences.api import set_user_preference diff --git a/common/djangoapps/monkey_patch/__init__.py b/common/djangoapps/monkey_patch/__init__.py index f718200a9802..6c420e94eb9f 100644 --- a/common/djangoapps/monkey_patch/__init__.py +++ b/common/djangoapps/monkey_patch/__init__.py @@ -13,7 +13,7 @@ That said, if you've decided you really need to monkey-patch the platform (and you've convinced enough people that this is best solution), kindly follow these guidelines: - - Reference django_utils_translation.py for a sample implementation. + - Reference django_18_upgrade.py for a sample implementation. - Name your module by replacing periods with underscores for the module to be patched: - patching 'django.utils.translation' diff --git a/common/djangoapps/monkey_patch/django_utils_translation.py b/common/djangoapps/monkey_patch/django_utils_translation.py deleted file mode 100644 index ae1940677cf1..000000000000 --- a/common/djangoapps/monkey_patch/django_utils_translation.py +++ /dev/null @@ -1,91 +0,0 @@ -""" -Monkey-patch `django.utils.translation` to not dump header info - -Modify Django's translation module, such that the *gettext functions -always return an empty string when attempting to translate an empty -string. This overrides the default behavior [0]: -> It is convention with GNU gettext to include meta-data as the -> translation for the empty string. - -Affected Methods: - - gettext - - ugettext - -Note: The *ngettext and *pgettext functions are intentionally omitted, -as they already behave as expected. The *_lazy functions are implicitly -patched, as they wrap their nonlazy equivalents. - -Django's translation module contains a good deal of indirection. For us -to patch the module with our own functions, we have to patch -`django.utils.translation._trans`. This ensures that the patched -behavior will still be used, even if code elsewhere caches a reference -to one of the translation functions. If you're curious, check out -Django's source code [1]. - -[0] https://docs.python.org/2.7/library/gettext.html#the-gnutranslations-class -[1] https://github.com/django/django/blob/1.4.8/django/utils/translation/__init__.py#L66 -""" -from django.utils.translation import _trans as translation - -import monkey_patch - -ATTRIBUTES = [ - 'gettext', - 'ugettext', -] - - -def is_patched(): - """ - Check if the translation module has been monkey-patched - """ - patched = True - for attribute in ATTRIBUTES: - if not monkey_patch.is_patched(translation, attribute): - patched = False - break - return patched - - -def patch(): - """ - Monkey-patch the translation functions - - Affected Methods: - - gettext - - ugettext - """ - def decorate(function, message_default=u''): - """ - Decorate a translation function - - Default message is a unicode string, but gettext overrides this - value to return a UTF8 string. - """ - def dont_translate_empty_string(message): - """ - Return the empty string when passed a falsey message - """ - if message: - message = function(message) - else: - message = message_default - return message - return dont_translate_empty_string - gettext = decorate(translation.gettext, '') - ugettext = decorate(translation.ugettext) - monkey_patch.patch(translation, 'gettext', gettext) - monkey_patch.patch(translation, 'ugettext', ugettext) - return is_patched() - - -def unpatch(): - """ - Un-monkey-patch the translation functions - """ - was_patched = False - for name in ATTRIBUTES: - # was_patched must be the second half of the or-clause, to avoid - # short-circuiting the expression - was_patched = monkey_patch.unpatch(translation, name) or was_patched - return was_patched diff --git a/common/djangoapps/monkey_patch/tests/test_django_utils_translation.py b/common/djangoapps/monkey_patch/tests/test_django_utils_translation.py deleted file mode 100644 index 109d2a40f088..000000000000 --- a/common/djangoapps/monkey_patch/tests/test_django_utils_translation.py +++ /dev/null @@ -1,337 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Test methods exposed in common/lib/monkey_patch/django_utils_translation.py - -Verify that the Django translation functions (gettext, ngettext, -pgettext, ugettext, and derivatives) all return the correct values -before, during, and after monkey-patching the django.utils.translation -module. - -gettext, ngettext, pgettext, and ugettext must return a translation as -output for nonempty input. - -ngettext, pgettext, npgettext, and ungettext must return an empty string -for an empty string as input. - -gettext and ugettext will return translation headers, before and after -patching. - -gettext and ugettext must return the empty string for any falsey input, -while patched. - -*_noop must return the input text. - -*_lazy must return the same text as their non-lazy counterparts. -""" -# pylint: disable=invalid-name -# Let names like `gettext_*` stay lowercase; makes matching easier. -# pylint: disable=missing-docstring -# All major functions are documented, the rest are self-evident shells. -# pylint: disable=no-member -# Pylint doesn't see our decorator `translate_with` add the `_` method. -# pylint: disable=test-inherits-tests -# This test file intentionally defines one base test class (UgettextTest) and -# patches the gettext function under test for all subsequent inheriting classes. -from unittest import TestCase - -from ddt import data -from ddt import ddt -from django.utils.translation import _trans -from django.utils.translation import gettext -from django.utils.translation import gettext_lazy -from django.utils.translation import gettext_noop -from django.utils.translation import ngettext -from django.utils.translation import ngettext_lazy -from django.utils.translation import npgettext -from django.utils.translation import npgettext_lazy -from django.utils.translation import pgettext -from django.utils.translation import pgettext_lazy -from django.utils.translation import ugettext -from django.utils.translation import ugettext_lazy -from django.utils.translation import ugettext_noop -from django.utils.translation import ungettext -from django.utils.translation import ungettext_lazy - -from monkey_patch.django_utils_translation import ATTRIBUTES as attributes_patched -from monkey_patch.django_utils_translation import is_patched -from monkey_patch.django_utils_translation import patch -from monkey_patch.django_utils_translation import unpatch - -# Note: The commented-out function names are explicitly excluded, as -# they are not attributes of `django.utils.translation._trans`. -# https://github.com/django/django/blob/1.4.8/django/utils/translation/__init__.py#L69 -attributes_not_patched = [ - 'gettext_noop', - 'ngettext', - 'npgettext', - 'pgettext', - 'ungettext', - # 'gettext_lazy', - # 'ngettext_lazy', - # 'npgettext_lazy', - # 'pgettext_lazy', - # 'ugettext_lazy', - # 'ugettext_noop', - # 'ungettext_lazy', -] - - -class MonkeyPatchTest(TestCase): - def setUp(self): - """ - Remember the current state, then reset - """ - super(MonkeyPatchTest, self).setUp() - self.was_patched = unpatch() - self.unpatch_all() - self.addCleanup(self.cleanup) - - def cleanup(self): - """ - Revert translation functions to previous state - - Since the end state varies, we always unpatch to remove any - changes, then repatch again iff the module was already - patched when the test began. - """ - self.unpatch_all() - if self.was_patched: - patch() - - def unpatch_all(self): - """ - Unpatch the module recursively - """ - while is_patched(): - unpatch() - - -@ddt -class PatchTest(MonkeyPatchTest): - """ - Verify monkey-patching and un-monkey-patching - """ - @data(*attributes_not_patched) - def test_not_patch(self, attribute_name): - """ - Test that functions are not patched unintentionally - """ - self.unpatch_all() - old_attribute = getattr(_trans, attribute_name) - patch() - new_attribute = getattr(_trans, attribute_name) - self.assertIs(old_attribute, new_attribute) - - @data(*attributes_patched) - def test_unpatch(self, attribute): - """ - Test that unpatch gracefully handles unpatched functions - """ - patch() - self.assertTrue(is_patched()) - self.unpatch_all() - self.assertFalse(is_patched()) - old_attribute = getattr(_trans, attribute) - self.unpatch_all() - new_attribute = getattr(_trans, attribute) - self.assertIs(old_attribute, new_attribute) - self.assertFalse(is_patched()) - - @data(*attributes_patched) - def test_patch_attributes(self, attribute): - """ - Test that patch changes the attribute - """ - self.unpatch_all() - self.assertFalse(is_patched()) - old_attribute = getattr(_trans, attribute) - patch() - new_attribute = getattr(_trans, attribute) - self.assertIsNot(old_attribute, new_attribute) - self.assertTrue(is_patched()) - old_attribute = getattr(_trans, attribute) - patch() - new_attribute = getattr(_trans, attribute) - self.assertIsNot(old_attribute, new_attribute) - self.assertTrue(is_patched()) - - -def translate_with(function): - """ - Decorate a class by setting its `_` translation function - """ - def decorate(cls): - def _(self, *args): - # pylint: disable=unused-argument - return function(*args) - cls._ = _ - return cls - return decorate - - -@translate_with(ugettext) -class UgettextTest(MonkeyPatchTest): - """ - Test a Django translation function - - Here we consider `ugettext` to be the base/default case. All other - translation functions extend, as needed. - """ - is_unicode = True - needs_patched = True - header = 'Project-Id-Version: ' - - def setUp(self): - """ - Restore translation text and functions - """ - super(UgettextTest, self).setUp() - if self.is_unicode: - self.empty = u'' - self.nonempty = u'(╯°□°)╯︵ ┻━┻' - else: - self.empty = '' - self.nonempty = 'Hey! Where are you?!' - - def assert_translations(self): - """ - Assert that the empty and nonempty translations are correct - - The `empty = empty[:]` syntax is intentional. Since subclasses - may implement a lazy translation, we must perform a "string - operation" to coerce it to a string value. We don't use `str` or - `unicode` because we also assert the string type. - """ - empty, nonempty = self.get_translations() - empty = empty[:] - nonempty = nonempty[:] - if self.is_unicode: - self.assertTrue(isinstance(empty, unicode)) - self.assertTrue(isinstance(nonempty, unicode)) - else: - self.assertTrue(isinstance(empty, str)) - self.assertTrue(isinstance(nonempty, str)) - if self.needs_patched and not is_patched(): - self.assertIn(self.header, empty) - else: - self.assertNotIn(self.header, empty) - self.assertNotIn(self.header, nonempty) - - def get_translations(self): - """ - Translate the empty and nonempty strings, per `self._` - """ - empty = self._(self.empty) - nonempty = self._(self.nonempty) - return (empty, nonempty) - - def test_patch(self): - """ - Test that `self._` correctly translates text before, during, and - after being monkey-patched. - """ - self.assert_translations() - was_successful = patch() - self.assertTrue(was_successful) - self.assert_translations() - was_successful = unpatch() - self.assertTrue(was_successful) - self.assert_translations() - - -@translate_with(gettext) -class GettextTest(UgettextTest): - is_unicode = False - - -@translate_with(pgettext) -class PgettextTest(UgettextTest): - needs_patched = False - l18n_context = 'monkey_patch' - - def get_translations(self): - empty = self._(self.l18n_context, self.empty) - nonempty = self._(self.l18n_context, self.nonempty) - return (empty, nonempty) - - -@translate_with(ngettext) -class NgettextTest(GettextTest): - number = 1 - needs_patched = False - - def get_translations(self): - empty = self._(self.empty, self.empty, self.number) - nonempty = self._(self.nonempty, self.nonempty, self.number) - return (empty, nonempty) - - -@translate_with(npgettext) -class NpgettextTest(PgettextTest): - number = 1 - - def get_translations(self): - empty = self._(self.l18n_context, self.empty, self.empty, self.number) - nonempty = self._(self.l18n_context, self.nonempty, self.nonempty, self.number) - return (empty, nonempty) - - -class NpgettextPluralTest(NpgettextTest): - number = 2 - - -class NgettextPluralTest(NgettextTest): - number = 2 - - -@translate_with(gettext_noop) -class GettextNoopTest(GettextTest): - needs_patched = False - - -@translate_with(ugettext_noop) -class UgettextNoopTest(UgettextTest): - needs_patched = False - - -@translate_with(ungettext) -class UngettextTest(NgettextTest): - is_unicode = True - - -class UngettextPluralTest(UngettextTest): - number = 2 - - -@translate_with(gettext_lazy) -class GettextLazyTest(GettextTest): - pass - - -@translate_with(ugettext_lazy) -class UgettextLazyTest(UgettextTest): - pass - - -@translate_with(pgettext_lazy) -class PgettextLazyTest(PgettextTest): - pass - - -@translate_with(ngettext_lazy) -class NgettextLazyTest(NgettextTest): - pass - - -@translate_with(npgettext_lazy) -class NpgettextLazyTest(NpgettextTest): - pass - - -class NpgettextLazyPluralTest(NpgettextLazyTest): - number = 2 - - -@translate_with(ungettext_lazy) -class UngettextLazyTest(UngettextTest): - pass diff --git a/common/djangoapps/monkey_patch/third_party_auth.py b/common/djangoapps/monkey_patch/third_party_auth.py new file mode 100644 index 000000000000..a78f832907e7 --- /dev/null +++ b/common/djangoapps/monkey_patch/third_party_auth.py @@ -0,0 +1,38 @@ +""" +Monkey patch implementation for a python_social_auth Django ORM method that is not Django 1.8-compatible. +Remove once the module fully supports Django 1.8! +""" + +from django.db import transaction +from social.storage.django_orm import DjangoUserMixin +from social.apps.django_app.default.models import ( + UserSocialAuth, Nonce, Association, Code +) + + +def patch(): + """ + Monkey-patch the DjangoUserMixin class. + """ + def create_social_auth_wrapper(wrapped_func): + # pylint: disable=missing-docstring + wrapped_func = wrapped_func.__func__ + + def _create_social_auth(*args, **kwargs): + # The entire reason for this monkey-patch is to wrap the create_social_auth call + # in an atomic transaction. The call can sometime raise an IntegrityError, which is + # caught and dealt with by python_social_auth - but not inside of an atomic transaction. + # In Django 1.8, unless the exception is raised in an atomic transaction, the transaction + # becomes unusable after the IntegrityError exception is raised. + with transaction.atomic(): + return wrapped_func(*args, **kwargs) + return classmethod(_create_social_auth) + + DjangoUserMixin.create_social_auth = create_social_auth_wrapper(DjangoUserMixin.create_social_auth) + + # Monkey-patch some social auth models' Meta class to squelch Django19 warnings. + # pylint: disable=protected-access + UserSocialAuth._meta.app_label = "default" + Nonce._meta.app_label = "default" + Association._meta.app_label = "default" + Code._meta.app_label = "default" diff --git a/common/djangoapps/performance/views/__init__.py b/common/djangoapps/performance/views/__init__.py index 805e2d96cbd8..78fe4e35cff9 100644 --- a/common/djangoapps/performance/views/__init__.py +++ b/common/djangoapps/performance/views/__init__.py @@ -19,9 +19,11 @@ def _get_request_header(request, header_name, default=''): def _get_request_value(request, value_name, default=''): - """Helper method to get header values from a request's REQUEST dict, if present.""" - if request is not None and hasattr(request, 'REQUEST') and value_name in request.REQUEST: - return request.REQUEST[value_name] + """Helper method to get header values from a request's GET or POST dicts, if present.""" + if request is not None and hasattr(request, 'GET') and value_name in request.GET: + return request.GET[value_name] + elif request is not None and hasattr(request, 'POST') and value_name in request.POST: + return request.POST[value_name] else: return default diff --git a/common/djangoapps/pipeline_mako/templates/static_content.html b/common/djangoapps/pipeline_mako/templates/static_content.html index 6e169f2ed32c..88686c4e079c 100644 --- a/common/djangoapps/pipeline_mako/templates/static_content.html +++ b/common/djangoapps/pipeline_mako/templates/static_content.html @@ -51,8 +51,11 @@ %> <%def name="include(path)"><% -from django.template.loaders.filesystem import _loader -source, template_path = _loader.load_template_source(path) +from django.conf import settings +from django.template.engine import Engine +from django.template.loaders.filesystem import Loader +engine = Engine(dirs=settings.DEFAULT_TEMPLATE_ENGINE['DIRS']) +source, template_path = Loader(engine).load_template_source(path) %>${source} <%def name="require_module(module_name, class_name)"> diff --git a/common/djangoapps/reverification/migrations/0001_initial.py b/common/djangoapps/reverification/migrations/0001_initial.py deleted file mode 100644 index b68f4118930c..000000000000 --- a/common/djangoapps/reverification/migrations/0001_initial.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'MidcourseReverificationWindow' - db.create_table('reverification_midcoursereverificationwindow', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('start_date', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True, blank=True)), - ('end_date', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True, blank=True)), - )) - db.send_create_signal('reverification', ['MidcourseReverificationWindow']) - - - def backwards(self, orm): - # Deleting model 'MidcourseReverificationWindow' - db.delete_table('reverification_midcoursereverificationwindow') - - - models = { - 'reverification.midcoursereverificationwindow': { - 'Meta': {'object_name': 'MidcourseReverificationWindow'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'end_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['reverification'] diff --git a/common/djangoapps/reverification/migrations/0002_auto__del_midcoursereverificationwindow.py b/common/djangoapps/reverification/migrations/0002_auto__del_midcoursereverificationwindow.py deleted file mode 100644 index cad4511ed99d..000000000000 --- a/common/djangoapps/reverification/migrations/0002_auto__del_midcoursereverificationwindow.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - - def forwards(self, orm): - # Deleting model 'MidcourseReverificationWindow' - db.delete_table('reverification_midcoursereverificationwindow') - - - def backwards(self, orm): - # Adding model 'MidcourseReverificationWindow' - db.create_table('reverification_midcoursereverificationwindow', ( - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('end_date', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True, blank=True)), - ('start_date', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True, blank=True)), - )) - db.send_create_signal('reverification', ['MidcourseReverificationWindow']) - - - models = { - - } - - complete_apps = ['reverification'] diff --git a/common/djangoapps/service_status/views.py b/common/djangoapps/service_status/views.py index 7233cbdbdad5..22028d545fcb 100644 --- a/common/djangoapps/service_status/views.py +++ b/common/djangoapps/service_status/views.py @@ -28,7 +28,7 @@ def celery_status(_): """ stats = celery.control.inspect().stats() or {} return HttpResponse(json.dumps(stats, indent=4), - mimetype="application/json") + content_type="application/json") @dog_stats_api.timed('status.service.celery.ping') @@ -56,4 +56,4 @@ def celery_ping(_): } return HttpResponse(json.dumps(output, indent=4), - mimetype="application/json") + content_type="application/json") diff --git a/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py b/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py index 076204c31e97..02e0c2b7b3a9 100644 --- a/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py +++ b/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py @@ -3,12 +3,12 @@ ### from django.core.management.base import NoArgsCommand -from django.core.cache import get_cache +from django.core.cache import caches class Command(NoArgsCommand): help = 'Import the specified data directory into the default ModuleStore' def handle_noargs(self, **options): - staticfiles_cache = get_cache('staticfiles') + staticfiles_cache = caches['staticfiles'] staticfiles_cache.clear() diff --git a/common/djangoapps/status/migrations/0001_initial.py b/common/djangoapps/status/migrations/0001_initial.py index 48a4d1eeff0f..7eefeb320c2c 100644 --- a/common/djangoapps/status/migrations/0001_initial.py +++ b/common/djangoapps/status/migrations/0001_initial.py @@ -1,93 +1,44 @@ # -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'GlobalStatusMessage' - db.create_table('status_globalstatusmessage', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('message', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - )) - db.send_create_signal('status', ['GlobalStatusMessage']) - - # Adding model 'CourseMessage' - db.create_table('status_coursemessage', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('global_message', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['status.GlobalStatusMessage'])), - ('course_key', self.gf('xmodule_django.models.CourseKeyField')(db_index=True, max_length=255, blank=True)), - ('message', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - )) - db.send_create_signal('status', ['CourseMessage']) - - - def backwards(self, orm): - # Deleting model 'GlobalStatusMessage' - db.delete_table('status_globalstatusmessage') - - # Deleting model 'CourseMessage' - db.delete_table('status_coursemessage') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'status.coursemessage': { - 'Meta': {'object_name': 'CourseMessage'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'global_message': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['status.GlobalStatusMessage']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - }, - 'status.globalstatusmessage': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'GlobalStatusMessage'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['status'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +from django.conf import settings +import xmodule_django.models + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='CourseMessage', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_key', xmodule_django.models.CourseKeyField(db_index=True, max_length=255, blank=True)), + ('message', models.TextField(null=True, blank=True)), + ], + ), + migrations.CreateModel( + name='GlobalStatusMessage', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('message', models.TextField(null=True, blank=True)), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + migrations.AddField( + model_name='coursemessage', + name='global_message', + field=models.ForeignKey(to='status.GlobalStatusMessage'), + ), + ] diff --git a/common/djangoapps/student/admin.py b/common/djangoapps/student/admin.py index 0f2ad68d279a..3b84627837b1 100644 --- a/common/djangoapps/student/admin.py +++ b/common/djangoapps/student/admin.py @@ -19,6 +19,7 @@ class CourseAccessRoleForm(forms.ModelForm): class Meta(object): model = CourseAccessRole + fields = '__all__' email = forms.EmailField(required=True) COURSE_ACCESS_ROLES = [(role_name, role_name) for role_name in REGISTERED_ACCESS_ROLES.keys()] diff --git a/common/djangoapps/student/forms.py b/common/djangoapps/student/forms.py index 3b4ff7c95db1..bf85d55a2179 100644 --- a/common/djangoapps/student/forms.py +++ b/common/djangoapps/student/forms.py @@ -2,10 +2,11 @@ Utility functions for validating forms """ from django import forms +from django.forms import widgets from django.core.exceptions import ValidationError from django.contrib.auth.models import User from django.contrib.auth.forms import PasswordResetForm -from django.contrib.auth.hashers import UNUSABLE_PASSWORD +from django.contrib.auth.hashers import UNUSABLE_PASSWORD_PREFIX from django.contrib.auth.tokens import default_token_generator from django.utils.http import int_to_base36 @@ -22,6 +23,13 @@ class PasswordResetFormNoActive(PasswordResetForm): + error_messages = { + 'unknown': _("That e-mail address doesn't have an associated " + "user account. Are you sure you've registered?"), + 'unusable': _("The user account associated with this e-mail " + "address cannot reset the password."), + } + def clean_email(self): """ This is a literal copy from Django 1.4.5's django.contrib.auth.forms.PasswordResetForm @@ -33,7 +41,7 @@ def clean_email(self): self.users_cache = User.objects.filter(email__iexact=email) if not len(self.users_cache): raise forms.ValidationError(self.error_messages['unknown']) - if any((user.password == UNUSABLE_PASSWORD) + if any((user.password.startswith(UNUSABLE_PASSWORD_PREFIX)) for user in self.users_cache): raise forms.ValidationError(self.error_messages['unusable']) return email @@ -79,16 +87,20 @@ def save( send_mail(subject, email, from_email, [user.email]) +class TrueCheckbox(widgets.CheckboxInput): + """ + A checkbox widget that only accepts "true" (case-insensitive) as true. + """ + def value_from_datadict(self, data, files, name): + value = data.get(name, '') + return value.lower() == 'true' + + class TrueField(forms.BooleanField): """ A boolean field that only accepts "true" (case-insensitive) as true """ - def to_python(self, value): - # CheckboxInput converts string to bool by case-insensitive match to "true" or "false" - if value is True: - return value - else: - return None + widget = TrueCheckbox _USERNAME_TOO_SHORT_MSG = _("Username must be minimum of two characters long") diff --git a/common/djangoapps/student/helpers.py b/common/djangoapps/student/helpers.py index e285e3dcf193..4e882e5dcca4 100644 --- a/common/djangoapps/student/helpers.py +++ b/common/djangoapps/student/helpers.py @@ -6,7 +6,7 @@ from django.core.urlresolvers import reverse, NoReverseMatch import third_party_auth -from verify_student.models import VerificationDeadline, SoftwareSecurePhotoVerification # pylint: disable=import-error +from lms.djangoapps.verify_student.models import VerificationDeadline, SoftwareSecurePhotoVerification from course_modes.models import CourseMode diff --git a/common/djangoapps/student/management/commands/transfer_students.py b/common/djangoapps/student/management/commands/transfer_students.py index 835d954071bb..79892cd5a657 100644 --- a/common/djangoapps/student/management/commands/transfer_students.py +++ b/common/djangoapps/student/management/commands/transfer_students.py @@ -52,7 +52,7 @@ class Command(TrackedCommand): help="If True, try to transfer certificate items to the new course.") ) - @transaction.commit_manually + @transaction.atomic def handle(self, *args, **options): # pylint: disable=unused-argument source_key = CourseKey.from_string(options.get('source_course', '')) dest_keys = [] @@ -72,7 +72,7 @@ def handle(self, *args, **options): # pylint: disable=unused-argument ) for user in source_students: - with transaction.commit_on_success(): + with transaction.atomic(): print "Moving {}.".format(user.username) # Find the old enrollment. enrollment = CourseEnrollment.objects.get( diff --git a/common/djangoapps/student/migrations/0001_initial.py b/common/djangoapps/student/migrations/0001_initial.py index d5766ca823a7..9bb87bae63ea 100644 --- a/common/djangoapps/student/migrations/0001_initial.py +++ b/common/djangoapps/student/migrations/0001_initial.py @@ -1,120 +1,290 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +# -*- coding: utf-8 -*- +from __future__ import unicode_literals +from django.db import migrations, models +import django.utils.timezone +import django_countries.fields +import django.db.models.deletion +from django.conf import settings +import xmodule_django.models -class Migration(SchemaMigration): - def forwards(self, orm): +class Migration(migrations.Migration): - # Adding model 'UserProfile' - db.create_table('auth_userprofile', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], unique=True)), - ('name', self.gf('django.db.models.fields.TextField')(blank=True)), - ('language', self.gf('django.db.models.fields.TextField')(blank=True)), - ('location', self.gf('django.db.models.fields.TextField')(blank=True)), - ('meta', self.gf('django.db.models.fields.TextField')(blank=True)), - ('courseware', self.gf('django.db.models.fields.TextField')(default='course.xml', blank=True)), - )) - db.send_create_signal('student', ['UserProfile']) + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] - # Adding model 'Registration' - db.create_table('auth_registration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], unique=True)), - ('activation_key', self.gf('django.db.models.fields.CharField')(unique=True, max_length=32, db_index=True)), - )) - db.send_create_signal('student', ['Registration']) - - def backwards(self, orm): - - # Deleting model 'UserProfile' - db.delete_table('auth_userprofile') - - # Deleting model 'Registration' - db.delete_table('auth_registration') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.TextField', [], {'default': "'course.xml'", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'location': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - } - } - - complete_apps = ['student'] + operations = [ + migrations.CreateModel( + name='AnonymousUserId', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('anonymous_user_id', models.CharField(unique=True, max_length=32)), + ('course_id', xmodule_django.models.CourseKeyField(db_index=True, max_length=255, blank=True)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='CourseAccessRole', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('org', models.CharField(db_index=True, max_length=64, blank=True)), + ('course_id', xmodule_django.models.CourseKeyField(db_index=True, max_length=255, blank=True)), + ('role', models.CharField(max_length=64, db_index=True)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='CourseEnrollment', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('created', models.DateTimeField(db_index=True, auto_now_add=True, null=True)), + ('is_active', models.BooleanField(default=True)), + ('mode', models.CharField(default=b'honor', max_length=100)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + options={ + 'ordering': ('user', 'course_id'), + }, + ), + migrations.CreateModel( + name='CourseEnrollmentAllowed', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('email', models.CharField(max_length=255, db_index=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('auto_enroll', models.BooleanField(default=0)), + ('created', models.DateTimeField(db_index=True, auto_now_add=True, null=True)), + ], + ), + migrations.CreateModel( + name='CourseEnrollmentAttribute', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('namespace', models.CharField(help_text='Namespace of enrollment attribute', max_length=255)), + ('name', models.CharField(help_text='Name of the enrollment attribute', max_length=255)), + ('value', models.CharField(help_text='Value of the enrollment attribute', max_length=255)), + ('enrollment', models.ForeignKey(related_name='attributes', to='student.CourseEnrollment')), + ], + ), + migrations.CreateModel( + name='DashboardConfiguration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('recent_enrollment_time_delta', models.PositiveIntegerField(default=0, help_text=b"The number of seconds in which a new enrollment is considered 'recent'. Used to display notifications.")), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + migrations.CreateModel( + name='EnrollmentRefundConfiguration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('refund_window_microseconds', models.BigIntegerField(default=1209600000000, help_text='The window of time after enrolling during which users can be granted a refund, represented in microseconds. The default is 14 days.')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + migrations.CreateModel( + name='EntranceExamConfiguration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('created', models.DateTimeField(db_index=True, auto_now_add=True, null=True)), + ('updated', models.DateTimeField(auto_now=True, db_index=True)), + ('skip_entrance_exam', models.BooleanField(default=True)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='HistoricalCourseEnrollment', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('created', models.DateTimeField(db_index=True, null=True, editable=False, blank=True)), + ('is_active', models.BooleanField(default=True)), + ('mode', models.CharField(default=b'honor', max_length=100)), + ('history_id', models.AutoField(serialize=False, primary_key=True)), + ('history_date', models.DateTimeField()), + ('history_type', models.CharField(max_length=1, choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')])), + ('history_user', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True)), + ('user', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ], + options={ + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': 'history_date', + 'verbose_name': 'historical course enrollment', + }, + ), + migrations.CreateModel( + name='LanguageProficiency', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('code', models.CharField(help_text='The ISO 639-1 language code for this language.', max_length=16, choices=[['aa', 'Afar'], ['ab', 'Abkhazian'], ['af', 'Afrikaans'], ['ak', 'Akan'], ['sq', 'Albanian'], ['am', 'Amharic'], ['ar', 'Arabic'], ['an', 'Aragonese'], ['hy', 'Armenian'], ['as', 'Assamese'], ['av', 'Avaric'], ['ae', 'Avestan'], ['ay', 'Aymara'], ['az', 'Azerbaijani'], ['ba', 'Bashkir'], ['bm', 'Bambara'], ['eu', 'Basque'], ['be', 'Belarusian'], ['bn', 'Bengali'], ['bh', 'Bihari languages'], ['bi', 'Bislama'], ['bs', 'Bosnian'], ['br', 'Breton'], ['bg', 'Bulgarian'], ['my', 'Burmese'], ['ca', 'Catalan'], ['ch', 'Chamorro'], ['ce', 'Chechen'], ['zh', 'Chinese'], ['zh_HANS', 'Simplified Chinese'], ['zh_HANT', 'Traditional Chinese'], ['cu', 'Church Slavic'], ['cv', 'Chuvash'], ['kw', 'Cornish'], ['co', 'Corsican'], ['cr', 'Cree'], ['cs', 'Czech'], ['da', 'Danish'], ['dv', 'Divehi'], ['nl', 'Dutch'], ['dz', 'Dzongkha'], ['en', 'English'], ['eo', 'Esperanto'], ['et', 'Estonian'], ['ee', 'Ewe'], ['fo', 'Faroese'], ['fj', 'Fijian'], ['fi', 'Finnish'], ['fr', 'French'], ['fy', 'Western Frisian'], ['ff', 'Fulah'], ['ka', 'Georgian'], ['de', 'German'], ['gd', 'Gaelic'], ['ga', 'Irish'], ['gl', 'Galician'], ['gv', 'Manx'], ['el', 'Greek'], ['gn', 'Guarani'], ['gu', 'Gujarati'], ['ht', 'Haitian'], ['ha', 'Hausa'], ['he', 'Hebrew'], ['hz', 'Herero'], ['hi', 'Hindi'], ['ho', 'Hiri Motu'], ['hr', 'Croatian'], ['hu', 'Hungarian'], ['ig', 'Igbo'], ['is', 'Icelandic'], ['io', 'Ido'], ['ii', 'Sichuan Yi'], ['iu', 'Inuktitut'], ['ie', 'Interlingue'], ['ia', 'Interlingua'], ['id', 'Indonesian'], ['ik', 'Inupiaq'], ['it', 'Italian'], ['jv', 'Javanese'], ['ja', 'Japanese'], ['kl', 'Kalaallisut'], ['kn', 'Kannada'], ['ks', 'Kashmiri'], ['kr', 'Kanuri'], ['kk', 'Kazakh'], ['km', 'Central Khmer'], ['ki', 'Kikuyu'], ['rw', 'Kinyarwanda'], ['ky', 'Kirghiz'], ['kv', 'Komi'], ['kg', 'Kongo'], ['ko', 'Korean'], ['kj', 'Kuanyama'], ['ku', 'Kurdish'], ['lo', 'Lao'], ['la', 'Latin'], ['lv', 'Latvian'], ['li', 'Limburgan'], ['ln', 'Lingala'], ['lt', 'Lithuanian'], ['lb', 'Luxembourgish'], ['lu', 'Luba-Katanga'], ['lg', 'Ganda'], ['mk', 'Macedonian'], ['mh', 'Marshallese'], ['ml', 'Malayalam'], ['mi', 'Maori'], ['mr', 'Marathi'], ['ms', 'Malay'], ['mg', 'Malagasy'], ['mt', 'Maltese'], ['mn', 'Mongolian'], ['na', 'Nauru'], ['nv', 'Navajo'], ['nr', 'Ndebele, South'], ['nd', 'Ndebele, North'], ['ng', 'Ndonga'], ['ne', 'Nepali'], ['nn', 'Norwegian Nynorsk'], ['nb', 'Bokm\xe5l, Norwegian'], ['no', 'Norwegian'], ['ny', 'Chichewa'], ['oc', 'Occitan'], ['oj', 'Ojibwa'], ['or', 'Oriya'], ['om', 'Oromo'], ['os', 'Ossetian'], ['pa', 'Panjabi'], ['fa', 'Persian'], ['pi', 'Pali'], ['pl', 'Polish'], ['pt', 'Portuguese'], ['ps', 'Pushto'], ['qu', 'Quechua'], ['rm', 'Romansh'], ['ro', 'Romanian'], ['rn', 'Rundi'], ['ru', 'Russian'], ['sg', 'Sango'], ['sa', 'Sanskrit'], ['si', 'Sinhala'], ['sk', 'Slovak'], ['sl', 'Slovenian'], ['se', 'Northern Sami'], ['sm', 'Samoan'], ['sn', 'Shona'], ['sd', 'Sindhi'], ['so', 'Somali'], ['st', 'Sotho, Southern'], ['es', 'Spanish'], ['sc', 'Sardinian'], ['sr', 'Serbian'], ['ss', 'Swati'], ['su', 'Sundanese'], ['sw', 'Swahili'], ['sv', 'Swedish'], ['ty', 'Tahitian'], ['ta', 'Tamil'], ['tt', 'Tatar'], ['te', 'Telugu'], ['tg', 'Tajik'], ['tl', 'Tagalog'], ['th', 'Thai'], ['bo', 'Tibetan'], ['ti', 'Tigrinya'], ['to', 'Tonga (Tonga Islands)'], ['tn', 'Tswana'], ['ts', 'Tsonga'], ['tk', 'Turkmen'], ['tr', 'Turkish'], ['tw', 'Twi'], ['ug', 'Uighur'], ['uk', 'Ukrainian'], ['ur', 'Urdu'], ['uz', 'Uzbek'], ['ve', 'Venda'], ['vi', 'Vietnamese'], ['vo', 'Volap\xfck'], ['cy', 'Welsh'], ['wa', 'Walloon'], ['wo', 'Wolof'], ['xh', 'Xhosa'], ['yi', 'Yiddish'], ['yo', 'Yoruba'], ['za', 'Zhuang'], ['zu', 'Zulu']])), + ], + ), + migrations.CreateModel( + name='LinkedInAddToProfileConfiguration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('company_identifier', models.TextField(help_text='The company identifier for the LinkedIn Add-to-Profile button e.g 0_0dPSPyS070e0HsE9HNz_13_d11_')), + ('dashboard_tracking_code', models.TextField(default=b'', blank=True)), + ('trk_partner_name', models.CharField(default=b'', help_text="Short identifier for the LinkedIn partner used in the tracking code. (Example: 'edx') If no value is provided, tracking codes will not be sent to LinkedIn.", max_length=10, blank=True)), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + migrations.CreateModel( + name='LoginFailures', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('failure_count', models.IntegerField(default=0)), + ('lockout_until', models.DateTimeField(null=True)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='ManualEnrollmentAudit', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('enrolled_email', models.CharField(max_length=255, db_index=True)), + ('time_stamp', models.DateTimeField(auto_now_add=True, null=True)), + ('state_transition', models.CharField(max_length=255, choices=[(b'from unenrolled to allowed to enroll', b'from unenrolled to allowed to enroll'), (b'from allowed to enroll to enrolled', b'from allowed to enroll to enrolled'), (b'from enrolled to enrolled', b'from enrolled to enrolled'), (b'from enrolled to unenrolled', b'from enrolled to unenrolled'), (b'from unenrolled to enrolled', b'from unenrolled to enrolled'), (b'from allowed to enroll to enrolled', b'from allowed to enroll to enrolled'), (b'from unenrolled to unenrolled', b'from unenrolled to unenrolled'), (b'N/A', b'N/A')])), + ('reason', models.TextField(null=True)), + ('enrolled_by', models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True)), + ('enrollment', models.ForeignKey(to='student.CourseEnrollment', null=True)), + ], + ), + migrations.CreateModel( + name='PasswordHistory', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('password', models.CharField(max_length=128)), + ('time_set', models.DateTimeField(default=django.utils.timezone.now)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='PendingEmailChange', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('new_email', models.CharField(db_index=True, max_length=255, blank=True)), + ('activation_key', models.CharField(unique=True, max_length=32, verbose_name=b'activation key', db_index=True)), + ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='PendingNameChange', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('new_name', models.CharField(max_length=255, blank=True)), + ('rationale', models.CharField(max_length=1024, blank=True)), + ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='Registration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('activation_key', models.CharField(unique=True, max_length=32, verbose_name=b'activation key', db_index=True)), + ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)), + ], + options={ + 'db_table': 'auth_registration', + }, + ), + migrations.CreateModel( + name='UserProfile', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(db_index=True, max_length=255, blank=True)), + ('meta', models.TextField(blank=True)), + ('courseware', models.CharField(default=b'course.xml', max_length=255, blank=True)), + ('language', models.CharField(db_index=True, max_length=255, blank=True)), + ('location', models.CharField(db_index=True, max_length=255, blank=True)), + ('year_of_birth', models.IntegerField(db_index=True, null=True, blank=True)), + ('gender', models.CharField(blank=True, max_length=6, null=True, db_index=True, choices=[(b'm', b'Male'), (b'f', b'Female'), (b'o', b'Other/Prefer Not to Say')])), + ('level_of_education', models.CharField(blank=True, max_length=6, null=True, db_index=True, choices=[(b'p', b'Doctorate'), (b'm', b"Master's or professional degree"), (b'b', b"Bachelor's degree"), (b'a', b'Associate degree'), (b'hs', b'Secondary/high school'), (b'jhs', b'Junior secondary/junior high/middle school'), (b'el', b'Elementary/primary school'), (b'none', b'No Formal Education'), (b'other', b'Other Education')])), + ('mailing_address', models.TextField(null=True, blank=True)), + ('city', models.TextField(null=True, blank=True)), + ('country', django_countries.fields.CountryField(blank=True, max_length=2, null=True)), + ('goals', models.TextField(null=True, blank=True)), + ('allow_certificate', models.BooleanField(default=1)), + ('bio', models.CharField(max_length=3000, null=True, blank=True)), + ('profile_image_uploaded_at', models.DateTimeField(null=True)), + ('user', models.OneToOneField(related_name='profile', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'db_table': 'auth_userprofile', + }, + ), + migrations.CreateModel( + name='UserSignupSource', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('site', models.CharField(max_length=255, db_index=True)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='UserStanding', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('account_status', models.CharField(blank=True, max_length=31, choices=[(b'disabled', 'Account Disabled'), (b'enabled', 'Account Enabled')])), + ('standing_last_changed_at', models.DateTimeField(auto_now=True)), + ('changed_by', models.ForeignKey(to=settings.AUTH_USER_MODEL, blank=True)), + ('user', models.OneToOneField(related_name='standing', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='UserTestGroup', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=32, db_index=True)), + ('description', models.TextField(blank=True)), + ('users', models.ManyToManyField(to=settings.AUTH_USER_MODEL, db_index=True)), + ], + ), + migrations.AddField( + model_name='languageproficiency', + name='user_profile', + field=models.ForeignKey(related_name='language_proficiencies', to='student.UserProfile'), + ), + migrations.AlterUniqueTogether( + name='courseenrollmentallowed', + unique_together=set([('email', 'course_id')]), + ), + migrations.AlterUniqueTogether( + name='languageproficiency', + unique_together=set([('code', 'user_profile')]), + ), + migrations.AlterUniqueTogether( + name='entranceexamconfiguration', + unique_together=set([('user', 'course_id')]), + ), + migrations.AlterUniqueTogether( + name='courseenrollment', + unique_together=set([('user', 'course_id')]), + ), + migrations.AlterUniqueTogether( + name='courseaccessrole', + unique_together=set([('user', 'org', 'course_id', 'role')]), + ), + ] diff --git a/common/djangoapps/student/migrations/0002_text_to_varchar_and_indexes.py b/common/djangoapps/student/migrations/0002_text_to_varchar_and_indexes.py deleted file mode 100644 index 27aea40a5cb7..000000000000 --- a/common/djangoapps/student/migrations/0002_text_to_varchar_and_indexes.py +++ /dev/null @@ -1,142 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'UserProfile.name' - db.alter_column('auth_userprofile', 'name', self.gf('django.db.models.fields.CharField')(max_length=255)) - - # Adding index on 'UserProfile', fields ['name'] - db.create_index('auth_userprofile', ['name']) - - # Changing field 'UserProfile.language' - db.alter_column('auth_userprofile', 'language', self.gf('django.db.models.fields.CharField')(max_length=255)) - - # Adding index on 'UserProfile', fields ['language'] - db.create_index('auth_userprofile', ['language']) - - # Changing field 'UserProfile.courseware' - db.alter_column('auth_userprofile', 'courseware', self.gf('django.db.models.fields.CharField')(max_length=255)) - - # Changing field 'UserProfile.meta' - db.alter_column('auth_userprofile', 'meta', self.gf('django.db.models.fields.CharField')(max_length=255)) - - # Changing field 'UserProfile.location' - db.alter_column('auth_userprofile', 'location', self.gf('django.db.models.fields.CharField')(max_length=255)) - - # Adding index on 'UserProfile', fields ['location'] - db.create_index('auth_userprofile', ['location']) - - def backwards(self, orm): - - # Removing index on 'UserProfile', fields ['location'] - db.delete_index('auth_userprofile', ['location']) - - # Removing index on 'UserProfile', fields ['language'] - db.delete_index('auth_userprofile', ['language']) - - # Removing index on 'UserProfile', fields ['name'] - db.delete_index('auth_userprofile', ['name']) - - # Changing field 'UserProfile.name' - db.alter_column('auth_userprofile', 'name', self.gf('django.db.models.fields.TextField')()) - - # Changing field 'UserProfile.language' - db.alter_column('auth_userprofile', 'language', self.gf('django.db.models.fields.TextField')()) - - # Changing field 'UserProfile.courseware' - db.alter_column('auth_userprofile', 'courseware', self.gf('django.db.models.fields.TextField')()) - - # Changing field 'UserProfile.meta' - db.alter_column('auth_userprofile', 'meta', self.gf('django.db.models.fields.TextField')()) - - # Changing field 'UserProfile.location' - db.alter_column('auth_userprofile', 'location', self.gf('django.db.models.fields.TextField')()) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'meta': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0003_auto__add_usertestgroup.py b/common/djangoapps/student/migrations/0003_auto__add_usertestgroup.py deleted file mode 100644 index a63abf946980..000000000000 --- a/common/djangoapps/student/migrations/0003_auto__add_usertestgroup.py +++ /dev/null @@ -1,123 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'UserTestGroup' - db.create_table('student_usertestgroup', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)), - ('description', self.gf('django.db.models.fields.TextField')(blank=True)), - )) - db.send_create_signal('student', ['UserTestGroup']) - - # Adding M2M table for field users on 'UserTestGroup' - db.create_table('student_usertestgroup_users', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('usertestgroup', models.ForeignKey(orm['student.usertestgroup'], null=False)), - ('user', models.ForeignKey(orm['auth.user'], null=False)) - )) - db.create_unique('student_usertestgroup_users', ['usertestgroup_id', 'user_id']) - - def backwards(self, orm): - - # Deleting model 'UserTestGroup' - db.delete_table('student_usertestgroup') - - # Removing M2M table for field users on 'UserTestGroup' - db.delete_table('student_usertestgroup_users') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'meta': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0004_add_email_index.py b/common/djangoapps/student/migrations/0004_add_email_index.py deleted file mode 100644 index 60af424f65f9..000000000000 --- a/common/djangoapps/student/migrations/0004_add_email_index.py +++ /dev/null @@ -1,105 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.execute("create unique index email on auth_user (email)") - pass - - def backwards(self, orm): - db.execute("drop index email on auth_user") - pass - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'meta': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0005_name_change.py b/common/djangoapps/student/migrations/0005_name_change.py deleted file mode 100644 index 24c393cccee8..000000000000 --- a/common/djangoapps/student/migrations/0005_name_change.py +++ /dev/null @@ -1,145 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'PendingEmailChange' - db.create_table('student_pendingemailchange', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)), - ('new_email', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=255, blank=True)), - ('activation_key', self.gf('django.db.models.fields.CharField')(unique=True, max_length=32, db_index=True)), - )) - db.send_create_signal('student', ['PendingEmailChange']) - - # Adding model 'PendingNameChange' - db.create_table('student_pendingnamechange', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)), - ('new_name', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('rationale', self.gf('django.db.models.fields.CharField')(max_length=1024, blank=True)), - )) - db.send_create_signal('student', ['PendingNameChange']) - - # Changing field 'UserProfile.user' - db.alter_column('auth_userprofile', 'user_id', self.gf('django.db.models.fields.related.OneToOneField')(unique=True, to=orm['auth.User'])) - - def backwards(self, orm): - - # Deleting model 'PendingEmailChange' - db.delete_table('student_pendingemailchange') - - # Deleting model 'PendingNameChange' - db.delete_table('student_pendingnamechange') - - # Changing field 'UserProfile.user' - db.alter_column('auth_userprofile', 'user_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], unique=True)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'meta': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0006_expand_meta_field.py b/common/djangoapps/student/migrations/0006_expand_meta_field.py deleted file mode 100644 index 7fc3094cccc5..000000000000 --- a/common/djangoapps/student/migrations/0006_expand_meta_field.py +++ /dev/null @@ -1,121 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'UserProfile.meta' - db.alter_column('auth_userprofile', 'meta', self.gf('django.db.models.fields.TextField')()) - - def backwards(self, orm): - - # Changing field 'UserProfile.meta' - db.alter_column('auth_userprofile', 'meta', self.gf('django.db.models.fields.CharField')(max_length=255)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0007_convert_to_utf8.py b/common/djangoapps/student/migrations/0007_convert_to_utf8.py deleted file mode 100644 index 7a96496ad04e..000000000000 --- a/common/djangoapps/student/migrations/0007_convert_to_utf8.py +++ /dev/null @@ -1,125 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - if db.backend_name == 'mysql': - db.execute_many(""" - ALTER DATABASE CHARACTER SET utf8 COLLATE utf8_general_ci; - ALTER TABLE student_pendingemailchange CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; - ALTER TABLE student_pendingnamechange CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; - ALTER TABLE student_usertestgroup CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; - ALTER TABLE student_usertestgroup_users CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; - """) - - def backwards(self, orm): - # Although this migration can't be undone, it is okay for it to be run backwards because it doesn't add/remove any fields - pass - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0008__auto__add_courseregistration.py b/common/djangoapps/student/migrations/0008__auto__add_courseregistration.py deleted file mode 100644 index 22ef55913af9..000000000000 --- a/common/djangoapps/student/migrations/0008__auto__add_courseregistration.py +++ /dev/null @@ -1,130 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseRegistration' - db.create_table('student_courseregistration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)), - ('course_id', self.gf('django.db.models.fields.IntegerField')()), - )) - db.send_create_signal('student', ['CourseRegistration']) - - def backwards(self, orm): - # Deleting model 'CourseRegistration' - db.delete_table('student_courseregistration') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseregistration': { - 'Meta': {'object_name': 'CourseRegistration'}, - 'course_id': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'meta': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0009_auto__del_courseregistration__add_courseenrollment.py b/common/djangoapps/student/migrations/0009_auto__del_courseregistration__add_courseenrollment.py deleted file mode 100644 index c5af13d34c5b..000000000000 --- a/common/djangoapps/student/migrations/0009_auto__del_courseregistration__add_courseenrollment.py +++ /dev/null @@ -1,141 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'CourseRegistration' - db.delete_table('student_courseregistration') - - # Adding model 'CourseEnrollment' - db.create_table('student_courseenrollment', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)), - ('course_id', self.gf('django.db.models.fields.IntegerField')()), - )) - db.send_create_signal('student', ['CourseEnrollment']) - - def backwards(self, orm): - # Adding model 'CourseRegistration' - db.create_table('student_courseregistration', ( - ('course_id', self.gf('django.db.models.fields.IntegerField')()), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)), - )) - db.send_create_signal('student', ['CourseRegistration']) - - # Deleting model 'CourseEnrollment' - db.delete_table('student_courseenrollment') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'meta': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0010_auto__chg_field_courseenrollment_course_id.py b/common/djangoapps/student/migrations/0010_auto__chg_field_courseenrollment_course_id.py deleted file mode 100644 index 153a166b5ed6..000000000000 --- a/common/djangoapps/student/migrations/0010_auto__chg_field_courseenrollment_course_id.py +++ /dev/null @@ -1,127 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'CourseEnrollment.course_id' - db.alter_column('student_courseenrollment', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255)) - - def backwards(self, orm): - - # Changing field 'CourseEnrollment.course_id' - db.alter_column('student_courseenrollment', 'course_id', self.gf('django.db.models.fields.IntegerField')()) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'meta': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0011_auto__chg_field_courseenrollment_user__del_unique_courseenrollment_use.py b/common/djangoapps/student/migrations/0011_auto__chg_field_courseenrollment_user__del_unique_courseenrollment_use.py deleted file mode 100644 index e8417f53ef4a..000000000000 --- a/common/djangoapps/student/migrations/0011_auto__chg_field_courseenrollment_user__del_unique_courseenrollment_use.py +++ /dev/null @@ -1,135 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # This table is dropped in a subsequent migration. This migration was causing problems when using InnoDB, - # so we are just dropping it. - pass - # # Removing unique constraint on 'CourseEnrollment', fields ['user'] - # db.delete_unique('student_courseenrollment', ['user_id']) - # - # - # # Changing field 'CourseEnrollment.user' - # db.alter_column('student_courseenrollment', 'user_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])) - - def backwards(self, orm): - pass - # # Changing field 'CourseEnrollment.user' - # db.alter_column('student_courseenrollment', 'user_id', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)) - # # Adding unique constraint on 'CourseEnrollment', fields ['user'] - # db.create_unique('student_courseenrollment', ['user_id']) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'meta': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0012_auto__add_field_userprofile_gender__add_field_userprofile_date_of_birt.py b/common/djangoapps/student/migrations/0012_auto__add_field_userprofile_gender__add_field_userprofile_date_of_birt.py deleted file mode 100644 index ce46bf50fa64..000000000000 --- a/common/djangoapps/student/migrations/0012_auto__add_field_userprofile_gender__add_field_userprofile_date_of_birt.py +++ /dev/null @@ -1,173 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'UserProfile.gender' - db.add_column('auth_userprofile', 'gender', - self.gf('django.db.models.fields.CharField')(max_length=6, null=True, blank=True), - keep_default=False) - - # Adding field 'UserProfile.date_of_birth' - db.add_column('auth_userprofile', 'date_of_birth', - self.gf('django.db.models.fields.DateField')(null=True, blank=True), - keep_default=False) - - # Adding field 'UserProfile.mailing_address' - db.add_column('auth_userprofile', 'mailing_address', - self.gf('django.db.models.fields.TextField')(null=True, blank=True), - keep_default=False) - - # Adding field 'UserProfile.country' - db.add_column('auth_userprofile', 'country', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), - keep_default=False) - - # Adding field 'UserProfile.telephone_number' - db.add_column('auth_userprofile', 'telephone_number', - self.gf('django.db.models.fields.CharField')(max_length=25, null=True, blank=True), - keep_default=False) - - # Adding field 'UserProfile.occupation' - db.add_column('auth_userprofile', 'occupation', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), - keep_default=False) - - def backwards(self, orm): - # Deleting field 'UserProfile.gender' - db.delete_column('auth_userprofile', 'gender') - - # Deleting field 'UserProfile.date_of_birth' - db.delete_column('auth_userprofile', 'date_of_birth') - - # Deleting field 'UserProfile.mailing_address' - db.delete_column('auth_userprofile', 'mailing_address') - - # Deleting field 'UserProfile.country' - db.delete_column('auth_userprofile', 'country') - - # Deleting field 'UserProfile.telephone_number' - db.delete_column('auth_userprofile', 'telephone_number') - - # Deleting field 'UserProfile.occupation' - db.delete_column('auth_userprofile', 'occupation') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'occupation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'telephone_number': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0013_auto__chg_field_userprofile_meta.py b/common/djangoapps/student/migrations/0013_auto__chg_field_userprofile_meta.py deleted file mode 100644 index de81c6bf53d2..000000000000 --- a/common/djangoapps/student/migrations/0013_auto__chg_field_userprofile_meta.py +++ /dev/null @@ -1,133 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'UserProfile.meta' - db.alter_column('auth_userprofile', 'meta', self.gf('django.db.models.fields.TextField')()) - - def backwards(self, orm): - - # Changing field 'UserProfile.meta' - db.alter_column('auth_userprofile', 'meta', self.gf('django.db.models.fields.CharField')(max_length=255)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'occupation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'telephone_number': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0014_auto__del_courseenrollment.py b/common/djangoapps/student/migrations/0014_auto__del_courseenrollment.py deleted file mode 100644 index 926c38c55f4e..000000000000 --- a/common/djangoapps/student/migrations/0014_auto__del_courseenrollment.py +++ /dev/null @@ -1,130 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'CourseEnrollment' - db.delete_table('student_courseenrollment') - - def backwards(self, orm): - # Adding model 'CourseEnrollment' - db.create_table('student_courseenrollment', ( - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - )) - db.send_create_signal('student', ['CourseEnrollment']) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'occupation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'telephone_number': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0015_auto__add_courseenrollment__add_unique_courseenrollment_user_course_id.py b/common/djangoapps/student/migrations/0015_auto__add_courseenrollment__add_unique_courseenrollment_user_course_id.py deleted file mode 100644 index 3cde0c755ce6..000000000000 --- a/common/djangoapps/student/migrations/0015_auto__add_courseenrollment__add_unique_courseenrollment_user_course_id.py +++ /dev/null @@ -1,142 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseEnrollment' - db.create_table('student_courseenrollment', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - )) - db.send_create_signal('student', ['CourseEnrollment']) - - # Adding unique constraint on 'CourseEnrollment', fields ['user', 'course_id'] - db.create_unique('student_courseenrollment', ['user_id', 'course_id']) - - def backwards(self, orm): - # Removing unique constraint on 'CourseEnrollment', fields ['user', 'course_id'] - db.delete_unique('student_courseenrollment', ['user_id', 'course_id']) - - # Deleting model 'CourseEnrollment' - db.delete_table('student_courseenrollment') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'occupation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'telephone_number': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0016_auto__add_field_courseenrollment_date__chg_field_userprofile_country.py b/common/djangoapps/student/migrations/0016_auto__add_field_courseenrollment_date__chg_field_userprofile_country.py deleted file mode 100644 index 58f013742ece..000000000000 --- a/common/djangoapps/student/migrations/0016_auto__add_field_courseenrollment_date__chg_field_userprofile_country.py +++ /dev/null @@ -1,140 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseEnrollment.date' - db.add_column('student_courseenrollment', 'date', - self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True, blank=True), - keep_default=False) - - # Changing field 'UserProfile.country' - db.alter_column('auth_userprofile', 'country', self.gf('django_countries.fields.CountryField')(max_length=2, null=True)) - - def backwards(self, orm): - # Deleting field 'CourseEnrollment.date' - db.delete_column('student_courseenrollment', 'date') - - # Changing field 'UserProfile.country' - db.alter_column('auth_userprofile', 'country', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'occupation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'telephone_number': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0017_rename_date_to_created.py b/common/djangoapps/student/migrations/0017_rename_date_to_created.py deleted file mode 100644 index 6bde313d8bfb..000000000000 --- a/common/djangoapps/student/migrations/0017_rename_date_to_created.py +++ /dev/null @@ -1,132 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Rename 'date' field to 'created' - db.rename_column('student_courseenrollment', 'date', 'created') - - def backwards(self, orm): - # Rename 'created' field to 'date' - db.rename_column('student_courseenrollment', 'created', 'date') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'occupation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'telephone_number': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0018_auto.py b/common/djangoapps/student/migrations/0018_auto.py deleted file mode 100644 index df0cc3fbdb00..000000000000 --- a/common/djangoapps/student/migrations/0018_auto.py +++ /dev/null @@ -1,132 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding index on 'CourseEnrollment', fields ['created'] - db.create_index('student_courseenrollment', ['created']) - - def backwards(self, orm): - # Removing index on 'CourseEnrollment', fields ['created'] - db.delete_index('student_courseenrollment', ['created']) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'occupation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'telephone_number': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0019_create_approved_demographic_fields_fall_2012.py b/common/djangoapps/student/migrations/0019_create_approved_demographic_fields_fall_2012.py deleted file mode 100644 index 7c0207f4f4c2..000000000000 --- a/common/djangoapps/student/migrations/0019_create_approved_demographic_fields_fall_2012.py +++ /dev/null @@ -1,187 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'UserProfile.occupation' - db.delete_column('auth_userprofile', 'occupation') - - # Deleting field 'UserProfile.telephone_number' - db.delete_column('auth_userprofile', 'telephone_number') - - # Deleting field 'UserProfile.date_of_birth' - db.delete_column('auth_userprofile', 'date_of_birth') - - # Deleting field 'UserProfile.country' - db.delete_column('auth_userprofile', 'country') - - # Adding field 'UserProfile.year_of_birth' - db.add_column('auth_userprofile', 'year_of_birth', - self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True), - keep_default=False) - - # Adding field 'UserProfile.level_of_education' - db.add_column('auth_userprofile', 'level_of_education', - self.gf('django.db.models.fields.CharField')(db_index=True, max_length=6, null=True, blank=True), - keep_default=False) - - # Adding field 'UserProfile.goals' - db.add_column('auth_userprofile', 'goals', - self.gf('django.db.models.fields.TextField')(null=True, blank=True), - keep_default=False) - - # Adding index on 'UserProfile', fields ['gender'] - db.create_index('auth_userprofile', ['gender']) - - def backwards(self, orm): - # Removing index on 'UserProfile', fields ['gender'] - db.delete_index('auth_userprofile', ['gender']) - - # Adding field 'UserProfile.occupation' - db.add_column('auth_userprofile', 'occupation', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), - keep_default=False) - - # Adding field 'UserProfile.telephone_number' - db.add_column('auth_userprofile', 'telephone_number', - self.gf('django.db.models.fields.CharField')(max_length=25, null=True, blank=True), - keep_default=False) - - # Adding field 'UserProfile.date_of_birth' - db.add_column('auth_userprofile', 'date_of_birth', - self.gf('django.db.models.fields.DateField')(null=True, blank=True), - keep_default=False) - - # Adding field 'UserProfile.country' - db.add_column('auth_userprofile', 'country', - self.gf('django_countries.fields.CountryField')(max_length=2, null=True, blank=True), - keep_default=False) - - # Deleting field 'UserProfile.year_of_birth' - db.delete_column('auth_userprofile', 'year_of_birth') - - # Deleting field 'UserProfile.level_of_education' - db.delete_column('auth_userprofile', 'level_of_education') - - # Deleting field 'UserProfile.goals' - db.delete_column('auth_userprofile', 'goals') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0020_add_test_center_user.py b/common/djangoapps/student/migrations/0020_add_test_center_user.py deleted file mode 100644 index 6c0bf5c4ee56..000000000000 --- a/common/djangoapps/student/migrations/0020_add_test_center_user.py +++ /dev/null @@ -1,188 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'TestCenterUser' - db.create_table('student_testcenteruser', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['auth.User'], unique=True)), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)), - ('updated_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, db_index=True, blank=True)), - ('user_updated_at', self.gf('django.db.models.fields.DateTimeField')(db_index=True)), - ('candidate_id', self.gf('django.db.models.fields.IntegerField')(null=True, db_index=True)), - ('client_candidate_id', self.gf('django.db.models.fields.CharField')(max_length=50, db_index=True)), - ('first_name', self.gf('django.db.models.fields.CharField')(max_length=30, db_index=True)), - ('last_name', self.gf('django.db.models.fields.CharField')(max_length=50, db_index=True)), - ('middle_name', self.gf('django.db.models.fields.CharField')(max_length=30, blank=True)), - ('suffix', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('salutation', self.gf('django.db.models.fields.CharField')(max_length=50, blank=True)), - ('address_1', self.gf('django.db.models.fields.CharField')(max_length=40)), - ('address_2', self.gf('django.db.models.fields.CharField')(max_length=40, blank=True)), - ('address_3', self.gf('django.db.models.fields.CharField')(max_length=40, blank=True)), - ('city', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)), - ('state', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=20, blank=True)), - ('postal_code', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=16, blank=True)), - ('country', self.gf('django.db.models.fields.CharField')(max_length=3, db_index=True)), - ('phone', self.gf('django.db.models.fields.CharField')(max_length=35)), - ('extension', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=8, blank=True)), - ('phone_country_code', self.gf('django.db.models.fields.CharField')(max_length=3, db_index=True)), - ('fax', self.gf('django.db.models.fields.CharField')(max_length=35, blank=True)), - ('fax_country_code', self.gf('django.db.models.fields.CharField')(max_length=3, blank=True)), - ('company_name', self.gf('django.db.models.fields.CharField')(max_length=50, blank=True)), - )) - db.send_create_signal('student', ['TestCenterUser']) - - - def backwards(self, orm): - # Deleting model 'TestCenterUser' - db.delete_table('student_testcenteruser') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.testcenteruser': { - 'Meta': {'object_name': 'TestCenterUser'}, - 'address_1': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'address_2': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'address_3': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'candidate_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'client_candidate_id': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'extension': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '8', 'blank': 'True'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '35', 'blank': 'True'}), - 'fax_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'middle_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '35'}), - 'phone_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'blank': 'True'}), - 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'suffix': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'unique': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0021_remove_askbot.py b/common/djangoapps/student/migrations/0021_remove_askbot.py deleted file mode 100644 index 8f76e5078c19..000000000000 --- a/common/djangoapps/student/migrations/0021_remove_askbot.py +++ /dev/null @@ -1,160 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -ASKBOT_AUTH_USER_COLUMNS = ( - 'website', - 'about', - 'gold', - 'email_isvalid', - 'real_name', - 'location', - 'reputation', - 'gravatar', - 'bronze', - 'last_seen', - 'silver', - 'questions_per_page', - 'new_response_count', - 'seen_response_count', -) - - -class Migration(SchemaMigration): - - def forwards(self, orm): - "Kill the askbot" - try: - # For MySQL, we're batching the alters together for performance reasons - if db.backend_name == 'mysql': - drops = ["drop `{0}`".format(col) for col in ASKBOT_AUTH_USER_COLUMNS] - statement = "alter table `auth_user` {0};".format(", ".join(drops)) - db.execute(statement) - else: - for column in ASKBOT_AUTH_USER_COLUMNS: - db.delete_column('auth_user', column) - except Exception as ex: - print "Couldn't remove askbot because of {0} -- it was probably never here to begin with.".format(ex) - - def backwards(self, orm): - raise RuntimeError("Cannot reverse this migration: there's no going back to Askbot.") - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.testcenteruser': { - 'Meta': {'object_name': 'TestCenterUser'}, - 'address_1': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'address_2': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'address_3': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'candidate_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'client_candidate_id': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'extension': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '8', 'blank': 'True'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '35', 'blank': 'True'}), - 'fax_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'middle_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '35'}), - 'phone_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'blank': 'True'}), - 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'suffix': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'unique': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0022_auto__add_courseenrollmentallowed__add_unique_courseenrollmentallowed_.py b/common/djangoapps/student/migrations/0022_auto__add_courseenrollmentallowed__add_unique_courseenrollmentallowed_.py deleted file mode 100644 index 769ad6737dee..000000000000 --- a/common/djangoapps/student/migrations/0022_auto__add_courseenrollmentallowed__add_unique_courseenrollmentallowed_.py +++ /dev/null @@ -1,155 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseEnrollmentAllowed' - db.create_table('student_courseenrollmentallowed', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('email', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True, db_index=True, blank=True)), - )) - db.send_create_signal('student', ['CourseEnrollmentAllowed']) - - # Adding unique constraint on 'CourseEnrollmentAllowed', fields ['email', 'course_id'] - db.create_unique('student_courseenrollmentallowed', ['email', 'course_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'CourseEnrollmentAllowed', fields ['email', 'course_id'] - db.delete_unique('student_courseenrollmentallowed', ['email', 'course_id']) - - # Deleting model 'CourseEnrollmentAllowed' - db.delete_table('student_courseenrollmentallowed') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.testcenteruser': { - 'Meta': {'object_name': 'TestCenterUser'}, - 'address_1': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'address_2': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'address_3': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'candidate_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'client_candidate_id': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'extension': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '8', 'blank': 'True'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '35', 'blank': 'True'}), - 'fax_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'middle_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '35'}), - 'phone_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'blank': 'True'}), - 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'suffix': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'unique': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0023_add_test_center_registration.py b/common/djangoapps/student/migrations/0023_add_test_center_registration.py deleted file mode 100644 index 6186f5deef19..000000000000 --- a/common/djangoapps/student/migrations/0023_add_test_center_registration.py +++ /dev/null @@ -1,241 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'TestCenterRegistration' - db.create_table('student_testcenterregistration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('testcenter_user', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['student.TestCenterUser'])), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=128, db_index=True)), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)), - ('updated_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, db_index=True, blank=True)), - ('user_updated_at', self.gf('django.db.models.fields.DateTimeField')(db_index=True)), - ('client_authorization_id', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20, db_index=True)), - ('exam_series_code', self.gf('django.db.models.fields.CharField')(max_length=15, db_index=True)), - ('eligibility_appointment_date_first', self.gf('django.db.models.fields.DateField')(db_index=True)), - ('eligibility_appointment_date_last', self.gf('django.db.models.fields.DateField')(db_index=True)), - ('accommodation_code', self.gf('django.db.models.fields.CharField')(max_length=64, blank=True)), - ('accommodation_request', self.gf('django.db.models.fields.CharField')(db_index=False, max_length=1024, blank=True)), - ('uploaded_at', self.gf('django.db.models.fields.DateTimeField')(null=True, db_index=True)), - ('processed_at', self.gf('django.db.models.fields.DateTimeField')(null=True, db_index=True)), - ('upload_status', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=20, blank=True)), - ('upload_error_message', self.gf('django.db.models.fields.CharField')(max_length=512, blank=True)), - ('authorization_id', self.gf('django.db.models.fields.IntegerField')(null=True, db_index=True)), - ('confirmed_at', self.gf('django.db.models.fields.DateTimeField')(null=True, db_index=True)), - )) - db.send_create_signal('student', ['TestCenterRegistration']) - - # Adding field 'TestCenterUser.uploaded_at' - db.add_column('student_testcenteruser', 'uploaded_at', - self.gf('django.db.models.fields.DateTimeField')(db_index=True, null=True, blank=True), - keep_default=False) - - # Adding field 'TestCenterUser.processed_at' - db.add_column('student_testcenteruser', 'processed_at', - self.gf('django.db.models.fields.DateTimeField')(null=True, db_index=True), - keep_default=False) - - # Adding field 'TestCenterUser.upload_status' - db.add_column('student_testcenteruser', 'upload_status', - self.gf('django.db.models.fields.CharField')(db_index=True, default='', max_length=20, blank=True), - keep_default=False) - - # Adding field 'TestCenterUser.upload_error_message' - db.add_column('student_testcenteruser', 'upload_error_message', - self.gf('django.db.models.fields.CharField')(default='', max_length=512, blank=True), - keep_default=False) - - # Adding field 'TestCenterUser.confirmed_at' - db.add_column('student_testcenteruser', 'confirmed_at', - self.gf('django.db.models.fields.DateTimeField')(null=True, db_index=True), - keep_default=False) - - # Adding index on 'TestCenterUser', fields ['company_name'] - db.create_index('student_testcenteruser', ['company_name']) - - # Adding unique constraint on 'TestCenterUser', fields ['client_candidate_id'] - db.create_unique('student_testcenteruser', ['client_candidate_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'TestCenterUser', fields ['client_candidate_id'] - db.delete_unique('student_testcenteruser', ['client_candidate_id']) - - # Removing index on 'TestCenterUser', fields ['company_name'] - db.delete_index('student_testcenteruser', ['company_name']) - - # Deleting model 'TestCenterRegistration' - db.delete_table('student_testcenterregistration') - - # Deleting field 'TestCenterUser.uploaded_at' - db.delete_column('student_testcenteruser', 'uploaded_at') - - # Deleting field 'TestCenterUser.processed_at' - db.delete_column('student_testcenteruser', 'processed_at') - - # Deleting field 'TestCenterUser.upload_status' - db.delete_column('student_testcenteruser', 'upload_status') - - # Deleting field 'TestCenterUser.upload_error_message' - db.delete_column('student_testcenteruser', 'upload_error_message') - - # Deleting field 'TestCenterUser.confirmed_at' - db.delete_column('student_testcenteruser', 'confirmed_at') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.testcenterregistration': { - 'Meta': {'object_name': 'TestCenterRegistration'}, - 'accommodation_code': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'accommodation_request': ('django.db.models.fields.CharField', [], {'db_index': 'False', 'max_length': '1024', 'blank': 'True'}), - 'authorization_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'client_authorization_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20', 'db_index': 'True'}), - 'confirmed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'eligibility_appointment_date_first': ('django.db.models.fields.DateField', [], {'db_index': 'True'}), - 'eligibility_appointment_date_last': ('django.db.models.fields.DateField', [], {'db_index': 'True'}), - 'exam_series_code': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'testcenter_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['student.TestCenterUser']"}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'upload_error_message': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'upload_status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.testcenteruser': { - 'Meta': {'object_name': 'TestCenterUser'}, - 'address_1': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'address_2': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'address_3': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'candidate_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'client_candidate_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}), - 'confirmed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'extension': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '8', 'blank': 'True'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '35', 'blank': 'True'}), - 'fax_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'middle_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '35'}), - 'phone_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'blank': 'True'}), - 'processed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'suffix': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'upload_error_message': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'upload_status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'unique': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0024_add_allow_certificate.py b/common/djangoapps/student/migrations/0024_add_allow_certificate.py deleted file mode 100644 index 5753f0176e00..000000000000 --- a/common/djangoapps/student/migrations/0024_add_allow_certificate.py +++ /dev/null @@ -1,172 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'UserProfile.allow_certificate' - db.add_column('auth_userprofile', 'allow_certificate', - self.gf('django.db.models.fields.BooleanField')(default=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'UserProfile.allow_certificate' - db.delete_column('auth_userprofile', 'allow_certificate') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.testcenterregistration': { - 'Meta': {'object_name': 'TestCenterRegistration'}, - 'accommodation_code': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'accommodation_request': ('django.db.models.fields.CharField', [], {'db_index': 'False', 'max_length': '1024', 'blank': 'True'}), - 'authorization_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'client_authorization_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20', 'db_index': 'True'}), - 'confirmed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'eligibility_appointment_date_first': ('django.db.models.fields.DateField', [], {'db_index': 'True'}), - 'eligibility_appointment_date_last': ('django.db.models.fields.DateField', [], {'db_index': 'True'}), - 'exam_series_code': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'testcenter_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['student.TestCenterUser']"}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'upload_error_message': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'upload_status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.testcenteruser': { - 'Meta': {'object_name': 'TestCenterUser'}, - 'address_1': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'address_2': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'address_3': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'candidate_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'client_candidate_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}), - 'confirmed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'extension': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '8', 'blank': 'True'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '35', 'blank': 'True'}), - 'fax_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'middle_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '35'}), - 'phone_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'blank': 'True'}), - 'processed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'suffix': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'upload_error_message': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'upload_status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'unique': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0025_auto__add_field_courseenrollmentallowed_auto_enroll.py b/common/djangoapps/student/migrations/0025_auto__add_field_courseenrollmentallowed_auto_enroll.py deleted file mode 100644 index a60d121de8fd..000000000000 --- a/common/djangoapps/student/migrations/0025_auto__add_field_courseenrollmentallowed_auto_enroll.py +++ /dev/null @@ -1,173 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseEnrollmentAllowed.auto_enroll' - db.add_column('student_courseenrollmentallowed', 'auto_enroll', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CourseEnrollmentAllowed.auto_enroll' - db.delete_column('student_courseenrollmentallowed', 'auto_enroll') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.testcenterregistration': { - 'Meta': {'object_name': 'TestCenterRegistration'}, - 'accommodation_code': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'accommodation_request': ('django.db.models.fields.CharField', [], {'db_index': 'False', 'max_length': '1024', 'blank': 'True'}), - 'authorization_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'client_authorization_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20', 'db_index': 'True'}), - 'confirmed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'eligibility_appointment_date_first': ('django.db.models.fields.DateField', [], {'db_index': 'True'}), - 'eligibility_appointment_date_last': ('django.db.models.fields.DateField', [], {'db_index': 'True'}), - 'exam_series_code': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'testcenter_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['student.TestCenterUser']"}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'upload_error_message': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'upload_status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.testcenteruser': { - 'Meta': {'object_name': 'TestCenterUser'}, - 'address_1': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'address_2': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'address_3': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'candidate_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'client_candidate_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}), - 'confirmed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'extension': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '8', 'blank': 'True'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '35', 'blank': 'True'}), - 'fax_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'middle_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '35'}), - 'phone_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'blank': 'True'}), - 'processed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'suffix': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'upload_error_message': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'upload_status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'unique': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0026_auto__remove_index_student_testcenterregistration_accommodation_request.py b/common/djangoapps/student/migrations/0026_auto__remove_index_student_testcenterregistration_accommodation_request.py deleted file mode 100644 index 23fc476348e9..000000000000 --- a/common/djangoapps/student/migrations/0026_auto__remove_index_student_testcenterregistration_accommodation_request.py +++ /dev/null @@ -1,180 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models -from django.db.utils import DatabaseError - - -class Migration(SchemaMigration): - """ - Remove an unwanted index from environments that have it. - This is a one-way migration in that backwards is a no-op and will not undo the removal. - This migration is only relevant to dev environments that existed before a migration rewrite - which removed the creation of this index. - """ - - def forwards(self, orm): - try: - # Removing index on 'TestCenterRegistration', fields ['accommodation_request'] - db.delete_index('student_testcenterregistration', ['accommodation_request']) - except DatabaseError: - print "-- skipping delete_index of student_testcenterregistration.accommodation_request (index does not exist)" - - - def backwards(self, orm): - pass - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.testcenterregistration': { - 'Meta': {'object_name': 'TestCenterRegistration'}, - 'accommodation_code': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'accommodation_request': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'authorization_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'client_authorization_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20', 'db_index': 'True'}), - 'confirmed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'eligibility_appointment_date_first': ('django.db.models.fields.DateField', [], {'db_index': 'True'}), - 'eligibility_appointment_date_last': ('django.db.models.fields.DateField', [], {'db_index': 'True'}), - 'exam_series_code': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'testcenter_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['student.TestCenterUser']"}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'upload_error_message': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'upload_status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.testcenteruser': { - 'Meta': {'object_name': 'TestCenterUser'}, - 'address_1': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'address_2': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'address_3': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'candidate_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'client_candidate_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}), - 'confirmed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'extension': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '8', 'blank': 'True'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '35', 'blank': 'True'}), - 'fax_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'middle_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '35'}), - 'phone_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'blank': 'True'}), - 'processed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'suffix': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'upload_error_message': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'upload_status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'unique': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0027_add_active_flag_and_mode_to_courseware_enrollment.py b/common/djangoapps/student/migrations/0027_add_active_flag_and_mode_to_courseware_enrollment.py deleted file mode 100644 index 112dccfe5102..000000000000 --- a/common/djangoapps/student/migrations/0027_add_active_flag_and_mode_to_courseware_enrollment.py +++ /dev/null @@ -1,183 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseEnrollment.is_active' - db.add_column('student_courseenrollment', 'is_active', - self.gf('django.db.models.fields.BooleanField')(default=True), - keep_default=False) - - # Adding field 'CourseEnrollment.mode' - db.add_column('student_courseenrollment', 'mode', - self.gf('django.db.models.fields.CharField')(default='honor', max_length=100), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CourseEnrollment.is_active' - db.delete_column('student_courseenrollment', 'is_active') - - # Deleting field 'CourseEnrollment.mode' - db.delete_column('student_courseenrollment', 'mode') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.testcenterregistration': { - 'Meta': {'object_name': 'TestCenterRegistration'}, - 'accommodation_code': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'accommodation_request': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'authorization_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'client_authorization_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20', 'db_index': 'True'}), - 'confirmed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'eligibility_appointment_date_first': ('django.db.models.fields.DateField', [], {'db_index': 'True'}), - 'eligibility_appointment_date_last': ('django.db.models.fields.DateField', [], {'db_index': 'True'}), - 'exam_series_code': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'testcenter_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['student.TestCenterUser']"}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'upload_error_message': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'upload_status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.testcenteruser': { - 'Meta': {'object_name': 'TestCenterUser'}, - 'address_1': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'address_2': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'address_3': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'candidate_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'client_candidate_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}), - 'confirmed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'extension': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '8', 'blank': 'True'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '35', 'blank': 'True'}), - 'fax_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'middle_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '35'}), - 'phone_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'blank': 'True'}), - 'processed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'suffix': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'upload_error_message': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'upload_status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'unique': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0028_auto__add_userstanding.py b/common/djangoapps/student/migrations/0028_auto__add_userstanding.py deleted file mode 100644 index ae66b86963c5..000000000000 --- a/common/djangoapps/student/migrations/0028_auto__add_userstanding.py +++ /dev/null @@ -1,188 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'UserStanding' - db.create_table('student_userstanding', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='standing', unique=True, to=orm['auth.User'])), - ('account_status', self.gf('django.db.models.fields.CharField')(max_length=31, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], blank=True)), - ('standing_last_changed_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - )) - db.send_create_signal('student', ['UserStanding']) - - - def backwards(self, orm): - # Deleting model 'UserStanding' - db.delete_table('student_userstanding') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.testcenterregistration': { - 'Meta': {'object_name': 'TestCenterRegistration'}, - 'accommodation_code': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'accommodation_request': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'authorization_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'client_authorization_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20', 'db_index': 'True'}), - 'confirmed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'eligibility_appointment_date_first': ('django.db.models.fields.DateField', [], {'db_index': 'True'}), - 'eligibility_appointment_date_last': ('django.db.models.fields.DateField', [], {'db_index': 'True'}), - 'exam_series_code': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'testcenter_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['student.TestCenterUser']"}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'upload_error_message': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'upload_status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.testcenteruser': { - 'Meta': {'object_name': 'TestCenterUser'}, - 'address_1': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'address_2': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'address_3': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'candidate_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'client_candidate_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}), - 'confirmed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'extension': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '8', 'blank': 'True'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '35', 'blank': 'True'}), - 'fax_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'middle_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '35'}), - 'phone_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'blank': 'True'}), - 'processed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'suffix': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'upload_error_message': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'upload_status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'unique': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0029_add_lookup_table_between_user_and_anonymous_student_id.py b/common/djangoapps/student/migrations/0029_add_lookup_table_between_user_and_anonymous_student_id.py deleted file mode 100644 index 49755981570e..000000000000 --- a/common/djangoapps/student/migrations/0029_add_lookup_table_between_user_and_anonymous_student_id.py +++ /dev/null @@ -1,194 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'AnonymousUserId' - db.create_table('student_anonymoususerid', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('anonymous_user_id', self.gf('django.db.models.fields.CharField')(unique=True, max_length=16)), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - )) - db.send_create_signal('student', ['AnonymousUserId']) - - - def backwards(self, orm): - # Deleting model 'AnonymousUserId' - db.delete_table('student_anonymoususerid') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '16'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.testcenterregistration': { - 'Meta': {'object_name': 'TestCenterRegistration'}, - 'accommodation_code': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'accommodation_request': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'authorization_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'client_authorization_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20', 'db_index': 'True'}), - 'confirmed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'eligibility_appointment_date_first': ('django.db.models.fields.DateField', [], {'db_index': 'True'}), - 'eligibility_appointment_date_last': ('django.db.models.fields.DateField', [], {'db_index': 'True'}), - 'exam_series_code': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'testcenter_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['student.TestCenterUser']"}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'upload_error_message': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'upload_status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.testcenteruser': { - 'Meta': {'object_name': 'TestCenterUser'}, - 'address_1': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'address_2': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'address_3': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'candidate_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'db_index': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'client_candidate_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}), - 'confirmed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'extension': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '8', 'blank': 'True'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '35', 'blank': 'True'}), - 'fax_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'middle_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '35'}), - 'phone_country_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'db_index': 'True'}), - 'postal_code': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'blank': 'True'}), - 'processed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'suffix': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'upload_error_message': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'upload_status': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '20', 'blank': 'True'}), - 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'unique': 'True'}), - 'user_updated_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0029_remove_pearson.py b/common/djangoapps/student/migrations/0029_remove_pearson.py deleted file mode 100644 index 4e1cb09b4c2f..000000000000 --- a/common/djangoapps/student/migrations/0029_remove_pearson.py +++ /dev/null @@ -1,185 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'TestCenterUser' - db.delete_table('student_testcenteruser') - - # Deleting model 'TestCenterRegistration' - db.delete_table('student_testcenterregistration') - - - def backwards(self, orm): - # Adding model 'TestCenterUser' - db.create_table('student_testcenteruser', ( - ('last_name', self.gf('django.db.models.fields.CharField')(max_length=50, db_index=True)), - ('suffix', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('confirmed_at', self.gf('django.db.models.fields.DateTimeField')(null=True, db_index=True)), - ('updated_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True, db_index=True)), - ('salutation', self.gf('django.db.models.fields.CharField')(max_length=50, blank=True)), - ('postal_code', self.gf('django.db.models.fields.CharField')(blank=True, max_length=16, db_index=True)), - ('processed_at', self.gf('django.db.models.fields.DateTimeField')(null=True, db_index=True)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('city', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)), - ('first_name', self.gf('django.db.models.fields.CharField')(max_length=30, db_index=True)), - ('middle_name', self.gf('django.db.models.fields.CharField')(max_length=30, blank=True)), - ('phone_country_code', self.gf('django.db.models.fields.CharField')(max_length=3, db_index=True)), - ('upload_status', self.gf('django.db.models.fields.CharField')(blank=True, max_length=20, db_index=True)), - ('state', self.gf('django.db.models.fields.CharField')(blank=True, max_length=20, db_index=True)), - ('upload_error_message', self.gf('django.db.models.fields.CharField')(max_length=512, blank=True)), - ('company_name', self.gf('django.db.models.fields.CharField')(blank=True, max_length=50, db_index=True)), - ('candidate_id', self.gf('django.db.models.fields.IntegerField')(null=True, db_index=True)), - ('fax', self.gf('django.db.models.fields.CharField')(max_length=35, blank=True)), - ('user_updated_at', self.gf('django.db.models.fields.DateTimeField')(db_index=True)), - ('phone', self.gf('django.db.models.fields.CharField')(max_length=35)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['auth.User'], unique=True)), - ('uploaded_at', self.gf('django.db.models.fields.DateTimeField')(blank=True, null=True, db_index=True)), - ('extension', self.gf('django.db.models.fields.CharField')(blank=True, max_length=8, db_index=True)), - ('fax_country_code', self.gf('django.db.models.fields.CharField')(max_length=3, blank=True)), - ('country', self.gf('django.db.models.fields.CharField')(max_length=3, db_index=True)), - ('client_candidate_id', self.gf('django.db.models.fields.CharField')(max_length=50, unique=True, db_index=True)), - ('address_1', self.gf('django.db.models.fields.CharField')(max_length=40)), - ('address_2', self.gf('django.db.models.fields.CharField')(max_length=40, blank=True)), - ('address_3', self.gf('django.db.models.fields.CharField')(max_length=40, blank=True)), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True, db_index=True)), - )) - db.send_create_signal('student', ['TestCenterUser']) - - # Adding model 'TestCenterRegistration' - db.create_table('student_testcenterregistration', ( - ('client_authorization_id', self.gf('django.db.models.fields.CharField')(max_length=20, unique=True, db_index=True)), - ('uploaded_at', self.gf('django.db.models.fields.DateTimeField')(null=True, db_index=True)), - ('user_updated_at', self.gf('django.db.models.fields.DateTimeField')(db_index=True)), - ('authorization_id', self.gf('django.db.models.fields.IntegerField')(null=True, db_index=True)), - ('upload_status', self.gf('django.db.models.fields.CharField')(blank=True, max_length=20, db_index=True)), - ('updated_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True, db_index=True)), - ('confirmed_at', self.gf('django.db.models.fields.DateTimeField')(null=True, db_index=True)), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True, db_index=True)), - ('accommodation_request', self.gf('django.db.models.fields.CharField')(max_length=1024, blank=True)), - ('eligibility_appointment_date_first', self.gf('django.db.models.fields.DateField')(db_index=True)), - ('exam_series_code', self.gf('django.db.models.fields.CharField')(max_length=15, db_index=True)), - ('processed_at', self.gf('django.db.models.fields.DateTimeField')(null=True, db_index=True)), - ('upload_error_message', self.gf('django.db.models.fields.CharField')(max_length=512, blank=True)), - ('accommodation_code', self.gf('django.db.models.fields.CharField')(max_length=64, blank=True)), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=128, db_index=True)), - ('testcenter_user', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['student.TestCenterUser'])), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('eligibility_appointment_date_last', self.gf('django.db.models.fields.DateField')(db_index=True)), - )) - db.send_create_signal('student', ['TestCenterRegistration']) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0030_auto__chg_field_anonymoususerid_anonymous_user_id.py b/common/djangoapps/student/migrations/0030_auto__chg_field_anonymoususerid_anonymous_user_id.py deleted file mode 100644 index f379ad6452cc..000000000000 --- a/common/djangoapps/student/migrations/0030_auto__chg_field_anonymoususerid_anonymous_user_id.py +++ /dev/null @@ -1,146 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'AnonymousUserId.anonymous_user_id' - db.alter_column('student_anonymoususerid', 'anonymous_user_id', self.gf('django.db.models.fields.CharField')(unique=True, max_length=32)) - - # THIS SQL WAS HAND-CODED - db.execute(""" - CREATE TABLE student_anonymoususerid_temp_archive - AS SELECT * FROM student_anonymoususerid WHERE LENGTH(anonymous_user_id) = 16 - """) - db.execute(""" - DELETE FROM student_anonymoususerid - WHERE LENGTH(anonymous_user_id) = 16 - """) - - def backwards(self, orm): - - # Changing field 'AnonymousUserId.anonymous_user_id' - db.alter_column('student_anonymoususerid', 'anonymous_user_id', self.gf('django.db.models.fields.CharField')(max_length=16, unique=True)) - - db.execute("DROP TABLE student_anonymoususerid_temp_archive") - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0031_drop_student_anonymoususerid_temp_archive.py b/common/djangoapps/student/migrations/0031_drop_student_anonymoususerid_temp_archive.py deleted file mode 100644 index bbf31664b9bd..000000000000 --- a/common/djangoapps/student/migrations/0031_drop_student_anonymoususerid_temp_archive.py +++ /dev/null @@ -1,132 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - -class Migration(DataMigration): - - def forwards(self, orm): - "Write your forwards methods here." - # Note: Remember to use orm['appname.ModelName'] rather than "from appname.models..." - db.execute("DROP TABLE student_anonymoususerid_temp_archive") - - def backwards(self, orm): - "Write your backwards methods here." - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] - symmetrical = True diff --git a/common/djangoapps/student/migrations/0032_add_field_UserProfile_country_add_field_UserProfile_city.py b/common/djangoapps/student/migrations/0032_add_field_UserProfile_country_add_field_UserProfile_city.py deleted file mode 100644 index a4d323e49833..000000000000 --- a/common/djangoapps/student/migrations/0032_add_field_UserProfile_country_add_field_UserProfile_city.py +++ /dev/null @@ -1,146 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'UserProfile.country' - db.add_column('auth_userprofile', 'country', - self.gf('django_countries.fields.CountryField')(max_length=2, null=True, blank=True), - keep_default=False) - - # Adding field 'UserProfile.city' - db.add_column('auth_userprofile', 'city', - self.gf('django.db.models.fields.TextField')(null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'UserProfile.country' - db.delete_column('auth_userprofile', 'country') - - # Deleting field 'UserProfile.city' - db.delete_column('auth_userprofile', 'city') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0032_auto__add_loginfailures.py b/common/djangoapps/student/migrations/0032_auto__add_loginfailures.py deleted file mode 100644 index 70919c419849..000000000000 --- a/common/djangoapps/student/migrations/0032_auto__add_loginfailures.py +++ /dev/null @@ -1,149 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'LoginFailures' - db.create_table('student_loginfailures', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('failure_count', self.gf('django.db.models.fields.IntegerField')(default=0)), - ('lockout_until', self.gf('django.db.models.fields.DateTimeField')(null=True)), - )) - db.send_create_signal('student', ['LoginFailures']) - - - def backwards(self, orm): - # Deleting model 'LoginFailures' - db.delete_table('student_loginfailures') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0033_auto__add_passwordhistory.py b/common/djangoapps/student/migrations/0033_auto__add_passwordhistory.py deleted file mode 100644 index c03a45f3f20d..000000000000 --- a/common/djangoapps/student/migrations/0033_auto__add_passwordhistory.py +++ /dev/null @@ -1,156 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'PasswordHistory' - db.create_table('student_passwordhistory', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('password', self.gf('django.db.models.fields.CharField')(max_length=128)), - ('time_set', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)), - )) - db.send_create_signal('student', ['PasswordHistory']) - - - def backwards(self, orm): - # Deleting model 'PasswordHistory' - db.delete_table('student_passwordhistory') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0034_auto__add_courseaccessrole.py b/common/djangoapps/student/migrations/0034_auto__add_courseaccessrole.py deleted file mode 100644 index bf9ce5e9db6f..000000000000 --- a/common/djangoapps/student/migrations/0034_auto__add_courseaccessrole.py +++ /dev/null @@ -1,189 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseAccessRole' - db.create_table('student_courseaccessrole', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('org', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=64, blank=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(db_index=True, max_length=255, blank=True)), - ('role', self.gf('django.db.models.fields.CharField')(max_length=64, db_index=True)), - )) - db.send_create_signal('student', ['CourseAccessRole']) - - # Adding unique constraint on 'CourseAccessRole', fields ['user', 'org', 'course_id', 'role'] - db.create_unique('student_courseaccessrole', ['user_id', 'org', 'course_id', 'role']) - - - # Changing field 'AnonymousUserId.course_id' - db.alter_column('student_anonymoususerid', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)) - - # Changing field 'CourseEnrollment.course_id' - db.alter_column('student_courseenrollment', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)) - - # Changing field 'CourseEnrollmentAllowed.course_id' - db.alter_column('student_courseenrollmentallowed', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)) - - def backwards(self, orm): - # Removing unique constraint on 'CourseAccessRole', fields ['user', 'org', 'course_id', 'role'] - db.delete_unique('student_courseaccessrole', ['user_id', 'org', 'course_id', 'role']) - - # Deleting model 'CourseAccessRole' - db.delete_table('student_courseaccessrole') - - - # Changing field 'AnonymousUserId.course_id' - db.alter_column('student_anonymoususerid', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255)) - - # Changing field 'CourseEnrollment.course_id' - db.alter_column('student_courseenrollment', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255)) - - # Changing field 'CourseEnrollmentAllowed.course_id' - db.alter_column('student_courseenrollmentallowed', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0035_access_roles.py b/common/djangoapps/student/migrations/0035_access_roles.py deleted file mode 100644 index bf7bec2dc6c9..000000000000 --- a/common/djangoapps/student/migrations/0035_access_roles.py +++ /dev/null @@ -1,312 +0,0 @@ -# -*- coding: utf-8 -*- -from south.v2 import DataMigration -import re -from opaque_keys.edx.locations import SlashSeparatedCourseKey -from opaque_keys import InvalidKeyError -import bson.son -import logging -from django.db.models.query_utils import Q -from django.db.utils import IntegrityError -from xmodule.modulestore import ModuleStoreEnum -from xmodule.modulestore.django import modulestore -from xmodule.modulestore.mixed import MixedModuleStore -import itertools - -log = logging.getLogger(__name__) - - -class Migration(DataMigration): - """ - Converts course_creator, instructor_, staff_, and betatestuser_ to new table - """ - - # Because we instantiate the module store and the modulestore needs this config table to exist. - depends_on = ( - ("xblock_django", "0001_initial"), - ) - - GROUP_ENTRY_RE = re.compile(r'(?Pstaff|instructor|beta_testers|course_creator_group)_?(?P.*)') - - def forwards(self, orm): - """ - Converts group table entries for write access and beta_test roles to course access roles table. - """ - store = modulestore() - if isinstance(store, MixedModuleStore): - self.mongostore = modulestore()._get_modulestore_by_type(ModuleStoreEnum.Type.mongo) - self.xmlstore = modulestore()._get_modulestore_by_type(ModuleStoreEnum.Type.xml) - elif store.get_modulestore_type() == ModuleStoreEnum.Type.mongo: - self.mongostore = store - self.xmlstore = None - elif store.get_modulestore_type() == ModuleStoreEnum.Type.xml: - self.mongostore = None - self.xmlstore = store - else: - return - - # Note: Remember to use orm['appname.ModelName'] rather than "from appname.models..." - # b/c the Groups table had several entries for each course, we need to ensure we process each unique - # course only once. The below datastructures help ensure that. - hold = {} # key of course_id_strings with array of group objects. Should only be org scoped entries - # or deleted courses - orgs = {} # downcased org to last recorded normal case of the org - query = Q(name='course_creator_group') - for role in ['staff', 'instructor', 'beta_testers', ]: - query = query | Q(name__startswith=role) - for group in orm['auth.Group'].objects.filter(query).all(): - def _migrate_users(correct_course_key, role, lower_org): - """ - Get all the users from the old group and migrate to this course key in the new table - """ - for user in orm['auth.user'].objects.filter(groups=group).all(): - entry = orm['student.courseaccessrole']( - role=role, user=user, - org=correct_course_key.org, course_id=correct_course_key - ) - try: - entry.save() - except IntegrityError: - # already stored - pass - orgs[lower_org] = correct_course_key.org - - parsed_entry = self.GROUP_ENTRY_RE.match(group.name) - role = parsed_entry.group('role_id') - if role == 'course_creator_group': - for user in orm['auth.user'].objects.filter(groups=group).all(): - entry = orm['student.courseaccessrole'](role=role, user=user) - entry.save() - else: - course_id_string = parsed_entry.group('course_id_string') - try: - course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id_string) - # course_key is the downcased version, get the normal cased one. loc_mapper() has no - # methods taking downcased SSCK; so, need to do it manually here - correct_course_key = self._map_downcased_ssck(course_key) - if correct_course_key is not None: - _migrate_users(correct_course_key, role, course_key.org) - except InvalidKeyError: - # old dotted format, try permutations - parts = course_id_string.split('.') - if len(parts) < 3: - hold.setdefault(course_id_string, []).append(group) - elif len(parts) == 3: - course_key = SlashSeparatedCourseKey(*parts) - correct_course_key = self._map_downcased_ssck(course_key) - if correct_course_key is None: - hold.setdefault(course_id_string, []).append(group) - else: - _migrate_users(correct_course_key, role, course_key.org) - else: - correct_course_key = self.divide_parts_find_key(parts) - if correct_course_key is None: - hold.setdefault(course_id_string, []).append(group) - else: - _migrate_users(correct_course_key, role, correct_course_key.org) - - # see if any in hold were missed above - for held_auth_scope, groups in hold.iteritems(): - # orgs indexed by downcased org - held_auth_scope = held_auth_scope.lower() - if held_auth_scope in orgs: - for group in groups: - role = self.GROUP_ENTRY_RE.match(group.name).group('role_id') - # they have org permission - for user in orm['auth.user'].objects.filter(groups=group).all(): - entry = orm['student.courseaccessrole']( - role=role, - user=user, - org=orgs[held_auth_scope], - ) - entry.save() - else: - # don't silently skip unexpected roles - log.warn("Didn't convert roles %s", [group.name for group in groups]) - - def divide_parts_find_key(self, parts): - """ - Look for all possible org/course/run patterns from a possibly dotted source - """ - for org_stop, course_stop in itertools.combinations(range(1, len(parts)), 2): - org = '.'.join(parts[:org_stop]) - course = '.'.join(parts[org_stop:course_stop]) - run = '.'.join(parts[course_stop:]) - course_key = SlashSeparatedCourseKey(org, course, run) - correct_course_key = self._map_downcased_ssck(course_key) - if correct_course_key is not None: - return correct_course_key - return None - - def backwards(self, orm): - "Removes the new table." - # Since this migration is non-destructive (monotonically adds information), I'm not sure what - # the semantic of backwards should be other than perhaps clearing the table. - orm['student.courseaccessrole'].objects.all().delete() - - def _map_downcased_ssck(self, downcased_ssck): - """ - Get the normal cased version of this downcased slash sep course key - """ - if self.mongostore is not None: - course_son = bson.son.SON([ - ('_id.tag', 'i4x'), - ('_id.org', re.compile(ur'^{}$'.format(downcased_ssck.org), re.IGNORECASE | re.UNICODE)), - ('_id.course', re.compile(ur'^{}$'.format(downcased_ssck.course), re.IGNORECASE | re.UNICODE)), - ('_id.category', 'course'), - ('_id.name', re.compile(ur'^{}$'.format(downcased_ssck.run), re.IGNORECASE | re.UNICODE)), - ]) - entry = self.mongostore.collection.find_one(course_son) - if entry: - idpart = entry['_id'] - return SlashSeparatedCourseKey(idpart['org'], idpart['course'], idpart['name']) - if self.xmlstore is not None: - for course in self.xmlstore.get_courses(): - if ( - course.id.org.lower() == downcased_ssck.org and course.id.course.lower() == downcased_ssck.course - and course.id.run.lower() == downcased_ssck.run - ): - return course.id - return None - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - - complete_apps = ['student'] - symmetrical = True diff --git a/common/djangoapps/student/migrations/0036_access_roles_orgless.py b/common/djangoapps/student/migrations/0036_access_roles_orgless.py deleted file mode 100644 index f3af6b461380..000000000000 --- a/common/djangoapps/student/migrations/0036_access_roles_orgless.py +++ /dev/null @@ -1,278 +0,0 @@ -# -*- coding: utf-8 -*- -from south.v2 import DataMigration -from xmodule.modulestore.django import modulestore -import re -from opaque_keys.edx.locations import SlashSeparatedCourseKey -import logging -from django.db.models.query_utils import Q -from django.db.utils import IntegrityError -from xmodule.modulestore import ModuleStoreEnum -import bson.son -from xmodule.modulestore.mixed import MixedModuleStore -import itertools - -log = logging.getLogger(__name__) - - -class Migration(DataMigration): - """ - Converts course_creator, instructor_, staff_, and betatestuser_ to new table - """ - - GROUP_ENTRY_RE = re.compile(r'(?Pstaff|instructor|beta_testers)_(?P\S*)') - - def forwards(self, orm): - """ - Converts group table entries for write access and beta_test roles to course access roles table. - """ - store = modulestore() - if isinstance(store, MixedModuleStore): - self.mongostore = modulestore()._get_modulestore_by_type(ModuleStoreEnum.Type.mongo) - self.xmlstore = modulestore()._get_modulestore_by_type(ModuleStoreEnum.Type.xml) - elif store.get_modulestore_type() == ModuleStoreEnum.Type.mongo: - self.mongostore = store - self.xmlstore = None - elif store.get_modulestore_type() == ModuleStoreEnum.Type.xml: - self.mongostore = None - self.xmlstore = store - else: - return - - query = Q(name__startswith='staff') | Q(name__startswith='instructor') | Q(name__startswith='beta_testers') - for group in orm['auth.Group'].objects.filter(query).exclude(name__contains="/").all(): - def _migrate_users(correct_course_key, role): - """ - Get all the users from the old group and migrate to this course key in the new table - """ - log.info( - u'Giving %s users access to %s', - group.name, correct_course_key - ) - for user in orm['auth.user'].objects.filter(groups=group).all(): - entry = orm['student.courseaccessrole']( - role=role, - user=user, - org=correct_course_key.org, - course_id=correct_course_key, - ) - try: - entry.save() - except IntegrityError: - pass - - parsed_entry = self.GROUP_ENTRY_RE.search(group.name) - if parsed_entry is None: - log.warn('Ignoring an unexpected unparsable entry %s', group.name) - continue - role = parsed_entry.group('role_id') - course_id_string = parsed_entry.group('course_id_string') - # if it's a full course_id w/ dots, ignore it - if u'/' not in course_id_string and not self.dotted_course(course_id_string): - # check new table to see if it's been added as org permission - if not orm['student.courseaccessrole'].objects.filter( - role=role, - org__iexact=course_id_string, - ).exists(): - # old auth was of form role_coursenum. Grant access to all such courses wildcarding org and run - # look in xml for matching courses - if self.xmlstore is not None: - for course in self.xmlstore.get_courses(): - if course_id_string == course.id.course.lower(): - _migrate_users(course.id, role) - - if self.mongostore is not None: - mongo_query = re.compile(ur'^{}$'.format(course_id_string), re.IGNORECASE) - for mongo_entry in self.mongostore.collection.find( - {"_id.category": "course", "_id.course": mongo_query}, fields=["_id"] - ): - mongo_id_dict = mongo_entry['_id'] - course_key = SlashSeparatedCourseKey( - mongo_id_dict['org'], mongo_id_dict['course'], mongo_id_dict['name'] - ) - _migrate_users(course_key, role) - - def dotted_course(self, parts): - """ - Look for all possible org/course/run patterns from a possibly dotted source - """ - for org_stop, course_stop in itertools.combinations(range(1, len(parts)), 2): - org = '.'.join(parts[:org_stop]) - course = '.'.join(parts[org_stop:course_stop]) - run = '.'.join(parts[course_stop:]) - course_key = SlashSeparatedCourseKey(org, course, run) - correct_course_key = self._map_downcased_ssck(course_key) - if correct_course_key is not None: - return correct_course_key - return False - - def _map_downcased_ssck(self, downcased_ssck): - """ - Get the normal cased version of this downcased slash sep course key - """ - if self.mongostore is not None: - course_son = bson.son.SON([ - ('_id.tag', 'i4x'), - ('_id.org', re.compile(ur'^{}$'.format(downcased_ssck.org), re.IGNORECASE | re.UNICODE)), - ('_id.course', re.compile(ur'^{}$'.format(downcased_ssck.course), re.IGNORECASE | re.UNICODE)), - ('_id.category', 'course'), - ('_id.name', re.compile(ur'^{}$'.format(downcased_ssck.run), re.IGNORECASE | re.UNICODE)), - ]) - entry = self.mongostore.collection.find_one(course_son) - if entry: - idpart = entry['_id'] - return SlashSeparatedCourseKey(idpart['org'], idpart['course'], idpart['name']) - if self.xmlstore is not None: - for course in self.xmlstore.get_courses(): - if ( - course.id.org.lower() == downcased_ssck.org and course.id.course.lower() == downcased_ssck.course - and course.id.run.lower() == downcased_ssck.run - ): - return course.id - return None - - def backwards(self, orm): - "No obvious way to reverse just this migration, but reversing 0035 will reverse this." - pass - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - - complete_apps = ['student'] - symmetrical = True diff --git a/common/djangoapps/student/migrations/0037_auto__add_courseregistrationcode.py b/common/djangoapps/student/migrations/0037_auto__add_courseregistrationcode.py deleted file mode 100644 index c60425df8afb..000000000000 --- a/common/djangoapps/student/migrations/0037_auto__add_courseregistrationcode.py +++ /dev/null @@ -1,179 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseRegistrationCode' - db.create_table('student_courseregistrationcode', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('code', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('transaction_group_name', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=255, null=True, blank=True)), - ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='created_by_user', to=orm['auth.User'])), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 6, 24, 0, 0))), - ('redeemed_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='redeemed_by_user', null=True, to=orm['auth.User'])), - ('redeemed_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 6, 24, 0, 0), null=True)), - )) - db.send_create_signal('student', ['CourseRegistrationCode']) - - - def backwards(self, orm): - # Deleting model 'CourseRegistrationCode' - db.delete_table('student_courseregistrationcode') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 6, 24, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 6, 24, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'redeemed_by_user'", 'null': 'True', 'to': "orm['auth.User']"}), - 'transaction_group_name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0038_auto__add_usersignupsource.py b/common/djangoapps/student/migrations/0038_auto__add_usersignupsource.py deleted file mode 100644 index faa725b7949a..000000000000 --- a/common/djangoapps/student/migrations/0038_auto__add_usersignupsource.py +++ /dev/null @@ -1,180 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'UserSignupSource' - db.create_table('student_usersignupsource', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('site', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - )) - db.send_create_signal('student', ['UserSignupSource']) - - - def backwards(self, orm): - # Deleting model 'UserSignupSource' - db.delete_table('student_usersignupsource') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 6, 25, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 6, 25, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'redeemed_by_user'", 'null': 'True', 'to': "orm['auth.User']"}), - 'transaction_group_name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user_id': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0039_auto__del_courseregistrationcode.py b/common/djangoapps/student/migrations/0039_auto__del_courseregistrationcode.py deleted file mode 100644 index 441b52ea2c12..000000000000 --- a/common/djangoapps/student/migrations/0039_auto__del_courseregistrationcode.py +++ /dev/null @@ -1,174 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'CourseRegistrationCode' - db.delete_table('student_courseregistrationcode') - - - def backwards(self, orm): - # Adding model 'CourseRegistrationCode' - db.create_table('student_courseregistrationcode', ( - ('code', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)), - ('transaction_group_name', self.gf('django.db.models.fields.CharField')(blank=True, max_length=255, null=True, db_index=True)), - ('redeemed_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='redeemed_by_user', null=True, to=orm['auth.User'])), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('redeemed_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 6, 25, 0, 0), null=True)), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 6, 25, 0, 0))), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='created_by_user', to=orm['auth.User'])), - )) - db.send_create_signal('student', ['CourseRegistrationCode']) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user_id': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0040_auto__del_field_usersignupsource_user_id__add_field_usersignupsource_u.py b/common/djangoapps/student/migrations/0040_auto__del_field_usersignupsource_user_id__add_field_usersignupsource_u.py deleted file mode 100644 index cabacf8de767..000000000000 --- a/common/djangoapps/student/migrations/0040_auto__del_field_usersignupsource_user_id__add_field_usersignupsource_u.py +++ /dev/null @@ -1,172 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'UserSignupSource.user_id' - db.delete_column('student_usersignupsource', 'user_id_id') - - # Adding field 'UserSignupSource.user' - db.add_column('student_usersignupsource', 'user', - self.gf('django.db.models.fields.related.ForeignKey')(default=0, to=orm['auth.User']), - keep_default=False) - - - def backwards(self, orm): - - # User chose to not deal with backwards NULL issues for 'UserSignupSource.user_id' - raise RuntimeError("Cannot reverse this migration. 'UserSignupSource.user_id' and its values cannot be restored.") - # Deleting field 'UserSignupSource.user' - db.delete_column('student_usersignupsource', 'user_id') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0041_add_dashboard_config.py b/common/djangoapps/student/migrations/0041_add_dashboard_config.py deleted file mode 100644 index dbf6da578c2a..000000000000 --- a/common/djangoapps/student/migrations/0041_add_dashboard_config.py +++ /dev/null @@ -1,177 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'DashboardConfiguration' - db.create_table('student_dashboardconfiguration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('recent_enrollment_time_delta', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)), - )) - db.send_create_signal('student', ['DashboardConfiguration']) - - def backwards(self, orm): - # Deleting model 'DashboardConfiguration' - db.delete_table('student_dashboardconfiguration') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.dashboardconfiguration': { - 'Meta': {'object_name': 'DashboardConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'recent_enrollment_time_delta': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0042_grant_sales_admin_roles.py b/common/djangoapps/student/migrations/0042_grant_sales_admin_roles.py deleted file mode 100644 index ccbb58f7fcca..000000000000 --- a/common/djangoapps/student/migrations/0042_grant_sales_admin_roles.py +++ /dev/null @@ -1,184 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models, IntegrityError - - -class Migration(DataMigration): - - def forwards(self, orm): - """Map all Finance Admins to Sales Admins.""" - finance_admins = orm['student.courseaccessrole'].objects.filter(role='finance_admin') - - for finance_admin in finance_admins: - sales_admin = orm['student.courseaccessrole']( - role='sales_admin', - user=finance_admin.user, - org=finance_admin.org, - course_id=finance_admin.course_id, - ) - try: - sales_admin.save() - except IntegrityError: - pass # If sales admin roles exist, continue. - - def backwards(self, orm): - """Remove all sales administrators, as they did not exist before this migration. """ - sales_admins = orm['student.courseaccessrole'].objects.filter(role='sales_admin') - sales_admins.delete() - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.dashboardconfiguration': { - 'Meta': {'object_name': 'DashboardConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'recent_enrollment_time_delta': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] - symmetrical = True diff --git a/common/djangoapps/student/migrations/0043_auto__add_linkedinaddtoprofileconfiguration.py b/common/djangoapps/student/migrations/0043_auto__add_linkedinaddtoprofileconfiguration.py deleted file mode 100644 index 41ec46effd48..000000000000 --- a/common/djangoapps/student/migrations/0043_auto__add_linkedinaddtoprofileconfiguration.py +++ /dev/null @@ -1,187 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'LinkedInAddToProfileConfiguration' - db.create_table('student_linkedinaddtoprofileconfiguration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('dashboard_tracking_code', self.gf('django.db.models.fields.TextField')(blank=True)), - )) - db.send_create_signal('student', ['LinkedInAddToProfileConfiguration']) - - - def backwards(self, orm): - # Deleting model 'LinkedInAddToProfileConfiguration' - db.delete_table('student_linkedinaddtoprofileconfiguration') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.dashboardconfiguration': { - 'Meta': {'object_name': 'DashboardConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'recent_enrollment_time_delta': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'student.linkedinaddtoprofileconfiguration': { - 'Meta': {'object_name': 'LinkedInAddToProfileConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'dashboard_tracking_code': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] \ No newline at end of file diff --git a/common/djangoapps/student/migrations/0044_linkedin_add_company_identifier.py b/common/djangoapps/student/migrations/0044_linkedin_add_company_identifier.py deleted file mode 100644 index 0f6b749591d3..000000000000 --- a/common/djangoapps/student/migrations/0044_linkedin_add_company_identifier.py +++ /dev/null @@ -1,183 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'LinkedInAddToProfileConfiguration.company_identifier' - db.add_column('student_linkedinaddtoprofileconfiguration', 'company_identifier', - self.gf('django.db.models.fields.TextField')(default=''), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'LinkedInAddToProfileConfiguration.company_identifier' - db.delete_column('student_linkedinaddtoprofileconfiguration', 'company_identifier') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.dashboardconfiguration': { - 'Meta': {'object_name': 'DashboardConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'recent_enrollment_time_delta': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'student.linkedinaddtoprofileconfiguration': { - 'Meta': {'object_name': 'LinkedInAddToProfileConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'company_identifier': ('django.db.models.fields.TextField', [], {}), - 'dashboard_tracking_code': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] \ No newline at end of file diff --git a/common/djangoapps/student/migrations/0045_add_trk_partner_to_linkedin_config.py b/common/djangoapps/student/migrations/0045_add_trk_partner_to_linkedin_config.py deleted file mode 100644 index 87128512d42d..000000000000 --- a/common/djangoapps/student/migrations/0045_add_trk_partner_to_linkedin_config.py +++ /dev/null @@ -1,184 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'LinkedInAddToProfileConfiguration.trk_partner_name' - db.add_column('student_linkedinaddtoprofileconfiguration', 'trk_partner_name', - self.gf('django.db.models.fields.CharField')(default='', max_length=10, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'LinkedInAddToProfileConfiguration.trk_partner_name' - db.delete_column('student_linkedinaddtoprofileconfiguration', 'trk_partner_name') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.dashboardconfiguration': { - 'Meta': {'object_name': 'DashboardConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'recent_enrollment_time_delta': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'student.linkedinaddtoprofileconfiguration': { - 'Meta': {'object_name': 'LinkedInAddToProfileConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'company_identifier': ('django.db.models.fields.TextField', [], {}), - 'dashboard_tracking_code': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'trk_partner_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0046_auto__add_entranceexamconfiguration__add_unique_entranceexamconfigurat.py b/common/djangoapps/student/migrations/0046_auto__add_entranceexamconfiguration__add_unique_entranceexamconfigurat.py deleted file mode 100644 index a0373d043eef..000000000000 --- a/common/djangoapps/student/migrations/0046_auto__add_entranceexamconfiguration__add_unique_entranceexamconfigurat.py +++ /dev/null @@ -1,205 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'EntranceExamConfiguration' - db.create_table('student_entranceexamconfiguration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True, db_index=True, blank=True)), - ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, db_index=True, blank=True)), - ('skip_entrance_exam', self.gf('django.db.models.fields.BooleanField')(default=True)), - )) - db.send_create_signal('student', ['EntranceExamConfiguration']) - - # Adding unique constraint on 'EntranceExamConfiguration', fields ['user', 'course_id'] - db.create_unique('student_entranceexamconfiguration', ['user_id', 'course_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'EntranceExamConfiguration', fields ['user', 'course_id'] - db.delete_unique('student_entranceexamconfiguration', ['user_id', 'course_id']) - - # Deleting model 'EntranceExamConfiguration' - db.delete_table('student_entranceexamconfiguration') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.dashboardconfiguration': { - 'Meta': {'object_name': 'DashboardConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'recent_enrollment_time_delta': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'student.entranceexamconfiguration': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'EntranceExamConfiguration'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'skip_entrance_exam': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.linkedinaddtoprofileconfiguration': { - 'Meta': {'object_name': 'LinkedInAddToProfileConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'company_identifier': ('django.db.models.fields.TextField', [], {}), - 'dashboard_tracking_code': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'trk_partner_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] \ No newline at end of file diff --git a/common/djangoapps/student/migrations/0047_add_bio_field.py b/common/djangoapps/student/migrations/0047_add_bio_field.py deleted file mode 100644 index 33f42d2e6573..000000000000 --- a/common/djangoapps/student/migrations/0047_add_bio_field.py +++ /dev/null @@ -1,194 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'UserProfile.bio' - db.add_column('auth_userprofile', 'bio', - self.gf('django.db.models.fields.CharField')(max_length=3000, null=True, blank=True, db_index=False), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'UserProfile.bio' - db.delete_column('auth_userprofile', 'bio') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.dashboardconfiguration': { - 'Meta': {'object_name': 'DashboardConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'recent_enrollment_time_delta': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'student.entranceexamconfiguration': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'EntranceExamConfiguration'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'skip_entrance_exam': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.linkedinaddtoprofileconfiguration': { - 'Meta': {'object_name': 'LinkedInAddToProfileConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'company_identifier': ('django.db.models.fields.TextField', [], {}), - 'dashboard_tracking_code': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'trk_partner_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'bio': ('django.db.models.fields.CharField', [], {'db_index': 'False', 'null': 'True', 'blank': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] \ No newline at end of file diff --git a/common/djangoapps/student/migrations/0048_add_profile_image_version.py b/common/djangoapps/student/migrations/0048_add_profile_image_version.py deleted file mode 100644 index 80e14e2f72c9..000000000000 --- a/common/djangoapps/student/migrations/0048_add_profile_image_version.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'UserProfile.profile_image_uploaded_at' - db.add_column('auth_userprofile', 'profile_image_uploaded_at', - self.gf('django.db.models.fields.DateTimeField')(null=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'UserProfile.profile_image_uploaded_at' - db.delete_column('auth_userprofile', 'profile_image_uploaded_at') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.dashboardconfiguration': { - 'Meta': {'object_name': 'DashboardConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'recent_enrollment_time_delta': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'student.entranceexamconfiguration': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'EntranceExamConfiguration'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'skip_entrance_exam': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.linkedinaddtoprofileconfiguration': { - 'Meta': {'object_name': 'LinkedInAddToProfileConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'company_identifier': ('django.db.models.fields.TextField', [], {}), - 'dashboard_tracking_code': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'trk_partner_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'bio': ('django.db.models.fields.CharField', [], {'max_length': '3000', 'db_index': 'False', 'null': 'True', 'blank': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'has_profile_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0049_auto__add_languageproficiency__add_unique_languageproficiency_code_use.py b/common/djangoapps/student/migrations/0049_auto__add_languageproficiency__add_unique_languageproficiency_code_use.py deleted file mode 100644 index 252e3f03c495..000000000000 --- a/common/djangoapps/student/migrations/0049_auto__add_languageproficiency__add_unique_languageproficiency_code_use.py +++ /dev/null @@ -1,210 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'LanguageProficiency' - db.create_table('student_languageproficiency', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user_profile', self.gf('django.db.models.fields.related.ForeignKey')(related_name='language_proficiencies', to=orm['student.UserProfile'])), - ('code', self.gf('django.db.models.fields.CharField')(max_length=16)), - )) - db.send_create_signal('student', ['LanguageProficiency']) - - # Adding unique constraint on 'LanguageProficiency', fields ['code', 'user_profile'] - db.create_unique('student_languageproficiency', ['code', 'user_profile_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'LanguageProficiency', fields ['code', 'user_profile'] - db.delete_unique('student_languageproficiency', ['code', 'user_profile_id']) - - # Deleting model 'LanguageProficiency' - db.delete_table('student_languageproficiency') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.dashboardconfiguration': { - 'Meta': {'object_name': 'DashboardConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'recent_enrollment_time_delta': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'student.entranceexamconfiguration': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'EntranceExamConfiguration'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'skip_entrance_exam': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.languageproficiency': { - 'Meta': {'unique_together': "(('code', 'user_profile'),)", 'object_name': 'LanguageProficiency'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '16'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user_profile': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'language_proficiencies'", 'to': "orm['student.UserProfile']"}) - }, - 'student.linkedinaddtoprofileconfiguration': { - 'Meta': {'object_name': 'LinkedInAddToProfileConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'company_identifier': ('django.db.models.fields.TextField', [], {}), - 'dashboard_tracking_code': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'trk_partner_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'bio': ('django.db.models.fields.CharField', [], {'max_length': '3000', 'db_index': 'False', 'null': 'True', 'blank': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'profile_image_uploaded_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] \ No newline at end of file diff --git a/common/djangoapps/student/migrations/0050_auto__add_manualenrollmentaudit.py b/common/djangoapps/student/migrations/0050_auto__add_manualenrollmentaudit.py deleted file mode 100644 index 90c3025d5eaa..000000000000 --- a/common/djangoapps/student/migrations/0050_auto__add_manualenrollmentaudit.py +++ /dev/null @@ -1,216 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'ManualEnrollmentAudit' - db.create_table('student_manualenrollmentaudit', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('enrollment', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['student.CourseEnrollment'], null=True)), - ('enrolled_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)), - ('enrolled_email', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('time_stamp', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True, blank=True)), - ('state_transition', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('reason', self.gf('django.db.models.fields.TextField')(null=True)), - )) - db.send_create_signal('student', ['ManualEnrollmentAudit']) - - def backwards(self, orm): - # Deleting model 'ManualEnrollmentAudit' - db.delete_table('student_manualenrollmentaudit') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.dashboardconfiguration': { - 'Meta': {'object_name': 'DashboardConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'recent_enrollment_time_delta': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'student.entranceexamconfiguration': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'EntranceExamConfiguration'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'skip_entrance_exam': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.languageproficiency': { - 'Meta': {'unique_together': "(('code', 'user_profile'),)", 'object_name': 'LanguageProficiency'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '16'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user_profile': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'language_proficiencies'", 'to': "orm['student.UserProfile']"}) - }, - 'student.linkedinaddtoprofileconfiguration': { - 'Meta': {'object_name': 'LinkedInAddToProfileConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'company_identifier': ('django.db.models.fields.TextField', [], {}), - 'dashboard_tracking_code': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'trk_partner_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.manualenrollmentaudit': { - 'Meta': {'object_name': 'ManualEnrollmentAudit'}, - 'enrolled_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'enrolled_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'reason': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'state_transition': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'time_stamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'bio': ('django.db.models.fields.CharField', [], {'max_length': '3000', 'null': 'True', 'blank': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'profile_image_uploaded_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0051_auto__add_courseenrollmentattribute.py b/common/djangoapps/student/migrations/0051_auto__add_courseenrollmentattribute.py deleted file mode 100644 index 66c218382cee..000000000000 --- a/common/djangoapps/student/migrations/0051_auto__add_courseenrollmentattribute.py +++ /dev/null @@ -1,224 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseEnrollmentAttribute' - db.create_table('student_courseenrollmentattribute', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('enrollment', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['student.CourseEnrollment'])), - ('namespace', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('value', self.gf('django.db.models.fields.CharField')(max_length=255)), - )) - db.send_create_signal('student', ['CourseEnrollmentAttribute']) - - - def backwards(self, orm): - # Deleting model 'CourseEnrollmentAttribute' - db.delete_table('student_courseenrollmentattribute') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.courseenrollmentattribute': { - 'Meta': {'object_name': 'CourseEnrollmentAttribute'}, - 'enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'value': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'student.dashboardconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'DashboardConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'recent_enrollment_time_delta': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'student.entranceexamconfiguration': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'EntranceExamConfiguration'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'skip_entrance_exam': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.languageproficiency': { - 'Meta': {'unique_together': "(('code', 'user_profile'),)", 'object_name': 'LanguageProficiency'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '16'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user_profile': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'language_proficiencies'", 'to': "orm['student.UserProfile']"}) - }, - 'student.linkedinaddtoprofileconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'LinkedInAddToProfileConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'company_identifier': ('django.db.models.fields.TextField', [], {}), - 'dashboard_tracking_code': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'trk_partner_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.manualenrollmentaudit': { - 'Meta': {'object_name': 'ManualEnrollmentAudit'}, - 'enrolled_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'enrolled_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'reason': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'state_transition': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'time_stamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'bio': ('django.db.models.fields.CharField', [], {'max_length': '3000', 'null': 'True', 'blank': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'profile_image_uploaded_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] \ No newline at end of file diff --git a/common/djangoapps/student/migrations/0052_auto__add_historicalcourseenrollment.py b/common/djangoapps/student/migrations/0052_auto__add_historicalcourseenrollment.py deleted file mode 100644 index 123050c5f409..000000000000 --- a/common/djangoapps/student/migrations/0052_auto__add_historicalcourseenrollment.py +++ /dev/null @@ -1,242 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'HistoricalCourseEnrollment' - db.create_table('student_historicalcourseenrollment', ( - ('id', self.gf('django.db.models.fields.IntegerField')(db_index=True, blank=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('created', self.gf('django.db.models.fields.DateTimeField')(db_index=True, null=True, blank=True)), - ('is_active', self.gf('django.db.models.fields.BooleanField')(default=True)), - ('mode', self.gf('django.db.models.fields.CharField')(default='honor', max_length=100)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name=u'+', null=True, on_delete=models.DO_NOTHING, to=orm['auth.User'])), - (u'history_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - (u'history_date', self.gf('django.db.models.fields.DateTimeField')()), - (u'history_user', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'+', null=True, on_delete=models.SET_NULL, to=orm['auth.User'])), - (u'history_type', self.gf('django.db.models.fields.CharField')(max_length=1)), - )) - db.send_create_signal('student', ['HistoricalCourseEnrollment']) - - - def backwards(self, orm): - # Deleting model 'HistoricalCourseEnrollment' - db.delete_table('student_historicalcourseenrollment') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.courseenrollmentattribute': { - 'Meta': {'object_name': 'CourseEnrollmentAttribute'}, - 'enrollment': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attributes'", 'to': "orm['student.CourseEnrollment']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'value': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'student.dashboardconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'DashboardConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'recent_enrollment_time_delta': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'student.entranceexamconfiguration': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'EntranceExamConfiguration'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'skip_entrance_exam': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.historicalcourseenrollment': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['auth.User']"}) - }, - 'student.languageproficiency': { - 'Meta': {'unique_together': "(('code', 'user_profile'),)", 'object_name': 'LanguageProficiency'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '16'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user_profile': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'language_proficiencies'", 'to': "orm['student.UserProfile']"}) - }, - 'student.linkedinaddtoprofileconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'LinkedInAddToProfileConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'company_identifier': ('django.db.models.fields.TextField', [], {}), - 'dashboard_tracking_code': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'trk_partner_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.manualenrollmentaudit': { - 'Meta': {'object_name': 'ManualEnrollmentAudit'}, - 'enrolled_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'enrolled_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'reason': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'state_transition': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'time_stamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'bio': ('django.db.models.fields.CharField', [], {'max_length': '3000', 'null': 'True', 'blank': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'profile_image_uploaded_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] \ No newline at end of file diff --git a/common/djangoapps/student/migrations/0053_auto__add_enrollmentrefundconfiguration.py b/common/djangoapps/student/migrations/0053_auto__add_enrollmentrefundconfiguration.py deleted file mode 100644 index 6311bca541c7..000000000000 --- a/common/djangoapps/student/migrations/0053_auto__add_enrollmentrefundconfiguration.py +++ /dev/null @@ -1,245 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'EnrollmentRefundConfiguration' - db.create_table('student_enrollmentrefundconfiguration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('refund_window_microseconds', self.gf('django.db.models.fields.BigIntegerField')(default=1209600000000)), - )) - db.send_create_signal('student', ['EnrollmentRefundConfiguration']) - - - def backwards(self, orm): - # Deleting model 'EnrollmentRefundConfiguration' - db.delete_table('student_enrollmentrefundconfiguration') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'student.anonymoususerid': { - 'Meta': {'object_name': 'AnonymousUserId'}, - 'anonymous_user_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseaccessrole': { - 'Meta': {'unique_together': "(('user', 'org', 'course_id', 'role'),)", 'object_name': 'CourseAccessRole'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'blank': 'True'}), - 'role': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.courseenrollmentallowed': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'CourseEnrollmentAllowed'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.courseenrollmentattribute': { - 'Meta': {'object_name': 'CourseEnrollmentAttribute'}, - 'enrollment': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attributes'", 'to': "orm['student.CourseEnrollment']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'value': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'student.dashboardconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'DashboardConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'recent_enrollment_time_delta': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'student.enrollmentrefundconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'EnrollmentRefundConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'refund_window_microseconds': ('django.db.models.fields.BigIntegerField', [], {'default': '1209600000000'}) - }, - 'student.entranceexamconfiguration': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'EntranceExamConfiguration'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'skip_entrance_exam': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.historicalcourseenrollment': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['auth.User']"}) - }, - 'student.languageproficiency': { - 'Meta': {'unique_together': "(('code', 'user_profile'),)", 'object_name': 'LanguageProficiency'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '16'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user_profile': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'language_proficiencies'", 'to': "orm['student.UserProfile']"}) - }, - 'student.linkedinaddtoprofileconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'LinkedInAddToProfileConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'company_identifier': ('django.db.models.fields.TextField', [], {}), - 'dashboard_tracking_code': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'trk_partner_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}) - }, - 'student.loginfailures': { - 'Meta': {'object_name': 'LoginFailures'}, - 'failure_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lockout_until': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.manualenrollmentaudit': { - 'Meta': {'object_name': 'ManualEnrollmentAudit'}, - 'enrolled_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), - 'enrolled_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'reason': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'state_transition': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'time_stamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.passwordhistory': { - 'Meta': {'object_name': 'PasswordHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'time_set': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.pendingemailchange': { - 'Meta': {'object_name': 'PendingEmailChange'}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_email': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.pendingnamechange': { - 'Meta': {'object_name': 'PendingNameChange'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'new_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'rationale': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.registration': { - 'Meta': {'object_name': 'Registration', 'db_table': "'auth_registration'"}, - 'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}) - }, - 'student.userprofile': { - 'Meta': {'object_name': 'UserProfile', 'db_table': "'auth_userprofile'"}, - 'allow_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'bio': ('django.db.models.fields.CharField', [], {'max_length': '3000', 'null': 'True', 'blank': 'True'}), - 'city': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), - 'courseware': ('django.db.models.fields.CharField', [], {'default': "'course.xml'", 'max_length': '255', 'blank': 'True'}), - 'gender': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'goals': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'level_of_education': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '6', 'null': 'True', 'blank': 'True'}), - 'location': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'mailing_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'meta': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'profile_image_uploaded_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'profile'", 'unique': 'True', 'to': "orm['auth.User']"}), - 'year_of_birth': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}) - }, - 'student.usersignupsource': { - 'Meta': {'object_name': 'UserSignupSource'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'site': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'student.userstanding': { - 'Meta': {'object_name': 'UserStanding'}, - 'account_status': ('django.db.models.fields.CharField', [], {'max_length': '31', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'standing_last_changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'standing'", 'unique': 'True', 'to': "orm['auth.User']"}) - }, - 'student.usertestgroup': { - 'Meta': {'object_name': 'UserTestGroup'}, - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'db_index': 'True', 'symmetrical': 'False'}) - } - } - - complete_apps = ['student'] \ No newline at end of file diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index 2faf03bba4a7..5e0d13d6d846 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -42,7 +42,6 @@ from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.locations import SlashSeparatedCourseKey from simple_history.models import HistoricalRecords -from south.modelsinspector import add_introspection_rules from track import contexts from xmodule_django.models import CourseKeyField, NoneToEmptyManager @@ -189,7 +188,7 @@ class UserStanding(models.Model): (ACCOUNT_ENABLED, u"Account Enabled"), ) - user = models.ForeignKey(User, db_index=True, related_name='standing', unique=True) + user = models.OneToOneField(User, db_index=True, related_name='standing') account_status = models.CharField( blank=True, max_length=31, choices=USER_STANDING_CHOICES ) @@ -493,7 +492,7 @@ class Registration(models.Model): class Meta(object): db_table = "auth_registration" - user = models.ForeignKey(User, unique=True) + user = models.OneToOneField(User) activation_key = models.CharField(('activation key'), max_length=32, unique=True, db_index=True) def register(self, user): @@ -824,7 +823,7 @@ def num_enrolled_in(self, course_id): 'course_id' is the course_id to return enrollments """ - enrollment_number = super(CourseEnrollmentManager, self).get_query_set().filter( + enrollment_number = super(CourseEnrollmentManager, self).get_queryset().filter( course_id=course_id, is_active=1 ).count() @@ -855,7 +854,7 @@ def enrollment_counts(self, course_id): """ # Unfortunately, Django's "group by"-style queries look super-awkward query = use_read_replica_if_available( - super(CourseEnrollmentManager, self).get_query_set().filter(course_id=course_id, is_active=True).values( + super(CourseEnrollmentManager, self).get_queryset().filter(course_id=course_id, is_active=True).values( 'mode').order_by().annotate(Count('mode'))) total = 0 enroll_dict = defaultdict(int) @@ -923,6 +922,7 @@ def __unicode__(self): ).format(self.user, self.course_id, self.created, self.is_active) @classmethod + @transaction.atomic def get_or_create_enrollment(cls, user, course_key): """ Create an enrollment for a user in a class. By default *this enrollment @@ -950,32 +950,16 @@ def get_or_create_enrollment(cls, user, course_key): if user.id is None: user.save() - try: - enrollment, created = CourseEnrollment.objects.get_or_create( - user=user, - course_id=course_key, - ) + enrollment, created = CourseEnrollment.objects.get_or_create( + user=user, + course_id=course_key, + ) - # If we *did* just create a new enrollment, set some defaults - if created: - enrollment.mode = "honor" - enrollment.is_active = False - enrollment.save() - except IntegrityError: - log.info( - ( - "An integrity error occurred while getting-or-creating the enrollment" - "for course key %s and student %s. This can occur if two processes try to get-or-create " - "the enrollment at the same time and the database is set to REPEATABLE READ. We will try " - "committing the transaction and retrying." - ), - course_key, user - ) - transaction.commit() - enrollment = CourseEnrollment.objects.get( - user=user, - course_id=course_key, - ) + # If we *did* just create a new enrollment, set some defaults + if created: + enrollment.mode = "honor" + enrollment.is_active = False + enrollment.save() return enrollment @@ -1950,9 +1934,6 @@ def __init__(self, *args, **kwargs): ) -add_introspection_rules([], [r"^student\.models\.LanguageField"]) - - class LanguageProficiency(models.Model): """ Represents a user's language proficiency. diff --git a/common/djangoapps/student/tests/test_email.py b/common/djangoapps/student/tests/test_email.py index d7aaf011807b..1b56924dcf69 100644 --- a/common/djangoapps/student/tests/test_email.py +++ b/common/djangoapps/student/tests/test_email.py @@ -12,6 +12,7 @@ from django.core.urlresolvers import reverse from django.core import mail from django.contrib.auth.models import User +from django.db import transaction from django.test import TestCase, TransactionTestCase from django.test.client import RequestFactory from mock import Mock, patch @@ -35,7 +36,6 @@ def mock_render_to_string(template_name, context): def mock_render_to_response(template_name, context): """Return an HttpResponse with content that encodes template_name and context""" - # View confirm_email_change uses @transaction.commit_manually. # This simulates any db access in the templates. UserProfile.objects.exists() return HttpResponse(mock_render_to_string(template_name, context)) @@ -418,9 +418,10 @@ def test_successful_email_change(self, email_user): self.assertEquals(0, PendingEmailChange.objects.count()) @patch('student.views.PendingEmailChange.objects.get', Mock(side_effect=TestException)) - @patch('student.views.transaction.rollback', wraps=django.db.transaction.rollback) - def test_always_rollback(self, rollback, _email_user): - with self.assertRaises(TestException): - confirm_email_change(self.request, self.key) + def test_always_rollback(self, _email_user): + connection = transaction.get_connection() + with patch.object(connection, 'rollback', wraps=connection.rollback) as mock_rollback: + with self.assertRaises(TestException): + confirm_email_change(self.request, self.key) - rollback.assert_called_with() + mock_rollback.assert_called_with() diff --git a/common/djangoapps/student/tests/test_login.py b/common/djangoapps/student/tests/test_login.py index 9ac21c17f5d3..d293af908a7b 100644 --- a/common/djangoapps/student/tests/test_login.py +++ b/common/djangoapps/student/tests/test_login.py @@ -284,6 +284,9 @@ def test_single_session_with_url_not_having_login_required_decorator(self): response = client1.post(self.url, creds) self._assert_response(response, success=True) + # Reload the user from the database + self.user = User.objects.get(pk=self.user.pk) # pylint: disable=no-member + self.assertEqual(self.user.profile.get_meta()['session_id'], client1.session.session_key) # second login should log out the first @@ -501,7 +504,7 @@ def test_success(self): self._setup_provider_response(success=True) response = self.client.post(self.url, {"access_token": "dummy"}) self.assertEqual(response.status_code, 204) - self.assertEqual(self.client.session['_auth_user_id'], self.user.id) # pylint: disable=no-member + self.assertEqual(int(self.client.session['_auth_user_id']), self.user.id) # pylint: disable=no-member def test_invalid_token(self): self._setup_provider_response(success=False) diff --git a/common/djangoapps/student/tests/test_password_policy.py b/common/djangoapps/student/tests/test_password_policy.py index 194de075f3fa..c606478b2520 100644 --- a/common/djangoapps/student/tests/test_password_policy.py +++ b/common/djangoapps/student/tests/test_password_policy.py @@ -7,7 +7,7 @@ from django.test.client import RequestFactory from django.core.urlresolvers import reverse from django.contrib.auth.models import AnonymousUser -from django.utils.importlib import import_module +from importlib import import_module from django.test.utils import override_settings from django.conf import 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 511395fbe3d8..ac07a0c4e0fc 100644 --- a/common/djangoapps/student/tests/test_reset_password.py +++ b/common/djangoapps/student/tests/test_reset_password.py @@ -10,10 +10,11 @@ from django.test import TestCase from django.test.client import RequestFactory from django.contrib.auth.models import User -from django.contrib.auth.hashers import UNUSABLE_PASSWORD +from django.contrib.auth.hashers import UNUSABLE_PASSWORD_PREFIX from django.contrib.auth.tokens import default_token_generator -from django.utils.http import int_to_base36 +from django.utils.encoding import force_bytes, force_text +from django.utils.http import urlsafe_base64_encode, base36_to_int, int_to_base36 from mock import Mock, patch import ddt @@ -42,12 +43,16 @@ def setUp(self): self.user_bad_passwd = UserFactory.create() self.user_bad_passwd.is_active = False - self.user_bad_passwd.password = UNUSABLE_PASSWORD + self.user_bad_passwd.password = UNUSABLE_PASSWORD_PREFIX self.user_bad_passwd.save() + def uidb36_to_uidb64(self, uidb36=None): + """ Converts uidb36 into uidb64 """ + return force_text(urlsafe_base64_encode(force_bytes(base36_to_int(uidb36 or self.uidb36)))) + @patch('student.views.render_to_string', Mock(side_effect=mock_render_to_string, autospec=True)) def test_user_bad_password_reset(self): - """Tests password reset behavior for user with password marked UNUSABLE_PASSWORD""" + """Tests password reset behavior for user with password marked UNUSABLE_PASSWORD_PREFIX""" bad_pwd_req = self.request_factory.post('/password_reset/', {'email': self.user_bad_passwd.email}) bad_pwd_resp = password_reset(bad_pwd_req) @@ -217,7 +222,9 @@ def test_reset_password_bad_token(self, reset_confirm): bad_reset_req = self.request_factory.get('/password_reset_confirm/NO-OP/') password_reset_confirm_wrapper(bad_reset_req, 'NO', 'OP') confirm_kwargs = reset_confirm.call_args[1] - self.assertEquals(confirm_kwargs['uidb36'], 'NO') + + self.assertEquals(confirm_kwargs['uidb64'], self.uidb36_to_uidb64('NO')) + self.assertEquals(confirm_kwargs['token'], 'OP') self.user = User.objects.get(pk=self.user.pk) self.assertFalse(self.user.is_active) @@ -229,7 +236,7 @@ def test_reset_password_good_token(self, reset_confirm): good_reset_req = self.request_factory.get('/password_reset_confirm/{0}-{1}/'.format(self.uidb36, self.token)) password_reset_confirm_wrapper(good_reset_req, self.uidb36, self.token) confirm_kwargs = reset_confirm.call_args[1] - self.assertEquals(confirm_kwargs['uidb36'], self.uidb36) + self.assertEquals(confirm_kwargs['uidb64'], self.uidb36_to_uidb64()) self.assertEquals(confirm_kwargs['token'], self.token) self.user = User.objects.get(pk=self.user.pk) self.assertTrue(self.user.is_active) @@ -251,7 +258,7 @@ def test_reset_password_with_reused_password(self, reset_confirm): good_reset_req = self.request_factory.get('/password_reset_confirm/{0}-{1}/'.format(self.uidb36, self.token)) password_reset_confirm_wrapper(good_reset_req, self.uidb36, self.token) confirm_kwargs = reset_confirm.call_args[1] - self.assertEquals(confirm_kwargs['uidb36'], self.uidb36) + self.assertEquals(confirm_kwargs['uidb64'], self.uidb36_to_uidb64()) self.assertEquals(confirm_kwargs['token'], self.token) self.user = User.objects.get(pk=self.user.pk) self.assertTrue(self.user.is_active) diff --git a/common/djangoapps/student/tests/test_verification_status.py b/common/djangoapps/student/tests/test_verification_status.py index 140b2f71d4ad..c3002bb63d11 100644 --- a/common/djangoapps/student/tests/test_verification_status.py +++ b/common/djangoapps/student/tests/test_verification_status.py @@ -20,7 +20,7 @@ from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from student.tests.factories import UserFactory, CourseEnrollmentFactory from course_modes.tests.factories import CourseModeFactory -from verify_student.models import VerificationDeadline, SoftwareSecurePhotoVerification # pylint: disable=import-error +from lms.djangoapps.verify_student.models import VerificationDeadline, SoftwareSecurePhotoVerification from util.testing import UrlResetMixin diff --git a/common/djangoapps/student/tests/tests.py b/common/djangoapps/student/tests/tests.py index a2c1e05ae4db..42f19757f29c 100644 --- a/common/djangoapps/student/tests/tests.py +++ b/common/djangoapps/student/tests/tests.py @@ -39,7 +39,7 @@ from bulk_email.models import Optout # pylint: disable=import-error from certificates.models import CertificateStatuses # pylint: disable=import-error from certificates.tests.factories import GeneratedCertificateFactory # pylint: disable=import-error -from verify_student.models import SoftwareSecurePhotoVerification +from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification import shoppingcart # pylint: disable=import-error from openedx.core.djangoapps.programs.tests.mixins import ProgramsApiConfigMixin diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 845968856e1e..15776e69ddf0 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -27,8 +27,9 @@ from django.http import (HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, HttpResponseServerError, Http404) from django.shortcuts import redirect +from django.utils.encoding import force_bytes, force_text from django.utils.translation import ungettext -from django.utils.http import base36_to_int +from django.utils.http import base36_to_int, urlsafe_base64_encode from django.utils.translation import ugettext as _, get_language from django.views.decorators.csrf import csrf_exempt, ensure_csrf_cookie from django.views.decorators.http import require_POST, require_GET @@ -55,7 +56,7 @@ DashboardConfiguration, LinkedInAddToProfileConfiguration, ManualEnrollmentAudit, ALLOWEDTOENROLL_TO_ENROLLED) from student.forms import AccountCreationForm, PasswordResetFormNoActive -from verify_student.models import SoftwareSecurePhotoVerification # pylint: disable=import-error +from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification from certificates.models import CertificateStatuses, certificate_status_for_student from certificates.api import ( # pylint: disable=import-error get_certificate_url, @@ -90,7 +91,7 @@ import dogstats_wrapper as dog_stats_api -from util.db import commit_on_success_with_read_committed +from util.db import outer_atomic from util.json_request import JsonResponse from util.bad_request_rate_limiter import BadRequestRateLimiter from util.milestones_helpers import ( @@ -920,8 +921,9 @@ def _credit_statuses(user, course_enrollments): return statuses +@transaction.non_atomic_requests @require_POST -@commit_on_success_with_read_committed +@outer_atomic(read_committed=True) def change_enrollment(request, check_access=True): """ Modify the enrollment status for the logged-in user. @@ -1438,7 +1440,8 @@ def _do_create_account(form): # TODO: Rearrange so that if part of the process fails, the whole process fails. # Right now, we can have e.g. no registration e-mail sent out and a zombie account try: - user.save() + with transaction.atomic(): + user.save() except IntegrityError: # Figure out the cause of the integrity error if len(User.objects.filter(username=user.username)) > 0: @@ -1570,7 +1573,7 @@ def create_account_with_params(request, params): ) # Perform operations within a transaction that are critical to account creation - with transaction.commit_on_success(): + with transaction.atomic(): # first, create the account (user, profile, registration) = _do_create_account(form) @@ -2052,12 +2055,19 @@ def password_reset_confirm_wrapper( # we also want to pass settings.PLATFORM_NAME in as extra_context extra_context = {"platform_name": microsite.get_value('platform_name', settings.PLATFORM_NAME)} + # Support old password reset URLs that used base36 encoded user IDs. + # https://github.com/django/django/commit/1184d077893ff1bc947e45b00a4d565f3df81776#diff-c571286052438b2e3190f8db8331a92bR231 + try: + uidb64 = force_text(urlsafe_base64_encode(force_bytes(base36_to_int(uidb36)))) + except ValueError: + uidb64 = '1' # dummy invalid ID (incorrect padding for base64) + if request.method == 'POST': # remember what the old password hash is before we call down old_password_hash = user.password result = password_reset_confirm( - request, uidb36=uidb36, token=token, extra_context=extra_context + request, uidb64=uidb64, token=token, extra_context=extra_context ) # get the updated user @@ -2071,7 +2081,7 @@ def password_reset_confirm_wrapper( return result else: return password_reset_confirm( - request, uidb36=uidb36, token=token, extra_context=extra_context + request, uidb64=uidb64, token=token, extra_context=extra_context ) @@ -2179,18 +2189,17 @@ def do_email_change_request(user, new_email, activation_key=None): @ensure_csrf_cookie -@transaction.commit_manually def confirm_email_change(request, key): # pylint: disable=unused-argument """ User requested a new e-mail. This is called when the activation link is clicked. We confirm with the old e-mail, and update """ - try: + with transaction.atomic(): try: pec = PendingEmailChange.objects.get(activation_key=key) except PendingEmailChange.DoesNotExist: response = render_to_response("invalid_email_key.html", {}) - transaction.rollback() + transaction.set_rollback(True) return response user = pec.user @@ -2201,7 +2210,7 @@ def confirm_email_change(request, key): # pylint: disable=unused-argument if len(User.objects.filter(email=pec.new_email)) != 0: response = render_to_response("email_exists.html", {}) - transaction.rollback() + transaction.set_rollback(True) return response subject = render_to_string('emails/email_change_subject.txt', address_context) @@ -2220,7 +2229,7 @@ def confirm_email_change(request, key): # pylint: disable=unused-argument except Exception: # pylint: disable=broad-except log.warning('Unable to send confirmation email to old address', exc_info=True) response = render_to_response("email_change_failed.html", {'email': user.email}) - transaction.rollback() + transaction.set_rollback(True) return response user.email = pec.new_email @@ -2232,16 +2241,11 @@ def confirm_email_change(request, key): # pylint: disable=unused-argument except Exception: # pylint: disable=broad-except log.warning('Unable to send confirmation email to new address', exc_info=True) response = render_to_response("email_change_failed.html", {'email': pec.new_email}) - transaction.rollback() + transaction.set_rollback(True) return response response = render_to_response("email_change_successful.html", address_context) - transaction.commit() return response - except Exception: # pylint: disable=broad-except - # If we get an unexpected exception, be sure to rollback the transaction - transaction.rollback() - raise @require_POST diff --git a/common/djangoapps/third_party_auth/admin.py b/common/djangoapps/third_party_auth/admin.py index 0897e3e28381..c42141da1b1b 100644 --- a/common/djangoapps/third_party_auth/admin.py +++ b/common/djangoapps/third_party_auth/admin.py @@ -126,6 +126,7 @@ class ApiPermissionsAdminForm(forms.ModelForm): """ Django admin form for ApiPermissions model """ class Meta(object): # pylint: disable=missing-docstring model = ProviderApiPermissions + fields = ['client', 'provider_id'] provider_id = forms.ChoiceField(choices=[], required=True) diff --git a/common/djangoapps/third_party_auth/api/views.py b/common/djangoapps/third_party_auth/api/views.py index ada722849c78..d508a7317981 100644 --- a/common/djangoapps/third_party_auth/api/views.py +++ b/common/djangoapps/third_party_auth/api/views.py @@ -204,8 +204,8 @@ def get_queryset(self): query = Q() - usernames = self.request.QUERY_PARAMS.getlist('username', None) - remote_ids = self.request.QUERY_PARAMS.getlist('remote_id', None) + usernames = self.request.query_params.getlist('username', None) + remote_ids = self.request.query_params.getlist('remote_id', None) if usernames: usernames = ','.join(usernames) diff --git a/common/djangoapps/third_party_auth/migrations/0001_initial.py b/common/djangoapps/third_party_auth/migrations/0001_initial.py index d4a13a6dc026..9bd9f7aee1bb 100644 --- a/common/djangoapps/third_party_auth/migrations/0001_initial.py +++ b/common/djangoapps/third_party_auth/migrations/0001_initial.py @@ -1,181 +1,137 @@ # -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +from __future__ import unicode_literals +from django.db import migrations, models +import provider.utils +import django.db.models.deletion +from django.conf import settings -class Migration(SchemaMigration): - def forwards(self, orm): - # Adding model 'OAuth2ProviderConfig' - db.create_table('third_party_auth_oauth2providerconfig', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('icon_class', self.gf('django.db.models.fields.CharField')(default='fa-sign-in', max_length=50)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=50)), - ('backend_name', self.gf('django.db.models.fields.CharField')(max_length=50, db_index=True)), - ('key', self.gf('django.db.models.fields.TextField')(blank=True)), - ('secret', self.gf('django.db.models.fields.TextField')(blank=True)), - ('other_settings', self.gf('django.db.models.fields.TextField')(blank=True)), - )) - db.send_create_signal('third_party_auth', ['OAuth2ProviderConfig']) +class Migration(migrations.Migration): - # Adding model 'SAMLProviderConfig' - db.create_table('third_party_auth_samlproviderconfig', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('icon_class', self.gf('django.db.models.fields.CharField')(default='fa-sign-in', max_length=50)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=50)), - ('backend_name', self.gf('django.db.models.fields.CharField')(default='tpa-saml', max_length=50)), - ('idp_slug', self.gf('django.db.models.fields.SlugField')(max_length=30)), - ('entity_id', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('metadata_source', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('attr_user_permanent_id', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), - ('attr_full_name', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), - ('attr_first_name', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), - ('attr_last_name', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), - ('attr_username', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), - ('attr_email', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), - ('other_settings', self.gf('django.db.models.fields.TextField')(blank=True)), - )) - db.send_create_signal('third_party_auth', ['SAMLProviderConfig']) + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('oauth2', '0001_initial'), + ] - # Adding model 'SAMLConfiguration' - db.create_table('third_party_auth_samlconfiguration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('private_key', self.gf('django.db.models.fields.TextField')()), - ('public_key', self.gf('django.db.models.fields.TextField')()), - ('entity_id', self.gf('django.db.models.fields.CharField')(default='http://saml.example.com', max_length=255)), - ('org_info_str', self.gf('django.db.models.fields.TextField')(default='{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}')), - ('other_config_str', self.gf('django.db.models.fields.TextField')(default='{\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\n}')), - )) - db.send_create_signal('third_party_auth', ['SAMLConfiguration']) - - # Adding model 'SAMLProviderData' - db.create_table('third_party_auth_samlproviderdata', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('fetched_at', self.gf('django.db.models.fields.DateTimeField')(db_index=True)), - ('expires_at', self.gf('django.db.models.fields.DateTimeField')(null=True, db_index=True)), - ('entity_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('sso_url', self.gf('django.db.models.fields.URLField')(max_length=200)), - ('public_key', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('third_party_auth', ['SAMLProviderData']) - - - def backwards(self, orm): - # Deleting model 'OAuth2ProviderConfig' - db.delete_table('third_party_auth_oauth2providerconfig') - - # Deleting model 'SAMLProviderConfig' - db.delete_table('third_party_auth_samlproviderconfig') - - # Deleting model 'SAMLConfiguration' - db.delete_table('third_party_auth_samlconfiguration') - - # Deleting model 'SAMLProviderData' - db.delete_table('third_party_auth_samlproviderdata') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'third_party_auth.oauth2providerconfig': { - 'Meta': {'object_name': 'OAuth2ProviderConfig'}, - 'backend_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'other_settings': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'secret': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - }, - 'third_party_auth.samlconfiguration': { - 'Meta': {'object_name': 'SAMLConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'default': "'http://saml.example.com'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org_info_str': ('django.db.models.fields.TextField', [], {'default': '\'{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}\''}), - 'other_config_str': ('django.db.models.fields.TextField', [], {'default': '\'{\\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\\n}\''}), - 'private_key': ('django.db.models.fields.TextField', [], {}), - 'public_key': ('django.db.models.fields.TextField', [], {}) - }, - 'third_party_auth.samlproviderconfig': { - 'Meta': {'object_name': 'SAMLProviderConfig'}, - 'attr_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_first_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_full_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_last_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_user_permanent_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_username': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'backend_name': ('django.db.models.fields.CharField', [], {'default': "'tpa-saml'", 'max_length': '50'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'idp_slug': ('django.db.models.fields.SlugField', [], {'max_length': '30'}), - 'metadata_source': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'other_settings': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - }, - 'third_party_auth.samlproviderdata': { - 'Meta': {'ordering': "('-fetched_at',)", 'object_name': 'SAMLProviderData'}, - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'expires_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'fetched_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'public_key': ('django.db.models.fields.TextField', [], {}), - 'sso_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}) - } - } - - complete_apps = ['third_party_auth'] \ No newline at end of file + operations = [ + migrations.CreateModel( + name='LTIProviderConfig', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('icon_class', models.CharField(default=b'fa-sign-in', help_text=b'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50)), + ('name', models.CharField(help_text=b'Name of this provider (shown to users)', max_length=50)), + ('secondary', models.BooleanField(default=False, help_text='Secondary providers are displayed less prominently, in a separate list of "Institution" login providers.')), + ('skip_registration_form', models.BooleanField(default=False, help_text='If this option is enabled, users will not be asked to confirm their details (name, email, etc.) during the registration process. Only select this option for trusted providers that are known to provide accurate user information.')), + ('skip_email_verification', models.BooleanField(default=False, help_text='If this option is selected, users will not be required to confirm their email, and their account will be activated immediately upon registration.')), + ('lti_consumer_key', models.CharField(help_text=b'The name that the LTI Tool Consumer will use to identify itself', max_length=255)), + ('lti_hostname', models.CharField(default=b'localhost', help_text=b'The domain that will be acting as the LTI consumer.', max_length=255, db_index=True)), + ('lti_consumer_secret', models.CharField(default=provider.utils.long_token, help_text=b'The shared secret that the LTI Tool Consumer will use to authenticate requests. Only this edX instance and this tool consumer instance should know this value. For increased security, you can avoid storing this in your database by leaving this field blank and setting SOCIAL_AUTH_LTI_CONSUMER_SECRETS = {"consumer key": "secret", ...} in your instance\'s Django setttigs (or lms.auth.json)', max_length=255, blank=True)), + ('lti_max_timestamp_age', models.IntegerField(default=10, help_text=b'The maximum age of oauth_timestamp values, in seconds.')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'verbose_name': 'Provider Configuration (LTI)', + 'verbose_name_plural': 'Provider Configuration (LTI)', + }, + ), + migrations.CreateModel( + name='OAuth2ProviderConfig', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('icon_class', models.CharField(default=b'fa-sign-in', help_text=b'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50)), + ('name', models.CharField(help_text=b'Name of this provider (shown to users)', max_length=50)), + ('secondary', models.BooleanField(default=False, help_text='Secondary providers are displayed less prominently, in a separate list of "Institution" login providers.')), + ('skip_registration_form', models.BooleanField(default=False, help_text='If this option is enabled, users will not be asked to confirm their details (name, email, etc.) during the registration process. Only select this option for trusted providers that are known to provide accurate user information.')), + ('skip_email_verification', models.BooleanField(default=False, help_text='If this option is selected, users will not be required to confirm their email, and their account will be activated immediately upon registration.')), + ('backend_name', models.CharField(help_text=b'Which python-social-auth OAuth2 provider backend to use. The list of backend choices is determined by the THIRD_PARTY_AUTH_BACKENDS setting.', max_length=50, db_index=True)), + ('key', models.TextField(verbose_name=b'Client ID', blank=True)), + ('secret', models.TextField(help_text=b'For increased security, you can avoid storing this in your database by leaving this field blank and setting SOCIAL_AUTH_OAUTH_SECRETS = {"(backend name)": "secret", ...} in your instance\'s Django settings (or lms.auth.json)', verbose_name=b'Client Secret', blank=True)), + ('other_settings', models.TextField(help_text=b'Optional JSON object with advanced settings, if any.', blank=True)), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'verbose_name': 'Provider Configuration (OAuth)', + 'verbose_name_plural': 'Provider Configuration (OAuth)', + }, + ), + migrations.CreateModel( + name='ProviderApiPermissions', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('provider_id', models.CharField(help_text=b'Uniquely identify a provider. This is different from backend_name.', max_length=255)), + ('client', models.ForeignKey(to='oauth2.Client')), + ], + options={ + 'verbose_name': 'Provider API Permission', + 'verbose_name_plural': 'Provider API Permissions', + }, + ), + migrations.CreateModel( + name='SAMLConfiguration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('private_key', models.TextField(help_text=b'To generate a key pair as two files, run "openssl req -new -x509 -days 3652 -nodes -out saml.crt -keyout saml.key". Paste the contents of saml.key here. For increased security, you can avoid storing this in your database by leaving this field blank and setting it via the SOCIAL_AUTH_SAML_SP_PRIVATE_KEY setting in your instance\'s Django settings (or lms.auth.json).', blank=True)), + ('public_key', models.TextField(help_text=b"Public key certificate. For increased security, you can avoid storing this in your database by leaving this field blank and setting it via the SOCIAL_AUTH_SAML_SP_PUBLIC_CERT setting in your instance's Django settings (or lms.auth.json).", blank=True)), + ('entity_id', models.CharField(default=b'http://saml.example.com', max_length=255, verbose_name=b'Entity ID')), + ('org_info_str', models.TextField(default=b'{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}', help_text=b"JSON dictionary of 'url', 'displayname', and 'name' for each language", verbose_name=b'Organization Info')), + ('other_config_str', models.TextField(default=b'{\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\n}', help_text=b'JSON object defining advanced settings that are passed on to python-saml. Valid keys that can be set here include: SECURITY_CONFIG and SP_EXTRA')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'verbose_name': 'SAML Configuration', + 'verbose_name_plural': 'SAML Configuration', + }, + ), + migrations.CreateModel( + name='SAMLProviderConfig', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('icon_class', models.CharField(default=b'fa-sign-in', help_text=b'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50)), + ('name', models.CharField(help_text=b'Name of this provider (shown to users)', max_length=50)), + ('secondary', models.BooleanField(default=False, help_text='Secondary providers are displayed less prominently, in a separate list of "Institution" login providers.')), + ('skip_registration_form', models.BooleanField(default=False, help_text='If this option is enabled, users will not be asked to confirm their details (name, email, etc.) during the registration process. Only select this option for trusted providers that are known to provide accurate user information.')), + ('skip_email_verification', models.BooleanField(default=False, help_text='If this option is selected, users will not be required to confirm their email, and their account will be activated immediately upon registration.')), + ('backend_name', models.CharField(default=b'tpa-saml', help_text=b"Which python-social-auth provider backend to use. 'tpa-saml' is the standard edX SAML backend.", max_length=50)), + ('idp_slug', models.SlugField(help_text=b'A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30)), + ('entity_id', models.CharField(help_text=b'Example: https://idp.testshib.org/idp/shibboleth', max_length=255, verbose_name=b'Entity ID')), + ('metadata_source', models.CharField(help_text=b"URL to this provider's XML metadata. Should be an HTTPS URL. Example: https://www.testshib.org/metadata/testshib-providers.xml", max_length=255)), + ('attr_user_permanent_id', models.CharField(help_text=b'URN of the SAML attribute that we can use as a unique, persistent user ID. Leave blank for default.', max_length=128, verbose_name=b'User ID Attribute', blank=True)), + ('attr_full_name', models.CharField(help_text=b"URN of SAML attribute containing the user's full name. Leave blank for default.", max_length=128, verbose_name=b'Full Name Attribute', blank=True)), + ('attr_first_name', models.CharField(help_text=b"URN of SAML attribute containing the user's first name. Leave blank for default.", max_length=128, verbose_name=b'First Name Attribute', blank=True)), + ('attr_last_name', models.CharField(help_text=b"URN of SAML attribute containing the user's last name. Leave blank for default.", max_length=128, verbose_name=b'Last Name Attribute', blank=True)), + ('attr_username', models.CharField(help_text=b'URN of SAML attribute to use as a suggested username for this user. Leave blank for default.', max_length=128, verbose_name=b'Username Hint Attribute', blank=True)), + ('attr_email', models.CharField(help_text=b"URN of SAML attribute containing the user's email address[es]. Leave blank for default.", max_length=128, verbose_name=b'Email Attribute', blank=True)), + ('other_settings', models.TextField(help_text=b'For advanced use cases, enter a JSON object with addtional configuration. The tpa-saml backend supports only {"requiredEntitlements": ["urn:..."]} which can be used to require the presence of a specific eduPersonEntitlement.', verbose_name=b'Advanced settings', blank=True)), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'verbose_name': 'Provider Configuration (SAML IdP)', + 'verbose_name_plural': 'Provider Configuration (SAML IdPs)', + }, + ), + migrations.CreateModel( + name='SAMLProviderData', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('fetched_at', models.DateTimeField(db_index=True)), + ('expires_at', models.DateTimeField(null=True, db_index=True)), + ('entity_id', models.CharField(max_length=255, db_index=True)), + ('sso_url', models.URLField(verbose_name=b'SSO URL')), + ('public_key', models.TextField()), + ], + options={ + 'ordering': ('-fetched_at',), + 'verbose_name': 'SAML Provider Data', + 'verbose_name_plural': 'SAML Provider Data', + }, + ), + ] diff --git a/common/djangoapps/third_party_auth/migrations/0002_convert_settings.py b/common/djangoapps/third_party_auth/migrations/0002_convert_settings.py deleted file mode 100644 index a5c38bca8139..000000000000 --- a/common/djangoapps/third_party_auth/migrations/0002_convert_settings.py +++ /dev/null @@ -1,141 +0,0 @@ -# -*- coding: utf-8 -*- -from django.conf import settings -import json -from south.v2 import DataMigration - - -class Migration(DataMigration): - - def forwards(self, orm): - """ Convert from the THIRD_PARTY_AUTH setting to OAuth2ProviderConfig """ - tpa = getattr(settings, 'THIRD_PARTY_AUTH_OLD_CONFIG', {}) - if tpa and not any(orm.OAuth2ProviderConfig.objects.all()): - print("Migrating third party auth config to OAuth2ProviderConfig") - providers = ( - # Name, backend, icon, prefix - ('Google', 'google-oauth2', 'fa-google-plus', 'SOCIAL_AUTH_GOOGLE_OAUTH2_'), - ('LinkedIn', 'linkedin-oauth2', 'fa-linkedin', 'SOCIAL_AUTH_LINKEDIN_OAUTH2_'), - ('Facebook', 'facebook', 'fa-facebook', 'SOCIAL_AUTH_FACEBOOK_'), - ) - for name, backend, icon, prefix in providers: - if name in tpa: - conf = tpa[name] - conf = {key.replace(prefix, ''): val for key, val in conf.items()} - key = conf.pop('KEY', '') - secret = conf.pop('SECRET', '') - orm.OAuth2ProviderConfig.objects.create( - enabled=True, - name=name, - backend_name=backend, - icon_class=icon, - key=key, - secret=secret, - other_settings=json.dumps(conf), - changed_by=None, - ) - print( - "Done. Make changes via /admin/third_party_auth/oauth2providerconfig/ " - "from now on. You can remove THIRD_PARTY_AUTH from ~/lms.auth.json" - ) - else: - print("Not migrating third party auth config to OAuth2ProviderConfig.") - - def backwards(self, orm): - """ No backwards migration necessary """ - pass - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'third_party_auth.oauth2providerconfig': { - 'Meta': {'object_name': 'OAuth2ProviderConfig'}, - 'backend_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'other_settings': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'secret': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - }, - 'third_party_auth.samlconfiguration': { - 'Meta': {'object_name': 'SAMLConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'default': "'http://saml.example.com'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org_info_str': ('django.db.models.fields.TextField', [], {'default': '\'{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}\''}), - 'other_config_str': ('django.db.models.fields.TextField', [], {'default': '\'{\\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\\n}\''}), - 'private_key': ('django.db.models.fields.TextField', [], {}), - 'public_key': ('django.db.models.fields.TextField', [], {}) - }, - 'third_party_auth.samlproviderconfig': { - 'Meta': {'object_name': 'SAMLProviderConfig'}, - 'attr_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_first_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_full_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_last_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_user_permanent_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_username': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'backend_name': ('django.db.models.fields.CharField', [], {'default': "'tpa-saml'", 'max_length': '50'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'idp_slug': ('django.db.models.fields.SlugField', [], {'max_length': '30'}), - 'metadata_source': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'other_settings': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - }, - 'third_party_auth.samlproviderdata': { - 'Meta': {'ordering': "('-fetched_at',)", 'object_name': 'SAMLProviderData'}, - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'expires_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'fetched_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'public_key': ('django.db.models.fields.TextField', [], {}), - 'sso_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}) - } - } - - complete_apps = ['third_party_auth'] - symmetrical = True diff --git a/common/djangoapps/third_party_auth/migrations/0003_add_config_options.py b/common/djangoapps/third_party_auth/migrations/0003_add_config_options.py deleted file mode 100644 index 6ff8a3d3a5ec..000000000000 --- a/common/djangoapps/third_party_auth/migrations/0003_add_config_options.py +++ /dev/null @@ -1,161 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'SAMLProviderConfig.secondary' - db.add_column('third_party_auth_samlproviderconfig', 'secondary', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - # Adding field 'SAMLProviderConfig.skip_registration_form' - db.add_column('third_party_auth_samlproviderconfig', 'skip_registration_form', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - # Adding field 'SAMLProviderConfig.skip_email_verification' - db.add_column('third_party_auth_samlproviderconfig', 'skip_email_verification', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - # Adding field 'OAuth2ProviderConfig.secondary' - db.add_column('third_party_auth_oauth2providerconfig', 'secondary', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - # Adding field 'OAuth2ProviderConfig.skip_registration_form' - db.add_column('third_party_auth_oauth2providerconfig', 'skip_registration_form', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - # Adding field 'OAuth2ProviderConfig.skip_email_verification' - db.add_column('third_party_auth_oauth2providerconfig', 'skip_email_verification', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'SAMLProviderConfig.secondary' - db.delete_column('third_party_auth_samlproviderconfig', 'secondary') - - # Deleting field 'SAMLProviderConfig.skip_registration_form' - db.delete_column('third_party_auth_samlproviderconfig', 'skip_registration_form') - - # Deleting field 'SAMLProviderConfig.skip_email_verification' - db.delete_column('third_party_auth_samlproviderconfig', 'skip_email_verification') - - # Deleting field 'OAuth2ProviderConfig.secondary' - db.delete_column('third_party_auth_oauth2providerconfig', 'secondary') - - # Deleting field 'OAuth2ProviderConfig.skip_registration_form' - db.delete_column('third_party_auth_oauth2providerconfig', 'skip_registration_form') - - # Deleting field 'OAuth2ProviderConfig.skip_email_verification' - db.delete_column('third_party_auth_oauth2providerconfig', 'skip_email_verification') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'third_party_auth.oauth2providerconfig': { - 'Meta': {'object_name': 'OAuth2ProviderConfig'}, - 'backend_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'other_settings': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'secondary': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'secret': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'skip_email_verification': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_registration_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'third_party_auth.samlconfiguration': { - 'Meta': {'object_name': 'SAMLConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'default': "'http://saml.example.com'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org_info_str': ('django.db.models.fields.TextField', [], {'default': '\'{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}\''}), - 'other_config_str': ('django.db.models.fields.TextField', [], {'default': '\'{\\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\\n}\''}), - 'private_key': ('django.db.models.fields.TextField', [], {}), - 'public_key': ('django.db.models.fields.TextField', [], {}) - }, - 'third_party_auth.samlproviderconfig': { - 'Meta': {'object_name': 'SAMLProviderConfig'}, - 'attr_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_first_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_full_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_last_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_user_permanent_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_username': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'backend_name': ('django.db.models.fields.CharField', [], {'default': "'tpa-saml'", 'max_length': '50'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'idp_slug': ('django.db.models.fields.SlugField', [], {'max_length': '30'}), - 'metadata_source': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'other_settings': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'secondary': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_email_verification': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_registration_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'third_party_auth.samlproviderdata': { - 'Meta': {'ordering': "('-fetched_at',)", 'object_name': 'SAMLProviderData'}, - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'expires_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'fetched_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'public_key': ('django.db.models.fields.TextField', [], {}), - 'sso_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}) - } - } - - complete_apps = ['third_party_auth'] \ No newline at end of file diff --git a/common/djangoapps/third_party_auth/migrations/0004_lti_tool_consumers.py b/common/djangoapps/third_party_auth/migrations/0004_lti_tool_consumers.py deleted file mode 100644 index dfef06ae7393..000000000000 --- a/common/djangoapps/third_party_auth/migrations/0004_lti_tool_consumers.py +++ /dev/null @@ -1,149 +0,0 @@ -# -*- coding: utf-8 -*- -# pylint: disable=C,E,F,R,W -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'LTIProviderConfig' - db.create_table('third_party_auth_ltiproviderconfig', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('icon_class', self.gf('django.db.models.fields.CharField')(default='fa-sign-in', max_length=50)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=50)), - ('secondary', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('skip_registration_form', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('skip_email_verification', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('lti_consumer_key', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('lti_consumer_secret', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('lti_max_timestamp_age', self.gf('django.db.models.fields.IntegerField')(default=10)), - )) - db.send_create_signal('third_party_auth', ['LTIProviderConfig']) - - - def backwards(self, orm): - # Deleting model 'LTIProviderConfig' - db.delete_table('third_party_auth_ltiproviderconfig') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'third_party_auth.ltiproviderconfig': { - 'Meta': {'object_name': 'LTIProviderConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lti_consumer_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'lti_consumer_secret': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'lti_max_timestamp_age': ('django.db.models.fields.IntegerField', [], {'default': '10'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'secondary': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_email_verification': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_registration_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'third_party_auth.oauth2providerconfig': { - 'Meta': {'object_name': 'OAuth2ProviderConfig'}, - 'backend_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'other_settings': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'secondary': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'secret': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'skip_email_verification': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_registration_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'third_party_auth.samlconfiguration': { - 'Meta': {'object_name': 'SAMLConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'default': "'http://saml.example.com'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org_info_str': ('django.db.models.fields.TextField', [], {'default': '\'{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}\''}), - 'other_config_str': ('django.db.models.fields.TextField', [], {'default': '\'{\\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\\n}\''}), - 'private_key': ('django.db.models.fields.TextField', [], {}), - 'public_key': ('django.db.models.fields.TextField', [], {}) - }, - 'third_party_auth.samlproviderconfig': { - 'Meta': {'object_name': 'SAMLProviderConfig'}, - 'attr_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_first_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_full_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_last_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_user_permanent_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_username': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'backend_name': ('django.db.models.fields.CharField', [], {'default': "'tpa-saml'", 'max_length': '50'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'idp_slug': ('django.db.models.fields.SlugField', [], {'max_length': '30'}), - 'metadata_source': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'other_settings': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'secondary': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_email_verification': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_registration_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'third_party_auth.samlproviderdata': { - 'Meta': {'ordering': "('-fetched_at',)", 'object_name': 'SAMLProviderData'}, - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'expires_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'fetched_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'public_key': ('django.db.models.fields.TextField', [], {}), - 'sso_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}) - } - } - - complete_apps = ['third_party_auth'] diff --git a/common/djangoapps/third_party_auth/migrations/0005_auto__add_field_ltiproviderconfig_lti_hostname.py b/common/djangoapps/third_party_auth/migrations/0005_auto__add_field_ltiproviderconfig_lti_hostname.py deleted file mode 100644 index 87c09fc129bf..000000000000 --- a/common/djangoapps/third_party_auth/migrations/0005_auto__add_field_ltiproviderconfig_lti_hostname.py +++ /dev/null @@ -1,137 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'LTIProviderConfig.lti_hostname' - db.add_column('third_party_auth_ltiproviderconfig', 'lti_hostname', - self.gf('django.db.models.fields.CharField')(default='localhost', max_length=255, db_index=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'LTIProviderConfig.lti_hostname' - db.delete_column('third_party_auth_ltiproviderconfig', 'lti_hostname') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'third_party_auth.ltiproviderconfig': { - 'Meta': {'object_name': 'LTIProviderConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lti_consumer_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'lti_consumer_secret': ('django.db.models.fields.CharField', [], {'default': "'ae8c9adcb7764ad67272c57c602dabd0b71acf22'", 'max_length': '255', 'blank': 'True'}), - 'lti_hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'lti_max_timestamp_age': ('django.db.models.fields.IntegerField', [], {'default': '10'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'secondary': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_email_verification': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_registration_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'third_party_auth.oauth2providerconfig': { - 'Meta': {'object_name': 'OAuth2ProviderConfig'}, - 'backend_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'other_settings': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'secondary': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'secret': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'skip_email_verification': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_registration_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'third_party_auth.samlconfiguration': { - 'Meta': {'object_name': 'SAMLConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'default': "'http://saml.example.com'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org_info_str': ('django.db.models.fields.TextField', [], {'default': '\'{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}\''}), - 'other_config_str': ('django.db.models.fields.TextField', [], {'default': '\'{\\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\\n}\''}), - 'private_key': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public_key': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - }, - 'third_party_auth.samlproviderconfig': { - 'Meta': {'object_name': 'SAMLProviderConfig'}, - 'attr_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_first_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_full_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_last_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_user_permanent_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_username': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'backend_name': ('django.db.models.fields.CharField', [], {'default': "'tpa-saml'", 'max_length': '50'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'idp_slug': ('django.db.models.fields.SlugField', [], {'max_length': '30'}), - 'metadata_source': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'other_settings': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'secondary': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_email_verification': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_registration_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'third_party_auth.samlproviderdata': { - 'Meta': {'ordering': "('-fetched_at',)", 'object_name': 'SAMLProviderData'}, - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'expires_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'fetched_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'public_key': ('django.db.models.fields.TextField', [], {}), - 'sso_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}) - } - } - - complete_apps = ['third_party_auth'] \ No newline at end of file diff --git a/common/djangoapps/third_party_auth/migrations/0006_add_api_permission.py b/common/djangoapps/third_party_auth/migrations/0006_add_api_permission.py deleted file mode 100644 index 9658dcbc89f2..000000000000 --- a/common/djangoapps/third_party_auth/migrations/0006_add_api_permission.py +++ /dev/null @@ -1,156 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'ProviderApiPermissions' - db.create_table('third_party_auth_providerapipermissions', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('client', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['oauth2.Client'])), - ('provider_id', self.gf('django.db.models.fields.CharField')(max_length=255)), - )) - db.send_create_signal('third_party_auth', ['ProviderApiPermissions']) - - - def backwards(self, orm): - # Deleting model 'ProviderApiPermissions' - db.delete_table('third_party_auth_providerapipermissions') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'oauth2.client': { - 'Meta': {'object_name': 'Client'}, - 'client_id': ('django.db.models.fields.CharField', [], {'default': "'d9843a249e3f607e3177'", 'max_length': '255'}), - 'client_secret': ('django.db.models.fields.CharField', [], {'default': "'4009d3b78cee9c0144da4a47a11e2186c6a46d4c'", 'max_length': '255'}), - 'client_type': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'redirect_uri': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'oauth2_client'", 'null': 'True', 'to': "orm['auth.User']"}) - }, - 'third_party_auth.providerapipermissions': { - 'Meta': {'object_name': 'ProviderApiPermissions'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'third_party_auth.ltiproviderconfig': { - 'Meta': {'object_name': 'LTIProviderConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lti_consumer_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'lti_consumer_secret': ('django.db.models.fields.CharField', [], {'default': "'011ecd0d33af228631f68d89b335cd6303c00508'", 'max_length': '255', 'blank': 'True'}), - 'lti_max_timestamp_age': ('django.db.models.fields.IntegerField', [], {'default': '10'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'secondary': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_email_verification': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_registration_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'third_party_auth.oauth2providerconfig': { - 'Meta': {'object_name': 'OAuth2ProviderConfig'}, - 'backend_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'other_settings': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'secondary': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'secret': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'skip_email_verification': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_registration_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'third_party_auth.samlconfiguration': { - 'Meta': {'object_name': 'SAMLConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'default': "'http://saml.example.com'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'org_info_str': ('django.db.models.fields.TextField', [], {'default': '\'{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}\''}), - 'other_config_str': ('django.db.models.fields.TextField', [], {'default': '\'{\\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\\n}\''}), - 'private_key': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public_key': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - }, - 'third_party_auth.samlproviderconfig': { - 'Meta': {'object_name': 'SAMLProviderConfig'}, - 'attr_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_first_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_full_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_last_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_user_permanent_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'attr_username': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'backend_name': ('django.db.models.fields.CharField', [], {'default': "'tpa-saml'", 'max_length': '50'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'icon_class': ('django.db.models.fields.CharField', [], {'default': "'fa-sign-in'", 'max_length': '50'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'idp_slug': ('django.db.models.fields.SlugField', [], {'max_length': '30'}), - 'metadata_source': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'other_settings': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'secondary': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_email_verification': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'skip_registration_form': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'third_party_auth.samlproviderdata': { - 'Meta': {'ordering': "('-fetched_at',)", 'object_name': 'SAMLProviderData'}, - 'entity_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'expires_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'fetched_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'public_key': ('django.db.models.fields.TextField', [], {}), - 'sso_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}) - } - } - - complete_apps = ['third_party_auth'] \ No newline at end of file diff --git a/common/djangoapps/third_party_auth/models.py b/common/djangoapps/third_party_auth/models.py index da06f6ecfccc..4384319faa6e 100644 --- a/common/djangoapps/third_party_auth/models.py +++ b/common/djangoapps/third_party_auth/models.py @@ -106,6 +106,7 @@ class ProviderConfig(ConfigurationModel): # "enabled" field is inherited from ConfigurationModel class Meta(object): + app_label = "third_party_auth" abstract = True @property @@ -213,6 +214,7 @@ class OAuth2ProviderConfig(ProviderConfig): other_settings = models.TextField(blank=True, help_text="Optional JSON object with advanced settings, if any.") class Meta(object): + app_label = "third_party_auth" verbose_name = "Provider Configuration (OAuth)" verbose_name_plural = verbose_name @@ -292,6 +294,7 @@ def clean(self): self.other_settings = clean_json(self.other_settings, dict) class Meta(object): + app_label = "third_party_auth" verbose_name = "Provider Configuration (SAML IdP)" verbose_name_plural = "Provider Configuration (SAML IdPs)" @@ -387,6 +390,7 @@ class SAMLConfiguration(ConfigurationModel): ) class Meta(object): + app_label = "third_party_auth" verbose_name = "SAML Configuration" verbose_name_plural = verbose_name @@ -453,6 +457,7 @@ class SAMLProviderData(models.Model): public_key = models.TextField() class Meta(object): + app_label = "third_party_auth" verbose_name = "SAML Provider Data" verbose_name_plural = verbose_name ordering = ('-fetched_at', ) @@ -508,6 +513,7 @@ class LTIProviderConfig(ProviderConfig): ) lti_hostname = models.CharField( + default='localhost', max_length=255, help_text=( 'The domain that will be acting as the LTI consumer.' @@ -565,6 +571,7 @@ def get_lti_consumer_secret(self): return getattr(settings, 'SOCIAL_AUTH_LTI_CONSUMER_SECRETS', {}).get(self.lti_consumer_key, '') class Meta(object): + app_label = "third_party_auth" verbose_name = "Provider Configuration (LTI)" verbose_name_plural = verbose_name @@ -575,6 +582,9 @@ class ProviderApiPermissions(models.Model): It gives permission for a OAuth2 client to access the information under certain IdPs. """ + class Meta(object): + app_label = "third_party_auth" + client = models.ForeignKey(Client) provider_id = models.CharField( max_length=255, diff --git a/common/djangoapps/third_party_auth/settings.py b/common/djangoapps/third_party_auth/settings.py index a856aefa4f4f..ae5b669f8bcf 100644 --- a/common/djangoapps/third_party_auth/settings.py +++ b/common/djangoapps/third_party_auth/settings.py @@ -24,12 +24,6 @@ def apply_settings(django_settings): # Params not in this whitelist will be silently dropped. django_settings.FIELDS_STORED_IN_SESSION = _FIELDS_STORED_IN_SESSION - # Register and configure python-social-auth with Django. - django_settings.INSTALLED_APPS += ( - 'social.apps.django_app.default', - 'third_party_auth', - ) - # Inject exception middleware to make redirects fire. django_settings.MIDDLEWARE_CLASSES += _MIDDLEWARE_CLASSES @@ -81,7 +75,7 @@ def apply_settings(django_settings): # Context processors required under Django. django_settings.SOCIAL_AUTH_UUID_LENGTH = 4 - django_settings.TEMPLATE_CONTEXT_PROCESSORS += ( + django_settings.DEFAULT_TEMPLATE_ENGINE['OPTIONS']['context_processors'] += ( 'social.apps.django_app.context_processors.backends', 'social.apps.django_app.context_processors.login_redirect', ) diff --git a/common/djangoapps/third_party_auth/tests/test_settings.py b/common/djangoapps/third_party_auth/tests/test_settings.py index 9108ce9c6621..9b5943c62d85 100644 --- a/common/djangoapps/third_party_auth/tests/test_settings.py +++ b/common/djangoapps/third_party_auth/tests/test_settings.py @@ -13,9 +13,14 @@ 'AUTHENTICATION_BACKENDS': _ORIGINAL_AUTHENTICATION_BACKENDS, 'INSTALLED_APPS': _ORIGINAL_INSTALLED_APPS, 'MIDDLEWARE_CLASSES': _ORIGINAL_MIDDLEWARE_CLASSES, - 'TEMPLATE_CONTEXT_PROCESSORS': _ORIGINAL_TEMPLATE_CONTEXT_PROCESSORS, + 'TEMPLATES': [{ + 'OPTIONS': { + 'context_processors': _ORIGINAL_TEMPLATE_CONTEXT_PROCESSORS + } + }], 'FEATURES': {}, } +_SETTINGS_MAP['DEFAULT_TEMPLATE_ENGINE'] = _SETTINGS_MAP['TEMPLATES'][0] class SettingsUnitTest(testutil.TestCase): @@ -39,10 +44,6 @@ def test_apply_settings_adds_fields_stored_in_session(self): settings.apply_settings(self.settings) self.assertEqual(settings._FIELDS_STORED_IN_SESSION, self.settings.FIELDS_STORED_IN_SESSION) - def test_apply_settings_adds_third_party_auth_to_installed_apps(self): - settings.apply_settings(self.settings) - self.assertIn('third_party_auth', self.settings.INSTALLED_APPS) - @unittest.skipUnless(testutil.AUTH_FEATURE_ENABLED, 'third_party_auth not enabled') def test_apply_settings_enables_no_providers_by_default(self): # Providers are only enabled via ConfigurationModels in the database diff --git a/common/djangoapps/track/migrations/0001_initial.py b/common/djangoapps/track/migrations/0001_initial.py index 6ec146dd1081..99ed7dce89d9 100644 --- a/common/djangoapps/track/migrations/0001_initial.py +++ b/common/djangoapps/track/migrations/0001_initial.py @@ -1,48 +1,32 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'TrackingLog' - db.create_table('track_trackinglog', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('dtcreated', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('username', self.gf('django.db.models.fields.CharField')(max_length=32, blank=True)), - ('ip', self.gf('django.db.models.fields.CharField')(max_length=32, blank=True)), - ('event_source', self.gf('django.db.models.fields.CharField')(max_length=32)), - ('event_type', self.gf('django.db.models.fields.CharField')(max_length=32, blank=True)), - ('event', self.gf('django.db.models.fields.TextField')(blank=True)), - ('agent', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)), - ('page', self.gf('django.db.models.fields.CharField')(max_length=32, null=True, blank=True)), - ('time', self.gf('django.db.models.fields.DateTimeField')()), - )) - db.send_create_signal('track', ['TrackingLog']) - - - def backwards(self, orm): - # Deleting model 'TrackingLog' - db.delete_table('track_trackinglog') - - - models = { - 'track.trackinglog': { - 'Meta': {'object_name': 'TrackingLog'}, - 'agent': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}), - 'dtcreated': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'event': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'event_source': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'event_type': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'page': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), - 'time': ('django.db.models.fields.DateTimeField', [], {}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}) - } - } - - complete_apps = ['track'] +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='TrackingLog', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('dtcreated', models.DateTimeField(auto_now_add=True, verbose_name=b'creation date')), + ('username', models.CharField(max_length=32, blank=True)), + ('ip', models.CharField(max_length=32, blank=True)), + ('event_source', models.CharField(max_length=32)), + ('event_type', models.CharField(max_length=512, blank=True)), + ('event', models.TextField(blank=True)), + ('agent', models.CharField(max_length=256, blank=True)), + ('page', models.CharField(max_length=512, null=True, blank=True)), + ('time', models.DateTimeField(verbose_name=b'event time')), + ('host', models.CharField(max_length=64, blank=True)), + ], + options={ + 'db_table': 'track_trackinglog', + }, + ), + ] diff --git a/common/djangoapps/track/migrations/0002_auto__add_field_trackinglog_host__chg_field_trackinglog_event_type__ch.py b/common/djangoapps/track/migrations/0002_auto__add_field_trackinglog_host__chg_field_trackinglog_event_type__ch.py deleted file mode 100644 index 0bb0cde42ec5..000000000000 --- a/common/djangoapps/track/migrations/0002_auto__add_field_trackinglog_host__chg_field_trackinglog_event_type__ch.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'TrackingLog.host' - db.add_column('track_trackinglog', 'host', - self.gf('django.db.models.fields.CharField')(default='', max_length=64, blank=True), - keep_default=False) - - - # Changing field 'TrackingLog.event_type' - db.alter_column('track_trackinglog', 'event_type', self.gf('django.db.models.fields.CharField')(max_length=512)) - - # Changing field 'TrackingLog.page' - db.alter_column('track_trackinglog', 'page', self.gf('django.db.models.fields.CharField')(max_length=512, null=True)) - - def backwards(self, orm): - # Deleting field 'TrackingLog.host' - db.delete_column('track_trackinglog', 'host') - - - # Changing field 'TrackingLog.event_type' - db.alter_column('track_trackinglog', 'event_type', self.gf('django.db.models.fields.CharField')(max_length=32)) - - # Changing field 'TrackingLog.page' - db.alter_column('track_trackinglog', 'page', self.gf('django.db.models.fields.CharField')(max_length=32, null=True)) - - models = { - 'track.trackinglog': { - 'Meta': {'object_name': 'TrackingLog'}, - 'agent': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}), - 'dtcreated': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'event': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'event_source': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'event_type': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), - 'host': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'page': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}), - 'time': ('django.db.models.fields.DateTimeField', [], {}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}) - } - } - - complete_apps = ['track'] diff --git a/common/djangoapps/track/views/__init__.py b/common/djangoapps/track/views/__init__.py index 3babc9c9df75..b3b18bf498f8 100644 --- a/common/djangoapps/track/views/__init__.py +++ b/common/djangoapps/track/views/__init__.py @@ -41,17 +41,18 @@ def _get_request_ip(request, default=''): def _get_request_value(request, value_name, default=''): - """Helper method to get header values from a request's REQUEST dict, if present.""" - if request is not None and hasattr(request, 'REQUEST') and value_name in request.REQUEST: - return request.REQUEST[value_name] - else: - return default + """Helper method to get header values from a request's GET/POST dict, if present.""" + if request is not None: + if request.method == 'GET': + return request.GET.get(value_name, default) + elif request.method == 'POST': + return request.POST.get(value_name, default) + return default def user_track(request): """ - Log when POST call to "event" URL is made by a user. Uses request.REQUEST - to allow for GET calls. + Log when POST call to "event" URL is made by a user. GET or POST call should provide "event_type", "event", and "page" arguments. """ diff --git a/common/djangoapps/util/cache.py b/common/djangoapps/util/cache.py index 1e50ac85898f..5b912ec3e408 100644 --- a/common/djangoapps/util/cache.py +++ b/common/djangoapps/util/cache.py @@ -17,7 +17,7 @@ from django.utils.translation import get_language try: - cache = cache.get_cache('general') + cache = cache.caches['general'] # pylint: disable=invalid-name except Exception: cache = cache.cache diff --git a/common/djangoapps/util/db.py b/common/djangoapps/util/db.py index 15442b3243b2..75264a66664a 100644 --- a/common/djangoapps/util/db.py +++ b/common/djangoapps/util/db.py @@ -1,47 +1,222 @@ """ Utility functions related to databases. """ +# TransactionManagementError used below actually *does* derive from the standard "Exception" class. +# pylint: disable=nonstandard-exception from functools import wraps import random -from django.db import connection, transaction +from django.db import DEFAULT_DB_ALIAS, DatabaseError, Error, transaction MYSQL_MAX_INT = (2 ** 31) - 1 -def commit_on_success_with_read_committed(func): # pylint: disable=invalid-name +class CommitOnSuccessManager(object): """ - Decorator which executes the decorated function inside a transaction with isolation level set to READ COMMITTED. + This class implements the commit_on_success() API that was available till Django 1.5. - If the function returns a response the transaction is committed and if the function raises an exception the - transaction is rolled back. + An instance can be used either as a decorator or as a context manager. However, it + cannot be nested inside an atomic block. - Raises TransactionManagementError if there are already more than 1 level of transactions open. + It is mostly taken from https://github.com/django/django/blob/1.8.5/django/db/transaction.py#L110-L277 + but instead of using save points commits all pending queries at the end of a block. - Note: This only works on MySQL. + The goal is to behave as close as possible to: + https://github.com/django/django/blob/1.4.22/django/db/transaction.py#L263-L289 """ - @wraps(func) - def wrapper(*args, **kwargs): # pylint: disable=missing-docstring - if connection.vendor == 'mysql': - # The isolation level cannot be changed while a transaction is in progress. So we close any existing one. - if connection.transaction_state: - if len(connection.transaction_state) == 1: - connection.commit() - # We can commit all open transactions. But it does not seem like a good idea. - elif len(connection.transaction_state) > 1: - raise transaction.TransactionManagementError('Cannot change isolation level. ' - 'More than 1 level of nested transactions.') + # Tests in TestCase subclasses are wrapped in an atomic block to speed up database restoration. + # So we must disabled this manager. + # https://github.com/django/django/blob/1.8.5/django/core/handlers/base.py#L129-L132 + ENABLED = True + + def __init__(self, using, read_committed=False): + self.using = using + self.read_committed = read_committed + + def __enter__(self): + + if not self.ENABLED: + return + + connection = transaction.get_connection(self.using) + + if connection.in_atomic_block: + raise transaction.TransactionManagementError('Cannot be inside an atomic block.') + + if getattr(connection, 'commit_on_success_block_level', 0) == 0: + connection.commit_on_success_block_level = 1 # This will set the transaction isolation level to READ COMMITTED for the next transaction. - cursor = connection.cursor() - cursor.execute("SET TRANSACTION ISOLATION LEVEL READ COMMITTED") + if self.read_committed is True: + if connection.vendor == 'mysql': + cursor = connection.cursor() + cursor.execute("SET TRANSACTION ISOLATION LEVEL READ COMMITTED") + + # We aren't in a transaction yet; create one. + # The usual way to start a transaction is to turn autocommit off. + # However, some database adapters (namely sqlite3) don't handle + # transactions and savepoints properly when autocommit is off. + # In such cases, start an explicit transaction instead, which has + # the side-effect of disabling autocommit. + if connection.features.autocommits_when_autocommit_is_off: + connection._start_transaction_under_autocommit() # pylint: disable=protected-access + connection.autocommit = False + else: + connection.set_autocommit(False) + else: + if self.read_committed is True: + raise transaction.TransactionManagementError('Cannot change isolation level when nested.') + + connection.commit_on_success_block_level += 1 + + def __exit__(self, exc_type, exc_value, traceback): + + if not self.ENABLED: + return + + connection = transaction.get_connection(self.using) + + try: + if exc_type is None: + # Commit transaction + try: + connection.commit() + except DatabaseError: + try: + connection.rollback() + except Error: + # An error during rollback means that something + # went wrong with the connection. Drop it. + connection.close() + raise + else: + # Roll back transaction + try: + connection.rollback() + except Error: + # An error during rollback means that something + # went wrong with the connection. Drop it. + connection.close() + + finally: + connection.commit_on_success_block_level -= 1 + + # Outermost block exit when autocommit was enabled. + if connection.commit_on_success_block_level == 0: + if connection.features.autocommits_when_autocommit_is_off: + connection.autocommit = True + else: + connection.set_autocommit(True) + + def __call__(self, func): + @wraps(func) + def decorated(*args, **kwds): # pylint: disable=missing-docstring + with self: + return func(*args, **kwds) + return decorated + + +def commit_on_success(using=None, read_committed=False): + """ + This function implements the commit_on_success() API that was available till Django 1.5. + + It can be used either as a decorator or as a context manager. However, it + cannot be nested inside an atomic block. + + If the wrapped function or block returns a response the transaction is committed + and if it raises an exception the transaction is rolled back. + + Arguments: + using (str): the name of the database. + read_committed (bool): Whether to use read committed isolation level. + + Raises: + TransactionManagementError: if already inside an atomic block. + """ + if callable(using): + return CommitOnSuccessManager(DEFAULT_DB_ALIAS, read_committed)(using) + # Decorator: @commit_on_success(...) or context manager: with commit_on_success(...): ... + else: + return CommitOnSuccessManager(using, read_committed) - with transaction.commit_on_success(): - return func(*args, **kwargs) - return wrapper +class OuterAtomic(transaction.Atomic): + """ + Atomic which cannot be nested in another atomic. + + This is useful if you want to ensure that a commit happens at + the end of the wrapped block. + """ + ALLOW_NESTED = False + + def __init__(self, using, savepoint, read_committed=False): + self.read_committed = read_committed + super(OuterAtomic, self).__init__(using, savepoint) + + def __enter__(self): + + connection = transaction.get_connection(self.using) + + # TestCase setup nests tests in two atomics - one for the test class and one for the individual test. + # The outermost atomic starts a transaction - so does not have a savepoint. + # The inner atomic starts a savepoint around the test. + # So, for tests only, there should be exactly one savepoint_id and two atomic_for_testcase_calls. + # atomic_for_testcase_calls below is added in a monkey-patch for tests only. + # pylint: disable=no-member + if self.ALLOW_NESTED and (self.atomic_for_testcase_calls - len(connection.savepoint_ids)) < 1: + raise transaction.TransactionManagementError('Cannot be inside an atomic block.') + + # Otherwise, this shouldn't be nested in any atomic block. + if not self.ALLOW_NESTED and connection.in_atomic_block: + raise transaction.TransactionManagementError('Cannot be inside an atomic block.') + + # This will set the transaction isolation level to READ COMMITTED for the next transaction. + if self.read_committed is True: + if connection.vendor == 'mysql': + cursor = connection.cursor() + cursor.execute("SET TRANSACTION ISOLATION LEVEL READ COMMITTED") + + super(OuterAtomic, self).__enter__() + + +def outer_atomic(using=None, savepoint=True, read_committed=False): + """ + A variant of Django's atomic() which cannot be nested inside another atomic. + + With the upgrade to Django 1.8, all views by default are wrapped + in an atomic block. Because of this, a commit to the database can + only happen once the view returns. This is because nested atomic + blocks use savepoints and the transaction only gets committed when + the outermost atomic block returns. See the official Django docs + for details: https://docs.djangoproject.com/en/1.8/topics/db/transactions/ + + However, in some cases, we need to be able to commit to the + database in the middle of a view. The only way to do this + is to disable automatic transaction management for the view by + adding @transaction.non_atomic_requests to it and then using + atomic() inside it in relevant places. To help ensure that queries + inside a piece of code are committed, you can wrap it in + outer_atomic(). outer_atomic() will ensure that it is not nested + inside another atomic block. + + Additionally, some views need to use READ COMMITTED isolation level. + For this add @transaction.non_atomic_requests and + @outer_atomic(read_committed=True) decorators on it. + + Arguments: + using (str): the name of the database. + read_committed (bool): Whether to use read committed isolation level. + + Raises: + TransactionManagementError: if already inside an atomic block. + """ + if callable(using): + return OuterAtomic(DEFAULT_DB_ALIAS, savepoint, read_committed)(using) + # Decorator: @outer_atomic(...) or context manager: with outer_atomic(...): ... + else: + return OuterAtomic(using, savepoint, read_committed) def generate_int_id(minimum=0, maximum=MYSQL_MAX_INT, used_ids=None): diff --git a/common/djangoapps/util/json_request.py b/common/djangoapps/util/json_request.py index 30eacb9810a8..8cc188ec2b18 100644 --- a/common/djangoapps/util/json_request.py +++ b/common/djangoapps/util/json_request.py @@ -1,11 +1,36 @@ from functools import wraps import json +import decimal from django.core.serializers import serialize from django.core.serializers.json import DjangoJSONEncoder from django.db.models.query import QuerySet from django.http import HttpResponse, HttpResponseBadRequest +class EDXJSONEncoder(DjangoJSONEncoder): + """ + Encoder for Decimal object, other objects will be encoded as per DjangoJSONEncoder default implementation. + + NOTE: + Please see https://docs.djangoproject.com/en/1.8/releases/1.5/#system-version-of-simplejson-no-longer-used + DjangoJSONEncoder will now use the Python's json module but Python's json module don't know about how to + encode Decimal object, so as per default implementation Decimal objects will be encoded to `str` which we don't + want and also this is different from Django 1.4, In Django 1.4 if Decimal object has zeros after the decimal + point then object will be serialized as `int` else `float`, so we are keeping this behavior. + """ + def default(self, o): # pylint: disable=method-hidden + """ + Encode Decimal objects. If decimal object has zeros after the + decimal point then object will be serialized as `int` else `float` + """ + if isinstance(o, decimal.Decimal): + if o == o.to_integral(): + return int(o) + return float(o) + else: + return super(EDXJSONEncoder, self).default(o) + + def expect_json(view_function): """ View decorator for simplifying handing of requests that expect json. If the request's @@ -33,15 +58,15 @@ class JsonResponse(HttpResponse): """ Django HttpResponse subclass that has sensible defaults for outputting JSON. """ - def __init__(self, object=None, status=None, encoder=DjangoJSONEncoder, + def __init__(self, resp_obj=None, status=None, encoder=EDXJSONEncoder, *args, **kwargs): - if object in (None, ""): + if resp_obj in (None, ""): content = "" status = status or 204 - elif isinstance(object, QuerySet): - content = serialize('json', object) + elif isinstance(resp_obj, QuerySet): + content = serialize('json', resp_obj) else: - content = json.dumps(object, cls=encoder, indent=2, ensure_ascii=False) + content = json.dumps(resp_obj, cls=encoder, indent=2, ensure_ascii=False) kwargs.setdefault("content_type", "application/json") if status: kwargs["status"] = status diff --git a/common/djangoapps/util/migrations/0001_initial.py b/common/djangoapps/util/migrations/0001_initial.py index baed557c2c35..6880b5da3597 100644 --- a/common/djangoapps/util/migrations/0001_initial.py +++ b/common/djangoapps/util/migrations/0001_initial.py @@ -1,72 +1,29 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'RateLimitConfiguration' - db.create_table('util_ratelimitconfiguration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('util', ['RateLimitConfiguration']) - - - def backwards(self, orm): - # Deleting model 'RateLimitConfiguration' - db.delete_table('util_ratelimitconfiguration') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'util.ratelimitconfiguration': { - 'Meta': {'object_name': 'RateLimitConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['util'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='RateLimitConfiguration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + ] diff --git a/common/djangoapps/util/migrations/0002_data__default_rate_limit_config.py b/common/djangoapps/util/migrations/0002_data__default_rate_limit_config.py new file mode 100644 index 000000000000..f43878182939 --- /dev/null +++ b/common/djangoapps/util/migrations/0002_data__default_rate_limit_config.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +# Converted from the original South migration 0002_default_rate_limit_config.py + +from django.db import migrations, models + + +def forwards(apps, schema_editor): + """Ensure that rate limiting is enabled by default. """ + rate_limit_configuration_model = apps.get_model("util", "RateLimitConfiguration") + db_alias = schema_editor.connection.alias + rate_limit_configuration_model.objects.using(db_alias).get_or_create(enabled=True) + +class Migration(migrations.Migration): + + dependencies = [ + ('util', '0001_initial'), + ] + + operations = [ + migrations.RunPython(forwards) + ] diff --git a/common/djangoapps/util/migrations/0002_default_rate_limit_config.py b/common/djangoapps/util/migrations/0002_default_rate_limit_config.py deleted file mode 100644 index f15ca5b558a1..000000000000 --- a/common/djangoapps/util/migrations/0002_default_rate_limit_config.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - - -class Migration(DataMigration): - - def forwards(self, orm): - """Ensure that rate limiting is enabled by default. """ - orm['util.RateLimitConfiguration'].objects.create(enabled=True) - - def backwards(self, orm): - pass - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'util.ratelimitconfiguration': { - 'Meta': {'object_name': 'RateLimitConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['util'] - symmetrical = True diff --git a/common/djangoapps/util/model_utils.py b/common/djangoapps/util/model_utils.py index e0a03bc690dc..de8e43a7d8a3 100644 --- a/common/djangoapps/util/model_utils.py +++ b/common/djangoapps/util/model_utils.py @@ -41,9 +41,9 @@ def get_changed_fields_dict(instance, model_class): # an empty dict as a default value. return {} else: - field_names = [ - field[0].name for field in model_class._meta.get_fields_with_model() - ] + # We want to compare all of the scalar fields on the model, but none of + # the relations. + field_names = [f.name for f in model_class._meta.get_fields() if not f.is_relation] # pylint: disable=protected-access changed_fields = { field_name: getattr(old_model, field_name) for field_name in field_names if getattr(old_model, field_name) != getattr(instance, field_name) diff --git a/common/djangoapps/util/models.py b/common/djangoapps/util/models.py index ff353a803960..9cfe1c5fbd71 100644 --- a/common/djangoapps/util/models.py +++ b/common/djangoapps/util/models.py @@ -20,7 +20,8 @@ class RateLimitConfiguration(ConfigurationModel): When enabled, it will disable rate limiting on any view decorated with the `can_disable_rate_limit` class decorator. """ - pass + class Meta(ConfigurationModel.Meta): + app_label = "util" def decompress_string(value): @@ -61,13 +62,3 @@ def to_python(self, value): value = decompress_string(value) return value - - def south_field_triple(self): - """Returns a suitable description of this field for South.""" - # We'll just introspect the _actual_ field. - from south.modelsinspector import introspector - - field_class = "django.db.models.fields.TextField" - args, kwargs = introspector(self) - # That's our definition! - return field_class, args, kwargs diff --git a/common/djangoapps/util/testing.py b/common/djangoapps/util/testing.py index 72a94a93cdac..d1d49e0496c5 100644 --- a/common/djangoapps/util/testing.py +++ b/common/djangoapps/util/testing.py @@ -4,6 +4,9 @@ from django.conf import settings from django.core.urlresolvers import clear_url_caches, resolve +from django.test import TestCase + +from util.db import OuterAtomic, CommitOnSuccessManager class UrlResetMixin(object): @@ -90,3 +93,51 @@ def reset_tracker(self): Reset the mock tracker in order to forget about old events. """ self.mock_tracker.reset_mock() + + +def patch_testcase(): + """ + Disable commit_on_success decorators for tests in TestCase subclasses. + + Since tests in TestCase classes are wrapped in an atomic block, we + cannot use transaction.commit() or transaction.rollback(). + https://docs.djangoproject.com/en/1.8/topics/testing/tools/#django.test.TransactionTestCase + """ + + def enter_atomics_wrapper(wrapped_func): + """ + Wrapper for TestCase._enter_atomics + """ + wrapped_func = wrapped_func.__func__ + + def _wrapper(*args, **kwargs): + """ + Method that performs atomic-entering accounting. + """ + CommitOnSuccessManager.ENABLED = False + OuterAtomic.ALLOW_NESTED = True + if not hasattr(OuterAtomic, 'atomic_for_testcase_calls'): + OuterAtomic.atomic_for_testcase_calls = 0 + OuterAtomic.atomic_for_testcase_calls += 1 + return wrapped_func(*args, **kwargs) + return classmethod(_wrapper) + + def rollback_atomics_wrapper(wrapped_func): + """ + Wrapper for TestCase._rollback_atomics + """ + wrapped_func = wrapped_func.__func__ + + def _wrapper(*args, **kwargs): + """ + Method that performs atomic-rollback accounting. + """ + CommitOnSuccessManager.ENABLED = True + OuterAtomic.ALLOW_NESTED = False + OuterAtomic.atomic_for_testcase_calls -= 1 + return wrapped_func(*args, **kwargs) + return classmethod(_wrapper) + + # pylint: disable=protected-access + TestCase._enter_atomics = enter_atomics_wrapper(TestCase._enter_atomics) + TestCase._rollback_atomics = rollback_atomics_wrapper(TestCase._rollback_atomics) diff --git a/common/djangoapps/util/tests/test_db.py b/common/djangoapps/util/tests/test_db.py index 62326e8a32db..603eecd9bb63 100644 --- a/common/djangoapps/util/tests/test_db.py +++ b/common/djangoapps/util/tests/test_db.py @@ -7,27 +7,27 @@ from django.contrib.auth.models import User from django.db import connection, IntegrityError -from django.db.transaction import commit_on_success, TransactionManagementError +from django.db.transaction import atomic, TransactionManagementError from django.test import TestCase, TransactionTestCase -from util.db import commit_on_success_with_read_committed, generate_int_id +from util.db import commit_on_success, generate_int_id, outer_atomic @ddt.ddt -class TransactionIsolationLevelsTestCase(TransactionTestCase): +class TransactionManagersTestCase(TransactionTestCase): """ - Tests the effects of changing transaction isolation level to READ COMMITTED instead of REPEATABLE READ. + Tests commit_on_success and outer_atomic. Note: This TestCase only works with MySQL. - To run it on devstack: - 1. Add TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' to envs/devstack.py - 2. Run "./manage.py lms --settings=devstack test util.tests.test_db" + To test do: "./manage.py lms --settings=test_with_mysql test util.tests.test_db" """ @ddt.data( - (commit_on_success, IntegrityError, None, True), - (commit_on_success_with_read_committed, type(None), False, True), + (outer_atomic(), IntegrityError, None, True), + (outer_atomic(read_committed=True), type(None), False, True), + (commit_on_success(), IntegrityError, None, True), + (commit_on_success(read_committed=True), type(None), False, True), ) @ddt.unpack def test_concurrent_requests(self, transaction_decorator, exception_class, created_in_1, created_in_2): @@ -80,8 +80,11 @@ def run(self): self.assertIsNone(thread2.status.get('exception')) self.assertEqual(thread2.status.get('created'), created_in_2) - def test_transaction_nesting(self): - """Test that the decorator raises an error if there are already more than 1 levels of nested transactions.""" + def test_outer_atomic_nesting(self): + """ + Test that outer_atomic raises an error if it is nested inside + another atomic. + """ if connection.vendor != 'mysql': raise unittest.SkipTest('Only works on MySQL.') @@ -90,15 +93,46 @@ def do_nothing(): """Just return.""" return - commit_on_success_with_read_committed(do_nothing)() + outer_atomic()(do_nothing)() + + with atomic(): + atomic()(do_nothing)() + + with outer_atomic(): + atomic()(do_nothing)() + + with self.assertRaisesRegexp(TransactionManagementError, 'Cannot be inside an atomic block.'): + with atomic(): + outer_atomic()(do_nothing)() - with commit_on_success(): - commit_on_success_with_read_committed(do_nothing)() + with self.assertRaisesRegexp(TransactionManagementError, 'Cannot be inside an atomic block.'): + with outer_atomic(): + outer_atomic()(do_nothing)() - with self.assertRaises(TransactionManagementError): + def test_commit_on_success_nesting(self): + """ + Test that commit_on_success raises an error if it is nested inside + atomic or if the isolation level is changed when it is nested + inside another commit_on_success. + """ + # pylint: disable=not-callable + + if connection.vendor != 'mysql': + raise unittest.SkipTest('Only works on MySQL.') + + def do_nothing(): + """Just return.""" + return + + commit_on_success(read_committed=True)(do_nothing)() + + with self.assertRaisesRegexp(TransactionManagementError, 'Cannot change isolation level when nested.'): with commit_on_success(): - with commit_on_success(): - commit_on_success_with_read_committed(do_nothing)() + commit_on_success(read_committed=True)(do_nothing)() + + with self.assertRaisesRegexp(TransactionManagementError, 'Cannot be inside an atomic block.'): + with atomic(): + commit_on_success(read_committed=True)(do_nothing)() @ddt.ddt diff --git a/common/djangoapps/util/tests/test_file.py b/common/djangoapps/util/tests/test_file.py index ae798d080d8d..0a1b111a8f4e 100644 --- a/common/djangoapps/util/tests/test_file.py +++ b/common/djangoapps/util/tests/test_file.py @@ -88,7 +88,6 @@ def setUp(self): super(StoreUploadedFileTestCase, self).setUp() self.request = Mock(spec=HttpRequest) self.file_content = "test file content" - self.request.FILES = {"uploaded_file": SimpleUploadedFile("tempfile.csv", self.file_content)} self.stored_file_name = None self.file_storage = None self.default_max_size = 2000000 @@ -109,22 +108,27 @@ def test_error_conditions(self): Verifies that exceptions are thrown in the expected cases. """ with self.assertRaises(ValueError) as error: + self.request.FILES = {"uploaded_file": SimpleUploadedFile("tempfile.csv", self.file_content)} store_uploaded_file(self.request, "wrong_key", [".txt", ".csv"], "stored_file", self.default_max_size) self.verify_exception("No file uploaded with key 'wrong_key'.", error) with self.assertRaises(exceptions.PermissionDenied) as error: + self.request.FILES = {"uploaded_file": SimpleUploadedFile("tempfile.csv", self.file_content)} store_uploaded_file(self.request, "uploaded_file", [], "stored_file", self.default_max_size) self.verify_exception("The file must end with one of the following extensions: ''.", error) with self.assertRaises(exceptions.PermissionDenied) as error: + self.request.FILES = {"uploaded_file": SimpleUploadedFile("tempfile.csv", self.file_content)} store_uploaded_file(self.request, "uploaded_file", [".bar"], "stored_file", self.default_max_size) self.verify_exception("The file must end with the extension '.bar'.", error) with self.assertRaises(exceptions.PermissionDenied) as error: + self.request.FILES = {"uploaded_file": SimpleUploadedFile("tempfile.csv", self.file_content)} store_uploaded_file(self.request, "uploaded_file", [".xxx", ".bar"], "stored_file", self.default_max_size) self.verify_exception("The file must end with one of the following extensions: '.xxx', '.bar'.", error) with self.assertRaises(exceptions.PermissionDenied) as error: + self.request.FILES = {"uploaded_file": SimpleUploadedFile("tempfile.csv", self.file_content)} store_uploaded_file(self.request, "uploaded_file", [".csv"], "stored_file", 2) self.verify_exception("Maximum upload file size is 2 bytes.", error) @@ -158,6 +162,7 @@ def success_validator(storage, filename): store_file_data(storage, filename) with self.assertRaises(FileValidationException) as error: + self.request.FILES = {"uploaded_file": SimpleUploadedFile("tempfile.csv", self.file_content)} store_uploaded_file( self.request, "uploaded_file", [".csv"], "error_file", self.default_max_size, validator=exception_validator @@ -166,6 +171,7 @@ def success_validator(storage, filename): # Verify the file was deleted. verify_file_presence(False) + self.request.FILES = {"uploaded_file": SimpleUploadedFile("tempfile.csv", self.file_content)} store_uploaded_file( self.request, "uploaded_file", [".csv"], "success_file", self.default_max_size, validator=success_validator ) @@ -176,6 +182,7 @@ def test_file_upload_lower_case_extension(self): """ Tests uploading a file with lower case extension. Verifies that the stored file contents are correct. """ + self.request.FILES = {"uploaded_file": SimpleUploadedFile("tempfile.csv", self.file_content)} file_storage, stored_file_name = store_uploaded_file( self.request, "uploaded_file", [".csv"], "stored_file", self.default_max_size ) @@ -204,6 +211,7 @@ def test_unique_filenames(self): self.request, "nonunique_file", [".txt"], requested_file_name, self.default_max_size ) + self.request.FILES = {"nonunique_file": SimpleUploadedFile("nonunique.txt", file_content)} file_storage, second_stored_file_name = store_uploaded_file( self.request, "nonunique_file", [".txt"], requested_file_name, self.default_max_size ) diff --git a/common/djangoapps/util/tests/test_memcache.py b/common/djangoapps/util/tests/test_memcache.py index 805884012db1..939765e3a480 100644 --- a/common/djangoapps/util/tests/test_memcache.py +++ b/common/djangoapps/util/tests/test_memcache.py @@ -3,7 +3,7 @@ """ from django.test import TestCase -from django.core.cache import get_cache +from django.core.cache import caches from util.memcache import safe_key @@ -18,7 +18,7 @@ class MemcacheTest(TestCase): def setUp(self): super(MemcacheTest, self).setUp() - self.cache = get_cache('default') + self.cache = caches['default'] def test_safe_key(self): key = safe_key('test', 'prefix', 'version') diff --git a/common/djangoapps/util/url.py b/common/djangoapps/util/url.py index c90d83dea2a7..25250eb2d577 100644 --- a/common/djangoapps/util/url.py +++ b/common/djangoapps/util/url.py @@ -5,7 +5,7 @@ import sys from django.conf import settings from django.core.urlresolvers import set_urlconf -from django.utils.importlib import import_module +from importlib import import_module def reload_django_url_config(): diff --git a/common/djangoapps/xblock_django/migrations/0001_initial.py b/common/djangoapps/xblock_django/migrations/0001_initial.py index 68485f0196b6..21231c122a51 100644 --- a/common/djangoapps/xblock_django/migrations/0001_initial.py +++ b/common/djangoapps/xblock_django/migrations/0001_initial.py @@ -1,74 +1,30 @@ # -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'XBlockDisableConfig' - db.create_table('xblock_django_xblockdisableconfig', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('disabled_blocks', self.gf('django.db.models.fields.TextField')(default='', blank=True)), - )) - db.send_create_signal('xblock_django', ['XBlockDisableConfig']) - - - def backwards(self, orm): - # Deleting model 'XBlockDisableConfig' - db.delete_table('xblock_django_xblockdisableconfig') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'xblock_django.xblockdisableconfig': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'XBlockDisableConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'disabled_blocks': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['xblock_django'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='XBlockDisableConfig', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('disabled_blocks', models.TextField(default=b'', help_text='Space-separated list of XBlocks which should not render.', blank=True)), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + ] diff --git a/common/djangoapps/xblock_django/models.py b/common/djangoapps/xblock_django/models.py index 863be4a3a742..d527287307e0 100644 --- a/common/djangoapps/xblock_django/models.py +++ b/common/djangoapps/xblock_django/models.py @@ -13,6 +13,9 @@ class XBlockDisableConfig(ConfigurationModel): Configuration for disabling XBlocks. """ + class Meta(ConfigurationModel.Meta): + app_label = 'xblock_django' + disabled_blocks = TextField( default='', blank=True, help_text=_('Space-separated list of XBlocks which should not render.') diff --git a/common/djangoapps/xmodule_django/models.py b/common/djangoapps/xmodule_django/models.py index 99268d7e4f47..fdf7294f7769 100644 --- a/common/djangoapps/xmodule_django/models.py +++ b/common/djangoapps/xmodule_django/models.py @@ -7,8 +7,6 @@ from django.core.exceptions import ValidationError from opaque_keys.edx.keys import CourseKey, UsageKey, BlockTypeKey -from south.modelsinspector import add_introspection_rules - class NoneToEmptyManager(models.Manager): """ @@ -22,7 +20,10 @@ def __init__(self): """ super(NoneToEmptyManager, self).__init__() - def get_query_set(self): + def get_queryset(self): + """ + Returns the result of NoneToEmptyQuerySet instead of a regular QuerySet. + """ return NoneToEmptyQuerySet(self.model, using=self._db) @@ -171,9 +172,3 @@ class BlockTypeKeyField(OpaqueKeyField): """ description = "A BlockTypeKey object, saved to the DB in the form of a string." KEY_CLASS = BlockTypeKey - - -add_introspection_rules([], [r"^xmodule_django\.models\.CourseKeyField"]) -add_introspection_rules([], [r"^xmodule_django\.models\.LocationKeyField"]) -add_introspection_rules([], [r"^xmodule_django\.models\.UsageKeyField"]) -add_introspection_rules([], [r"^xmodule_django\.models\.BlockTypeKeyField"]) diff --git a/common/lib/capa/capa/tests/test_responsetypes.py b/common/lib/capa/capa/tests/test_responsetypes.py index 788c551dc2c3..a3a91e440fc9 100644 --- a/common/lib/capa/capa/tests/test_responsetypes.py +++ b/common/lib/capa/capa/tests/test_responsetypes.py @@ -57,11 +57,11 @@ def setUp(self): if self.xml_factory_class: self.xml_factory = self.xml_factory_class() - def build_problem(self, capa_system=None, **kwargs): + def build_problem(self, capa_system=None, **kwargs): # pylint: disable=missing-docstring xml = self.xml_factory.build_xml(**kwargs) return new_loncapa_problem(xml, capa_system=capa_system) - def assert_grade(self, problem, submission, expected_correctness, msg=None): + def assert_grade(self, problem, submission, expected_correctness, msg=None): # pylint: disable=missing-docstring input_dict = {'1_2_1': submission} correct_map = problem.grade_answers(input_dict) if msg is None: @@ -69,11 +69,11 @@ def assert_grade(self, problem, submission, expected_correctness, msg=None): else: self.assertEquals(correct_map.get_correctness('1_2_1'), expected_correctness, msg) - def assert_answer_format(self, problem): + def assert_answer_format(self, problem): # pylint: disable=missing-docstring answers = problem.get_question_answers() self.assertTrue(answers['1_2_1'] is not None) - def assert_multiple_grade(self, problem, correct_answers, incorrect_answers): + def assert_multiple_grade(self, problem, correct_answers, incorrect_answers): # pylint: disable=missing-docstring for input_str in correct_answers: result = problem.grade_answers({'1_2_1': input_str}).get_correctness('1_2_1') self.assertEqual(result, 'correct') @@ -109,7 +109,7 @@ def _get_random_number_result(self, seed_value): return str(rand.randint(0, 1e9)) -class MultiChoiceResponseTest(ResponseTest): +class MultiChoiceResponseTest(ResponseTest): # pylint: disable=missing-docstring xml_factory_class = MultipleChoiceResponseXMLFactory def test_multiple_choice_grade(self): @@ -170,7 +170,7 @@ def test_partial_points_multiple_choice_grade(self): self.assertAlmostEqual(correct_map.get_npoints('1_2_1'), 0) -class TrueFalseResponseTest(ResponseTest): +class TrueFalseResponseTest(ResponseTest): # pylint: disable=missing-docstring xml_factory_class = TrueFalseResponseXMLFactory def test_true_false_grade(self): @@ -214,7 +214,7 @@ def test_single_correct_response(self): self.assert_grade(problem, ['choice_0'], 'correct') -class ImageResponseTest(ResponseTest): +class ImageResponseTest(ResponseTest): # pylint: disable=missing-docstring xml_factory_class = ImageResponseXMLFactory def test_rectangle_grade(self): @@ -277,7 +277,7 @@ def test_show_answer(self): self.assert_answer_format(problem) -class SymbolicResponseTest(ResponseTest): +class SymbolicResponseTest(ResponseTest): # pylint: disable=missing-docstring xml_factory_class = SymbolicResponseXMLFactory def test_grade_single_input_correct(self): @@ -394,7 +394,7 @@ def _assert_symbolic_grade( ) -class OptionResponseTest(ResponseTest): +class OptionResponseTest(ResponseTest): # pylint: disable=missing-docstring xml_factory_class = OptionResponseXMLFactory def test_grade(self): @@ -592,7 +592,7 @@ def test_validate_answer(self): self.assertFalse(problem.responders.values()[0].validate_answer('3*y+2*x')) -class StringResponseTest(ResponseTest): +class StringResponseTest(ResponseTest): # pylint: disable=missing-docstring xml_factory_class = StringResponseXMLFactory def test_backward_compatibility_for_multiple_answers(self): @@ -947,7 +947,7 @@ def gimme_a_random_hint(answer_ids, student_answers, new_cmap, old_cmap): self.assertEqual(hint, self._get_random_number_result(problem.seed)) -class CodeResponseTest(ResponseTest): +class CodeResponseTest(ResponseTest): # pylint: disable=missing-docstring xml_factory_class = CodeResponseXMLFactory def setUp(self): @@ -1138,7 +1138,7 @@ def test_parse_score_msg_of_responder(self): self.assertEquals(output[answer_id]['msg'], u'Invalid grader reply. Please contact the course staff.') -class ChoiceResponseTest(ResponseTest): +class ChoiceResponseTest(ResponseTest): # pylint: disable=missing-docstring xml_factory_class = ChoiceResponseXMLFactory def test_radio_group_grade(self): @@ -1286,7 +1286,7 @@ def test_grade_with_no_checkbox_selected(self): self.assertEqual(correct_map.get_correctness('1_2_1'), 'incorrect') -class JavascriptResponseTest(ResponseTest): +class JavascriptResponseTest(ResponseTest): # pylint: disable=missing-docstring xml_factory_class = JavascriptResponseXMLFactory def test_grade(self): @@ -1326,7 +1326,7 @@ def test_cant_execute_javascript(self): ) -class NumericalResponseTest(ResponseTest): +class NumericalResponseTest(ResponseTest): # pylint: disable=missing-docstring xml_factory_class = NumericalResponseXMLFactory # We blend the line between integration (using evaluator) and exclusively @@ -1640,7 +1640,7 @@ def test_validate_answer(self): self.assertFalse(responder.validate_answer('fish')) -class CustomResponseTest(ResponseTest): +class CustomResponseTest(ResponseTest): # pylint: disable=missing-docstring xml_factory_class = CustomResponseXMLFactory def test_inline_code(self): diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index f1993e58b125..19b85a36a133 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -417,6 +417,7 @@ class CourseFields(object): ) has_children = True checklists = List( + help=_("Checklist to Follow When Developing a Course"), scope=Scope.settings, default=[ { @@ -787,7 +788,8 @@ class CourseFields(object): "number that you entered when you created the course. To use the course number that you entered when " "you created the course, enter null." ), - scope=Scope.settings + scope=Scope.settings, + default="" ) max_student_enrollments_allowed = Integer( diff --git a/common/lib/xmodule/xmodule/modulestore/django.py b/common/lib/xmodule/xmodule/modulestore/django.py index 9f61a4e8d6f3..7eb9ef8d8d84 100644 --- a/common/lib/xmodule/xmodule/modulestore/django.py +++ b/common/lib/xmodule/xmodule/modulestore/django.py @@ -17,7 +17,7 @@ if not settings.configured: settings.configure() -from django.core.cache import get_cache, InvalidCacheBackendError +from django.core.cache import caches, InvalidCacheBackendError import django.dispatch import django.utils @@ -152,9 +152,9 @@ def create_modulestore_instance( request_cache = None try: - metadata_inheritance_cache = get_cache('mongo_metadata_inheritance') + metadata_inheritance_cache = caches['mongo_metadata_inheritance'] except InvalidCacheBackendError: - metadata_inheritance_cache = get_cache('default') + metadata_inheritance_cache = caches['default'] if issubclass(class_, MixedModuleStore): _options['create_modulestore_instance'] = create_modulestore_instance @@ -214,7 +214,7 @@ def modulestore(): # should be updated to have a setting that enumerates modulestore # wrappers and then uses that setting to wrap the modulestore in # appropriate wrappers depending on enabled features. - from ccx.modulestore import CCXModulestoreWrapper # pylint: disable=import-error + from lms.djangoapps.ccx.modulestore import CCXModulestoreWrapper _MIXED_MODULESTORE = CCXModulestoreWrapper(_MIXED_MODULESTORE) return _MIXED_MODULESTORE diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py index 739fcf32ea7b..81dade550e0c 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py @@ -15,7 +15,7 @@ from pymongo.errors import DuplicateKeyError # pylint: disable=unused-import try: - from django.core.cache import get_cache, InvalidCacheBackendError + from django.core.cache import caches, InvalidCacheBackendError DJANGO_AVAILABLE = True except ImportError: DJANGO_AVAILABLE = False @@ -32,6 +32,15 @@ new_contract('BlockData', BlockData) +def get_cache(alias): + """ + Return cache for an `alias` + + Note: The primary purpose of this is to mock the cache in test_split_modulestore.py + """ + return caches[alias] + + def round_power_2(value): """ Return value rounded up to the nearest power of 2. diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py index 5e10752fa787..4c0ee8770593 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py @@ -13,7 +13,7 @@ import ddt from contracts import contract from nose.plugins.attrib import attr -from django.core.cache import get_cache, InvalidCacheBackendError +from django.core.cache import caches, InvalidCacheBackendError from openedx.core.lib import tempdir from xblock.fields import Reference, ReferenceList, ReferenceValueDict @@ -934,7 +934,7 @@ class TestCourseStructureCache(SplitModuleTest): def setUp(self): # use the default cache, since the `course_structure_cache` # is a dummy cache during testing - self.cache = get_cache('default') + self.cache = caches['default'] # make sure we clear the cache before every test... self.cache.clear() diff --git a/common/lib/xmodule/xmodule/static_content.py b/common/lib/xmodule/xmodule/static_content.py index deed93e0c5a0..dd4fbecbc6d1 100755 --- a/common/lib/xmodule/xmodule/static_content.py +++ b/common/lib/xmodule/xmodule/static_content.py @@ -186,6 +186,9 @@ def main(): Generate Usage: static_content.py """ + from django.conf import settings + settings.configure() + args = docopt(main.__doc__) root = path(args['']) diff --git a/common/lib/xmodule/xmodule/tests/test_course_metadata_utils.py b/common/lib/xmodule/xmodule/tests/test_course_metadata_utils.py index 6743dcbf4e01..5e8d4ec20367 100644 --- a/common/lib/xmodule/xmodule/tests/test_course_metadata_utils.py +++ b/common/lib/xmodule/xmodule/tests/test_course_metadata_utils.py @@ -6,7 +6,6 @@ from unittest import TestCase from django.utils.timezone import UTC -from django.utils.translation import ugettext from xmodule.course_metadata_utils import ( clean_course_key, @@ -105,6 +104,10 @@ def mock_strftime_localized(date_time, format_string): else: raise ValueError("Invalid format string :" + format_string) + def nop_gettext(text): + """Dummy implementation of gettext, so we don't need Django.""" + return text + test_datetime = datetime(1945, 02, 06, 04, 20, 00, tzinfo=UTC()) advertised_start_parsable = "2038-01-19 03:14:07" advertised_start_bad_date = "215-01-01 10:10:10" @@ -158,36 +161,34 @@ def mock_strftime_localized(date_time, format_string): # Test parsable advertised start date. # Expect start datetime to be parsed and formatted back into a string. TestScenario( - (DEFAULT_START_DATE, advertised_start_parsable, 'DATE_TIME', ugettext, mock_strftime_localized), + (DEFAULT_START_DATE, advertised_start_parsable, 'DATE_TIME', nop_gettext, mock_strftime_localized), mock_strftime_localized(Date().from_json(advertised_start_parsable), 'DATE_TIME') + " UTC" ), # Test un-parsable advertised start date. # Expect date parsing to throw a ValueError, and the advertised # start to be returned in Title Case. TestScenario( - (test_datetime, advertised_start_unparsable, 'DATE_TIME', ugettext, mock_strftime_localized), + (test_datetime, advertised_start_unparsable, 'DATE_TIME', nop_gettext, mock_strftime_localized), advertised_start_unparsable.title() ), # Test parsable advertised start date from before January 1, 1900. # Expect mock_strftime_localized to throw a ValueError, and the # advertised start to be returned in Title Case. TestScenario( - (test_datetime, advertised_start_bad_date, 'DATE_TIME', ugettext, mock_strftime_localized), + (test_datetime, advertised_start_bad_date, 'DATE_TIME', nop_gettext, mock_strftime_localized), advertised_start_bad_date.title() ), # Test without advertised start date, but with a set start datetime. # Expect formatted datetime to be returned. TestScenario( - (test_datetime, None, 'SHORT_DATE', ugettext, mock_strftime_localized), + (test_datetime, None, 'SHORT_DATE', nop_gettext, mock_strftime_localized), mock_strftime_localized(test_datetime, 'SHORT_DATE') ), # Test without advertised start date and with default start datetime. # Expect TBD to be returned. TestScenario( - (DEFAULT_START_DATE, None, 'SHORT_DATE', ugettext, mock_strftime_localized), - # Translators: TBD stands for 'To Be Determined' and is used when a course - # does not yet have an announced start date. - ugettext('TBD') + (DEFAULT_START_DATE, None, 'SHORT_DATE', nop_gettext, mock_strftime_localized), + 'TBD' ) ]), FunctionTest(course_end_datetime_text, [ diff --git a/common/test/acceptance/pages/lms/instructor_dashboard.py b/common/test/acceptance/pages/lms/instructor_dashboard.py index 83e42928968d..9286f6ed2951 100644 --- a/common/test/acceptance/pages/lms/instructor_dashboard.py +++ b/common/test/acceptance/pages/lms/instructor_dashboard.py @@ -775,8 +775,8 @@ class SpecialExamsPageAttemptsSection(PageObject): url = None def is_browser_on_page(self): - return self.q(css="div.wrap #ui-accordion-proctoring-accordion-header-1[aria-selected=true]").present and\ - self.q(css="#search_attempt_id").present + return (self.q(css="div.wrap #ui-accordion-proctoring-accordion-header-1[aria-selected=true]").present and + self.q(css="#search_attempt_id").present) @property def is_search_text_field_visible(self): diff --git a/common/test/acceptance/tests/discussion/helpers.py b/common/test/acceptance/tests/discussion/helpers.py index 269148b20de4..949628d98d4c 100644 --- a/common/test/acceptance/tests/discussion/helpers.py +++ b/common/test/acceptance/tests/discussion/helpers.py @@ -81,6 +81,7 @@ def add_user_to_cohort(self, course_fixture, username, cohort_id): """ url = LMS_BASE_URL + "/courses/" + course_fixture._course_key + "/cohorts/{}/add".format(cohort_id) data = {"users": username} + course_fixture.headers['Content-type'] = 'application/x-www-form-urlencoded' response = course_fixture.session.post(url, data=data, headers=course_fixture.headers) self.assertTrue(response.ok, "Failed to add user to cohort") diff --git a/common/test/acceptance/tests/lms/test_teams.py b/common/test/acceptance/tests/lms/test_teams.py index b1226e647a3d..08b96e9c0be7 100644 --- a/common/test/acceptance/tests/lms/test_teams.py +++ b/common/test/acceptance/tests/lms/test_teams.py @@ -673,10 +673,7 @@ def test_sort_teams(self, sort_order, secondary_sort_order, reverse): user_info = AutoAuthPage(self.browser, course_id=self.course_id).visit().user_info self.create_membership(user_info['username'], team['id']) team['open_slots'] = self.max_team_size - i - # Parse last activity date, removing microseconds because - # the Django ORM does not support them. Will be fixed in - # Django 1.8. - team['last_activity_at'] = parse(team['last_activity_at']).replace(microsecond=0) + # Re-authenticate as staff after creating users AutoAuthPage( self.browser, diff --git a/common/test/db_cache/bok_choy_data.json b/common/test/db_cache/bok_choy_data.json deleted file mode 100644 index 74b2c4d6752f..000000000000 --- a/common/test/db_cache/bok_choy_data.json +++ /dev/null @@ -1 +0,0 @@ -[{"pk": 81, "model": "contenttypes.contenttype", "fields": {"model": "accesstoken", "name": "access token", "app_label": "oauth2"}}, {"pk": 164, "model": "contenttypes.contenttype", "fields": {"model": "aiclassifier", "name": "ai classifier", "app_label": "assessment"}}, {"pk": 163, "model": "contenttypes.contenttype", "fields": {"model": "aiclassifierset", "name": "ai classifier set", "app_label": "assessment"}}, {"pk": 166, "model": "contenttypes.contenttype", "fields": {"model": "aigradingworkflow", "name": "ai grading workflow", "app_label": "assessment"}}, {"pk": 165, "model": "contenttypes.contenttype", "fields": {"model": "aitrainingworkflow", "name": "ai training workflow", "app_label": "assessment"}}, {"pk": 35, "model": "contenttypes.contenttype", "fields": {"model": "anonymoususerid", "name": "anonymous user id", "app_label": "student"}}, {"pk": 84, "model": "contenttypes.contenttype", "fields": {"model": "article", "name": "article", "app_label": "wiki"}}, {"pk": 85, "model": "contenttypes.contenttype", "fields": {"model": "articleforobject", "name": "Article for object", "app_label": "wiki"}}, {"pk": 88, "model": "contenttypes.contenttype", "fields": {"model": "articleplugin", "name": "article plugin", "app_label": "wiki"}}, {"pk": 86, "model": "contenttypes.contenttype", "fields": {"model": "articlerevision", "name": "article revision", "app_label": "wiki"}}, {"pk": 93, "model": "contenttypes.contenttype", "fields": {"model": "articlesubscription", "name": "article subscription", "app_label": "wiki"}}, {"pk": 154, "model": "contenttypes.contenttype", "fields": {"model": "assessment", "name": "assessment", "app_label": "assessment"}}, {"pk": 157, "model": "contenttypes.contenttype", "fields": {"model": "assessmentfeedback", "name": "assessment feedback", "app_label": "assessment"}}, {"pk": 156, "model": "contenttypes.contenttype", "fields": {"model": "assessmentfeedbackoption", "name": "assessment feedback option", "app_label": "assessment"}}, {"pk": 155, "model": "contenttypes.contenttype", "fields": {"model": "assessmentpart", "name": "assessment part", "app_label": "assessment"}}, {"pk": 167, "model": "contenttypes.contenttype", "fields": {"model": "assessmentworkflow", "name": "assessment workflow", "app_label": "workflow"}}, {"pk": 169, "model": "contenttypes.contenttype", "fields": {"model": "assessmentworkflowcancellation", "name": "assessment workflow cancellation", "app_label": "workflow"}}, {"pk": 168, "model": "contenttypes.contenttype", "fields": {"model": "assessmentworkflowstep", "name": "assessment workflow step", "app_label": "workflow"}}, {"pk": 19, "model": "contenttypes.contenttype", "fields": {"model": "association", "name": "association", "app_label": "django_openid_auth"}}, {"pk": 25, "model": "contenttypes.contenttype", "fields": {"model": "association", "name": "association", "app_label": "default"}}, {"pk": 63, "model": "contenttypes.contenttype", "fields": {"model": "badgeassertion", "name": "badge assertion", "app_label": "certificates"}}, {"pk": 64, "model": "contenttypes.contenttype", "fields": {"model": "badgeimageconfiguration", "name": "badge image configuration", "app_label": "certificates"}}, {"pk": 77, "model": "contenttypes.contenttype", "fields": {"model": "brandingapiconfig", "name": "branding api config", "app_label": "branding"}}, {"pk": 76, "model": "contenttypes.contenttype", "fields": {"model": "brandinginfoconfig", "name": "branding info config", "app_label": "branding"}}, {"pk": 61, "model": "contenttypes.contenttype", "fields": {"model": "certificategenerationconfiguration", "name": "certificate generation configuration", "app_label": "certificates"}}, {"pk": 60, "model": "contenttypes.contenttype", "fields": {"model": "certificategenerationcoursesetting", "name": "certificate generation course setting", "app_label": "certificates"}}, {"pk": 62, "model": "contenttypes.contenttype", "fields": {"model": "certificatehtmlviewconfiguration", "name": "certificate html view configuration", "app_label": "certificates"}}, {"pk": 122, "model": "contenttypes.contenttype", "fields": {"model": "certificateitem", "name": "certificate item", "app_label": "shoppingcart"}}, {"pk": 56, "model": "contenttypes.contenttype", "fields": {"model": "certificatewhitelist", "name": "certificate whitelist", "app_label": "certificates"}}, {"pk": 79, "model": "contenttypes.contenttype", "fields": {"model": "client", "name": "client", "app_label": "oauth2"}}, {"pk": 26, "model": "contenttypes.contenttype", "fields": {"model": "code", "name": "code", "app_label": "default"}}, {"pk": 4, "model": "contenttypes.contenttype", "fields": {"model": "contenttype", "name": "content type", "app_label": "contenttypes"}}, {"pk": 22, "model": "contenttypes.contenttype", "fields": {"model": "corsmodel", "name": "cors model", "app_label": "corsheaders"}}, {"pk": 136, "model": "contenttypes.contenttype", "fields": {"model": "country", "name": "country", "app_label": "embargo"}}, {"pk": 137, "model": "contenttypes.contenttype", "fields": {"model": "countryaccessrule", "name": "country access rule", "app_label": "embargo"}}, {"pk": 116, "model": "contenttypes.contenttype", "fields": {"model": "coupon", "name": "coupon", "app_label": "shoppingcart"}}, {"pk": 117, "model": "contenttypes.contenttype", "fields": {"model": "couponredemption", "name": "coupon redemption", "app_label": "shoppingcart"}}, {"pk": 48, "model": "contenttypes.contenttype", "fields": {"model": "courseaccessrole", "name": "course access role", "app_label": "student"}}, {"pk": 138, "model": "contenttypes.contenttype", "fields": {"model": "courseaccessrulehistory", "name": "course access rule history", "app_label": "embargo"}}, {"pk": 75, "model": "contenttypes.contenttype", "fields": {"model": "courseauthorization", "name": "course authorization", "app_label": "bulk_email"}}, {"pk": 71, "model": "contenttypes.contenttype", "fields": {"model": "coursecohort", "name": "course cohort", "app_label": "course_groups"}}, {"pk": 70, "model": "contenttypes.contenttype", "fields": {"model": "coursecohortssettings", "name": "course cohorts settings", "app_label": "course_groups"}}, {"pk": 178, "model": "contenttypes.contenttype", "fields": {"model": "coursecontentmilestone", "name": "course content milestone", "app_label": "milestones"}}, {"pk": 189, "model": "contenttypes.contenttype", "fields": {"model": "coursecreator", "name": "course creator", "app_label": "course_creators"}}, {"pk": 72, "model": "contenttypes.contenttype", "fields": {"model": "courseemail", "name": "course email", "app_label": "bulk_email"}}, {"pk": 74, "model": "contenttypes.contenttype", "fields": {"model": "courseemailtemplate", "name": "course email template", "app_label": "bulk_email"}}, {"pk": 45, "model": "contenttypes.contenttype", "fields": {"model": "courseenrollment", "name": "course enrollment", "app_label": "student"}}, {"pk": 47, "model": "contenttypes.contenttype", "fields": {"model": "courseenrollmentallowed", "name": "course enrollment allowed", "app_label": "student"}}, {"pk": 53, "model": "contenttypes.contenttype", "fields": {"model": "courseenrollmentattribute", "name": "course enrollment attribute", "app_label": "student"}}, {"pk": 177, "model": "contenttypes.contenttype", "fields": {"model": "coursemilestone", "name": "course milestone", "app_label": "milestones"}}, {"pk": 125, "model": "contenttypes.contenttype", "fields": {"model": "coursemode", "name": "course mode", "app_label": "course_modes"}}, {"pk": 126, "model": "contenttypes.contenttype", "fields": {"model": "coursemodesarchive", "name": "course modes archive", "app_label": "course_modes"}}, {"pk": 119, "model": "contenttypes.contenttype", "fields": {"model": "courseregcodeitem", "name": "course reg code item", "app_label": "shoppingcart"}}, {"pk": 120, "model": "contenttypes.contenttype", "fields": {"model": "courseregcodeitemannotation", "name": "course reg code item annotation", "app_label": "shoppingcart"}}, {"pk": 114, "model": "contenttypes.contenttype", "fields": {"model": "courseregistrationcode", "name": "course registration code", "app_label": "shoppingcart"}}, {"pk": 112, "model": "contenttypes.contenttype", "fields": {"model": "courseregistrationcodeinvoiceitem", "name": "course registration code invoice item", "app_label": "shoppingcart"}}, {"pk": 140, "model": "contenttypes.contenttype", "fields": {"model": "coursererunstate", "name": "course rerun state", "app_label": "course_action_state"}}, {"pk": 66, "model": "contenttypes.contenttype", "fields": {"model": "coursesoftware", "name": "course software", "app_label": "licenses"}}, {"pk": 145, "model": "contenttypes.contenttype", "fields": {"model": "coursestructure", "name": "course structure", "app_label": "course_structures"}}, {"pk": 105, "model": "contenttypes.contenttype", "fields": {"model": "courseteam", "name": "course team", "app_label": "teams"}}, {"pk": 106, "model": "contenttypes.contenttype", "fields": {"model": "courseteammembership", "name": "course team membership", "app_label": "teams"}}, {"pk": 68, "model": "contenttypes.contenttype", "fields": {"model": "courseusergroup", "name": "course user group", "app_label": "course_groups"}}, {"pk": 69, "model": "contenttypes.contenttype", "fields": {"model": "courseusergrouppartitiongroup", "name": "course user group partition group", "app_label": "course_groups"}}, {"pk": 172, "model": "contenttypes.contenttype", "fields": {"model": "coursevideo", "name": "course video", "app_label": "edxval"}}, {"pk": 181, "model": "contenttypes.contenttype", "fields": {"model": "creditcourse", "name": "credit course", "app_label": "credit"}}, {"pk": 184, "model": "contenttypes.contenttype", "fields": {"model": "crediteligibility", "name": "credit eligibility", "app_label": "credit"}}, {"pk": 180, "model": "contenttypes.contenttype", "fields": {"model": "creditprovider", "name": "credit provider", "app_label": "credit"}}, {"pk": 186, "model": "contenttypes.contenttype", "fields": {"model": "creditrequest", "name": "credit request", "app_label": "credit"}}, {"pk": 182, "model": "contenttypes.contenttype", "fields": {"model": "creditrequirement", "name": "credit requirement", "app_label": "credit"}}, {"pk": 183, "model": "contenttypes.contenttype", "fields": {"model": "creditrequirementstatus", "name": "credit requirement status", "app_label": "credit"}}, {"pk": 152, "model": "contenttypes.contenttype", "fields": {"model": "criterion", "name": "criterion", "app_label": "assessment"}}, {"pk": 153, "model": "contenttypes.contenttype", "fields": {"model": "criterionoption", "name": "criterion option", "app_label": "assessment"}}, {"pk": 10, "model": "contenttypes.contenttype", "fields": {"model": "crontabschedule", "name": "crontab", "app_label": "djcelery"}}, {"pk": 132, "model": "contenttypes.contenttype", "fields": {"model": "darklangconfig", "name": "dark lang config", "app_label": "dark_lang"}}, {"pk": 49, "model": "contenttypes.contenttype", "fields": {"model": "dashboardconfiguration", "name": "dashboard configuration", "app_label": "student"}}, {"pk": 124, "model": "contenttypes.contenttype", "fields": {"model": "donation", "name": "donation", "app_label": "shoppingcart"}}, {"pk": 123, "model": "contenttypes.contenttype", "fields": {"model": "donationconfiguration", "name": "donation configuration", "app_label": "shoppingcart"}}, {"pk": 133, "model": "contenttypes.contenttype", "fields": {"model": "embargoedcourse", "name": "embargoed course", "app_label": "embargo"}}, {"pk": 134, "model": "contenttypes.contenttype", "fields": {"model": "embargoedstate", "name": "embargoed state", "app_label": "embargo"}}, {"pk": 173, "model": "contenttypes.contenttype", "fields": {"model": "encodedvideo", "name": "encoded video", "app_label": "edxval"}}, {"pk": 51, "model": "contenttypes.contenttype", "fields": {"model": "entranceexamconfiguration", "name": "entrance exam configuration", "app_label": "student"}}, {"pk": 59, "model": "contenttypes.contenttype", "fields": {"model": "examplecertificate", "name": "example certificate", "app_label": "certificates"}}, {"pk": 58, "model": "contenttypes.contenttype", "fields": {"model": "examplecertificateset", "name": "example certificate set", "app_label": "certificates"}}, {"pk": 78, "model": "contenttypes.contenttype", "fields": {"model": "externalauthmap", "name": "external auth map", "app_label": "external_auth"}}, {"pk": 57, "model": "contenttypes.contenttype", "fields": {"model": "generatedcertificate", "name": "generated certificate", "app_label": "certificates"}}, {"pk": 80, "model": "contenttypes.contenttype", "fields": {"model": "grant", "name": "grant", "app_label": "oauth2"}}, {"pk": 2, "model": "contenttypes.contenttype", "fields": {"model": "group", "name": "group", "app_label": "auth"}}, {"pk": 185, "model": "contenttypes.contenttype", "fields": {"model": "historicalcreditrequest", "name": "historical credit request", "app_label": "credit"}}, {"pk": 130, "model": "contenttypes.contenttype", "fields": {"model": "incoursereverificationconfiguration", "name": "in course reverification configuration", "app_label": "verify_student"}}, {"pk": 65, "model": "contenttypes.contenttype", "fields": {"model": "instructortask", "name": "instructor task", "app_label": "instructor_task"}}, {"pk": 9, "model": "contenttypes.contenttype", "fields": {"model": "intervalschedule", "name": "interval", "app_label": "djcelery"}}, {"pk": 109, "model": "contenttypes.contenttype", "fields": {"model": "invoice", "name": "invoice", "app_label": "shoppingcart"}}, {"pk": 113, "model": "contenttypes.contenttype", "fields": {"model": "invoicehistory", "name": "invoice history", "app_label": "shoppingcart"}}, {"pk": 111, "model": "contenttypes.contenttype", "fields": {"model": "invoiceitem", "name": "invoice item", "app_label": "shoppingcart"}}, {"pk": 110, "model": "contenttypes.contenttype", "fields": {"model": "invoicetransaction", "name": "invoice transaction", "app_label": "shoppingcart"}}, {"pk": 139, "model": "contenttypes.contenttype", "fields": {"model": "ipfilter", "name": "ip filter", "app_label": "embargo"}}, {"pk": 52, "model": "contenttypes.contenttype", "fields": {"model": "languageproficiency", "name": "language proficiency", "app_label": "student"}}, {"pk": 50, "model": "contenttypes.contenttype", "fields": {"model": "linkedinaddtoprofileconfiguration", "name": "linked in add to profile configuration", "app_label": "student"}}, {"pk": 21, "model": "contenttypes.contenttype", "fields": {"model": "logentry", "name": "log entry", "app_label": "admin"}}, {"pk": 44, "model": "contenttypes.contenttype", "fields": {"model": "loginfailures", "name": "login failures", "app_label": "student"}}, {"pk": 46, "model": "contenttypes.contenttype", "fields": {"model": "manualenrollmentaudit", "name": "manual enrollment audit", "app_label": "student"}}, {"pk": 15, "model": "contenttypes.contenttype", "fields": {"model": "migrationhistory", "name": "migration history", "app_label": "south"}}, {"pk": 175, "model": "contenttypes.contenttype", "fields": {"model": "milestone", "name": "milestone", "app_label": "milestones"}}, {"pk": 176, "model": "contenttypes.contenttype", "fields": {"model": "milestonerelationshiptype", "name": "milestone relationship type", "app_label": "milestones"}}, {"pk": 141, "model": "contenttypes.contenttype", "fields": {"model": "mobileapiconfig", "name": "mobile api config", "app_label": "mobile_api"}}, {"pk": 18, "model": "contenttypes.contenttype", "fields": {"model": "nonce", "name": "nonce", "app_label": "django_openid_auth"}}, {"pk": 24, "model": "contenttypes.contenttype", "fields": {"model": "nonce", "name": "nonce", "app_label": "default"}}, {"pk": 100, "model": "contenttypes.contenttype", "fields": {"model": "note", "name": "note", "app_label": "notes"}}, {"pk": 97, "model": "contenttypes.contenttype", "fields": {"model": "notification", "name": "notification", "app_label": "django_notify"}}, {"pk": 32, "model": "contenttypes.contenttype", "fields": {"model": "offlinecomputedgrade", "name": "offline computed grade", "app_label": "courseware"}}, {"pk": 33, "model": "contenttypes.contenttype", "fields": {"model": "offlinecomputedgradelog", "name": "offline computed grade log", "app_label": "courseware"}}, {"pk": 73, "model": "contenttypes.contenttype", "fields": {"model": "optout", "name": "optout", "app_label": "bulk_email"}}, {"pk": 107, "model": "contenttypes.contenttype", "fields": {"model": "order", "name": "order", "app_label": "shoppingcart"}}, {"pk": 108, "model": "contenttypes.contenttype", "fields": {"model": "orderitem", "name": "order item", "app_label": "shoppingcart"}}, {"pk": 118, "model": "contenttypes.contenttype", "fields": {"model": "paidcourseregistration", "name": "paid course registration", "app_label": "shoppingcart"}}, {"pk": 121, "model": "contenttypes.contenttype", "fields": {"model": "paidcourseregistrationannotation", "name": "paid course registration annotation", "app_label": "shoppingcart"}}, {"pk": 43, "model": "contenttypes.contenttype", "fields": {"model": "passwordhistory", "name": "password history", "app_label": "student"}}, {"pk": 158, "model": "contenttypes.contenttype", "fields": {"model": "peerworkflow", "name": "peer workflow", "app_label": "assessment"}}, {"pk": 159, "model": "contenttypes.contenttype", "fields": {"model": "peerworkflowitem", "name": "peer workflow item", "app_label": "assessment"}}, {"pk": 42, "model": "contenttypes.contenttype", "fields": {"model": "pendingemailchange", "name": "pending email change", "app_label": "student"}}, {"pk": 41, "model": "contenttypes.contenttype", "fields": {"model": "pendingnamechange", "name": "pending name change", "app_label": "student"}}, {"pk": 12, "model": "contenttypes.contenttype", "fields": {"model": "periodictask", "name": "periodic task", "app_label": "djcelery"}}, {"pk": 11, "model": "contenttypes.contenttype", "fields": {"model": "periodictasks", "name": "periodic tasks", "app_label": "djcelery"}}, {"pk": 1, "model": "contenttypes.contenttype", "fields": {"model": "permission", "name": "permission", "app_label": "auth"}}, {"pk": 170, "model": "contenttypes.contenttype", "fields": {"model": "profile", "name": "profile", "app_label": "edxval"}}, {"pk": 17, "model": "contenttypes.contenttype", "fields": {"model": "psychometricdata", "name": "psychometric data", "app_label": "psychometrics"}}, {"pk": 188, "model": "contenttypes.contenttype", "fields": {"model": "pushnotificationconfig", "name": "push notification config", "app_label": "contentstore"}}, {"pk": 99, "model": "contenttypes.contenttype", "fields": {"model": "puzzlecomplete", "name": "puzzle complete", "app_label": "foldit"}}, {"pk": 55, "model": "contenttypes.contenttype", "fields": {"model": "ratelimitconfiguration", "name": "rate limit configuration", "app_label": "util"}}, {"pk": 82, "model": "contenttypes.contenttype", "fields": {"model": "refreshtoken", "name": "refresh token", "app_label": "oauth2"}}, {"pk": 40, "model": "contenttypes.contenttype", "fields": {"model": "registration", "name": "registration", "app_label": "student"}}, {"pk": 115, "model": "contenttypes.contenttype", "fields": {"model": "registrationcoderedemption", "name": "registration code redemption", "app_label": "shoppingcart"}}, {"pk": 135, "model": "contenttypes.contenttype", "fields": {"model": "restrictedcourse", "name": "restricted course", "app_label": "embargo"}}, {"pk": 89, "model": "contenttypes.contenttype", "fields": {"model": "reusableplugin", "name": "reusable plugin", "app_label": "wiki"}}, {"pk": 91, "model": "contenttypes.contenttype", "fields": {"model": "revisionplugin", "name": "revision plugin", "app_label": "wiki"}}, {"pk": 92, "model": "contenttypes.contenttype", "fields": {"model": "revisionpluginrevision", "name": "revision plugin revision", "app_label": "wiki"}}, {"pk": 151, "model": "contenttypes.contenttype", "fields": {"model": "rubric", "name": "rubric", "app_label": "assessment"}}, {"pk": 8, "model": "contenttypes.contenttype", "fields": {"model": "tasksetmeta", "name": "saved group result", "app_label": "djcelery"}}, {"pk": 98, "model": "contenttypes.contenttype", "fields": {"model": "score", "name": "score", "app_label": "foldit"}}, {"pk": 149, "model": "contenttypes.contenttype", "fields": {"model": "score", "name": "score", "app_label": "submissions"}}, {"pk": 150, "model": "contenttypes.contenttype", "fields": {"model": "scoresummary", "name": "score summary", "app_label": "submissions"}}, {"pk": 16, "model": "contenttypes.contenttype", "fields": {"model": "servercircuit", "name": "server circuit", "app_label": "circuit"}}, {"pk": 5, "model": "contenttypes.contenttype", "fields": {"model": "session", "name": "session", "app_label": "sessions"}}, {"pk": 95, "model": "contenttypes.contenttype", "fields": {"model": "settings", "name": "settings", "app_label": "django_notify"}}, {"pk": 90, "model": "contenttypes.contenttype", "fields": {"model": "simpleplugin", "name": "simple plugin", "app_label": "wiki"}}, {"pk": 6, "model": "contenttypes.contenttype", "fields": {"model": "site", "name": "site", "app_label": "sites"}}, {"pk": 131, "model": "contenttypes.contenttype", "fields": {"model": "skippedreverification", "name": "skipped reverification", "app_label": "verify_student"}}, {"pk": 127, "model": "contenttypes.contenttype", "fields": {"model": "softwaresecurephotoverification", "name": "software secure photo verification", "app_label": "verify_student"}}, {"pk": 101, "model": "contenttypes.contenttype", "fields": {"model": "splashconfig", "name": "splash config", "app_label": "splash"}}, {"pk": 34, "model": "contenttypes.contenttype", "fields": {"model": "studentfieldoverride", "name": "student field override", "app_label": "courseware"}}, {"pk": 147, "model": "contenttypes.contenttype", "fields": {"model": "studentitem", "name": "student item", "app_label": "submissions"}}, {"pk": 27, "model": "contenttypes.contenttype", "fields": {"model": "studentmodule", "name": "student module", "app_label": "courseware"}}, {"pk": 28, "model": "contenttypes.contenttype", "fields": {"model": "studentmodulehistory", "name": "student module history", "app_label": "courseware"}}, {"pk": 161, "model": "contenttypes.contenttype", "fields": {"model": "studenttrainingworkflow", "name": "student training workflow", "app_label": "assessment"}}, {"pk": 162, "model": "contenttypes.contenttype", "fields": {"model": "studenttrainingworkflowitem", "name": "student training workflow item", "app_label": "assessment"}}, {"pk": 190, "model": "contenttypes.contenttype", "fields": {"model": "studioconfig", "name": "studio config", "app_label": "xblock_config"}}, {"pk": 148, "model": "contenttypes.contenttype", "fields": {"model": "submission", "name": "submission", "app_label": "submissions"}}, {"pk": 96, "model": "contenttypes.contenttype", "fields": {"model": "subscription", "name": "subscription", "app_label": "django_notify"}}, {"pk": 174, "model": "contenttypes.contenttype", "fields": {"model": "subtitle", "name": "subtitle", "app_label": "edxval"}}, {"pk": 143, "model": "contenttypes.contenttype", "fields": {"model": "surveyanswer", "name": "survey answer", "app_label": "survey"}}, {"pk": 142, "model": "contenttypes.contenttype", "fields": {"model": "surveyform", "name": "survey form", "app_label": "survey"}}, {"pk": 14, "model": "contenttypes.contenttype", "fields": {"model": "taskstate", "name": "task", "app_label": "djcelery"}}, {"pk": 7, "model": "contenttypes.contenttype", "fields": {"model": "taskmeta", "name": "task state", "app_label": "djcelery"}}, {"pk": 54, "model": "contenttypes.contenttype", "fields": {"model": "trackinglog", "name": "tracking log", "app_label": "track"}}, {"pk": 160, "model": "contenttypes.contenttype", "fields": {"model": "trainingexample", "name": "training example", "app_label": "assessment"}}, {"pk": 83, "model": "contenttypes.contenttype", "fields": {"model": "trustedclient", "name": "trusted client", "app_label": "oauth2_provider"}}, {"pk": 94, "model": "contenttypes.contenttype", "fields": {"model": "notificationtype", "name": "type", "app_label": "django_notify"}}, {"pk": 87, "model": "contenttypes.contenttype", "fields": {"model": "urlpath", "name": "URL path", "app_label": "wiki"}}, {"pk": 3, "model": "contenttypes.contenttype", "fields": {"model": "user", "name": "user", "app_label": "auth"}}, {"pk": 103, "model": "contenttypes.contenttype", "fields": {"model": "usercoursetag", "name": "user course tag", "app_label": "user_api"}}, {"pk": 67, "model": "contenttypes.contenttype", "fields": {"model": "userlicense", "name": "user license", "app_label": "licenses"}}, {"pk": 179, "model": "contenttypes.contenttype", "fields": {"model": "usermilestone", "name": "user milestone", "app_label": "milestones"}}, {"pk": 20, "model": "contenttypes.contenttype", "fields": {"model": "useropenid", "name": "user open id", "app_label": "django_openid_auth"}}, {"pk": 104, "model": "contenttypes.contenttype", "fields": {"model": "userorgtag", "name": "user org tag", "app_label": "user_api"}}, {"pk": 102, "model": "contenttypes.contenttype", "fields": {"model": "userpreference", "name": "user preference", "app_label": "user_api"}}, {"pk": 37, "model": "contenttypes.contenttype", "fields": {"model": "userprofile", "name": "user profile", "app_label": "student"}}, {"pk": 38, "model": "contenttypes.contenttype", "fields": {"model": "usersignupsource", "name": "user signup source", "app_label": "student"}}, {"pk": 23, "model": "contenttypes.contenttype", "fields": {"model": "usersocialauth", "name": "user social auth", "app_label": "default"}}, {"pk": 36, "model": "contenttypes.contenttype", "fields": {"model": "userstanding", "name": "user standing", "app_label": "student"}}, {"pk": 39, "model": "contenttypes.contenttype", "fields": {"model": "usertestgroup", "name": "user test group", "app_label": "student"}}, {"pk": 128, "model": "contenttypes.contenttype", "fields": {"model": "verificationcheckpoint", "name": "verification checkpoint", "app_label": "verify_student"}}, {"pk": 129, "model": "contenttypes.contenttype", "fields": {"model": "verificationstatus", "name": "Verification Status", "app_label": "verify_student"}}, {"pk": 171, "model": "contenttypes.contenttype", "fields": {"model": "video", "name": "video", "app_label": "edxval"}}, {"pk": 187, "model": "contenttypes.contenttype", "fields": {"model": "videouploadconfig", "name": "video upload config", "app_label": "contentstore"}}, {"pk": 13, "model": "contenttypes.contenttype", "fields": {"model": "workerstate", "name": "worker", "app_label": "djcelery"}}, {"pk": 144, "model": "contenttypes.contenttype", "fields": {"model": "xblockasidesconfig", "name": "x block asides config", "app_label": "lms_xblock"}}, {"pk": 146, "model": "contenttypes.contenttype", "fields": {"model": "xdomainproxyconfiguration", "name": "x domain proxy configuration", "app_label": "cors_csrf"}}, {"pk": 31, "model": "contenttypes.contenttype", "fields": {"model": "xmodulestudentinfofield", "name": "x module student info field", "app_label": "courseware"}}, {"pk": 30, "model": "contenttypes.contenttype", "fields": {"model": "xmodulestudentprefsfield", "name": "x module student prefs field", "app_label": "courseware"}}, {"pk": 29, "model": "contenttypes.contenttype", "fields": {"model": "xmoduleuserstatesummaryfield", "name": "x module user state summary field", "app_label": "courseware"}}, {"pk": 1, "model": "sites.site", "fields": {"domain": "example.com", "name": "example.com"}}, {"pk": 1, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:50Z", "app_name": "courseware", "migration": "0001_initial"}}, {"pk": 2, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:51Z", "app_name": "courseware", "migration": "0002_add_indexes"}}, {"pk": 3, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:51Z", "app_name": "courseware", "migration": "0003_done_grade_cache"}}, {"pk": 4, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:51Z", "app_name": "courseware", "migration": "0004_add_field_studentmodule_course_id"}}, {"pk": 5, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:51Z", "app_name": "courseware", "migration": "0005_auto__add_offlinecomputedgrade__add_unique_offlinecomputedgrade_user_c"}}, {"pk": 6, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:51Z", "app_name": "courseware", "migration": "0006_create_student_module_history"}}, {"pk": 7, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:51Z", "app_name": "courseware", "migration": "0007_allow_null_version_in_history"}}, {"pk": 8, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:52Z", "app_name": "courseware", "migration": "0008_add_xmodule_storage"}}, {"pk": 9, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:52Z", "app_name": "courseware", "migration": "0009_add_field_default"}}, {"pk": 10, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:52Z", "app_name": "courseware", "migration": "0010_rename_xblock_field_content_to_user_state_summary"}}, {"pk": 11, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:52Z", "app_name": "courseware", "migration": "0011_add_model_StudentFieldOverride"}}, {"pk": 12, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:52Z", "app_name": "courseware", "migration": "0012_auto__del_unique_studentfieldoverride_course_id_location_student__add_"}}, {"pk": 13, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:52Z", "app_name": "courseware", "migration": "0013_auto__add_field_studentfieldoverride_created__add_field_studentfieldov"}}, {"pk": 14, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:53Z", "app_name": "student", "migration": "0001_initial"}}, {"pk": 15, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:53Z", "app_name": "student", "migration": "0002_text_to_varchar_and_indexes"}}, {"pk": 16, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:53Z", "app_name": "student", "migration": "0003_auto__add_usertestgroup"}}, {"pk": 17, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:53Z", "app_name": "student", "migration": "0004_add_email_index"}}, {"pk": 18, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:53Z", "app_name": "student", "migration": "0005_name_change"}}, {"pk": 19, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:53Z", "app_name": "student", "migration": "0006_expand_meta_field"}}, {"pk": 20, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:53Z", "app_name": "student", "migration": "0007_convert_to_utf8"}}, {"pk": 21, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:53Z", "app_name": "student", "migration": "0008__auto__add_courseregistration"}}, {"pk": 22, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:53Z", "app_name": "student", "migration": "0009_auto__del_courseregistration__add_courseenrollment"}}, {"pk": 23, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:54Z", "app_name": "student", "migration": "0010_auto__chg_field_courseenrollment_course_id"}}, {"pk": 24, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:54Z", "app_name": "student", "migration": "0011_auto__chg_field_courseenrollment_user__del_unique_courseenrollment_use"}}, {"pk": 25, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:54Z", "app_name": "student", "migration": "0012_auto__add_field_userprofile_gender__add_field_userprofile_date_of_birt"}}, {"pk": 26, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:54Z", "app_name": "student", "migration": "0013_auto__chg_field_userprofile_meta"}}, {"pk": 27, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:54Z", "app_name": "student", "migration": "0014_auto__del_courseenrollment"}}, {"pk": 28, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:54Z", "app_name": "student", "migration": "0015_auto__add_courseenrollment__add_unique_courseenrollment_user_course_id"}}, {"pk": 29, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:54Z", "app_name": "student", "migration": "0016_auto__add_field_courseenrollment_date__chg_field_userprofile_country"}}, {"pk": 30, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:54Z", "app_name": "student", "migration": "0017_rename_date_to_created"}}, {"pk": 31, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:54Z", "app_name": "student", "migration": "0018_auto"}}, {"pk": 32, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:54Z", "app_name": "student", "migration": "0019_create_approved_demographic_fields_fall_2012"}}, {"pk": 33, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:55Z", "app_name": "student", "migration": "0020_add_test_center_user"}}, {"pk": 34, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:55Z", "app_name": "student", "migration": "0021_remove_askbot"}}, {"pk": 35, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:55Z", "app_name": "student", "migration": "0022_auto__add_courseenrollmentallowed__add_unique_courseenrollmentallowed_"}}, {"pk": 36, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:56Z", "app_name": "student", "migration": "0023_add_test_center_registration"}}, {"pk": 37, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:56Z", "app_name": "student", "migration": "0024_add_allow_certificate"}}, {"pk": 38, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:56Z", "app_name": "student", "migration": "0025_auto__add_field_courseenrollmentallowed_auto_enroll"}}, {"pk": 39, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:56Z", "app_name": "student", "migration": "0026_auto__remove_index_student_testcenterregistration_accommodation_request"}}, {"pk": 40, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:56Z", "app_name": "student", "migration": "0027_add_active_flag_and_mode_to_courseware_enrollment"}}, {"pk": 41, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:56Z", "app_name": "student", "migration": "0028_auto__add_userstanding"}}, {"pk": 42, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:56Z", "app_name": "student", "migration": "0029_add_lookup_table_between_user_and_anonymous_student_id"}}, {"pk": 43, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:56Z", "app_name": "student", "migration": "0029_remove_pearson"}}, {"pk": 44, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:56Z", "app_name": "student", "migration": "0030_auto__chg_field_anonymoususerid_anonymous_user_id"}}, {"pk": 45, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:56Z", "app_name": "student", "migration": "0031_drop_student_anonymoususerid_temp_archive"}}, {"pk": 46, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:56Z", "app_name": "student", "migration": "0032_add_field_UserProfile_country_add_field_UserProfile_city"}}, {"pk": 47, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:56Z", "app_name": "student", "migration": "0032_auto__add_loginfailures"}}, {"pk": 48, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:57Z", "app_name": "student", "migration": "0033_auto__add_passwordhistory"}}, {"pk": 49, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:57Z", "app_name": "student", "migration": "0034_auto__add_courseaccessrole"}}, {"pk": 50, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:58Z", "app_name": "student", "migration": "0035_access_roles"}}, {"pk": 51, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:58Z", "app_name": "student", "migration": "0036_access_roles_orgless"}}, {"pk": 52, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:59Z", "app_name": "student", "migration": "0037_auto__add_courseregistrationcode"}}, {"pk": 53, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:59Z", "app_name": "student", "migration": "0038_auto__add_usersignupsource"}}, {"pk": 54, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:59Z", "app_name": "student", "migration": "0039_auto__del_courseregistrationcode"}}, {"pk": 55, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:59Z", "app_name": "student", "migration": "0040_auto__del_field_usersignupsource_user_id__add_field_usersignupsource_u"}}, {"pk": 56, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:59Z", "app_name": "student", "migration": "0041_add_dashboard_config"}}, {"pk": 57, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:59Z", "app_name": "student", "migration": "0042_grant_sales_admin_roles"}}, {"pk": 58, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:59Z", "app_name": "student", "migration": "0043_auto__add_linkedinaddtoprofileconfiguration"}}, {"pk": 59, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:59Z", "app_name": "student", "migration": "0044_linkedin_add_company_identifier"}}, {"pk": 60, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:59Z", "app_name": "student", "migration": "0045_add_trk_partner_to_linkedin_config"}}, {"pk": 61, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:55:59Z", "app_name": "student", "migration": "0046_auto__add_entranceexamconfiguration__add_unique_entranceexamconfigurat"}}, {"pk": 62, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:00Z", "app_name": "student", "migration": "0047_add_bio_field"}}, {"pk": 63, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:00Z", "app_name": "student", "migration": "0048_add_profile_image_version"}}, {"pk": 64, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:00Z", "app_name": "student", "migration": "0049_auto__add_languageproficiency__add_unique_languageproficiency_code_use"}}, {"pk": 65, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:00Z", "app_name": "student", "migration": "0050_auto__add_manualenrollmentaudit"}}, {"pk": 66, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:00Z", "app_name": "student", "migration": "0051_auto__add_courseenrollmentattribute"}}, {"pk": 67, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:00Z", "app_name": "track", "migration": "0001_initial"}}, {"pk": 68, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:01Z", "app_name": "track", "migration": "0002_auto__add_field_trackinglog_host__chg_field_trackinglog_event_type__ch"}}, {"pk": 69, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:01Z", "app_name": "util", "migration": "0001_initial"}}, {"pk": 70, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:01Z", "app_name": "util", "migration": "0002_default_rate_limit_config"}}, {"pk": 71, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:01Z", "app_name": "certificates", "migration": "0001_added_generatedcertificates"}}, {"pk": 72, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:01Z", "app_name": "certificates", "migration": "0002_auto__add_field_generatedcertificate_download_url"}}, {"pk": 73, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:02Z", "app_name": "certificates", "migration": "0003_auto__add_field_generatedcertificate_enabled"}}, {"pk": 74, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:02Z", "app_name": "certificates", "migration": "0004_auto__add_field_generatedcertificate_graded_certificate_id__add_field_"}}, {"pk": 75, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:02Z", "app_name": "certificates", "migration": "0005_auto__add_field_generatedcertificate_name"}}, {"pk": 76, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:02Z", "app_name": "certificates", "migration": "0006_auto__chg_field_generatedcertificate_certificate_id"}}, {"pk": 77, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:02Z", "app_name": "certificates", "migration": "0007_auto__add_revokedcertificate"}}, {"pk": 78, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:02Z", "app_name": "certificates", "migration": "0008_auto__del_revokedcertificate__del_field_generatedcertificate_name__add"}}, {"pk": 79, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:02Z", "app_name": "certificates", "migration": "0009_auto__del_field_generatedcertificate_graded_download_url__del_field_ge"}}, {"pk": 80, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:02Z", "app_name": "certificates", "migration": "0010_auto__del_field_generatedcertificate_enabled__add_field_generatedcerti"}}, {"pk": 81, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:02Z", "app_name": "certificates", "migration": "0011_auto__del_field_generatedcertificate_certificate_id__add_field_generat"}}, {"pk": 82, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:03Z", "app_name": "certificates", "migration": "0012_auto__add_field_generatedcertificate_name__add_field_generatedcertific"}}, {"pk": 83, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:03Z", "app_name": "certificates", "migration": "0013_auto__add_field_generatedcertificate_error_reason"}}, {"pk": 84, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:03Z", "app_name": "certificates", "migration": "0014_adding_whitelist"}}, {"pk": 85, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:03Z", "app_name": "certificates", "migration": "0015_adding_mode_for_verified_certs"}}, {"pk": 86, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:03Z", "app_name": "certificates", "migration": "0016_change_course_key_fields"}}, {"pk": 87, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:03Z", "app_name": "certificates", "migration": "0017_auto__add_certificategenerationconfiguration"}}, {"pk": 88, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:03Z", "app_name": "certificates", "migration": "0018_add_example_cert_models"}}, {"pk": 89, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:03Z", "app_name": "certificates", "migration": "0019_auto__add_certificatehtmlviewconfiguration"}}, {"pk": 90, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:03Z", "app_name": "certificates", "migration": "0020_certificatehtmlviewconfiguration_data"}}, {"pk": 91, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:04Z", "app_name": "certificates", "migration": "0021_auto__add_badgeassertion__add_unique_badgeassertion_course_id_user__ad"}}, {"pk": 92, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:04Z", "app_name": "certificates", "migration": "0022_default_modes"}}, {"pk": 93, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:04Z", "app_name": "instructor_task", "migration": "0001_initial"}}, {"pk": 94, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:04Z", "app_name": "instructor_task", "migration": "0002_add_subtask_field"}}, {"pk": 95, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:05Z", "app_name": "licenses", "migration": "0001_initial"}}, {"pk": 96, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:05Z", "app_name": "course_groups", "migration": "0001_initial"}}, {"pk": 97, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:05Z", "app_name": "course_groups", "migration": "0002_add_model_CourseUserGroupPartitionGroup"}}, {"pk": 98, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:06Z", "app_name": "course_groups", "migration": "0003_auto__add_coursecohort__add_coursecohortssettings"}}, {"pk": 99, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:06Z", "app_name": "course_groups", "migration": "0004_auto__del_field_coursecohortssettings_cohorted_discussions__add_field_"}}, {"pk": 100, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:06Z", "app_name": "bulk_email", "migration": "0001_initial"}}, {"pk": 101, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:06Z", "app_name": "bulk_email", "migration": "0002_change_field_names"}}, {"pk": 102, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:06Z", "app_name": "bulk_email", "migration": "0003_add_optout_user"}}, {"pk": 103, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:06Z", "app_name": "bulk_email", "migration": "0004_migrate_optout_user"}}, {"pk": 104, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:06Z", "app_name": "bulk_email", "migration": "0005_remove_optout_email"}}, {"pk": 105, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:06Z", "app_name": "bulk_email", "migration": "0006_add_course_email_template"}}, {"pk": 106, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:07Z", "app_name": "bulk_email", "migration": "0007_load_course_email_template"}}, {"pk": 107, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:07Z", "app_name": "bulk_email", "migration": "0008_add_course_authorizations"}}, {"pk": 108, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:07Z", "app_name": "bulk_email", "migration": "0009_force_unique_course_ids"}}, {"pk": 109, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:07Z", "app_name": "bulk_email", "migration": "0010_auto__chg_field_optout_course_id__add_field_courseemail_template_name_"}}, {"pk": 110, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:07Z", "app_name": "branding", "migration": "0001_initial"}}, {"pk": 111, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:07Z", "app_name": "branding", "migration": "0002_auto__add_brandingapiconfig"}}, {"pk": 112, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:08Z", "app_name": "external_auth", "migration": "0001_initial"}}, {"pk": 113, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:09Z", "app_name": "oauth2", "migration": "0001_initial"}}, {"pk": 114, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:09Z", "app_name": "oauth2", "migration": "0002_auto__chg_field_client_user"}}, {"pk": 115, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:09Z", "app_name": "oauth2", "migration": "0003_auto__add_field_client_name"}}, {"pk": 116, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:09Z", "app_name": "oauth2", "migration": "0004_auto__add_index_accesstoken_token"}}, {"pk": 117, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:09Z", "app_name": "oauth2_provider", "migration": "0001_initial"}}, {"pk": 118, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:10Z", "app_name": "wiki", "migration": "0001_initial"}}, {"pk": 119, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:10Z", "app_name": "wiki", "migration": "0002_auto__add_field_articleplugin_created"}}, {"pk": 120, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:11Z", "app_name": "wiki", "migration": "0003_auto__add_field_urlpath_article"}}, {"pk": 121, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:11Z", "app_name": "wiki", "migration": "0004_populate_urlpath__article"}}, {"pk": 122, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:11Z", "app_name": "wiki", "migration": "0005_auto__chg_field_urlpath_article"}}, {"pk": 123, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:11Z", "app_name": "wiki", "migration": "0006_auto__add_attachmentrevision__add_image__add_attachment"}}, {"pk": 124, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:11Z", "app_name": "wiki", "migration": "0007_auto__add_articlesubscription"}}, {"pk": 125, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:11Z", "app_name": "wiki", "migration": "0008_auto__add_simpleplugin__add_revisionpluginrevision__add_imagerevision_"}}, {"pk": 126, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:11Z", "app_name": "wiki", "migration": "0009_auto__add_field_imagerevision_width__add_field_imagerevision_height"}}, {"pk": 127, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:11Z", "app_name": "wiki", "migration": "0010_auto__chg_field_imagerevision_image"}}, {"pk": 128, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:12Z", "app_name": "wiki", "migration": "0011_auto__chg_field_imagerevision_width__chg_field_imagerevision_height"}}, {"pk": 129, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:12Z", "app_name": "django_notify", "migration": "0001_initial"}}, {"pk": 130, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:13Z", "app_name": "notifications", "migration": "0001_initial"}}, {"pk": 131, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:13Z", "app_name": "foldit", "migration": "0001_initial"}}, {"pk": 132, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:14Z", "app_name": "django_comment_client", "migration": "0001_initial"}}, {"pk": 133, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:14Z", "app_name": "django_comment_common", "migration": "0001_initial"}}, {"pk": 134, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:15Z", "app_name": "notes", "migration": "0001_initial"}}, {"pk": 135, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:15Z", "app_name": "splash", "migration": "0001_initial"}}, {"pk": 136, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:15Z", "app_name": "splash", "migration": "0002_auto__add_field_splashconfig_unaffected_url_paths"}}, {"pk": 137, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:15Z", "app_name": "user_api", "migration": "0001_initial"}}, {"pk": 138, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:16Z", "app_name": "user_api", "migration": "0002_auto__add_usercoursetags__add_unique_usercoursetags_user_course_id_key"}}, {"pk": 139, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:16Z", "app_name": "user_api", "migration": "0003_rename_usercoursetags"}}, {"pk": 140, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:16Z", "app_name": "user_api", "migration": "0004_auto__add_userorgtag__add_unique_userorgtag_user_org_key__chg_field_us"}}, {"pk": 141, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:16Z", "app_name": "teams", "migration": "0001_initial"}}, {"pk": 142, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:17Z", "app_name": "shoppingcart", "migration": "0001_initial"}}, {"pk": 143, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:17Z", "app_name": "shoppingcart", "migration": "0002_auto__add_field_paidcourseregistration_mode"}}, {"pk": 144, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:17Z", "app_name": "shoppingcart", "migration": "0003_auto__del_field_orderitem_line_cost"}}, {"pk": 145, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:17Z", "app_name": "shoppingcart", "migration": "0004_auto__add_field_orderitem_fulfilled_time"}}, {"pk": 146, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:17Z", "app_name": "shoppingcart", "migration": "0005_auto__add_paidcourseregistrationannotation__add_field_orderitem_report"}}, {"pk": 147, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:17Z", "app_name": "shoppingcart", "migration": "0006_auto__add_field_order_refunded_time__add_field_orderitem_refund_reques"}}, {"pk": 148, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:18Z", "app_name": "shoppingcart", "migration": "0007_auto__add_field_orderitem_service_fee"}}, {"pk": 149, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:18Z", "app_name": "shoppingcart", "migration": "0008_auto__add_coupons__add_couponredemption__chg_field_certificateitem_cou"}}, {"pk": 150, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:18Z", "app_name": "shoppingcart", "migration": "0009_auto__del_coupons__add_courseregistrationcode__add_coupon__chg_field_c"}}, {"pk": 151, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:18Z", "app_name": "shoppingcart", "migration": "0010_auto__add_registrationcoderedemption__del_field_courseregistrationcode"}}, {"pk": 152, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:19Z", "app_name": "shoppingcart", "migration": "0011_auto__add_invoice__add_field_courseregistrationcode_invoice"}}, {"pk": 153, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:19Z", "app_name": "shoppingcart", "migration": "0012_auto__del_field_courseregistrationcode_transaction_group_name__del_fie"}}, {"pk": 154, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:19Z", "app_name": "shoppingcart", "migration": "0013_auto__add_field_invoice_is_valid"}}, {"pk": 155, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:20Z", "app_name": "shoppingcart", "migration": "0014_auto__del_field_invoice_tax_id__add_field_invoice_address_line_1__add_"}}, {"pk": 156, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:20Z", "app_name": "shoppingcart", "migration": "0015_auto__del_field_invoice_purchase_order_number__del_field_invoice_compa"}}, {"pk": 157, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:20Z", "app_name": "shoppingcart", "migration": "0016_auto__del_field_invoice_company_email__del_field_invoice_company_refer"}}, {"pk": 158, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:20Z", "app_name": "shoppingcart", "migration": "0017_auto__add_field_courseregistrationcode_order__chg_field_registrationco"}}, {"pk": 159, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:20Z", "app_name": "shoppingcart", "migration": "0018_auto__add_donation"}}, {"pk": 160, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:20Z", "app_name": "shoppingcart", "migration": "0019_auto__add_donationconfiguration"}}, {"pk": 161, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:21Z", "app_name": "shoppingcart", "migration": "0020_auto__add_courseregcodeitem__add_courseregcodeitemannotation__add_fiel"}}, {"pk": 162, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:21Z", "app_name": "shoppingcart", "migration": "0021_auto__add_field_orderitem_created__add_field_orderitem_modified"}}, {"pk": 163, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:21Z", "app_name": "shoppingcart", "migration": "0022_auto__add_field_registrationcoderedemption_course_enrollment__add_fiel"}}, {"pk": 164, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:21Z", "app_name": "shoppingcart", "migration": "0023_auto__add_field_coupon_expiration_date"}}, {"pk": 165, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:21Z", "app_name": "shoppingcart", "migration": "0024_auto__add_field_courseregistrationcode_mode_slug"}}, {"pk": 166, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:22Z", "app_name": "shoppingcart", "migration": "0025_update_invoice_models"}}, {"pk": 167, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:22Z", "app_name": "shoppingcart", "migration": "0026_migrate_invoices"}}, {"pk": 168, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:22Z", "app_name": "shoppingcart", "migration": "0027_add_invoice_history"}}, {"pk": 169, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:22Z", "app_name": "shoppingcart", "migration": "0028_auto__add_field_courseregistrationcode_is_valid"}}, {"pk": 170, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:23Z", "app_name": "course_modes", "migration": "0001_initial"}}, {"pk": 171, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:23Z", "app_name": "course_modes", "migration": "0002_auto__add_field_coursemode_currency"}}, {"pk": 172, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:23Z", "app_name": "course_modes", "migration": "0003_auto__add_unique_coursemode_course_id_currency_mode_slug"}}, {"pk": 173, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:23Z", "app_name": "course_modes", "migration": "0004_auto__add_field_coursemode_expiration_date"}}, {"pk": 174, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:23Z", "app_name": "course_modes", "migration": "0005_auto__add_field_coursemode_expiration_datetime"}}, {"pk": 175, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:23Z", "app_name": "course_modes", "migration": "0006_expiration_date_to_datetime"}}, {"pk": 176, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:23Z", "app_name": "course_modes", "migration": "0007_add_description"}}, {"pk": 177, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:23Z", "app_name": "course_modes", "migration": "0007_auto__add_coursemodesarchive__chg_field_coursemode_course_id"}}, {"pk": 178, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:23Z", "app_name": "course_modes", "migration": "0008_auto__del_field_coursemodesarchive_description__add_field_coursemode_s"}}, {"pk": 179, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:23Z", "app_name": "verify_student", "migration": "0001_initial"}}, {"pk": 180, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:24Z", "app_name": "verify_student", "migration": "0002_auto__add_field_softwaresecurephotoverification_window"}}, {"pk": 181, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:24Z", "app_name": "verify_student", "migration": "0003_auto__add_field_softwaresecurephotoverification_display"}}, {"pk": 182, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:24Z", "app_name": "verify_student", "migration": "0004_auto__add_verificationcheckpoint__add_unique_verificationcheckpoint_co"}}, {"pk": 183, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:24Z", "app_name": "verify_student", "migration": "0005_auto__add_incoursereverificationconfiguration"}}, {"pk": 184, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:24Z", "app_name": "verify_student", "migration": "0006_auto__add_skippedreverification__add_unique_skippedreverification_user"}}, {"pk": 185, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:24Z", "app_name": "verify_student", "migration": "0007_auto__add_field_verificationstatus_location_id"}}, {"pk": 186, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:24Z", "app_name": "verify_student", "migration": "0008_auto__del_field_verificationcheckpoint_checkpoint_name__add_field_veri"}}, {"pk": 187, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:24Z", "app_name": "verify_student", "migration": "0009_auto__change_softwaresecurephotoverification_window_id_default_none"}}, {"pk": 188, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:25Z", "app_name": "verify_student", "migration": "0010_auto__del_field_softwaresecurephotoverification_window"}}, {"pk": 189, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:25Z", "app_name": "dark_lang", "migration": "0001_initial"}}, {"pk": 190, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:25Z", "app_name": "dark_lang", "migration": "0002_enable_on_install"}}, {"pk": 191, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:25Z", "app_name": "reverification", "migration": "0001_initial"}}, {"pk": 192, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:25Z", "app_name": "reverification", "migration": "0002_auto__del_midcoursereverificationwindow"}}, {"pk": 193, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:26Z", "app_name": "embargo", "migration": "0001_initial"}}, {"pk": 194, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:26Z", "app_name": "embargo", "migration": "0002_add_country_access_models"}}, {"pk": 195, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:27Z", "app_name": "embargo", "migration": "0003_add_countries"}}, {"pk": 196, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:27Z", "app_name": "embargo", "migration": "0004_migrate_embargo_config"}}, {"pk": 197, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:27Z", "app_name": "embargo", "migration": "0005_add_courseaccessrulehistory"}}, {"pk": 198, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:27Z", "app_name": "embargo", "migration": "0006_auto__add_field_restrictedcourse_disable_access_check"}}, {"pk": 199, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:28Z", "app_name": "course_action_state", "migration": "0001_initial"}}, {"pk": 200, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:28Z", "app_name": "course_action_state", "migration": "0002_add_rerun_display_name"}}, {"pk": 201, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:28Z", "app_name": "mobile_api", "migration": "0001_initial"}}, {"pk": 202, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:29Z", "app_name": "survey", "migration": "0001_initial"}}, {"pk": 203, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:30Z", "app_name": "lms_xblock", "migration": "0001_initial"}}, {"pk": 204, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:30Z", "app_name": "course_structures", "migration": "0001_initial"}}, {"pk": 205, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:30Z", "app_name": "cors_csrf", "migration": "0001_initial"}}, {"pk": 206, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:31Z", "app_name": "submissions", "migration": "0001_initial"}}, {"pk": 207, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:31Z", "app_name": "submissions", "migration": "0002_auto__add_scoresummary"}}, {"pk": 208, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:31Z", "app_name": "submissions", "migration": "0003_auto__del_field_submission_answer__add_field_submission_raw_answer"}}, {"pk": 209, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:31Z", "app_name": "submissions", "migration": "0004_auto__add_field_score_reset"}}, {"pk": 210, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:32Z", "app_name": "assessment", "migration": "0001_initial"}}, {"pk": 211, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:33Z", "app_name": "assessment", "migration": "0002_auto__add_assessmentfeedbackoption__del_field_assessmentfeedback_feedb"}}, {"pk": 212, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:33Z", "app_name": "assessment", "migration": "0003_add_index_pw_course_item_student"}}, {"pk": 213, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:33Z", "app_name": "assessment", "migration": "0004_auto__add_field_peerworkflow_graded_count"}}, {"pk": 214, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:33Z", "app_name": "assessment", "migration": "0005_auto__del_field_peerworkflow_graded_count__add_field_peerworkflow_grad"}}, {"pk": 215, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:33Z", "app_name": "assessment", "migration": "0006_auto__add_field_assessmentpart_feedback"}}, {"pk": 216, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:33Z", "app_name": "assessment", "migration": "0007_auto__chg_field_assessmentpart_feedback"}}, {"pk": 217, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:33Z", "app_name": "assessment", "migration": "0008_student_training"}}, {"pk": 218, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:34Z", "app_name": "assessment", "migration": "0009_auto__add_unique_studenttrainingworkflowitem_order_num_workflow"}}, {"pk": 219, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:34Z", "app_name": "assessment", "migration": "0010_auto__add_unique_studenttrainingworkflow_submission_uuid"}}, {"pk": 220, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:34Z", "app_name": "assessment", "migration": "0011_ai_training"}}, {"pk": 221, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:34Z", "app_name": "assessment", "migration": "0012_move_algorithm_id_to_classifier_set"}}, {"pk": 222, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:34Z", "app_name": "assessment", "migration": "0013_auto__add_field_aigradingworkflow_essay_text"}}, {"pk": 223, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:35Z", "app_name": "assessment", "migration": "0014_auto__add_field_aitrainingworkflow_item_id__add_field_aitrainingworkfl"}}, {"pk": 224, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:35Z", "app_name": "assessment", "migration": "0015_auto__add_unique_aitrainingworkflow_uuid__add_unique_aigradingworkflow"}}, {"pk": 225, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:35Z", "app_name": "assessment", "migration": "0016_auto__add_field_aiclassifierset_course_id__add_field_aiclassifierset_i"}}, {"pk": 226, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:35Z", "app_name": "assessment", "migration": "0016_auto__add_field_rubric_structure_hash"}}, {"pk": 227, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:35Z", "app_name": "assessment", "migration": "0017_rubric_structure_hash"}}, {"pk": 228, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:35Z", "app_name": "assessment", "migration": "0018_auto__add_field_assessmentpart_criterion"}}, {"pk": 229, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:35Z", "app_name": "assessment", "migration": "0019_assessmentpart_criterion_field"}}, {"pk": 230, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:35Z", "app_name": "assessment", "migration": "0020_assessmentpart_criterion_not_null"}}, {"pk": 231, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:35Z", "app_name": "assessment", "migration": "0021_assessmentpart_option_nullable"}}, {"pk": 232, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:36Z", "app_name": "assessment", "migration": "0022__add_label_fields"}}, {"pk": 233, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:36Z", "app_name": "assessment", "migration": "0023_assign_criteria_and_option_labels"}}, {"pk": 234, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:36Z", "app_name": "assessment", "migration": "0024_auto__chg_field_assessmentpart_criterion"}}, {"pk": 235, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:36Z", "app_name": "assessment", "migration": "0025_auto__add_field_peerworkflow_cancelled_at"}}, {"pk": 236, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:36Z", "app_name": "workflow", "migration": "0001_initial"}}, {"pk": 237, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:36Z", "app_name": "workflow", "migration": "0002_auto__add_field_assessmentworkflow_course_id__add_field_assessmentwork"}}, {"pk": 238, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:36Z", "app_name": "workflow", "migration": "0003_auto__add_assessmentworkflowstep"}}, {"pk": 239, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:37Z", "app_name": "workflow", "migration": "0004_auto__add_assessmentworkflowcancellation"}}, {"pk": 240, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:37Z", "app_name": "edxval", "migration": "0001_initial"}}, {"pk": 241, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:37Z", "app_name": "edxval", "migration": "0002_default_profiles"}}, {"pk": 242, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:37Z", "app_name": "edxval", "migration": "0003_status_and_created_fields"}}, {"pk": 243, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:38Z", "app_name": "edxval", "migration": "0004_remove_profile_fields"}}, {"pk": 244, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:39Z", "app_name": "milestones", "migration": "0001_initial"}}, {"pk": 245, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:39Z", "app_name": "milestones", "migration": "0002_seed_relationship_types"}}, {"pk": 246, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:39Z", "app_name": "django_extensions", "migration": "0001_empty"}}, {"pk": 247, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:40Z", "app_name": "credit", "migration": "0001_initial"}}, {"pk": 248, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:40Z", "app_name": "credit", "migration": "0002_rename_credit_requirement_criteria_field"}}, {"pk": 249, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:40Z", "app_name": "credit", "migration": "0003_add_creditrequirementstatus_reason"}}, {"pk": 250, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:40Z", "app_name": "credit", "migration": "0004_auto__add_field_creditrequirement_display_name"}}, {"pk": 251, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:40Z", "app_name": "credit", "migration": "0005_auto__add_field_creditprovider_provider_url__add_field_creditprovider_"}}, {"pk": 252, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:41Z", "app_name": "credit", "migration": "0006_auto__add_creditrequest__add_unique_creditrequest_username_course_prov"}}, {"pk": 253, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:41Z", "app_name": "credit", "migration": "0007_auto__add_field_creditprovider_enable_integration__chg_field_creditpro"}}, {"pk": 254, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:45Z", "app_name": "contentstore", "migration": "0001_initial"}}, {"pk": 255, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:45Z", "app_name": "contentstore", "migration": "0002_auto__del_field_videouploadconfig_status_whitelist"}}, {"pk": 256, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:45Z", "app_name": "contentstore", "migration": "0003_auto__add_pushnotificationconfig"}}, {"pk": 257, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:46Z", "app_name": "course_creators", "migration": "0001_initial"}}, {"pk": 258, "model": "south.migrationhistory", "fields": {"applied": "2015-06-17T19:56:46Z", "app_name": "xblock_config", "migration": "0001_initial"}}, {"pk": 1, "model": "certificates.badgeimageconfiguration", "fields": {"default": false, "mode": "honor", "icon": "./honor.png"}}, {"pk": 2, "model": "certificates.badgeimageconfiguration", "fields": {"default": false, "mode": "verified", "icon": "./verified.png"}}, {"pk": 3, "model": "certificates.badgeimageconfiguration", "fields": {"default": false, "mode": "professional", "icon": "./professional.png"}}, {"pk": 6, "model": "embargo.country", "fields": {"country": "AD"}}, {"pk": 234, "model": "embargo.country", "fields": {"country": "AE"}}, {"pk": 1, "model": "embargo.country", "fields": {"country": "AF"}}, {"pk": 10, "model": "embargo.country", "fields": {"country": "AG"}}, {"pk": 8, "model": "embargo.country", "fields": {"country": "AI"}}, {"pk": 3, "model": "embargo.country", "fields": {"country": "AL"}}, {"pk": 12, "model": "embargo.country", "fields": {"country": "AM"}}, {"pk": 7, "model": "embargo.country", "fields": {"country": "AO"}}, {"pk": 9, "model": "embargo.country", "fields": {"country": "AQ"}}, {"pk": 11, "model": "embargo.country", "fields": {"country": "AR"}}, {"pk": 5, "model": "embargo.country", "fields": {"country": "AS"}}, {"pk": 15, "model": "embargo.country", "fields": {"country": "AT"}}, {"pk": 14, "model": "embargo.country", "fields": {"country": "AU"}}, {"pk": 13, "model": "embargo.country", "fields": {"country": "AW"}}, {"pk": 2, "model": "embargo.country", "fields": {"country": "AX"}}, {"pk": 16, "model": "embargo.country", "fields": {"country": "AZ"}}, {"pk": 29, "model": "embargo.country", "fields": {"country": "BA"}}, {"pk": 20, "model": "embargo.country", "fields": {"country": "BB"}}, {"pk": 19, "model": "embargo.country", "fields": {"country": "BD"}}, {"pk": 22, "model": "embargo.country", "fields": {"country": "BE"}}, {"pk": 36, "model": "embargo.country", "fields": {"country": "BF"}}, {"pk": 35, "model": "embargo.country", "fields": {"country": "BG"}}, {"pk": 18, "model": "embargo.country", "fields": {"country": "BH"}}, {"pk": 37, "model": "embargo.country", "fields": {"country": "BI"}}, {"pk": 24, "model": "embargo.country", "fields": {"country": "BJ"}}, {"pk": 184, "model": "embargo.country", "fields": {"country": "BL"}}, {"pk": 25, "model": "embargo.country", "fields": {"country": "BM"}}, {"pk": 34, "model": "embargo.country", "fields": {"country": "BN"}}, {"pk": 27, "model": "embargo.country", "fields": {"country": "BO"}}, {"pk": 28, "model": "embargo.country", "fields": {"country": "BQ"}}, {"pk": 32, "model": "embargo.country", "fields": {"country": "BR"}}, {"pk": 17, "model": "embargo.country", "fields": {"country": "BS"}}, {"pk": 26, "model": "embargo.country", "fields": {"country": "BT"}}, {"pk": 31, "model": "embargo.country", "fields": {"country": "BV"}}, {"pk": 30, "model": "embargo.country", "fields": {"country": "BW"}}, {"pk": 21, "model": "embargo.country", "fields": {"country": "BY"}}, {"pk": 23, "model": "embargo.country", "fields": {"country": "BZ"}}, {"pk": 41, "model": "embargo.country", "fields": {"country": "CA"}}, {"pk": 48, "model": "embargo.country", "fields": {"country": "CC"}}, {"pk": 52, "model": "embargo.country", "fields": {"country": "CD"}}, {"pk": 43, "model": "embargo.country", "fields": {"country": "CF"}}, {"pk": 51, "model": "embargo.country", "fields": {"country": "CG"}}, {"pk": 216, "model": "embargo.country", "fields": {"country": "CH"}}, {"pk": 55, "model": "embargo.country", "fields": {"country": "CI"}}, {"pk": 53, "model": "embargo.country", "fields": {"country": "CK"}}, {"pk": 45, "model": "embargo.country", "fields": {"country": "CL"}}, {"pk": 40, "model": "embargo.country", "fields": {"country": "CM"}}, {"pk": 46, "model": "embargo.country", "fields": {"country": "CN"}}, {"pk": 49, "model": "embargo.country", "fields": {"country": "CO"}}, {"pk": 54, "model": "embargo.country", "fields": {"country": "CR"}}, {"pk": 57, "model": "embargo.country", "fields": {"country": "CU"}}, {"pk": 38, "model": "embargo.country", "fields": {"country": "CV"}}, {"pk": 58, "model": "embargo.country", "fields": {"country": "CW"}}, {"pk": 47, "model": "embargo.country", "fields": {"country": "CX"}}, {"pk": 59, "model": "embargo.country", "fields": {"country": "CY"}}, {"pk": 60, "model": "embargo.country", "fields": {"country": "CZ"}}, {"pk": 83, "model": "embargo.country", "fields": {"country": "DE"}}, {"pk": 62, "model": "embargo.country", "fields": {"country": "DJ"}}, {"pk": 61, "model": "embargo.country", "fields": {"country": "DK"}}, {"pk": 63, "model": "embargo.country", "fields": {"country": "DM"}}, {"pk": 64, "model": "embargo.country", "fields": {"country": "DO"}}, {"pk": 4, "model": "embargo.country", "fields": {"country": "DZ"}}, {"pk": 65, "model": "embargo.country", "fields": {"country": "EC"}}, {"pk": 70, "model": "embargo.country", "fields": {"country": "EE"}}, {"pk": 66, "model": "embargo.country", "fields": {"country": "EG"}}, {"pk": 246, "model": "embargo.country", "fields": {"country": "EH"}}, {"pk": 69, "model": "embargo.country", "fields": {"country": "ER"}}, {"pk": 209, "model": "embargo.country", "fields": {"country": "ES"}}, {"pk": 71, "model": "embargo.country", "fields": {"country": "ET"}}, {"pk": 75, "model": "embargo.country", "fields": {"country": "FI"}}, {"pk": 74, "model": "embargo.country", "fields": {"country": "FJ"}}, {"pk": 72, "model": "embargo.country", "fields": {"country": "FK"}}, {"pk": 143, "model": "embargo.country", "fields": {"country": "FM"}}, {"pk": 73, "model": "embargo.country", "fields": {"country": "FO"}}, {"pk": 76, "model": "embargo.country", "fields": {"country": "FR"}}, {"pk": 80, "model": "embargo.country", "fields": {"country": "GA"}}, {"pk": 235, "model": "embargo.country", "fields": {"country": "GB"}}, {"pk": 88, "model": "embargo.country", "fields": {"country": "GD"}}, {"pk": 82, "model": "embargo.country", "fields": {"country": "GE"}}, {"pk": 77, "model": "embargo.country", "fields": {"country": "GF"}}, {"pk": 92, "model": "embargo.country", "fields": {"country": "GG"}}, {"pk": 84, "model": "embargo.country", "fields": {"country": "GH"}}, {"pk": 85, "model": "embargo.country", "fields": {"country": "GI"}}, {"pk": 87, "model": "embargo.country", "fields": {"country": "GL"}}, {"pk": 81, "model": "embargo.country", "fields": {"country": "GM"}}, {"pk": 93, "model": "embargo.country", "fields": {"country": "GN"}}, {"pk": 89, "model": "embargo.country", "fields": {"country": "GP"}}, {"pk": 68, "model": "embargo.country", "fields": {"country": "GQ"}}, {"pk": 86, "model": "embargo.country", "fields": {"country": "GR"}}, {"pk": 206, "model": "embargo.country", "fields": {"country": "GS"}}, {"pk": 91, "model": "embargo.country", "fields": {"country": "GT"}}, {"pk": 90, "model": "embargo.country", "fields": {"country": "GU"}}, {"pk": 94, "model": "embargo.country", "fields": {"country": "GW"}}, {"pk": 95, "model": "embargo.country", "fields": {"country": "GY"}}, {"pk": 100, "model": "embargo.country", "fields": {"country": "HK"}}, {"pk": 97, "model": "embargo.country", "fields": {"country": "HM"}}, {"pk": 99, "model": "embargo.country", "fields": {"country": "HN"}}, {"pk": 56, "model": "embargo.country", "fields": {"country": "HR"}}, {"pk": 96, "model": "embargo.country", "fields": {"country": "HT"}}, {"pk": 101, "model": "embargo.country", "fields": {"country": "HU"}}, {"pk": 104, "model": "embargo.country", "fields": {"country": "ID"}}, {"pk": 107, "model": "embargo.country", "fields": {"country": "IE"}}, {"pk": 109, "model": "embargo.country", "fields": {"country": "IL"}}, {"pk": 108, "model": "embargo.country", "fields": {"country": "IM"}}, {"pk": 103, "model": "embargo.country", "fields": {"country": "IN"}}, {"pk": 33, "model": "embargo.country", "fields": {"country": "IO"}}, {"pk": 106, "model": "embargo.country", "fields": {"country": "IQ"}}, {"pk": 105, "model": "embargo.country", "fields": {"country": "IR"}}, {"pk": 102, "model": "embargo.country", "fields": {"country": "IS"}}, {"pk": 110, "model": "embargo.country", "fields": {"country": "IT"}}, {"pk": 113, "model": "embargo.country", "fields": {"country": "JE"}}, {"pk": 111, "model": "embargo.country", "fields": {"country": "JM"}}, {"pk": 114, "model": "embargo.country", "fields": {"country": "JO"}}, {"pk": 112, "model": "embargo.country", "fields": {"country": "JP"}}, {"pk": 116, "model": "embargo.country", "fields": {"country": "KE"}}, {"pk": 119, "model": "embargo.country", "fields": {"country": "KG"}}, {"pk": 39, "model": "embargo.country", "fields": {"country": "KH"}}, {"pk": 117, "model": "embargo.country", "fields": {"country": "KI"}}, {"pk": 50, "model": "embargo.country", "fields": {"country": "KM"}}, {"pk": 186, "model": "embargo.country", "fields": {"country": "KN"}}, {"pk": 163, "model": "embargo.country", "fields": {"country": "KP"}}, {"pk": 207, "model": "embargo.country", "fields": {"country": "KR"}}, {"pk": 118, "model": "embargo.country", "fields": {"country": "KW"}}, {"pk": 42, "model": "embargo.country", "fields": {"country": "KY"}}, {"pk": 115, "model": "embargo.country", "fields": {"country": "KZ"}}, {"pk": 120, "model": "embargo.country", "fields": {"country": "LA"}}, {"pk": 122, "model": "embargo.country", "fields": {"country": "LB"}}, {"pk": 187, "model": "embargo.country", "fields": {"country": "LC"}}, {"pk": 126, "model": "embargo.country", "fields": {"country": "LI"}}, {"pk": 210, "model": "embargo.country", "fields": {"country": "LK"}}, {"pk": 124, "model": "embargo.country", "fields": {"country": "LR"}}, {"pk": 123, "model": "embargo.country", "fields": {"country": "LS"}}, {"pk": 127, "model": "embargo.country", "fields": {"country": "LT"}}, {"pk": 128, "model": "embargo.country", "fields": {"country": "LU"}}, {"pk": 121, "model": "embargo.country", "fields": {"country": "LV"}}, {"pk": 125, "model": "embargo.country", "fields": {"country": "LY"}}, {"pk": 149, "model": "embargo.country", "fields": {"country": "MA"}}, {"pk": 145, "model": "embargo.country", "fields": {"country": "MC"}}, {"pk": 144, "model": "embargo.country", "fields": {"country": "MD"}}, {"pk": 147, "model": "embargo.country", "fields": {"country": "ME"}}, {"pk": 188, "model": "embargo.country", "fields": {"country": "MF"}}, {"pk": 131, "model": "embargo.country", "fields": {"country": "MG"}}, {"pk": 137, "model": "embargo.country", "fields": {"country": "MH"}}, {"pk": 130, "model": "embargo.country", "fields": {"country": "MK"}}, {"pk": 135, "model": "embargo.country", "fields": {"country": "ML"}}, {"pk": 151, "model": "embargo.country", "fields": {"country": "MM"}}, {"pk": 146, "model": "embargo.country", "fields": {"country": "MN"}}, {"pk": 129, "model": "embargo.country", "fields": {"country": "MO"}}, {"pk": 164, "model": "embargo.country", "fields": {"country": "MP"}}, {"pk": 138, "model": "embargo.country", "fields": {"country": "MQ"}}, {"pk": 139, "model": "embargo.country", "fields": {"country": "MR"}}, {"pk": 148, "model": "embargo.country", "fields": {"country": "MS"}}, {"pk": 136, "model": "embargo.country", "fields": {"country": "MT"}}, {"pk": 140, "model": "embargo.country", "fields": {"country": "MU"}}, {"pk": 134, "model": "embargo.country", "fields": {"country": "MV"}}, {"pk": 132, "model": "embargo.country", "fields": {"country": "MW"}}, {"pk": 142, "model": "embargo.country", "fields": {"country": "MX"}}, {"pk": 133, "model": "embargo.country", "fields": {"country": "MY"}}, {"pk": 150, "model": "embargo.country", "fields": {"country": "MZ"}}, {"pk": 152, "model": "embargo.country", "fields": {"country": "NA"}}, {"pk": 156, "model": "embargo.country", "fields": {"country": "NC"}}, {"pk": 159, "model": "embargo.country", "fields": {"country": "NE"}}, {"pk": 162, "model": "embargo.country", "fields": {"country": "NF"}}, {"pk": 160, "model": "embargo.country", "fields": {"country": "NG"}}, {"pk": 158, "model": "embargo.country", "fields": {"country": "NI"}}, {"pk": 155, "model": "embargo.country", "fields": {"country": "NL"}}, {"pk": 165, "model": "embargo.country", "fields": {"country": "NO"}}, {"pk": 154, "model": "embargo.country", "fields": {"country": "NP"}}, {"pk": 153, "model": "embargo.country", "fields": {"country": "NR"}}, {"pk": 161, "model": "embargo.country", "fields": {"country": "NU"}}, {"pk": 157, "model": "embargo.country", "fields": {"country": "NZ"}}, {"pk": 166, "model": "embargo.country", "fields": {"country": "OM"}}, {"pk": 170, "model": "embargo.country", "fields": {"country": "PA"}}, {"pk": 173, "model": "embargo.country", "fields": {"country": "PE"}}, {"pk": 78, "model": "embargo.country", "fields": {"country": "PF"}}, {"pk": 171, "model": "embargo.country", "fields": {"country": "PG"}}, {"pk": 174, "model": "embargo.country", "fields": {"country": "PH"}}, {"pk": 167, "model": "embargo.country", "fields": {"country": "PK"}}, {"pk": 176, "model": "embargo.country", "fields": {"country": "PL"}}, {"pk": 189, "model": "embargo.country", "fields": {"country": "PM"}}, {"pk": 175, "model": "embargo.country", "fields": {"country": "PN"}}, {"pk": 178, "model": "embargo.country", "fields": {"country": "PR"}}, {"pk": 169, "model": "embargo.country", "fields": {"country": "PS"}}, {"pk": 177, "model": "embargo.country", "fields": {"country": "PT"}}, {"pk": 168, "model": "embargo.country", "fields": {"country": "PW"}}, {"pk": 172, "model": "embargo.country", "fields": {"country": "PY"}}, {"pk": 179, "model": "embargo.country", "fields": {"country": "QA"}}, {"pk": 180, "model": "embargo.country", "fields": {"country": "RE"}}, {"pk": 181, "model": "embargo.country", "fields": {"country": "RO"}}, {"pk": 196, "model": "embargo.country", "fields": {"country": "RS"}}, {"pk": 182, "model": "embargo.country", "fields": {"country": "RU"}}, {"pk": 183, "model": "embargo.country", "fields": {"country": "RW"}}, {"pk": 194, "model": "embargo.country", "fields": {"country": "SA"}}, {"pk": 203, "model": "embargo.country", "fields": {"country": "SB"}}, {"pk": 197, "model": "embargo.country", "fields": {"country": "SC"}}, {"pk": 211, "model": "embargo.country", "fields": {"country": "SD"}}, {"pk": 215, "model": "embargo.country", "fields": {"country": "SE"}}, {"pk": 199, "model": "embargo.country", "fields": {"country": "SG"}}, {"pk": 185, "model": "embargo.country", "fields": {"country": "SH"}}, {"pk": 202, "model": "embargo.country", "fields": {"country": "SI"}}, {"pk": 213, "model": "embargo.country", "fields": {"country": "SJ"}}, {"pk": 201, "model": "embargo.country", "fields": {"country": "SK"}}, {"pk": 198, "model": "embargo.country", "fields": {"country": "SL"}}, {"pk": 192, "model": "embargo.country", "fields": {"country": "SM"}}, {"pk": 195, "model": "embargo.country", "fields": {"country": "SN"}}, {"pk": 204, "model": "embargo.country", "fields": {"country": "SO"}}, {"pk": 212, "model": "embargo.country", "fields": {"country": "SR"}}, {"pk": 208, "model": "embargo.country", "fields": {"country": "SS"}}, {"pk": 193, "model": "embargo.country", "fields": {"country": "ST"}}, {"pk": 67, "model": "embargo.country", "fields": {"country": "SV"}}, {"pk": 200, "model": "embargo.country", "fields": {"country": "SX"}}, {"pk": 217, "model": "embargo.country", "fields": {"country": "SY"}}, {"pk": 214, "model": "embargo.country", "fields": {"country": "SZ"}}, {"pk": 230, "model": "embargo.country", "fields": {"country": "TC"}}, {"pk": 44, "model": "embargo.country", "fields": {"country": "TD"}}, {"pk": 79, "model": "embargo.country", "fields": {"country": "TF"}}, {"pk": 223, "model": "embargo.country", "fields": {"country": "TG"}}, {"pk": 221, "model": "embargo.country", "fields": {"country": "TH"}}, {"pk": 219, "model": "embargo.country", "fields": {"country": "TJ"}}, {"pk": 224, "model": "embargo.country", "fields": {"country": "TK"}}, {"pk": 222, "model": "embargo.country", "fields": {"country": "TL"}}, {"pk": 229, "model": "embargo.country", "fields": {"country": "TM"}}, {"pk": 227, "model": "embargo.country", "fields": {"country": "TN"}}, {"pk": 225, "model": "embargo.country", "fields": {"country": "TO"}}, {"pk": 228, "model": "embargo.country", "fields": {"country": "TR"}}, {"pk": 226, "model": "embargo.country", "fields": {"country": "TT"}}, {"pk": 231, "model": "embargo.country", "fields": {"country": "TV"}}, {"pk": 218, "model": "embargo.country", "fields": {"country": "TW"}}, {"pk": 220, "model": "embargo.country", "fields": {"country": "TZ"}}, {"pk": 233, "model": "embargo.country", "fields": {"country": "UA"}}, {"pk": 232, "model": "embargo.country", "fields": {"country": "UG"}}, {"pk": 236, "model": "embargo.country", "fields": {"country": "UM"}}, {"pk": 237, "model": "embargo.country", "fields": {"country": "US"}}, {"pk": 238, "model": "embargo.country", "fields": {"country": "UY"}}, {"pk": 239, "model": "embargo.country", "fields": {"country": "UZ"}}, {"pk": 98, "model": "embargo.country", "fields": {"country": "VA"}}, {"pk": 190, "model": "embargo.country", "fields": {"country": "VC"}}, {"pk": 241, "model": "embargo.country", "fields": {"country": "VE"}}, {"pk": 243, "model": "embargo.country", "fields": {"country": "VG"}}, {"pk": 244, "model": "embargo.country", "fields": {"country": "VI"}}, {"pk": 242, "model": "embargo.country", "fields": {"country": "VN"}}, {"pk": 240, "model": "embargo.country", "fields": {"country": "VU"}}, {"pk": 245, "model": "embargo.country", "fields": {"country": "WF"}}, {"pk": 191, "model": "embargo.country", "fields": {"country": "WS"}}, {"pk": 247, "model": "embargo.country", "fields": {"country": "YE"}}, {"pk": 141, "model": "embargo.country", "fields": {"country": "YT"}}, {"pk": 205, "model": "embargo.country", "fields": {"country": "ZA"}}, {"pk": 248, "model": "embargo.country", "fields": {"country": "ZM"}}, {"pk": 249, "model": "embargo.country", "fields": {"country": "ZW"}}, {"pk": 1, "model": "edxval.profile", "fields": {"profile_name": "desktop_mp4"}}, {"pk": 2, "model": "edxval.profile", "fields": {"profile_name": "desktop_webm"}}, {"pk": 3, "model": "edxval.profile", "fields": {"profile_name": "mobile_high"}}, {"pk": 4, "model": "edxval.profile", "fields": {"profile_name": "mobile_low"}}, {"pk": 5, "model": "edxval.profile", "fields": {"profile_name": "youtube"}}, {"pk": 1, "model": "milestones.milestonerelationshiptype", "fields": {"active": true, "description": "Autogenerated milestone relationship type \"fulfills\"", "modified": "2015-06-17T19:56:39Z", "name": "fulfills", "created": "2015-06-17T19:56:39Z"}}, {"pk": 2, "model": "milestones.milestonerelationshiptype", "fields": {"active": true, "description": "Autogenerated milestone relationship type \"requires\"", "modified": "2015-06-17T19:56:39Z", "name": "requires", "created": "2015-06-17T19:56:39Z"}}, {"pk": 61, "model": "auth.permission", "fields": {"codename": "add_logentry", "name": "Can add log entry", "content_type": 21}}, {"pk": 62, "model": "auth.permission", "fields": {"codename": "change_logentry", "name": "Can change log entry", "content_type": 21}}, {"pk": 63, "model": "auth.permission", "fields": {"codename": "delete_logentry", "name": "Can delete log entry", "content_type": 21}}, {"pk": 493, "model": "auth.permission", "fields": {"codename": "add_aiclassifier", "name": "Can add ai classifier", "content_type": 164}}, {"pk": 494, "model": "auth.permission", "fields": {"codename": "change_aiclassifier", "name": "Can change ai classifier", "content_type": 164}}, {"pk": 495, "model": "auth.permission", "fields": {"codename": "delete_aiclassifier", "name": "Can delete ai classifier", "content_type": 164}}, {"pk": 490, "model": "auth.permission", "fields": {"codename": "add_aiclassifierset", "name": "Can add ai classifier set", "content_type": 163}}, {"pk": 491, "model": "auth.permission", "fields": {"codename": "change_aiclassifierset", "name": "Can change ai classifier set", "content_type": 163}}, {"pk": 492, "model": "auth.permission", "fields": {"codename": "delete_aiclassifierset", "name": "Can delete ai classifier set", "content_type": 163}}, {"pk": 499, "model": "auth.permission", "fields": {"codename": "add_aigradingworkflow", "name": "Can add ai grading workflow", "content_type": 166}}, {"pk": 500, "model": "auth.permission", "fields": {"codename": "change_aigradingworkflow", "name": "Can change ai grading workflow", "content_type": 166}}, {"pk": 501, "model": "auth.permission", "fields": {"codename": "delete_aigradingworkflow", "name": "Can delete ai grading workflow", "content_type": 166}}, {"pk": 496, "model": "auth.permission", "fields": {"codename": "add_aitrainingworkflow", "name": "Can add ai training workflow", "content_type": 165}}, {"pk": 497, "model": "auth.permission", "fields": {"codename": "change_aitrainingworkflow", "name": "Can change ai training workflow", "content_type": 165}}, {"pk": 498, "model": "auth.permission", "fields": {"codename": "delete_aitrainingworkflow", "name": "Can delete ai training workflow", "content_type": 165}}, {"pk": 463, "model": "auth.permission", "fields": {"codename": "add_assessment", "name": "Can add assessment", "content_type": 154}}, {"pk": 464, "model": "auth.permission", "fields": {"codename": "change_assessment", "name": "Can change assessment", "content_type": 154}}, {"pk": 465, "model": "auth.permission", "fields": {"codename": "delete_assessment", "name": "Can delete assessment", "content_type": 154}}, {"pk": 472, "model": "auth.permission", "fields": {"codename": "add_assessmentfeedback", "name": "Can add assessment feedback", "content_type": 157}}, {"pk": 473, "model": "auth.permission", "fields": {"codename": "change_assessmentfeedback", "name": "Can change assessment feedback", "content_type": 157}}, {"pk": 474, "model": "auth.permission", "fields": {"codename": "delete_assessmentfeedback", "name": "Can delete assessment feedback", "content_type": 157}}, {"pk": 469, "model": "auth.permission", "fields": {"codename": "add_assessmentfeedbackoption", "name": "Can add assessment feedback option", "content_type": 156}}, {"pk": 470, "model": "auth.permission", "fields": {"codename": "change_assessmentfeedbackoption", "name": "Can change assessment feedback option", "content_type": 156}}, {"pk": 471, "model": "auth.permission", "fields": {"codename": "delete_assessmentfeedbackoption", "name": "Can delete assessment feedback option", "content_type": 156}}, {"pk": 466, "model": "auth.permission", "fields": {"codename": "add_assessmentpart", "name": "Can add assessment part", "content_type": 155}}, {"pk": 467, "model": "auth.permission", "fields": {"codename": "change_assessmentpart", "name": "Can change assessment part", "content_type": 155}}, {"pk": 468, "model": "auth.permission", "fields": {"codename": "delete_assessmentpart", "name": "Can delete assessment part", "content_type": 155}}, {"pk": 457, "model": "auth.permission", "fields": {"codename": "add_criterion", "name": "Can add criterion", "content_type": 152}}, {"pk": 458, "model": "auth.permission", "fields": {"codename": "change_criterion", "name": "Can change criterion", "content_type": 152}}, {"pk": 459, "model": "auth.permission", "fields": {"codename": "delete_criterion", "name": "Can delete criterion", "content_type": 152}}, {"pk": 460, "model": "auth.permission", "fields": {"codename": "add_criterionoption", "name": "Can add criterion option", "content_type": 153}}, {"pk": 461, "model": "auth.permission", "fields": {"codename": "change_criterionoption", "name": "Can change criterion option", "content_type": 153}}, {"pk": 462, "model": "auth.permission", "fields": {"codename": "delete_criterionoption", "name": "Can delete criterion option", "content_type": 153}}, {"pk": 475, "model": "auth.permission", "fields": {"codename": "add_peerworkflow", "name": "Can add peer workflow", "content_type": 158}}, {"pk": 476, "model": "auth.permission", "fields": {"codename": "change_peerworkflow", "name": "Can change peer workflow", "content_type": 158}}, {"pk": 477, "model": "auth.permission", "fields": {"codename": "delete_peerworkflow", "name": "Can delete peer workflow", "content_type": 158}}, {"pk": 478, "model": "auth.permission", "fields": {"codename": "add_peerworkflowitem", "name": "Can add peer workflow item", "content_type": 159}}, {"pk": 479, "model": "auth.permission", "fields": {"codename": "change_peerworkflowitem", "name": "Can change peer workflow item", "content_type": 159}}, {"pk": 480, "model": "auth.permission", "fields": {"codename": "delete_peerworkflowitem", "name": "Can delete peer workflow item", "content_type": 159}}, {"pk": 454, "model": "auth.permission", "fields": {"codename": "add_rubric", "name": "Can add rubric", "content_type": 151}}, {"pk": 455, "model": "auth.permission", "fields": {"codename": "change_rubric", "name": "Can change rubric", "content_type": 151}}, {"pk": 456, "model": "auth.permission", "fields": {"codename": "delete_rubric", "name": "Can delete rubric", "content_type": 151}}, {"pk": 484, "model": "auth.permission", "fields": {"codename": "add_studenttrainingworkflow", "name": "Can add student training workflow", "content_type": 161}}, {"pk": 485, "model": "auth.permission", "fields": {"codename": "change_studenttrainingworkflow", "name": "Can change student training workflow", "content_type": 161}}, {"pk": 486, "model": "auth.permission", "fields": {"codename": "delete_studenttrainingworkflow", "name": "Can delete student training workflow", "content_type": 161}}, {"pk": 487, "model": "auth.permission", "fields": {"codename": "add_studenttrainingworkflowitem", "name": "Can add student training workflow item", "content_type": 162}}, {"pk": 488, "model": "auth.permission", "fields": {"codename": "change_studenttrainingworkflowitem", "name": "Can change student training workflow item", "content_type": 162}}, {"pk": 489, "model": "auth.permission", "fields": {"codename": "delete_studenttrainingworkflowitem", "name": "Can delete student training workflow item", "content_type": 162}}, {"pk": 481, "model": "auth.permission", "fields": {"codename": "add_trainingexample", "name": "Can add training example", "content_type": 160}}, {"pk": 482, "model": "auth.permission", "fields": {"codename": "change_trainingexample", "name": "Can change training example", "content_type": 160}}, {"pk": 483, "model": "auth.permission", "fields": {"codename": "delete_trainingexample", "name": "Can delete training example", "content_type": 160}}, {"pk": 4, "model": "auth.permission", "fields": {"codename": "add_group", "name": "Can add group", "content_type": 2}}, {"pk": 5, "model": "auth.permission", "fields": {"codename": "change_group", "name": "Can change group", "content_type": 2}}, {"pk": 6, "model": "auth.permission", "fields": {"codename": "delete_group", "name": "Can delete group", "content_type": 2}}, {"pk": 1, "model": "auth.permission", "fields": {"codename": "add_permission", "name": "Can add permission", "content_type": 1}}, {"pk": 2, "model": "auth.permission", "fields": {"codename": "change_permission", "name": "Can change permission", "content_type": 1}}, {"pk": 3, "model": "auth.permission", "fields": {"codename": "delete_permission", "name": "Can delete permission", "content_type": 1}}, {"pk": 7, "model": "auth.permission", "fields": {"codename": "add_user", "name": "Can add user", "content_type": 3}}, {"pk": 8, "model": "auth.permission", "fields": {"codename": "change_user", "name": "Can change user", "content_type": 3}}, {"pk": 9, "model": "auth.permission", "fields": {"codename": "delete_user", "name": "Can delete user", "content_type": 3}}, {"pk": 229, "model": "auth.permission", "fields": {"codename": "add_brandingapiconfig", "name": "Can add branding api config", "content_type": 77}}, {"pk": 230, "model": "auth.permission", "fields": {"codename": "change_brandingapiconfig", "name": "Can change branding api config", "content_type": 77}}, {"pk": 231, "model": "auth.permission", "fields": {"codename": "delete_brandingapiconfig", "name": "Can delete branding api config", "content_type": 77}}, {"pk": 226, "model": "auth.permission", "fields": {"codename": "add_brandinginfoconfig", "name": "Can add branding info config", "content_type": 76}}, {"pk": 227, "model": "auth.permission", "fields": {"codename": "change_brandinginfoconfig", "name": "Can change branding info config", "content_type": 76}}, {"pk": 228, "model": "auth.permission", "fields": {"codename": "delete_brandinginfoconfig", "name": "Can delete branding info config", "content_type": 76}}, {"pk": 223, "model": "auth.permission", "fields": {"codename": "add_courseauthorization", "name": "Can add course authorization", "content_type": 75}}, {"pk": 224, "model": "auth.permission", "fields": {"codename": "change_courseauthorization", "name": "Can change course authorization", "content_type": 75}}, {"pk": 225, "model": "auth.permission", "fields": {"codename": "delete_courseauthorization", "name": "Can delete course authorization", "content_type": 75}}, {"pk": 214, "model": "auth.permission", "fields": {"codename": "add_courseemail", "name": "Can add course email", "content_type": 72}}, {"pk": 215, "model": "auth.permission", "fields": {"codename": "change_courseemail", "name": "Can change course email", "content_type": 72}}, {"pk": 216, "model": "auth.permission", "fields": {"codename": "delete_courseemail", "name": "Can delete course email", "content_type": 72}}, {"pk": 220, "model": "auth.permission", "fields": {"codename": "add_courseemailtemplate", "name": "Can add course email template", "content_type": 74}}, {"pk": 221, "model": "auth.permission", "fields": {"codename": "change_courseemailtemplate", "name": "Can change course email template", "content_type": 74}}, {"pk": 222, "model": "auth.permission", "fields": {"codename": "delete_courseemailtemplate", "name": "Can delete course email template", "content_type": 74}}, {"pk": 217, "model": "auth.permission", "fields": {"codename": "add_optout", "name": "Can add optout", "content_type": 73}}, {"pk": 218, "model": "auth.permission", "fields": {"codename": "change_optout", "name": "Can change optout", "content_type": 73}}, {"pk": 219, "model": "auth.permission", "fields": {"codename": "delete_optout", "name": "Can delete optout", "content_type": 73}}, {"pk": 187, "model": "auth.permission", "fields": {"codename": "add_badgeassertion", "name": "Can add badge assertion", "content_type": 63}}, {"pk": 188, "model": "auth.permission", "fields": {"codename": "change_badgeassertion", "name": "Can change badge assertion", "content_type": 63}}, {"pk": 189, "model": "auth.permission", "fields": {"codename": "delete_badgeassertion", "name": "Can delete badge assertion", "content_type": 63}}, {"pk": 190, "model": "auth.permission", "fields": {"codename": "add_badgeimageconfiguration", "name": "Can add badge image configuration", "content_type": 64}}, {"pk": 191, "model": "auth.permission", "fields": {"codename": "change_badgeimageconfiguration", "name": "Can change badge image configuration", "content_type": 64}}, {"pk": 192, "model": "auth.permission", "fields": {"codename": "delete_badgeimageconfiguration", "name": "Can delete badge image configuration", "content_type": 64}}, {"pk": 181, "model": "auth.permission", "fields": {"codename": "add_certificategenerationconfiguration", "name": "Can add certificate generation configuration", "content_type": 61}}, {"pk": 182, "model": "auth.permission", "fields": {"codename": "change_certificategenerationconfiguration", "name": "Can change certificate generation configuration", "content_type": 61}}, {"pk": 183, "model": "auth.permission", "fields": {"codename": "delete_certificategenerationconfiguration", "name": "Can delete certificate generation configuration", "content_type": 61}}, {"pk": 178, "model": "auth.permission", "fields": {"codename": "add_certificategenerationcoursesetting", "name": "Can add certificate generation course setting", "content_type": 60}}, {"pk": 179, "model": "auth.permission", "fields": {"codename": "change_certificategenerationcoursesetting", "name": "Can change certificate generation course setting", "content_type": 60}}, {"pk": 180, "model": "auth.permission", "fields": {"codename": "delete_certificategenerationcoursesetting", "name": "Can delete certificate generation course setting", "content_type": 60}}, {"pk": 184, "model": "auth.permission", "fields": {"codename": "add_certificatehtmlviewconfiguration", "name": "Can add certificate html view configuration", "content_type": 62}}, {"pk": 185, "model": "auth.permission", "fields": {"codename": "change_certificatehtmlviewconfiguration", "name": "Can change certificate html view configuration", "content_type": 62}}, {"pk": 186, "model": "auth.permission", "fields": {"codename": "delete_certificatehtmlviewconfiguration", "name": "Can delete certificate html view configuration", "content_type": 62}}, {"pk": 166, "model": "auth.permission", "fields": {"codename": "add_certificatewhitelist", "name": "Can add certificate whitelist", "content_type": 56}}, {"pk": 167, "model": "auth.permission", "fields": {"codename": "change_certificatewhitelist", "name": "Can change certificate whitelist", "content_type": 56}}, {"pk": 168, "model": "auth.permission", "fields": {"codename": "delete_certificatewhitelist", "name": "Can delete certificate whitelist", "content_type": 56}}, {"pk": 175, "model": "auth.permission", "fields": {"codename": "add_examplecertificate", "name": "Can add example certificate", "content_type": 59}}, {"pk": 176, "model": "auth.permission", "fields": {"codename": "change_examplecertificate", "name": "Can change example certificate", "content_type": 59}}, {"pk": 177, "model": "auth.permission", "fields": {"codename": "delete_examplecertificate", "name": "Can delete example certificate", "content_type": 59}}, {"pk": 172, "model": "auth.permission", "fields": {"codename": "add_examplecertificateset", "name": "Can add example certificate set", "content_type": 58}}, {"pk": 173, "model": "auth.permission", "fields": {"codename": "change_examplecertificateset", "name": "Can change example certificate set", "content_type": 58}}, {"pk": 174, "model": "auth.permission", "fields": {"codename": "delete_examplecertificateset", "name": "Can delete example certificate set", "content_type": 58}}, {"pk": 169, "model": "auth.permission", "fields": {"codename": "add_generatedcertificate", "name": "Can add generated certificate", "content_type": 57}}, {"pk": 170, "model": "auth.permission", "fields": {"codename": "change_generatedcertificate", "name": "Can change generated certificate", "content_type": 57}}, {"pk": 171, "model": "auth.permission", "fields": {"codename": "delete_generatedcertificate", "name": "Can delete generated certificate", "content_type": 57}}, {"pk": 46, "model": "auth.permission", "fields": {"codename": "add_servercircuit", "name": "Can add server circuit", "content_type": 16}}, {"pk": 47, "model": "auth.permission", "fields": {"codename": "change_servercircuit", "name": "Can change server circuit", "content_type": 16}}, {"pk": 48, "model": "auth.permission", "fields": {"codename": "delete_servercircuit", "name": "Can delete server circuit", "content_type": 16}}, {"pk": 565, "model": "auth.permission", "fields": {"codename": "add_pushnotificationconfig", "name": "Can add push notification config", "content_type": 188}}, {"pk": 566, "model": "auth.permission", "fields": {"codename": "change_pushnotificationconfig", "name": "Can change push notification config", "content_type": 188}}, {"pk": 567, "model": "auth.permission", "fields": {"codename": "delete_pushnotificationconfig", "name": "Can delete push notification config", "content_type": 188}}, {"pk": 562, "model": "auth.permission", "fields": {"codename": "add_videouploadconfig", "name": "Can add video upload config", "content_type": 187}}, {"pk": 563, "model": "auth.permission", "fields": {"codename": "change_videouploadconfig", "name": "Can change video upload config", "content_type": 187}}, {"pk": 564, "model": "auth.permission", "fields": {"codename": "delete_videouploadconfig", "name": "Can delete video upload config", "content_type": 187}}, {"pk": 10, "model": "auth.permission", "fields": {"codename": "add_contenttype", "name": "Can add content type", "content_type": 4}}, {"pk": 11, "model": "auth.permission", "fields": {"codename": "change_contenttype", "name": "Can change content type", "content_type": 4}}, {"pk": 12, "model": "auth.permission", "fields": {"codename": "delete_contenttype", "name": "Can delete content type", "content_type": 4}}, {"pk": 64, "model": "auth.permission", "fields": {"codename": "add_corsmodel", "name": "Can add cors model", "content_type": 22}}, {"pk": 65, "model": "auth.permission", "fields": {"codename": "change_corsmodel", "name": "Can change cors model", "content_type": 22}}, {"pk": 66, "model": "auth.permission", "fields": {"codename": "delete_corsmodel", "name": "Can delete cors model", "content_type": 22}}, {"pk": 439, "model": "auth.permission", "fields": {"codename": "add_xdomainproxyconfiguration", "name": "Can add x domain proxy configuration", "content_type": 146}}, {"pk": 440, "model": "auth.permission", "fields": {"codename": "change_xdomainproxyconfiguration", "name": "Can change x domain proxy configuration", "content_type": 146}}, {"pk": 441, "model": "auth.permission", "fields": {"codename": "delete_xdomainproxyconfiguration", "name": "Can delete x domain proxy configuration", "content_type": 146}}, {"pk": 94, "model": "auth.permission", "fields": {"codename": "add_offlinecomputedgrade", "name": "Can add offline computed grade", "content_type": 32}}, {"pk": 95, "model": "auth.permission", "fields": {"codename": "change_offlinecomputedgrade", "name": "Can change offline computed grade", "content_type": 32}}, {"pk": 96, "model": "auth.permission", "fields": {"codename": "delete_offlinecomputedgrade", "name": "Can delete offline computed grade", "content_type": 32}}, {"pk": 97, "model": "auth.permission", "fields": {"codename": "add_offlinecomputedgradelog", "name": "Can add offline computed grade log", "content_type": 33}}, {"pk": 98, "model": "auth.permission", "fields": {"codename": "change_offlinecomputedgradelog", "name": "Can change offline computed grade log", "content_type": 33}}, {"pk": 99, "model": "auth.permission", "fields": {"codename": "delete_offlinecomputedgradelog", "name": "Can delete offline computed grade log", "content_type": 33}}, {"pk": 100, "model": "auth.permission", "fields": {"codename": "add_studentfieldoverride", "name": "Can add student field override", "content_type": 34}}, {"pk": 101, "model": "auth.permission", "fields": {"codename": "change_studentfieldoverride", "name": "Can change student field override", "content_type": 34}}, {"pk": 102, "model": "auth.permission", "fields": {"codename": "delete_studentfieldoverride", "name": "Can delete student field override", "content_type": 34}}, {"pk": 79, "model": "auth.permission", "fields": {"codename": "add_studentmodule", "name": "Can add student module", "content_type": 27}}, {"pk": 80, "model": "auth.permission", "fields": {"codename": "change_studentmodule", "name": "Can change student module", "content_type": 27}}, {"pk": 81, "model": "auth.permission", "fields": {"codename": "delete_studentmodule", "name": "Can delete student module", "content_type": 27}}, {"pk": 82, "model": "auth.permission", "fields": {"codename": "add_studentmodulehistory", "name": "Can add student module history", "content_type": 28}}, {"pk": 83, "model": "auth.permission", "fields": {"codename": "change_studentmodulehistory", "name": "Can change student module history", "content_type": 28}}, {"pk": 84, "model": "auth.permission", "fields": {"codename": "delete_studentmodulehistory", "name": "Can delete student module history", "content_type": 28}}, {"pk": 91, "model": "auth.permission", "fields": {"codename": "add_xmodulestudentinfofield", "name": "Can add x module student info field", "content_type": 31}}, {"pk": 92, "model": "auth.permission", "fields": {"codename": "change_xmodulestudentinfofield", "name": "Can change x module student info field", "content_type": 31}}, {"pk": 93, "model": "auth.permission", "fields": {"codename": "delete_xmodulestudentinfofield", "name": "Can delete x module student info field", "content_type": 31}}, {"pk": 88, "model": "auth.permission", "fields": {"codename": "add_xmodulestudentprefsfield", "name": "Can add x module student prefs field", "content_type": 30}}, {"pk": 89, "model": "auth.permission", "fields": {"codename": "change_xmodulestudentprefsfield", "name": "Can change x module student prefs field", "content_type": 30}}, {"pk": 90, "model": "auth.permission", "fields": {"codename": "delete_xmodulestudentprefsfield", "name": "Can delete x module student prefs field", "content_type": 30}}, {"pk": 85, "model": "auth.permission", "fields": {"codename": "add_xmoduleuserstatesummaryfield", "name": "Can add x module user state summary field", "content_type": 29}}, {"pk": 86, "model": "auth.permission", "fields": {"codename": "change_xmoduleuserstatesummaryfield", "name": "Can change x module user state summary field", "content_type": 29}}, {"pk": 87, "model": "auth.permission", "fields": {"codename": "delete_xmoduleuserstatesummaryfield", "name": "Can delete x module user state summary field", "content_type": 29}}, {"pk": 421, "model": "auth.permission", "fields": {"codename": "add_coursererunstate", "name": "Can add course rerun state", "content_type": 140}}, {"pk": 422, "model": "auth.permission", "fields": {"codename": "change_coursererunstate", "name": "Can change course rerun state", "content_type": 140}}, {"pk": 423, "model": "auth.permission", "fields": {"codename": "delete_coursererunstate", "name": "Can delete course rerun state", "content_type": 140}}, {"pk": 568, "model": "auth.permission", "fields": {"codename": "add_coursecreator", "name": "Can add course creator", "content_type": 189}}, {"pk": 569, "model": "auth.permission", "fields": {"codename": "change_coursecreator", "name": "Can change course creator", "content_type": 189}}, {"pk": 570, "model": "auth.permission", "fields": {"codename": "delete_coursecreator", "name": "Can delete course creator", "content_type": 189}}, {"pk": 211, "model": "auth.permission", "fields": {"codename": "add_coursecohort", "name": "Can add course cohort", "content_type": 71}}, {"pk": 212, "model": "auth.permission", "fields": {"codename": "change_coursecohort", "name": "Can change course cohort", "content_type": 71}}, {"pk": 213, "model": "auth.permission", "fields": {"codename": "delete_coursecohort", "name": "Can delete course cohort", "content_type": 71}}, {"pk": 208, "model": "auth.permission", "fields": {"codename": "add_coursecohortssettings", "name": "Can add course cohorts settings", "content_type": 70}}, {"pk": 209, "model": "auth.permission", "fields": {"codename": "change_coursecohortssettings", "name": "Can change course cohorts settings", "content_type": 70}}, {"pk": 210, "model": "auth.permission", "fields": {"codename": "delete_coursecohortssettings", "name": "Can delete course cohorts settings", "content_type": 70}}, {"pk": 202, "model": "auth.permission", "fields": {"codename": "add_courseusergroup", "name": "Can add course user group", "content_type": 68}}, {"pk": 203, "model": "auth.permission", "fields": {"codename": "change_courseusergroup", "name": "Can change course user group", "content_type": 68}}, {"pk": 204, "model": "auth.permission", "fields": {"codename": "delete_courseusergroup", "name": "Can delete course user group", "content_type": 68}}, {"pk": 205, "model": "auth.permission", "fields": {"codename": "add_courseusergrouppartitiongroup", "name": "Can add course user group partition group", "content_type": 69}}, {"pk": 206, "model": "auth.permission", "fields": {"codename": "change_courseusergrouppartitiongroup", "name": "Can change course user group partition group", "content_type": 69}}, {"pk": 207, "model": "auth.permission", "fields": {"codename": "delete_courseusergrouppartitiongroup", "name": "Can delete course user group partition group", "content_type": 69}}, {"pk": 376, "model": "auth.permission", "fields": {"codename": "add_coursemode", "name": "Can add course mode", "content_type": 125}}, {"pk": 377, "model": "auth.permission", "fields": {"codename": "change_coursemode", "name": "Can change course mode", "content_type": 125}}, {"pk": 378, "model": "auth.permission", "fields": {"codename": "delete_coursemode", "name": "Can delete course mode", "content_type": 125}}, {"pk": 379, "model": "auth.permission", "fields": {"codename": "add_coursemodesarchive", "name": "Can add course modes archive", "content_type": 126}}, {"pk": 380, "model": "auth.permission", "fields": {"codename": "change_coursemodesarchive", "name": "Can change course modes archive", "content_type": 126}}, {"pk": 381, "model": "auth.permission", "fields": {"codename": "delete_coursemodesarchive", "name": "Can delete course modes archive", "content_type": 126}}, {"pk": 436, "model": "auth.permission", "fields": {"codename": "add_coursestructure", "name": "Can add course structure", "content_type": 145}}, {"pk": 437, "model": "auth.permission", "fields": {"codename": "change_coursestructure", "name": "Can change course structure", "content_type": 145}}, {"pk": 438, "model": "auth.permission", "fields": {"codename": "delete_coursestructure", "name": "Can delete course structure", "content_type": 145}}, {"pk": 544, "model": "auth.permission", "fields": {"codename": "add_creditcourse", "name": "Can add credit course", "content_type": 181}}, {"pk": 545, "model": "auth.permission", "fields": {"codename": "change_creditcourse", "name": "Can change credit course", "content_type": 181}}, {"pk": 546, "model": "auth.permission", "fields": {"codename": "delete_creditcourse", "name": "Can delete credit course", "content_type": 181}}, {"pk": 553, "model": "auth.permission", "fields": {"codename": "add_crediteligibility", "name": "Can add credit eligibility", "content_type": 184}}, {"pk": 554, "model": "auth.permission", "fields": {"codename": "change_crediteligibility", "name": "Can change credit eligibility", "content_type": 184}}, {"pk": 555, "model": "auth.permission", "fields": {"codename": "delete_crediteligibility", "name": "Can delete credit eligibility", "content_type": 184}}, {"pk": 541, "model": "auth.permission", "fields": {"codename": "add_creditprovider", "name": "Can add credit provider", "content_type": 180}}, {"pk": 542, "model": "auth.permission", "fields": {"codename": "change_creditprovider", "name": "Can change credit provider", "content_type": 180}}, {"pk": 543, "model": "auth.permission", "fields": {"codename": "delete_creditprovider", "name": "Can delete credit provider", "content_type": 180}}, {"pk": 559, "model": "auth.permission", "fields": {"codename": "add_creditrequest", "name": "Can add credit request", "content_type": 186}}, {"pk": 560, "model": "auth.permission", "fields": {"codename": "change_creditrequest", "name": "Can change credit request", "content_type": 186}}, {"pk": 561, "model": "auth.permission", "fields": {"codename": "delete_creditrequest", "name": "Can delete credit request", "content_type": 186}}, {"pk": 547, "model": "auth.permission", "fields": {"codename": "add_creditrequirement", "name": "Can add credit requirement", "content_type": 182}}, {"pk": 548, "model": "auth.permission", "fields": {"codename": "change_creditrequirement", "name": "Can change credit requirement", "content_type": 182}}, {"pk": 549, "model": "auth.permission", "fields": {"codename": "delete_creditrequirement", "name": "Can delete credit requirement", "content_type": 182}}, {"pk": 550, "model": "auth.permission", "fields": {"codename": "add_creditrequirementstatus", "name": "Can add credit requirement status", "content_type": 183}}, {"pk": 551, "model": "auth.permission", "fields": {"codename": "change_creditrequirementstatus", "name": "Can change credit requirement status", "content_type": 183}}, {"pk": 552, "model": "auth.permission", "fields": {"codename": "delete_creditrequirementstatus", "name": "Can delete credit requirement status", "content_type": 183}}, {"pk": 556, "model": "auth.permission", "fields": {"codename": "add_historicalcreditrequest", "name": "Can add historical credit request", "content_type": 185}}, {"pk": 557, "model": "auth.permission", "fields": {"codename": "change_historicalcreditrequest", "name": "Can change historical credit request", "content_type": 185}}, {"pk": 558, "model": "auth.permission", "fields": {"codename": "delete_historicalcreditrequest", "name": "Can delete historical credit request", "content_type": 185}}, {"pk": 397, "model": "auth.permission", "fields": {"codename": "add_darklangconfig", "name": "Can add dark lang config", "content_type": 132}}, {"pk": 398, "model": "auth.permission", "fields": {"codename": "change_darklangconfig", "name": "Can change dark lang config", "content_type": 132}}, {"pk": 399, "model": "auth.permission", "fields": {"codename": "delete_darklangconfig", "name": "Can delete dark lang config", "content_type": 132}}, {"pk": 73, "model": "auth.permission", "fields": {"codename": "add_association", "name": "Can add association", "content_type": 25}}, {"pk": 74, "model": "auth.permission", "fields": {"codename": "change_association", "name": "Can change association", "content_type": 25}}, {"pk": 75, "model": "auth.permission", "fields": {"codename": "delete_association", "name": "Can delete association", "content_type": 25}}, {"pk": 76, "model": "auth.permission", "fields": {"codename": "add_code", "name": "Can add code", "content_type": 26}}, {"pk": 77, "model": "auth.permission", "fields": {"codename": "change_code", "name": "Can change code", "content_type": 26}}, {"pk": 78, "model": "auth.permission", "fields": {"codename": "delete_code", "name": "Can delete code", "content_type": 26}}, {"pk": 70, "model": "auth.permission", "fields": {"codename": "add_nonce", "name": "Can add nonce", "content_type": 24}}, {"pk": 71, "model": "auth.permission", "fields": {"codename": "change_nonce", "name": "Can change nonce", "content_type": 24}}, {"pk": 72, "model": "auth.permission", "fields": {"codename": "delete_nonce", "name": "Can delete nonce", "content_type": 24}}, {"pk": 67, "model": "auth.permission", "fields": {"codename": "add_usersocialauth", "name": "Can add user social auth", "content_type": 23}}, {"pk": 68, "model": "auth.permission", "fields": {"codename": "change_usersocialauth", "name": "Can change user social auth", "content_type": 23}}, {"pk": 69, "model": "auth.permission", "fields": {"codename": "delete_usersocialauth", "name": "Can delete user social auth", "content_type": 23}}, {"pk": 292, "model": "auth.permission", "fields": {"codename": "add_notification", "name": "Can add notification", "content_type": 97}}, {"pk": 293, "model": "auth.permission", "fields": {"codename": "change_notification", "name": "Can change notification", "content_type": 97}}, {"pk": 294, "model": "auth.permission", "fields": {"codename": "delete_notification", "name": "Can delete notification", "content_type": 97}}, {"pk": 283, "model": "auth.permission", "fields": {"codename": "add_notificationtype", "name": "Can add type", "content_type": 94}}, {"pk": 284, "model": "auth.permission", "fields": {"codename": "change_notificationtype", "name": "Can change type", "content_type": 94}}, {"pk": 285, "model": "auth.permission", "fields": {"codename": "delete_notificationtype", "name": "Can delete type", "content_type": 94}}, {"pk": 286, "model": "auth.permission", "fields": {"codename": "add_settings", "name": "Can add settings", "content_type": 95}}, {"pk": 287, "model": "auth.permission", "fields": {"codename": "change_settings", "name": "Can change settings", "content_type": 95}}, {"pk": 288, "model": "auth.permission", "fields": {"codename": "delete_settings", "name": "Can delete settings", "content_type": 95}}, {"pk": 289, "model": "auth.permission", "fields": {"codename": "add_subscription", "name": "Can add subscription", "content_type": 96}}, {"pk": 290, "model": "auth.permission", "fields": {"codename": "change_subscription", "name": "Can change subscription", "content_type": 96}}, {"pk": 291, "model": "auth.permission", "fields": {"codename": "delete_subscription", "name": "Can delete subscription", "content_type": 96}}, {"pk": 55, "model": "auth.permission", "fields": {"codename": "add_association", "name": "Can add association", "content_type": 19}}, {"pk": 56, "model": "auth.permission", "fields": {"codename": "change_association", "name": "Can change association", "content_type": 19}}, {"pk": 57, "model": "auth.permission", "fields": {"codename": "delete_association", "name": "Can delete association", "content_type": 19}}, {"pk": 52, "model": "auth.permission", "fields": {"codename": "add_nonce", "name": "Can add nonce", "content_type": 18}}, {"pk": 53, "model": "auth.permission", "fields": {"codename": "change_nonce", "name": "Can change nonce", "content_type": 18}}, {"pk": 54, "model": "auth.permission", "fields": {"codename": "delete_nonce", "name": "Can delete nonce", "content_type": 18}}, {"pk": 58, "model": "auth.permission", "fields": {"codename": "add_useropenid", "name": "Can add user open id", "content_type": 20}}, {"pk": 59, "model": "auth.permission", "fields": {"codename": "change_useropenid", "name": "Can change user open id", "content_type": 20}}, {"pk": 60, "model": "auth.permission", "fields": {"codename": "delete_useropenid", "name": "Can delete user open id", "content_type": 20}}, {"pk": 28, "model": "auth.permission", "fields": {"codename": "add_crontabschedule", "name": "Can add crontab", "content_type": 10}}, {"pk": 29, "model": "auth.permission", "fields": {"codename": "change_crontabschedule", "name": "Can change crontab", "content_type": 10}}, {"pk": 30, "model": "auth.permission", "fields": {"codename": "delete_crontabschedule", "name": "Can delete crontab", "content_type": 10}}, {"pk": 25, "model": "auth.permission", "fields": {"codename": "add_intervalschedule", "name": "Can add interval", "content_type": 9}}, {"pk": 26, "model": "auth.permission", "fields": {"codename": "change_intervalschedule", "name": "Can change interval", "content_type": 9}}, {"pk": 27, "model": "auth.permission", "fields": {"codename": "delete_intervalschedule", "name": "Can delete interval", "content_type": 9}}, {"pk": 34, "model": "auth.permission", "fields": {"codename": "add_periodictask", "name": "Can add periodic task", "content_type": 12}}, {"pk": 35, "model": "auth.permission", "fields": {"codename": "change_periodictask", "name": "Can change periodic task", "content_type": 12}}, {"pk": 36, "model": "auth.permission", "fields": {"codename": "delete_periodictask", "name": "Can delete periodic task", "content_type": 12}}, {"pk": 31, "model": "auth.permission", "fields": {"codename": "add_periodictasks", "name": "Can add periodic tasks", "content_type": 11}}, {"pk": 32, "model": "auth.permission", "fields": {"codename": "change_periodictasks", "name": "Can change periodic tasks", "content_type": 11}}, {"pk": 33, "model": "auth.permission", "fields": {"codename": "delete_periodictasks", "name": "Can delete periodic tasks", "content_type": 11}}, {"pk": 19, "model": "auth.permission", "fields": {"codename": "add_taskmeta", "name": "Can add task state", "content_type": 7}}, {"pk": 20, "model": "auth.permission", "fields": {"codename": "change_taskmeta", "name": "Can change task state", "content_type": 7}}, {"pk": 21, "model": "auth.permission", "fields": {"codename": "delete_taskmeta", "name": "Can delete task state", "content_type": 7}}, {"pk": 22, "model": "auth.permission", "fields": {"codename": "add_tasksetmeta", "name": "Can add saved group result", "content_type": 8}}, {"pk": 23, "model": "auth.permission", "fields": {"codename": "change_tasksetmeta", "name": "Can change saved group result", "content_type": 8}}, {"pk": 24, "model": "auth.permission", "fields": {"codename": "delete_tasksetmeta", "name": "Can delete saved group result", "content_type": 8}}, {"pk": 40, "model": "auth.permission", "fields": {"codename": "add_taskstate", "name": "Can add task", "content_type": 14}}, {"pk": 41, "model": "auth.permission", "fields": {"codename": "change_taskstate", "name": "Can change task", "content_type": 14}}, {"pk": 42, "model": "auth.permission", "fields": {"codename": "delete_taskstate", "name": "Can delete task", "content_type": 14}}, {"pk": 37, "model": "auth.permission", "fields": {"codename": "add_workerstate", "name": "Can add worker", "content_type": 13}}, {"pk": 38, "model": "auth.permission", "fields": {"codename": "change_workerstate", "name": "Can change worker", "content_type": 13}}, {"pk": 39, "model": "auth.permission", "fields": {"codename": "delete_workerstate", "name": "Can delete worker", "content_type": 13}}, {"pk": 517, "model": "auth.permission", "fields": {"codename": "add_coursevideo", "name": "Can add course video", "content_type": 172}}, {"pk": 518, "model": "auth.permission", "fields": {"codename": "change_coursevideo", "name": "Can change course video", "content_type": 172}}, {"pk": 519, "model": "auth.permission", "fields": {"codename": "delete_coursevideo", "name": "Can delete course video", "content_type": 172}}, {"pk": 520, "model": "auth.permission", "fields": {"codename": "add_encodedvideo", "name": "Can add encoded video", "content_type": 173}}, {"pk": 521, "model": "auth.permission", "fields": {"codename": "change_encodedvideo", "name": "Can change encoded video", "content_type": 173}}, {"pk": 522, "model": "auth.permission", "fields": {"codename": "delete_encodedvideo", "name": "Can delete encoded video", "content_type": 173}}, {"pk": 511, "model": "auth.permission", "fields": {"codename": "add_profile", "name": "Can add profile", "content_type": 170}}, {"pk": 512, "model": "auth.permission", "fields": {"codename": "change_profile", "name": "Can change profile", "content_type": 170}}, {"pk": 513, "model": "auth.permission", "fields": {"codename": "delete_profile", "name": "Can delete profile", "content_type": 170}}, {"pk": 523, "model": "auth.permission", "fields": {"codename": "add_subtitle", "name": "Can add subtitle", "content_type": 174}}, {"pk": 524, "model": "auth.permission", "fields": {"codename": "change_subtitle", "name": "Can change subtitle", "content_type": 174}}, {"pk": 525, "model": "auth.permission", "fields": {"codename": "delete_subtitle", "name": "Can delete subtitle", "content_type": 174}}, {"pk": 514, "model": "auth.permission", "fields": {"codename": "add_video", "name": "Can add video", "content_type": 171}}, {"pk": 515, "model": "auth.permission", "fields": {"codename": "change_video", "name": "Can change video", "content_type": 171}}, {"pk": 516, "model": "auth.permission", "fields": {"codename": "delete_video", "name": "Can delete video", "content_type": 171}}, {"pk": 409, "model": "auth.permission", "fields": {"codename": "add_country", "name": "Can add country", "content_type": 136}}, {"pk": 410, "model": "auth.permission", "fields": {"codename": "change_country", "name": "Can change country", "content_type": 136}}, {"pk": 411, "model": "auth.permission", "fields": {"codename": "delete_country", "name": "Can delete country", "content_type": 136}}, {"pk": 412, "model": "auth.permission", "fields": {"codename": "add_countryaccessrule", "name": "Can add country access rule", "content_type": 137}}, {"pk": 413, "model": "auth.permission", "fields": {"codename": "change_countryaccessrule", "name": "Can change country access rule", "content_type": 137}}, {"pk": 414, "model": "auth.permission", "fields": {"codename": "delete_countryaccessrule", "name": "Can delete country access rule", "content_type": 137}}, {"pk": 415, "model": "auth.permission", "fields": {"codename": "add_courseaccessrulehistory", "name": "Can add course access rule history", "content_type": 138}}, {"pk": 416, "model": "auth.permission", "fields": {"codename": "change_courseaccessrulehistory", "name": "Can change course access rule history", "content_type": 138}}, {"pk": 417, "model": "auth.permission", "fields": {"codename": "delete_courseaccessrulehistory", "name": "Can delete course access rule history", "content_type": 138}}, {"pk": 400, "model": "auth.permission", "fields": {"codename": "add_embargoedcourse", "name": "Can add embargoed course", "content_type": 133}}, {"pk": 401, "model": "auth.permission", "fields": {"codename": "change_embargoedcourse", "name": "Can change embargoed course", "content_type": 133}}, {"pk": 402, "model": "auth.permission", "fields": {"codename": "delete_embargoedcourse", "name": "Can delete embargoed course", "content_type": 133}}, {"pk": 403, "model": "auth.permission", "fields": {"codename": "add_embargoedstate", "name": "Can add embargoed state", "content_type": 134}}, {"pk": 404, "model": "auth.permission", "fields": {"codename": "change_embargoedstate", "name": "Can change embargoed state", "content_type": 134}}, {"pk": 405, "model": "auth.permission", "fields": {"codename": "delete_embargoedstate", "name": "Can delete embargoed state", "content_type": 134}}, {"pk": 418, "model": "auth.permission", "fields": {"codename": "add_ipfilter", "name": "Can add ip filter", "content_type": 139}}, {"pk": 419, "model": "auth.permission", "fields": {"codename": "change_ipfilter", "name": "Can change ip filter", "content_type": 139}}, {"pk": 420, "model": "auth.permission", "fields": {"codename": "delete_ipfilter", "name": "Can delete ip filter", "content_type": 139}}, {"pk": 406, "model": "auth.permission", "fields": {"codename": "add_restrictedcourse", "name": "Can add restricted course", "content_type": 135}}, {"pk": 407, "model": "auth.permission", "fields": {"codename": "change_restrictedcourse", "name": "Can change restricted course", "content_type": 135}}, {"pk": 408, "model": "auth.permission", "fields": {"codename": "delete_restrictedcourse", "name": "Can delete restricted course", "content_type": 135}}, {"pk": 232, "model": "auth.permission", "fields": {"codename": "add_externalauthmap", "name": "Can add external auth map", "content_type": 78}}, {"pk": 233, "model": "auth.permission", "fields": {"codename": "change_externalauthmap", "name": "Can change external auth map", "content_type": 78}}, {"pk": 234, "model": "auth.permission", "fields": {"codename": "delete_externalauthmap", "name": "Can delete external auth map", "content_type": 78}}, {"pk": 298, "model": "auth.permission", "fields": {"codename": "add_puzzlecomplete", "name": "Can add puzzle complete", "content_type": 99}}, {"pk": 299, "model": "auth.permission", "fields": {"codename": "change_puzzlecomplete", "name": "Can change puzzle complete", "content_type": 99}}, {"pk": 300, "model": "auth.permission", "fields": {"codename": "delete_puzzlecomplete", "name": "Can delete puzzle complete", "content_type": 99}}, {"pk": 295, "model": "auth.permission", "fields": {"codename": "add_score", "name": "Can add score", "content_type": 98}}, {"pk": 296, "model": "auth.permission", "fields": {"codename": "change_score", "name": "Can change score", "content_type": 98}}, {"pk": 297, "model": "auth.permission", "fields": {"codename": "delete_score", "name": "Can delete score", "content_type": 98}}, {"pk": 193, "model": "auth.permission", "fields": {"codename": "add_instructortask", "name": "Can add instructor task", "content_type": 65}}, {"pk": 194, "model": "auth.permission", "fields": {"codename": "change_instructortask", "name": "Can change instructor task", "content_type": 65}}, {"pk": 195, "model": "auth.permission", "fields": {"codename": "delete_instructortask", "name": "Can delete instructor task", "content_type": 65}}, {"pk": 196, "model": "auth.permission", "fields": {"codename": "add_coursesoftware", "name": "Can add course software", "content_type": 66}}, {"pk": 197, "model": "auth.permission", "fields": {"codename": "change_coursesoftware", "name": "Can change course software", "content_type": 66}}, {"pk": 198, "model": "auth.permission", "fields": {"codename": "delete_coursesoftware", "name": "Can delete course software", "content_type": 66}}, {"pk": 199, "model": "auth.permission", "fields": {"codename": "add_userlicense", "name": "Can add user license", "content_type": 67}}, {"pk": 200, "model": "auth.permission", "fields": {"codename": "change_userlicense", "name": "Can change user license", "content_type": 67}}, {"pk": 201, "model": "auth.permission", "fields": {"codename": "delete_userlicense", "name": "Can delete user license", "content_type": 67}}, {"pk": 433, "model": "auth.permission", "fields": {"codename": "add_xblockasidesconfig", "name": "Can add x block asides config", "content_type": 144}}, {"pk": 434, "model": "auth.permission", "fields": {"codename": "change_xblockasidesconfig", "name": "Can change x block asides config", "content_type": 144}}, {"pk": 435, "model": "auth.permission", "fields": {"codename": "delete_xblockasidesconfig", "name": "Can delete x block asides config", "content_type": 144}}, {"pk": 535, "model": "auth.permission", "fields": {"codename": "add_coursecontentmilestone", "name": "Can add course content milestone", "content_type": 178}}, {"pk": 536, "model": "auth.permission", "fields": {"codename": "change_coursecontentmilestone", "name": "Can change course content milestone", "content_type": 178}}, {"pk": 537, "model": "auth.permission", "fields": {"codename": "delete_coursecontentmilestone", "name": "Can delete course content milestone", "content_type": 178}}, {"pk": 532, "model": "auth.permission", "fields": {"codename": "add_coursemilestone", "name": "Can add course milestone", "content_type": 177}}, {"pk": 533, "model": "auth.permission", "fields": {"codename": "change_coursemilestone", "name": "Can change course milestone", "content_type": 177}}, {"pk": 534, "model": "auth.permission", "fields": {"codename": "delete_coursemilestone", "name": "Can delete course milestone", "content_type": 177}}, {"pk": 526, "model": "auth.permission", "fields": {"codename": "add_milestone", "name": "Can add milestone", "content_type": 175}}, {"pk": 527, "model": "auth.permission", "fields": {"codename": "change_milestone", "name": "Can change milestone", "content_type": 175}}, {"pk": 528, "model": "auth.permission", "fields": {"codename": "delete_milestone", "name": "Can delete milestone", "content_type": 175}}, {"pk": 529, "model": "auth.permission", "fields": {"codename": "add_milestonerelationshiptype", "name": "Can add milestone relationship type", "content_type": 176}}, {"pk": 530, "model": "auth.permission", "fields": {"codename": "change_milestonerelationshiptype", "name": "Can change milestone relationship type", "content_type": 176}}, {"pk": 531, "model": "auth.permission", "fields": {"codename": "delete_milestonerelationshiptype", "name": "Can delete milestone relationship type", "content_type": 176}}, {"pk": 538, "model": "auth.permission", "fields": {"codename": "add_usermilestone", "name": "Can add user milestone", "content_type": 179}}, {"pk": 539, "model": "auth.permission", "fields": {"codename": "change_usermilestone", "name": "Can change user milestone", "content_type": 179}}, {"pk": 540, "model": "auth.permission", "fields": {"codename": "delete_usermilestone", "name": "Can delete user milestone", "content_type": 179}}, {"pk": 424, "model": "auth.permission", "fields": {"codename": "add_mobileapiconfig", "name": "Can add mobile api config", "content_type": 141}}, {"pk": 425, "model": "auth.permission", "fields": {"codename": "change_mobileapiconfig", "name": "Can change mobile api config", "content_type": 141}}, {"pk": 426, "model": "auth.permission", "fields": {"codename": "delete_mobileapiconfig", "name": "Can delete mobile api config", "content_type": 141}}, {"pk": 301, "model": "auth.permission", "fields": {"codename": "add_note", "name": "Can add note", "content_type": 100}}, {"pk": 302, "model": "auth.permission", "fields": {"codename": "change_note", "name": "Can change note", "content_type": 100}}, {"pk": 303, "model": "auth.permission", "fields": {"codename": "delete_note", "name": "Can delete note", "content_type": 100}}, {"pk": 241, "model": "auth.permission", "fields": {"codename": "add_accesstoken", "name": "Can add access token", "content_type": 81}}, {"pk": 242, "model": "auth.permission", "fields": {"codename": "change_accesstoken", "name": "Can change access token", "content_type": 81}}, {"pk": 243, "model": "auth.permission", "fields": {"codename": "delete_accesstoken", "name": "Can delete access token", "content_type": 81}}, {"pk": 235, "model": "auth.permission", "fields": {"codename": "add_client", "name": "Can add client", "content_type": 79}}, {"pk": 236, "model": "auth.permission", "fields": {"codename": "change_client", "name": "Can change client", "content_type": 79}}, {"pk": 237, "model": "auth.permission", "fields": {"codename": "delete_client", "name": "Can delete client", "content_type": 79}}, {"pk": 238, "model": "auth.permission", "fields": {"codename": "add_grant", "name": "Can add grant", "content_type": 80}}, {"pk": 239, "model": "auth.permission", "fields": {"codename": "change_grant", "name": "Can change grant", "content_type": 80}}, {"pk": 240, "model": "auth.permission", "fields": {"codename": "delete_grant", "name": "Can delete grant", "content_type": 80}}, {"pk": 244, "model": "auth.permission", "fields": {"codename": "add_refreshtoken", "name": "Can add refresh token", "content_type": 82}}, {"pk": 245, "model": "auth.permission", "fields": {"codename": "change_refreshtoken", "name": "Can change refresh token", "content_type": 82}}, {"pk": 246, "model": "auth.permission", "fields": {"codename": "delete_refreshtoken", "name": "Can delete refresh token", "content_type": 82}}, {"pk": 247, "model": "auth.permission", "fields": {"codename": "add_trustedclient", "name": "Can add trusted client", "content_type": 83}}, {"pk": 248, "model": "auth.permission", "fields": {"codename": "change_trustedclient", "name": "Can change trusted client", "content_type": 83}}, {"pk": 249, "model": "auth.permission", "fields": {"codename": "delete_trustedclient", "name": "Can delete trusted client", "content_type": 83}}, {"pk": 49, "model": "auth.permission", "fields": {"codename": "add_psychometricdata", "name": "Can add psychometric data", "content_type": 17}}, {"pk": 50, "model": "auth.permission", "fields": {"codename": "change_psychometricdata", "name": "Can change psychometric data", "content_type": 17}}, {"pk": 51, "model": "auth.permission", "fields": {"codename": "delete_psychometricdata", "name": "Can delete psychometric data", "content_type": 17}}, {"pk": 13, "model": "auth.permission", "fields": {"codename": "add_session", "name": "Can add session", "content_type": 5}}, {"pk": 14, "model": "auth.permission", "fields": {"codename": "change_session", "name": "Can change session", "content_type": 5}}, {"pk": 15, "model": "auth.permission", "fields": {"codename": "delete_session", "name": "Can delete session", "content_type": 5}}, {"pk": 367, "model": "auth.permission", "fields": {"codename": "add_certificateitem", "name": "Can add certificate item", "content_type": 122}}, {"pk": 368, "model": "auth.permission", "fields": {"codename": "change_certificateitem", "name": "Can change certificate item", "content_type": 122}}, {"pk": 369, "model": "auth.permission", "fields": {"codename": "delete_certificateitem", "name": "Can delete certificate item", "content_type": 122}}, {"pk": 349, "model": "auth.permission", "fields": {"codename": "add_coupon", "name": "Can add coupon", "content_type": 116}}, {"pk": 350, "model": "auth.permission", "fields": {"codename": "change_coupon", "name": "Can change coupon", "content_type": 116}}, {"pk": 351, "model": "auth.permission", "fields": {"codename": "delete_coupon", "name": "Can delete coupon", "content_type": 116}}, {"pk": 352, "model": "auth.permission", "fields": {"codename": "add_couponredemption", "name": "Can add coupon redemption", "content_type": 117}}, {"pk": 353, "model": "auth.permission", "fields": {"codename": "change_couponredemption", "name": "Can change coupon redemption", "content_type": 117}}, {"pk": 354, "model": "auth.permission", "fields": {"codename": "delete_couponredemption", "name": "Can delete coupon redemption", "content_type": 117}}, {"pk": 358, "model": "auth.permission", "fields": {"codename": "add_courseregcodeitem", "name": "Can add course reg code item", "content_type": 119}}, {"pk": 359, "model": "auth.permission", "fields": {"codename": "change_courseregcodeitem", "name": "Can change course reg code item", "content_type": 119}}, {"pk": 360, "model": "auth.permission", "fields": {"codename": "delete_courseregcodeitem", "name": "Can delete course reg code item", "content_type": 119}}, {"pk": 361, "model": "auth.permission", "fields": {"codename": "add_courseregcodeitemannotation", "name": "Can add course reg code item annotation", "content_type": 120}}, {"pk": 362, "model": "auth.permission", "fields": {"codename": "change_courseregcodeitemannotation", "name": "Can change course reg code item annotation", "content_type": 120}}, {"pk": 363, "model": "auth.permission", "fields": {"codename": "delete_courseregcodeitemannotation", "name": "Can delete course reg code item annotation", "content_type": 120}}, {"pk": 343, "model": "auth.permission", "fields": {"codename": "add_courseregistrationcode", "name": "Can add course registration code", "content_type": 114}}, {"pk": 344, "model": "auth.permission", "fields": {"codename": "change_courseregistrationcode", "name": "Can change course registration code", "content_type": 114}}, {"pk": 345, "model": "auth.permission", "fields": {"codename": "delete_courseregistrationcode", "name": "Can delete course registration code", "content_type": 114}}, {"pk": 337, "model": "auth.permission", "fields": {"codename": "add_courseregistrationcodeinvoiceitem", "name": "Can add course registration code invoice item", "content_type": 112}}, {"pk": 338, "model": "auth.permission", "fields": {"codename": "change_courseregistrationcodeinvoiceitem", "name": "Can change course registration code invoice item", "content_type": 112}}, {"pk": 339, "model": "auth.permission", "fields": {"codename": "delete_courseregistrationcodeinvoiceitem", "name": "Can delete course registration code invoice item", "content_type": 112}}, {"pk": 373, "model": "auth.permission", "fields": {"codename": "add_donation", "name": "Can add donation", "content_type": 124}}, {"pk": 374, "model": "auth.permission", "fields": {"codename": "change_donation", "name": "Can change donation", "content_type": 124}}, {"pk": 375, "model": "auth.permission", "fields": {"codename": "delete_donation", "name": "Can delete donation", "content_type": 124}}, {"pk": 370, "model": "auth.permission", "fields": {"codename": "add_donationconfiguration", "name": "Can add donation configuration", "content_type": 123}}, {"pk": 371, "model": "auth.permission", "fields": {"codename": "change_donationconfiguration", "name": "Can change donation configuration", "content_type": 123}}, {"pk": 372, "model": "auth.permission", "fields": {"codename": "delete_donationconfiguration", "name": "Can delete donation configuration", "content_type": 123}}, {"pk": 328, "model": "auth.permission", "fields": {"codename": "add_invoice", "name": "Can add invoice", "content_type": 109}}, {"pk": 329, "model": "auth.permission", "fields": {"codename": "change_invoice", "name": "Can change invoice", "content_type": 109}}, {"pk": 330, "model": "auth.permission", "fields": {"codename": "delete_invoice", "name": "Can delete invoice", "content_type": 109}}, {"pk": 340, "model": "auth.permission", "fields": {"codename": "add_invoicehistory", "name": "Can add invoice history", "content_type": 113}}, {"pk": 341, "model": "auth.permission", "fields": {"codename": "change_invoicehistory", "name": "Can change invoice history", "content_type": 113}}, {"pk": 342, "model": "auth.permission", "fields": {"codename": "delete_invoicehistory", "name": "Can delete invoice history", "content_type": 113}}, {"pk": 334, "model": "auth.permission", "fields": {"codename": "add_invoiceitem", "name": "Can add invoice item", "content_type": 111}}, {"pk": 335, "model": "auth.permission", "fields": {"codename": "change_invoiceitem", "name": "Can change invoice item", "content_type": 111}}, {"pk": 336, "model": "auth.permission", "fields": {"codename": "delete_invoiceitem", "name": "Can delete invoice item", "content_type": 111}}, {"pk": 331, "model": "auth.permission", "fields": {"codename": "add_invoicetransaction", "name": "Can add invoice transaction", "content_type": 110}}, {"pk": 332, "model": "auth.permission", "fields": {"codename": "change_invoicetransaction", "name": "Can change invoice transaction", "content_type": 110}}, {"pk": 333, "model": "auth.permission", "fields": {"codename": "delete_invoicetransaction", "name": "Can delete invoice transaction", "content_type": 110}}, {"pk": 322, "model": "auth.permission", "fields": {"codename": "add_order", "name": "Can add order", "content_type": 107}}, {"pk": 323, "model": "auth.permission", "fields": {"codename": "change_order", "name": "Can change order", "content_type": 107}}, {"pk": 324, "model": "auth.permission", "fields": {"codename": "delete_order", "name": "Can delete order", "content_type": 107}}, {"pk": 325, "model": "auth.permission", "fields": {"codename": "add_orderitem", "name": "Can add order item", "content_type": 108}}, {"pk": 326, "model": "auth.permission", "fields": {"codename": "change_orderitem", "name": "Can change order item", "content_type": 108}}, {"pk": 327, "model": "auth.permission", "fields": {"codename": "delete_orderitem", "name": "Can delete order item", "content_type": 108}}, {"pk": 355, "model": "auth.permission", "fields": {"codename": "add_paidcourseregistration", "name": "Can add paid course registration", "content_type": 118}}, {"pk": 356, "model": "auth.permission", "fields": {"codename": "change_paidcourseregistration", "name": "Can change paid course registration", "content_type": 118}}, {"pk": 357, "model": "auth.permission", "fields": {"codename": "delete_paidcourseregistration", "name": "Can delete paid course registration", "content_type": 118}}, {"pk": 364, "model": "auth.permission", "fields": {"codename": "add_paidcourseregistrationannotation", "name": "Can add paid course registration annotation", "content_type": 121}}, {"pk": 365, "model": "auth.permission", "fields": {"codename": "change_paidcourseregistrationannotation", "name": "Can change paid course registration annotation", "content_type": 121}}, {"pk": 366, "model": "auth.permission", "fields": {"codename": "delete_paidcourseregistrationannotation", "name": "Can delete paid course registration annotation", "content_type": 121}}, {"pk": 346, "model": "auth.permission", "fields": {"codename": "add_registrationcoderedemption", "name": "Can add registration code redemption", "content_type": 115}}, {"pk": 347, "model": "auth.permission", "fields": {"codename": "change_registrationcoderedemption", "name": "Can change registration code redemption", "content_type": 115}}, {"pk": 348, "model": "auth.permission", "fields": {"codename": "delete_registrationcoderedemption", "name": "Can delete registration code redemption", "content_type": 115}}, {"pk": 16, "model": "auth.permission", "fields": {"codename": "add_site", "name": "Can add site", "content_type": 6}}, {"pk": 17, "model": "auth.permission", "fields": {"codename": "change_site", "name": "Can change site", "content_type": 6}}, {"pk": 18, "model": "auth.permission", "fields": {"codename": "delete_site", "name": "Can delete site", "content_type": 6}}, {"pk": 43, "model": "auth.permission", "fields": {"codename": "add_migrationhistory", "name": "Can add migration history", "content_type": 15}}, {"pk": 44, "model": "auth.permission", "fields": {"codename": "change_migrationhistory", "name": "Can change migration history", "content_type": 15}}, {"pk": 45, "model": "auth.permission", "fields": {"codename": "delete_migrationhistory", "name": "Can delete migration history", "content_type": 15}}, {"pk": 304, "model": "auth.permission", "fields": {"codename": "add_splashconfig", "name": "Can add splash config", "content_type": 101}}, {"pk": 305, "model": "auth.permission", "fields": {"codename": "change_splashconfig", "name": "Can change splash config", "content_type": 101}}, {"pk": 306, "model": "auth.permission", "fields": {"codename": "delete_splashconfig", "name": "Can delete splash config", "content_type": 101}}, {"pk": 103, "model": "auth.permission", "fields": {"codename": "add_anonymoususerid", "name": "Can add anonymous user id", "content_type": 35}}, {"pk": 104, "model": "auth.permission", "fields": {"codename": "change_anonymoususerid", "name": "Can change anonymous user id", "content_type": 35}}, {"pk": 105, "model": "auth.permission", "fields": {"codename": "delete_anonymoususerid", "name": "Can delete anonymous user id", "content_type": 35}}, {"pk": 142, "model": "auth.permission", "fields": {"codename": "add_courseaccessrole", "name": "Can add course access role", "content_type": 48}}, {"pk": 143, "model": "auth.permission", "fields": {"codename": "change_courseaccessrole", "name": "Can change course access role", "content_type": 48}}, {"pk": 144, "model": "auth.permission", "fields": {"codename": "delete_courseaccessrole", "name": "Can delete course access role", "content_type": 48}}, {"pk": 133, "model": "auth.permission", "fields": {"codename": "add_courseenrollment", "name": "Can add course enrollment", "content_type": 45}}, {"pk": 134, "model": "auth.permission", "fields": {"codename": "change_courseenrollment", "name": "Can change course enrollment", "content_type": 45}}, {"pk": 135, "model": "auth.permission", "fields": {"codename": "delete_courseenrollment", "name": "Can delete course enrollment", "content_type": 45}}, {"pk": 139, "model": "auth.permission", "fields": {"codename": "add_courseenrollmentallowed", "name": "Can add course enrollment allowed", "content_type": 47}}, {"pk": 140, "model": "auth.permission", "fields": {"codename": "change_courseenrollmentallowed", "name": "Can change course enrollment allowed", "content_type": 47}}, {"pk": 141, "model": "auth.permission", "fields": {"codename": "delete_courseenrollmentallowed", "name": "Can delete course enrollment allowed", "content_type": 47}}, {"pk": 157, "model": "auth.permission", "fields": {"codename": "add_courseenrollmentattribute", "name": "Can add course enrollment attribute", "content_type": 53}}, {"pk": 158, "model": "auth.permission", "fields": {"codename": "change_courseenrollmentattribute", "name": "Can change course enrollment attribute", "content_type": 53}}, {"pk": 159, "model": "auth.permission", "fields": {"codename": "delete_courseenrollmentattribute", "name": "Can delete course enrollment attribute", "content_type": 53}}, {"pk": 145, "model": "auth.permission", "fields": {"codename": "add_dashboardconfiguration", "name": "Can add dashboard configuration", "content_type": 49}}, {"pk": 146, "model": "auth.permission", "fields": {"codename": "change_dashboardconfiguration", "name": "Can change dashboard configuration", "content_type": 49}}, {"pk": 147, "model": "auth.permission", "fields": {"codename": "delete_dashboardconfiguration", "name": "Can delete dashboard configuration", "content_type": 49}}, {"pk": 151, "model": "auth.permission", "fields": {"codename": "add_entranceexamconfiguration", "name": "Can add entrance exam configuration", "content_type": 51}}, {"pk": 152, "model": "auth.permission", "fields": {"codename": "change_entranceexamconfiguration", "name": "Can change entrance exam configuration", "content_type": 51}}, {"pk": 153, "model": "auth.permission", "fields": {"codename": "delete_entranceexamconfiguration", "name": "Can delete entrance exam configuration", "content_type": 51}}, {"pk": 154, "model": "auth.permission", "fields": {"codename": "add_languageproficiency", "name": "Can add language proficiency", "content_type": 52}}, {"pk": 155, "model": "auth.permission", "fields": {"codename": "change_languageproficiency", "name": "Can change language proficiency", "content_type": 52}}, {"pk": 156, "model": "auth.permission", "fields": {"codename": "delete_languageproficiency", "name": "Can delete language proficiency", "content_type": 52}}, {"pk": 148, "model": "auth.permission", "fields": {"codename": "add_linkedinaddtoprofileconfiguration", "name": "Can add linked in add to profile configuration", "content_type": 50}}, {"pk": 149, "model": "auth.permission", "fields": {"codename": "change_linkedinaddtoprofileconfiguration", "name": "Can change linked in add to profile configuration", "content_type": 50}}, {"pk": 150, "model": "auth.permission", "fields": {"codename": "delete_linkedinaddtoprofileconfiguration", "name": "Can delete linked in add to profile configuration", "content_type": 50}}, {"pk": 130, "model": "auth.permission", "fields": {"codename": "add_loginfailures", "name": "Can add login failures", "content_type": 44}}, {"pk": 131, "model": "auth.permission", "fields": {"codename": "change_loginfailures", "name": "Can change login failures", "content_type": 44}}, {"pk": 132, "model": "auth.permission", "fields": {"codename": "delete_loginfailures", "name": "Can delete login failures", "content_type": 44}}, {"pk": 136, "model": "auth.permission", "fields": {"codename": "add_manualenrollmentaudit", "name": "Can add manual enrollment audit", "content_type": 46}}, {"pk": 137, "model": "auth.permission", "fields": {"codename": "change_manualenrollmentaudit", "name": "Can change manual enrollment audit", "content_type": 46}}, {"pk": 138, "model": "auth.permission", "fields": {"codename": "delete_manualenrollmentaudit", "name": "Can delete manual enrollment audit", "content_type": 46}}, {"pk": 127, "model": "auth.permission", "fields": {"codename": "add_passwordhistory", "name": "Can add password history", "content_type": 43}}, {"pk": 128, "model": "auth.permission", "fields": {"codename": "change_passwordhistory", "name": "Can change password history", "content_type": 43}}, {"pk": 129, "model": "auth.permission", "fields": {"codename": "delete_passwordhistory", "name": "Can delete password history", "content_type": 43}}, {"pk": 124, "model": "auth.permission", "fields": {"codename": "add_pendingemailchange", "name": "Can add pending email change", "content_type": 42}}, {"pk": 125, "model": "auth.permission", "fields": {"codename": "change_pendingemailchange", "name": "Can change pending email change", "content_type": 42}}, {"pk": 126, "model": "auth.permission", "fields": {"codename": "delete_pendingemailchange", "name": "Can delete pending email change", "content_type": 42}}, {"pk": 121, "model": "auth.permission", "fields": {"codename": "add_pendingnamechange", "name": "Can add pending name change", "content_type": 41}}, {"pk": 122, "model": "auth.permission", "fields": {"codename": "change_pendingnamechange", "name": "Can change pending name change", "content_type": 41}}, {"pk": 123, "model": "auth.permission", "fields": {"codename": "delete_pendingnamechange", "name": "Can delete pending name change", "content_type": 41}}, {"pk": 118, "model": "auth.permission", "fields": {"codename": "add_registration", "name": "Can add registration", "content_type": 40}}, {"pk": 119, "model": "auth.permission", "fields": {"codename": "change_registration", "name": "Can change registration", "content_type": 40}}, {"pk": 120, "model": "auth.permission", "fields": {"codename": "delete_registration", "name": "Can delete registration", "content_type": 40}}, {"pk": 109, "model": "auth.permission", "fields": {"codename": "add_userprofile", "name": "Can add user profile", "content_type": 37}}, {"pk": 110, "model": "auth.permission", "fields": {"codename": "change_userprofile", "name": "Can change user profile", "content_type": 37}}, {"pk": 111, "model": "auth.permission", "fields": {"codename": "delete_userprofile", "name": "Can delete user profile", "content_type": 37}}, {"pk": 112, "model": "auth.permission", "fields": {"codename": "add_usersignupsource", "name": "Can add user signup source", "content_type": 38}}, {"pk": 113, "model": "auth.permission", "fields": {"codename": "change_usersignupsource", "name": "Can change user signup source", "content_type": 38}}, {"pk": 114, "model": "auth.permission", "fields": {"codename": "delete_usersignupsource", "name": "Can delete user signup source", "content_type": 38}}, {"pk": 106, "model": "auth.permission", "fields": {"codename": "add_userstanding", "name": "Can add user standing", "content_type": 36}}, {"pk": 107, "model": "auth.permission", "fields": {"codename": "change_userstanding", "name": "Can change user standing", "content_type": 36}}, {"pk": 108, "model": "auth.permission", "fields": {"codename": "delete_userstanding", "name": "Can delete user standing", "content_type": 36}}, {"pk": 115, "model": "auth.permission", "fields": {"codename": "add_usertestgroup", "name": "Can add user test group", "content_type": 39}}, {"pk": 116, "model": "auth.permission", "fields": {"codename": "change_usertestgroup", "name": "Can change user test group", "content_type": 39}}, {"pk": 117, "model": "auth.permission", "fields": {"codename": "delete_usertestgroup", "name": "Can delete user test group", "content_type": 39}}, {"pk": 448, "model": "auth.permission", "fields": {"codename": "add_score", "name": "Can add score", "content_type": 149}}, {"pk": 449, "model": "auth.permission", "fields": {"codename": "change_score", "name": "Can change score", "content_type": 149}}, {"pk": 450, "model": "auth.permission", "fields": {"codename": "delete_score", "name": "Can delete score", "content_type": 149}}, {"pk": 451, "model": "auth.permission", "fields": {"codename": "add_scoresummary", "name": "Can add score summary", "content_type": 150}}, {"pk": 452, "model": "auth.permission", "fields": {"codename": "change_scoresummary", "name": "Can change score summary", "content_type": 150}}, {"pk": 453, "model": "auth.permission", "fields": {"codename": "delete_scoresummary", "name": "Can delete score summary", "content_type": 150}}, {"pk": 442, "model": "auth.permission", "fields": {"codename": "add_studentitem", "name": "Can add student item", "content_type": 147}}, {"pk": 443, "model": "auth.permission", "fields": {"codename": "change_studentitem", "name": "Can change student item", "content_type": 147}}, {"pk": 444, "model": "auth.permission", "fields": {"codename": "delete_studentitem", "name": "Can delete student item", "content_type": 147}}, {"pk": 445, "model": "auth.permission", "fields": {"codename": "add_submission", "name": "Can add submission", "content_type": 148}}, {"pk": 446, "model": "auth.permission", "fields": {"codename": "change_submission", "name": "Can change submission", "content_type": 148}}, {"pk": 447, "model": "auth.permission", "fields": {"codename": "delete_submission", "name": "Can delete submission", "content_type": 148}}, {"pk": 430, "model": "auth.permission", "fields": {"codename": "add_surveyanswer", "name": "Can add survey answer", "content_type": 143}}, {"pk": 431, "model": "auth.permission", "fields": {"codename": "change_surveyanswer", "name": "Can change survey answer", "content_type": 143}}, {"pk": 432, "model": "auth.permission", "fields": {"codename": "delete_surveyanswer", "name": "Can delete survey answer", "content_type": 143}}, {"pk": 427, "model": "auth.permission", "fields": {"codename": "add_surveyform", "name": "Can add survey form", "content_type": 142}}, {"pk": 428, "model": "auth.permission", "fields": {"codename": "change_surveyform", "name": "Can change survey form", "content_type": 142}}, {"pk": 429, "model": "auth.permission", "fields": {"codename": "delete_surveyform", "name": "Can delete survey form", "content_type": 142}}, {"pk": 316, "model": "auth.permission", "fields": {"codename": "add_courseteam", "name": "Can add course team", "content_type": 105}}, {"pk": 317, "model": "auth.permission", "fields": {"codename": "change_courseteam", "name": "Can change course team", "content_type": 105}}, {"pk": 318, "model": "auth.permission", "fields": {"codename": "delete_courseteam", "name": "Can delete course team", "content_type": 105}}, {"pk": 319, "model": "auth.permission", "fields": {"codename": "add_courseteammembership", "name": "Can add course team membership", "content_type": 106}}, {"pk": 320, "model": "auth.permission", "fields": {"codename": "change_courseteammembership", "name": "Can change course team membership", "content_type": 106}}, {"pk": 321, "model": "auth.permission", "fields": {"codename": "delete_courseteammembership", "name": "Can delete course team membership", "content_type": 106}}, {"pk": 160, "model": "auth.permission", "fields": {"codename": "add_trackinglog", "name": "Can add tracking log", "content_type": 54}}, {"pk": 161, "model": "auth.permission", "fields": {"codename": "change_trackinglog", "name": "Can change tracking log", "content_type": 54}}, {"pk": 162, "model": "auth.permission", "fields": {"codename": "delete_trackinglog", "name": "Can delete tracking log", "content_type": 54}}, {"pk": 310, "model": "auth.permission", "fields": {"codename": "add_usercoursetag", "name": "Can add user course tag", "content_type": 103}}, {"pk": 311, "model": "auth.permission", "fields": {"codename": "change_usercoursetag", "name": "Can change user course tag", "content_type": 103}}, {"pk": 312, "model": "auth.permission", "fields": {"codename": "delete_usercoursetag", "name": "Can delete user course tag", "content_type": 103}}, {"pk": 313, "model": "auth.permission", "fields": {"codename": "add_userorgtag", "name": "Can add user org tag", "content_type": 104}}, {"pk": 314, "model": "auth.permission", "fields": {"codename": "change_userorgtag", "name": "Can change user org tag", "content_type": 104}}, {"pk": 315, "model": "auth.permission", "fields": {"codename": "delete_userorgtag", "name": "Can delete user org tag", "content_type": 104}}, {"pk": 307, "model": "auth.permission", "fields": {"codename": "add_userpreference", "name": "Can add user preference", "content_type": 102}}, {"pk": 308, "model": "auth.permission", "fields": {"codename": "change_userpreference", "name": "Can change user preference", "content_type": 102}}, {"pk": 309, "model": "auth.permission", "fields": {"codename": "delete_userpreference", "name": "Can delete user preference", "content_type": 102}}, {"pk": 163, "model": "auth.permission", "fields": {"codename": "add_ratelimitconfiguration", "name": "Can add rate limit configuration", "content_type": 55}}, {"pk": 164, "model": "auth.permission", "fields": {"codename": "change_ratelimitconfiguration", "name": "Can change rate limit configuration", "content_type": 55}}, {"pk": 165, "model": "auth.permission", "fields": {"codename": "delete_ratelimitconfiguration", "name": "Can delete rate limit configuration", "content_type": 55}}, {"pk": 391, "model": "auth.permission", "fields": {"codename": "add_incoursereverificationconfiguration", "name": "Can add in course reverification configuration", "content_type": 130}}, {"pk": 392, "model": "auth.permission", "fields": {"codename": "change_incoursereverificationconfiguration", "name": "Can change in course reverification configuration", "content_type": 130}}, {"pk": 393, "model": "auth.permission", "fields": {"codename": "delete_incoursereverificationconfiguration", "name": "Can delete in course reverification configuration", "content_type": 130}}, {"pk": 394, "model": "auth.permission", "fields": {"codename": "add_skippedreverification", "name": "Can add skipped reverification", "content_type": 131}}, {"pk": 395, "model": "auth.permission", "fields": {"codename": "change_skippedreverification", "name": "Can change skipped reverification", "content_type": 131}}, {"pk": 396, "model": "auth.permission", "fields": {"codename": "delete_skippedreverification", "name": "Can delete skipped reverification", "content_type": 131}}, {"pk": 382, "model": "auth.permission", "fields": {"codename": "add_softwaresecurephotoverification", "name": "Can add software secure photo verification", "content_type": 127}}, {"pk": 383, "model": "auth.permission", "fields": {"codename": "change_softwaresecurephotoverification", "name": "Can change software secure photo verification", "content_type": 127}}, {"pk": 384, "model": "auth.permission", "fields": {"codename": "delete_softwaresecurephotoverification", "name": "Can delete software secure photo verification", "content_type": 127}}, {"pk": 385, "model": "auth.permission", "fields": {"codename": "add_verificationcheckpoint", "name": "Can add verification checkpoint", "content_type": 128}}, {"pk": 386, "model": "auth.permission", "fields": {"codename": "change_verificationcheckpoint", "name": "Can change verification checkpoint", "content_type": 128}}, {"pk": 387, "model": "auth.permission", "fields": {"codename": "delete_verificationcheckpoint", "name": "Can delete verification checkpoint", "content_type": 128}}, {"pk": 388, "model": "auth.permission", "fields": {"codename": "add_verificationstatus", "name": "Can add Verification Status", "content_type": 129}}, {"pk": 389, "model": "auth.permission", "fields": {"codename": "change_verificationstatus", "name": "Can change Verification Status", "content_type": 129}}, {"pk": 390, "model": "auth.permission", "fields": {"codename": "delete_verificationstatus", "name": "Can delete Verification Status", "content_type": 129}}, {"pk": 250, "model": "auth.permission", "fields": {"codename": "add_article", "name": "Can add article", "content_type": 84}}, {"pk": 254, "model": "auth.permission", "fields": {"codename": "assign", "name": "Can change ownership of any article", "content_type": 84}}, {"pk": 251, "model": "auth.permission", "fields": {"codename": "change_article", "name": "Can change article", "content_type": 84}}, {"pk": 252, "model": "auth.permission", "fields": {"codename": "delete_article", "name": "Can delete article", "content_type": 84}}, {"pk": 255, "model": "auth.permission", "fields": {"codename": "grant", "name": "Can assign permissions to other users", "content_type": 84}}, {"pk": 253, "model": "auth.permission", "fields": {"codename": "moderate", "name": "Can edit all articles and lock/unlock/restore", "content_type": 84}}, {"pk": 256, "model": "auth.permission", "fields": {"codename": "add_articleforobject", "name": "Can add Article for object", "content_type": 85}}, {"pk": 257, "model": "auth.permission", "fields": {"codename": "change_articleforobject", "name": "Can change Article for object", "content_type": 85}}, {"pk": 258, "model": "auth.permission", "fields": {"codename": "delete_articleforobject", "name": "Can delete Article for object", "content_type": 85}}, {"pk": 265, "model": "auth.permission", "fields": {"codename": "add_articleplugin", "name": "Can add article plugin", "content_type": 88}}, {"pk": 266, "model": "auth.permission", "fields": {"codename": "change_articleplugin", "name": "Can change article plugin", "content_type": 88}}, {"pk": 267, "model": "auth.permission", "fields": {"codename": "delete_articleplugin", "name": "Can delete article plugin", "content_type": 88}}, {"pk": 259, "model": "auth.permission", "fields": {"codename": "add_articlerevision", "name": "Can add article revision", "content_type": 86}}, {"pk": 260, "model": "auth.permission", "fields": {"codename": "change_articlerevision", "name": "Can change article revision", "content_type": 86}}, {"pk": 261, "model": "auth.permission", "fields": {"codename": "delete_articlerevision", "name": "Can delete article revision", "content_type": 86}}, {"pk": 280, "model": "auth.permission", "fields": {"codename": "add_articlesubscription", "name": "Can add article subscription", "content_type": 93}}, {"pk": 281, "model": "auth.permission", "fields": {"codename": "change_articlesubscription", "name": "Can change article subscription", "content_type": 93}}, {"pk": 282, "model": "auth.permission", "fields": {"codename": "delete_articlesubscription", "name": "Can delete article subscription", "content_type": 93}}, {"pk": 268, "model": "auth.permission", "fields": {"codename": "add_reusableplugin", "name": "Can add reusable plugin", "content_type": 89}}, {"pk": 269, "model": "auth.permission", "fields": {"codename": "change_reusableplugin", "name": "Can change reusable plugin", "content_type": 89}}, {"pk": 270, "model": "auth.permission", "fields": {"codename": "delete_reusableplugin", "name": "Can delete reusable plugin", "content_type": 89}}, {"pk": 274, "model": "auth.permission", "fields": {"codename": "add_revisionplugin", "name": "Can add revision plugin", "content_type": 91}}, {"pk": 275, "model": "auth.permission", "fields": {"codename": "change_revisionplugin", "name": "Can change revision plugin", "content_type": 91}}, {"pk": 276, "model": "auth.permission", "fields": {"codename": "delete_revisionplugin", "name": "Can delete revision plugin", "content_type": 91}}, {"pk": 277, "model": "auth.permission", "fields": {"codename": "add_revisionpluginrevision", "name": "Can add revision plugin revision", "content_type": 92}}, {"pk": 278, "model": "auth.permission", "fields": {"codename": "change_revisionpluginrevision", "name": "Can change revision plugin revision", "content_type": 92}}, {"pk": 279, "model": "auth.permission", "fields": {"codename": "delete_revisionpluginrevision", "name": "Can delete revision plugin revision", "content_type": 92}}, {"pk": 271, "model": "auth.permission", "fields": {"codename": "add_simpleplugin", "name": "Can add simple plugin", "content_type": 90}}, {"pk": 272, "model": "auth.permission", "fields": {"codename": "change_simpleplugin", "name": "Can change simple plugin", "content_type": 90}}, {"pk": 273, "model": "auth.permission", "fields": {"codename": "delete_simpleplugin", "name": "Can delete simple plugin", "content_type": 90}}, {"pk": 262, "model": "auth.permission", "fields": {"codename": "add_urlpath", "name": "Can add URL path", "content_type": 87}}, {"pk": 263, "model": "auth.permission", "fields": {"codename": "change_urlpath", "name": "Can change URL path", "content_type": 87}}, {"pk": 264, "model": "auth.permission", "fields": {"codename": "delete_urlpath", "name": "Can delete URL path", "content_type": 87}}, {"pk": 502, "model": "auth.permission", "fields": {"codename": "add_assessmentworkflow", "name": "Can add assessment workflow", "content_type": 167}}, {"pk": 503, "model": "auth.permission", "fields": {"codename": "change_assessmentworkflow", "name": "Can change assessment workflow", "content_type": 167}}, {"pk": 504, "model": "auth.permission", "fields": {"codename": "delete_assessmentworkflow", "name": "Can delete assessment workflow", "content_type": 167}}, {"pk": 508, "model": "auth.permission", "fields": {"codename": "add_assessmentworkflowcancellation", "name": "Can add assessment workflow cancellation", "content_type": 169}}, {"pk": 509, "model": "auth.permission", "fields": {"codename": "change_assessmentworkflowcancellation", "name": "Can change assessment workflow cancellation", "content_type": 169}}, {"pk": 510, "model": "auth.permission", "fields": {"codename": "delete_assessmentworkflowcancellation", "name": "Can delete assessment workflow cancellation", "content_type": 169}}, {"pk": 505, "model": "auth.permission", "fields": {"codename": "add_assessmentworkflowstep", "name": "Can add assessment workflow step", "content_type": 168}}, {"pk": 506, "model": "auth.permission", "fields": {"codename": "change_assessmentworkflowstep", "name": "Can change assessment workflow step", "content_type": 168}}, {"pk": 507, "model": "auth.permission", "fields": {"codename": "delete_assessmentworkflowstep", "name": "Can delete assessment workflow step", "content_type": 168}}, {"pk": 571, "model": "auth.permission", "fields": {"codename": "add_studioconfig", "name": "Can add studio config", "content_type": 190}}, {"pk": 572, "model": "auth.permission", "fields": {"codename": "change_studioconfig", "name": "Can change studio config", "content_type": 190}}, {"pk": 573, "model": "auth.permission", "fields": {"codename": "delete_studioconfig", "name": "Can delete studio config", "content_type": 190}}, {"pk": 1, "model": "util.ratelimitconfiguration", "fields": {"change_date": "2015-06-17T19:56:01Z", "changed_by": null, "enabled": true}}, {"pk": 1, "model": "certificates.certificatehtmlviewconfiguration", "fields": {"change_date": "2015-06-17T19:56:03Z", "changed_by": null, "configuration": "{\"default\": {\"accomplishment_class_append\": \"accomplishment-certificate\", \"platform_name\": \"Your Platform Name Here\", \"logo_src\": \"/static/certificates/images/logo.png\", \"logo_url\": \"http://www.example.com\", \"company_verified_certificate_url\": \"http://www.example.com/verified-certificate\", \"company_privacy_url\": \"http://www.example.com/privacy-policy\", \"company_tos_url\": \"http://www.example.com/terms-service\", \"company_about_url\": \"http://www.example.com/about-us\"}, \"base\": {\"certificate_type\": \"base\", \"certificate_title\": \"Certificate of Achievement\", \"document_body_class_append\": \"is-base\"}, \"distinguished\": {\"certificate_type\": \"distinguished\", \"certificate_title\": \"Distinguished Certificate of Achievement\", \"document_body_class_append\": \"is-distinguished\"}}", "enabled": false}}, {"pk": 1, "model": "dark_lang.darklangconfig", "fields": {"change_date": "2015-06-17T19:56:25Z", "changed_by": null, "enabled": true, "released_languages": ""}}, {"pk": 1, "model": "mobile_api.mobileapiconfig", "fields": {"change_date": "2015-06-17T19:56:28Z", "video_profiles": "mobile_low,mobile_high,youtube", "changed_by": null, "enabled": false}}] \ No newline at end of file diff --git a/common/test/db_cache/bok_choy_schema.sql b/common/test/db_cache/bok_choy_schema.sql deleted file mode 100644 index bbba6a4aed94..000000000000 --- a/common/test/db_cache/bok_choy_schema.sql +++ /dev/null @@ -1,3433 +0,0 @@ - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -DROP TABLE IF EXISTS `assessment_aiclassifier`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_aiclassifier` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `classifier_set_id` int(11) NOT NULL, - `criterion_id` int(11) NOT NULL, - `classifier_data` varchar(100) NOT NULL, - PRIMARY KEY (`id`), - KEY `assessment_aiclassifier_714175dc` (`classifier_set_id`), - KEY `assessment_aiclassifier_a36470e4` (`criterion_id`), - CONSTRAINT `classifier_set_id_refs_id_f80cbf6` FOREIGN KEY (`classifier_set_id`) REFERENCES `assessment_aiclassifierset` (`id`), - CONSTRAINT `criterion_id_refs_id_e6ab97f2` FOREIGN KEY (`criterion_id`) REFERENCES `assessment_criterion` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_aiclassifierset`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_aiclassifierset` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `rubric_id` int(11) NOT NULL, - `created_at` datetime NOT NULL, - `algorithm_id` varchar(128) NOT NULL, - `course_id` varchar(40) NOT NULL, - `item_id` varchar(128) NOT NULL, - PRIMARY KEY (`id`), - KEY `assessment_aiclassifierset_27cb9807` (`rubric_id`), - KEY `assessment_aiclassifierset_3b1c9c31` (`created_at`), - KEY `assessment_aiclassifierset_53012c1e` (`algorithm_id`), - KEY `assessment_aiclassifierset_ff48d8e5` (`course_id`), - KEY `assessment_aiclassifierset_67b70d25` (`item_id`), - CONSTRAINT `rubric_id_refs_id_c037b8e4` FOREIGN KEY (`rubric_id`) REFERENCES `assessment_rubric` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_aigradingworkflow`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_aigradingworkflow` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `uuid` varchar(36) NOT NULL, - `scheduled_at` datetime NOT NULL, - `completed_at` datetime DEFAULT NULL, - `submission_uuid` varchar(128) NOT NULL, - `classifier_set_id` int(11) DEFAULT NULL, - `algorithm_id` varchar(128) NOT NULL, - `rubric_id` int(11) NOT NULL, - `assessment_id` int(11) DEFAULT NULL, - `student_id` varchar(40) NOT NULL, - `item_id` varchar(128) NOT NULL, - `course_id` varchar(40) NOT NULL, - `essay_text` longtext NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `assessment_aigradingworkflow_uuid_492e936265ecbfd2_uniq` (`uuid`), - KEY `assessment_aigradingworkflow_2bbc74ae` (`uuid`), - KEY `assessment_aigradingworkflow_4bacaa90` (`scheduled_at`), - KEY `assessment_aigradingworkflow_a2fd3af6` (`completed_at`), - KEY `assessment_aigradingworkflow_39d020e6` (`submission_uuid`), - KEY `assessment_aigradingworkflow_714175dc` (`classifier_set_id`), - KEY `assessment_aigradingworkflow_53012c1e` (`algorithm_id`), - KEY `assessment_aigradingworkflow_27cb9807` (`rubric_id`), - KEY `assessment_aigradingworkflow_c168f2dc` (`assessment_id`), - KEY `assessment_aigradingworkflow_42ff452e` (`student_id`), - KEY `assessment_aigradingworkflow_67b70d25` (`item_id`), - KEY `assessment_aigradingworkflow_ff48d8e5` (`course_id`), - CONSTRAINT `assessment_id_refs_id_1d8478e7` FOREIGN KEY (`assessment_id`) REFERENCES `assessment_assessment` (`id`), - CONSTRAINT `classifier_set_id_refs_id_1e9046d1` FOREIGN KEY (`classifier_set_id`) REFERENCES `assessment_aiclassifierset` (`id`), - CONSTRAINT `rubric_id_refs_id_dc2a0464` FOREIGN KEY (`rubric_id`) REFERENCES `assessment_rubric` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_aitrainingworkflow`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_aitrainingworkflow` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `uuid` varchar(36) NOT NULL, - `algorithm_id` varchar(128) NOT NULL, - `classifier_set_id` int(11) DEFAULT NULL, - `scheduled_at` datetime NOT NULL, - `completed_at` datetime DEFAULT NULL, - `item_id` varchar(128) NOT NULL, - `course_id` varchar(40) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `assessment_aitrainingworkflow_uuid_284fdaa93019f8ef_uniq` (`uuid`), - KEY `assessment_aitrainingworkflow_2bbc74ae` (`uuid`), - KEY `assessment_aitrainingworkflow_53012c1e` (`algorithm_id`), - KEY `assessment_aitrainingworkflow_714175dc` (`classifier_set_id`), - KEY `assessment_aitrainingworkflow_4bacaa90` (`scheduled_at`), - KEY `assessment_aitrainingworkflow_a2fd3af6` (`completed_at`), - KEY `assessment_aitrainingworkflow_67b70d25` (`item_id`), - KEY `assessment_aitrainingworkflow_ff48d8e5` (`course_id`), - CONSTRAINT `classifier_set_id_refs_id_dcc7412` FOREIGN KEY (`classifier_set_id`) REFERENCES `assessment_aiclassifierset` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_aitrainingworkflow_training_examples`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_aitrainingworkflow_training_examples` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `aitrainingworkflow_id` int(11) NOT NULL, - `trainingexample_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `assessment_aitraini_aitrainingworkflow_id_4b50cfbece05470a_uniq` (`aitrainingworkflow_id`,`trainingexample_id`), - KEY `assessment_aitrainingworkflow_training_examples_a57f9195` (`aitrainingworkflow_id`), - KEY `assessment_aitrainingworkflow_training_examples_ea4da31f` (`trainingexample_id`), - CONSTRAINT `aitrainingworkflow_id_refs_id_45c30582` FOREIGN KEY (`aitrainingworkflow_id`) REFERENCES `assessment_aitrainingworkflow` (`id`), - CONSTRAINT `trainingexample_id_refs_id_bf13a24` FOREIGN KEY (`trainingexample_id`) REFERENCES `assessment_trainingexample` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_assessment`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_assessment` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `submission_uuid` varchar(128) NOT NULL, - `rubric_id` int(11) NOT NULL, - `scored_at` datetime NOT NULL, - `scorer_id` varchar(40) NOT NULL, - `score_type` varchar(2) NOT NULL, - `feedback` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `assessment_assessment_39d020e6` (`submission_uuid`), - KEY `assessment_assessment_27cb9807` (`rubric_id`), - KEY `assessment_assessment_3227200` (`scored_at`), - KEY `assessment_assessment_9f54855a` (`scorer_id`), - CONSTRAINT `rubric_id_refs_id_1ab6dbc4` FOREIGN KEY (`rubric_id`) REFERENCES `assessment_rubric` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_assessmentfeedback`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_assessmentfeedback` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `submission_uuid` varchar(128) NOT NULL, - `feedback_text` longtext NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `submission_uuid` (`submission_uuid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_assessmentfeedback_assessments`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_assessmentfeedback_assessments` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `assessmentfeedback_id` int(11) NOT NULL, - `assessment_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `assessment_assessmen_assessmentfeedback_id_36925aaa1a839ac_uniq` (`assessmentfeedback_id`,`assessment_id`), - KEY `assessment_assessmentfeedback_assessments_58f1f0d` (`assessmentfeedback_id`), - KEY `assessment_assessmentfeedback_assessments_c168f2dc` (`assessment_id`), - CONSTRAINT `assessment_id_refs_id_e7fd607e` FOREIGN KEY (`assessment_id`) REFERENCES `assessment_assessment` (`id`), - CONSTRAINT `assessmentfeedback_id_refs_id_91bbd347` FOREIGN KEY (`assessmentfeedback_id`) REFERENCES `assessment_assessmentfeedback` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_assessmentfeedback_options`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_assessmentfeedback_options` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `assessmentfeedback_id` int(11) NOT NULL, - `assessmentfeedbackoption_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `assessment_assessmen_assessmentfeedback_id_14efc9eea8f4c83_uniq` (`assessmentfeedback_id`,`assessmentfeedbackoption_id`), - KEY `assessment_assessmentfeedback_options_58f1f0d` (`assessmentfeedback_id`), - KEY `assessment_assessmentfeedback_options_4e523d64` (`assessmentfeedbackoption_id`), - CONSTRAINT `assessmentfeedback_id_refs_id_5c27c412` FOREIGN KEY (`assessmentfeedback_id`) REFERENCES `assessment_assessmentfeedback` (`id`), - CONSTRAINT `assessmentfeedbackoption_id_refs_id_cdf28acd` FOREIGN KEY (`assessmentfeedbackoption_id`) REFERENCES `assessment_assessmentfeedbackoption` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_assessmentfeedbackoption`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_assessmentfeedbackoption` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `text` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `text` (`text`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_assessmentpart`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_assessmentpart` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `assessment_id` int(11) NOT NULL, - `option_id` int(11), - `feedback` longtext NOT NULL, - `criterion_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `assessment_assessmentpart_c168f2dc` (`assessment_id`), - KEY `assessment_assessmentpart_2f3b0dc9` (`option_id`), - KEY `assessment_assessmentpart_a36470e4` (`criterion_id`), - CONSTRAINT `assessment_id_refs_id_bff26444` FOREIGN KEY (`assessment_id`) REFERENCES `assessment_assessment` (`id`), - CONSTRAINT `criterion_id_refs_id_eeb3dc44` FOREIGN KEY (`criterion_id`) REFERENCES `assessment_criterion` (`id`), - CONSTRAINT `option_id_refs_id_4439dd5` FOREIGN KEY (`option_id`) REFERENCES `assessment_criterionoption` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_criterion`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_criterion` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `rubric_id` int(11) NOT NULL, - `name` varchar(100) NOT NULL, - `order_num` int(10) unsigned NOT NULL, - `prompt` longtext NOT NULL, - `label` varchar(100) NOT NULL, - PRIMARY KEY (`id`), - KEY `assessment_criterion_27cb9807` (`rubric_id`), - CONSTRAINT `rubric_id_refs_id_f2f4f3c4` FOREIGN KEY (`rubric_id`) REFERENCES `assessment_rubric` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_criterionoption`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_criterionoption` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `criterion_id` int(11) NOT NULL, - `order_num` int(10) unsigned NOT NULL, - `points` int(10) unsigned NOT NULL, - `name` varchar(100) NOT NULL, - `explanation` longtext NOT NULL, - `label` varchar(100) NOT NULL, - PRIMARY KEY (`id`), - KEY `assessment_criterionoption_a36470e4` (`criterion_id`), - CONSTRAINT `criterion_id_refs_id_d2645232` FOREIGN KEY (`criterion_id`) REFERENCES `assessment_criterion` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_peerworkflow`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_peerworkflow` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `student_id` varchar(40) NOT NULL, - `item_id` varchar(128) NOT NULL, - `course_id` varchar(40) NOT NULL, - `submission_uuid` varchar(128) NOT NULL, - `created_at` datetime NOT NULL, - `completed_at` datetime DEFAULT NULL, - `grading_completed_at` datetime, - `cancelled_at` datetime, - PRIMARY KEY (`id`), - UNIQUE KEY `submission_uuid` (`submission_uuid`), - KEY `assessment_peerworkflow_42ff452e` (`student_id`), - KEY `assessment_peerworkflow_67b70d25` (`item_id`), - KEY `assessment_peerworkflow_ff48d8e5` (`course_id`), - KEY `assessment_peerworkflow_3b1c9c31` (`created_at`), - KEY `assessment_peerworkflow_a2fd3af6` (`completed_at`), - KEY `assessment_peerworkflow_course_id_5ca23fddca9b630d` (`course_id`,`item_id`,`student_id`), - KEY `assessment_peerworkflow_dcd62131` (`grading_completed_at`), - KEY `assessment_peerworkflow_853d09a8` (`cancelled_at`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_peerworkflowitem`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_peerworkflowitem` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `scorer_id` int(11) NOT NULL, - `author_id` int(11) NOT NULL, - `submission_uuid` varchar(128) NOT NULL, - `started_at` datetime NOT NULL, - `assessment_id` int(11) DEFAULT NULL, - `scored` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `assessment_peerworkflowitem_9f54855a` (`scorer_id`), - KEY `assessment_peerworkflowitem_cc846901` (`author_id`), - KEY `assessment_peerworkflowitem_39d020e6` (`submission_uuid`), - KEY `assessment_peerworkflowitem_d6e710e4` (`started_at`), - KEY `assessment_peerworkflowitem_c168f2dc` (`assessment_id`), - CONSTRAINT `assessment_id_refs_id_f69a86a1` FOREIGN KEY (`assessment_id`) REFERENCES `assessment_assessment` (`id`), - CONSTRAINT `author_id_refs_id_59547df0` FOREIGN KEY (`author_id`) REFERENCES `assessment_peerworkflow` (`id`), - CONSTRAINT `scorer_id_refs_id_59547df0` FOREIGN KEY (`scorer_id`) REFERENCES `assessment_peerworkflow` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_rubric`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_rubric` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `content_hash` varchar(40) NOT NULL, - `structure_hash` varchar(40) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `content_hash` (`content_hash`), - KEY `assessment_rubric_36e74b05` (`structure_hash`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_studenttrainingworkflow`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_studenttrainingworkflow` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `submission_uuid` varchar(128) NOT NULL, - `student_id` varchar(40) NOT NULL, - `item_id` varchar(128) NOT NULL, - `course_id` varchar(40) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `assessment_studenttrainin_submission_uuid_6d32c6477719d68f_uniq` (`submission_uuid`), - KEY `assessment_studenttrainingworkflow_39d020e6` (`submission_uuid`), - KEY `assessment_studenttrainingworkflow_42ff452e` (`student_id`), - KEY `assessment_studenttrainingworkflow_67b70d25` (`item_id`), - KEY `assessment_studenttrainingworkflow_ff48d8e5` (`course_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_studenttrainingworkflowitem`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_studenttrainingworkflowitem` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `workflow_id` int(11) NOT NULL, - `order_num` int(10) unsigned NOT NULL, - `started_at` datetime NOT NULL, - `completed_at` datetime DEFAULT NULL, - `training_example_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `assessment_studenttrainingworkf_order_num_1391289faa95b87c_uniq` (`order_num`,`workflow_id`), - KEY `assessment_studenttrainingworkflowitem_26cddbc7` (`workflow_id`), - KEY `assessment_studenttrainingworkflowitem_541d6663` (`training_example_id`), - CONSTRAINT `training_example_id_refs_id_7d3f36e4` FOREIGN KEY (`training_example_id`) REFERENCES `assessment_trainingexample` (`id`), - CONSTRAINT `workflow_id_refs_id_ce50a30` FOREIGN KEY (`workflow_id`) REFERENCES `assessment_studenttrainingworkflow` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_trainingexample`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_trainingexample` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `raw_answer` longtext NOT NULL, - `rubric_id` int(11) NOT NULL, - `content_hash` varchar(40) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `content_hash` (`content_hash`), - KEY `assessment_trainingexample_27cb9807` (`rubric_id`), - CONSTRAINT `rubric_id_refs_id_7750db21` FOREIGN KEY (`rubric_id`) REFERENCES `assessment_rubric` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `assessment_trainingexample_options_selected`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `assessment_trainingexample_options_selected` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `trainingexample_id` int(11) NOT NULL, - `criterionoption_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `assessment_trainingexa_trainingexample_id_60940991fb17d27d_uniq` (`trainingexample_id`,`criterionoption_id`), - KEY `assessment_trainingexample_options_selected_ea4da31f` (`trainingexample_id`), - KEY `assessment_trainingexample_options_selected_843fa247` (`criterionoption_id`), - CONSTRAINT `criterionoption_id_refs_id_bed5a465` FOREIGN KEY (`criterionoption_id`) REFERENCES `assessment_criterionoption` (`id`), - CONSTRAINT `trainingexample_id_refs_id_5f0faa8d` FOREIGN KEY (`trainingexample_id`) REFERENCES `assessment_trainingexample` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `auth_group`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `auth_group` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(80) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `auth_group_permissions`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `auth_group_permissions` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `group_id` int(11) NOT NULL, - `permission_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `group_id` (`group_id`,`permission_id`), - KEY `auth_group_permissions_bda51c3c` (`group_id`), - KEY `auth_group_permissions_1e014c8f` (`permission_id`), - CONSTRAINT `group_id_refs_id_3cea63fe` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), - CONSTRAINT `permission_id_refs_id_a7792de1` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `auth_permission`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `auth_permission` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(50) NOT NULL, - `content_type_id` int(11) NOT NULL, - `codename` varchar(100) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `content_type_id` (`content_type_id`,`codename`), - KEY `auth_permission_e4470c6e` (`content_type_id`), - CONSTRAINT `content_type_id_refs_id_728de91f` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=574 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `auth_registration`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `auth_registration` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `activation_key` varchar(32) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `user_id` (`user_id`), - UNIQUE KEY `activation_key` (`activation_key`), - CONSTRAINT `user_id_refs_id_3e5b0b5` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `auth_user`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `auth_user` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `username` varchar(30) NOT NULL, - `first_name` varchar(30) NOT NULL, - `last_name` varchar(30) NOT NULL, - `email` varchar(75) NOT NULL, - `password` varchar(128) NOT NULL, - `is_staff` tinyint(1) NOT NULL, - `is_active` tinyint(1) NOT NULL, - `is_superuser` tinyint(1) NOT NULL, - `last_login` datetime NOT NULL, - `date_joined` datetime NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `username` (`username`), - UNIQUE KEY `email` (`email`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `auth_user_groups`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `auth_user_groups` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `group_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `user_id` (`user_id`,`group_id`), - KEY `auth_user_groups_fbfc09f1` (`user_id`), - KEY `auth_user_groups_bda51c3c` (`group_id`), - CONSTRAINT `group_id_refs_id_f0ee9890` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), - CONSTRAINT `user_id_refs_id_831107f1` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `auth_user_user_permissions`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `auth_user_user_permissions` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `permission_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `user_id` (`user_id`,`permission_id`), - KEY `auth_user_user_permissions_fbfc09f1` (`user_id`), - KEY `auth_user_user_permissions_1e014c8f` (`permission_id`), - CONSTRAINT `permission_id_refs_id_67e79cb` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), - CONSTRAINT `user_id_refs_id_f2045483` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `auth_userprofile`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `auth_userprofile` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `name` varchar(255) NOT NULL, - `language` varchar(255) NOT NULL, - `location` varchar(255) NOT NULL, - `meta` longtext NOT NULL, - `courseware` varchar(255) NOT NULL, - `gender` varchar(6), - `mailing_address` longtext, - `year_of_birth` int(11), - `level_of_education` varchar(6), - `goals` longtext, - `allow_certificate` tinyint(1) NOT NULL, - `country` varchar(2), - `city` longtext, - `bio` varchar(3000), - `profile_image_uploaded_at` datetime, - PRIMARY KEY (`id`), - UNIQUE KEY `user_id` (`user_id`), - KEY `auth_userprofile_52094d6e` (`name`), - KEY `auth_userprofile_8a7ac9ab` (`language`), - KEY `auth_userprofile_b54954de` (`location`), - KEY `auth_userprofile_fca3d292` (`gender`), - KEY `auth_userprofile_d85587` (`year_of_birth`), - KEY `auth_userprofile_551e365c` (`level_of_education`), - CONSTRAINT `user_id_refs_id_628b4c11` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `branding_brandingapiconfig`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `branding_brandingapiconfig` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `branding_brandingapiconfig_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_9f2ff49` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `branding_brandinginfoconfig`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `branding_brandinginfoconfig` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - `configuration` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `branding_brandinginfoconfig_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_d2757db8` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `bulk_email_courseauthorization`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `bulk_email_courseauthorization` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_id` varchar(255) NOT NULL, - `email_enabled` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `bulk_email_courseauthorization_course_id_4f6cee675bf93275_uniq` (`course_id`), - KEY `bulk_email_courseauthorization_ff48d8e5` (`course_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `bulk_email_courseemail`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `bulk_email_courseemail` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `sender_id` int(11) DEFAULT NULL, - `slug` varchar(128) NOT NULL, - `subject` varchar(128) NOT NULL, - `html_message` longtext, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `course_id` varchar(255) NOT NULL, - `to_option` varchar(64) NOT NULL, - `text_message` longtext, - `template_name` varchar(255), - `from_addr` varchar(255), - PRIMARY KEY (`id`), - KEY `bulk_email_courseemail_901f59e9` (`sender_id`), - KEY `bulk_email_courseemail_36af87d1` (`slug`), - KEY `bulk_email_courseemail_ff48d8e5` (`course_id`), - CONSTRAINT `sender_id_refs_id_70ed6279` FOREIGN KEY (`sender_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `bulk_email_courseemailtemplate`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `bulk_email_courseemailtemplate` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `html_template` longtext, - `plain_template` longtext, - `name` varchar(255), - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `bulk_email_optout`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `bulk_email_optout` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_id` varchar(255) NOT NULL, - `user_id` int(11), - PRIMARY KEY (`id`), - UNIQUE KEY `bulk_email_optout_course_id_368f7519b2997e1a_uniq` (`course_id`,`user_id`), - KEY `bulk_email_optout_ff48d8e5` (`course_id`), - KEY `bulk_email_optout_fbfc09f1` (`user_id`), - CONSTRAINT `user_id_refs_id_9e68e67c` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `celery_taskmeta`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `celery_taskmeta` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `task_id` varchar(255) NOT NULL, - `status` varchar(50) NOT NULL, - `result` longtext, - `date_done` datetime NOT NULL, - `traceback` longtext, - `hidden` tinyint(1) NOT NULL, - `meta` longtext, - PRIMARY KEY (`id`), - UNIQUE KEY `task_id` (`task_id`), - KEY `celery_taskmeta_c91f1bf` (`hidden`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `celery_tasksetmeta`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `celery_tasksetmeta` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `taskset_id` varchar(255) NOT NULL, - `result` longtext NOT NULL, - `date_done` datetime NOT NULL, - `hidden` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `taskset_id` (`taskset_id`), - KEY `celery_tasksetmeta_c91f1bf` (`hidden`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `certificates_badgeassertion`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `certificates_badgeassertion` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `course_id` varchar(255) NOT NULL, - `mode` varchar(100) NOT NULL, - `data` longtext NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `certificates_badgeassertion_course_id_f465e63872f731f_uniq` (`course_id`,`user_id`), - KEY `certificates_badgeassertion_fbfc09f1` (`user_id`), - CONSTRAINT `user_id_refs_id_30664b3b` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `certificates_badgeimageconfiguration`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `certificates_badgeimageconfiguration` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `mode` varchar(125) NOT NULL, - `icon` varchar(100) NOT NULL, - `default` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `mode` (`mode`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `certificates_certificategenerationconfiguration`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `certificates_certificategenerationconfiguration` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `certificates_certificategenerationconfiguration_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_abb3a677` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `certificates_certificategenerationcoursesetting`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `certificates_certificategenerationcoursesetting` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `course_key` varchar(255) NOT NULL, - `enabled` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `certificates_certificategenerationcoursesetting_b4b47e7a` (`course_key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `certificates_certificatehtmlviewconfiguration`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `certificates_certificatehtmlviewconfiguration` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - `configuration` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `certificates_certificatehtmlviewconfiguration_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_8584db17` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `certificates_certificatewhitelist`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `certificates_certificatewhitelist` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `course_id` varchar(255) NOT NULL, - `whitelist` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `certificates_certificatewhitelist_fbfc09f1` (`user_id`), - CONSTRAINT `user_id_refs_id_a7ba9306` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `certificates_examplecertificate`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `certificates_examplecertificate` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `example_cert_set_id` int(11) NOT NULL, - `description` varchar(255) NOT NULL, - `uuid` varchar(255) NOT NULL, - `access_key` varchar(255) NOT NULL, - `full_name` varchar(255) NOT NULL, - `template` varchar(255) NOT NULL, - `status` varchar(255) NOT NULL, - `error_reason` longtext, - `download_url` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `uuid` (`uuid`), - KEY `certificates_examplecertificate_uuid_183b9188451b331e` (`uuid`,`access_key`), - KEY `certificates_examplecertificate_3b9264a` (`example_cert_set_id`), - KEY `certificates_examplecertificate_752852c3` (`access_key`), - CONSTRAINT `example_cert_set_id_refs_id_bdd9e28a` FOREIGN KEY (`example_cert_set_id`) REFERENCES `certificates_examplecertificateset` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `certificates_examplecertificateset`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `certificates_examplecertificateset` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `course_key` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - KEY `certificates_examplecertificateset_b4b47e7a` (`course_key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `certificates_generatedcertificate`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `certificates_generatedcertificate` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `download_url` varchar(128) NOT NULL, - `grade` varchar(5) NOT NULL, - `course_id` varchar(255) NOT NULL, - `key` varchar(32) NOT NULL, - `distinction` tinyint(1) NOT NULL, - `status` varchar(32) NOT NULL, - `verify_uuid` varchar(32) NOT NULL, - `download_uuid` varchar(32) NOT NULL, - `name` varchar(255) NOT NULL, - `created_date` datetime NOT NULL, - `modified_date` datetime NOT NULL, - `error_reason` varchar(512) NOT NULL, - `mode` varchar(32) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `certificates_generatedcertifica_course_id_1389f6b2d72f5e78_uniq` (`course_id`,`user_id`), - KEY `certificates_generatedcertificate_fbfc09f1` (`user_id`), - CONSTRAINT `user_id_refs_id_8e23bfe2` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `circuit_servercircuit`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `circuit_servercircuit` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(32) NOT NULL, - `schematic` longtext NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `contentstore_pushnotificationconfig`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `contentstore_pushnotificationconfig` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `contentstore_pushnotificationconfig_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_e431b975` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `contentstore_videouploadconfig`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `contentstore_videouploadconfig` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - `profile_whitelist` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `contentstore_videouploadconfig_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_209c438f` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `cors_csrf_xdomainproxyconfiguration`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `cors_csrf_xdomainproxyconfiguration` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - `whitelist` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `cors_csrf_xdomainproxyconfiguration_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_3dfcfcb0` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `corsheaders_corsmodel`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `corsheaders_corsmodel` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `cors` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `course_action_state_coursererunstate`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `course_action_state_coursererunstate` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created_time` datetime NOT NULL, - `updated_time` datetime NOT NULL, - `created_user_id` int(11) DEFAULT NULL, - `updated_user_id` int(11) DEFAULT NULL, - `course_key` varchar(255) NOT NULL, - `action` varchar(100) NOT NULL, - `state` varchar(50) NOT NULL, - `should_display` tinyint(1) NOT NULL, - `message` varchar(1000) NOT NULL, - `source_course_key` varchar(255) NOT NULL, - `display_name` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `course_action_state_coursererun_course_key_cf5da77ed3032d6_uniq` (`course_key`,`action`), - KEY `course_action_state_coursererunstate_5b876fa2` (`created_user_id`), - KEY `course_action_state_coursererunstate_ceb2e2e7` (`updated_user_id`), - KEY `course_action_state_coursererunstate_b4b47e7a` (`course_key`), - KEY `course_action_state_coursererunstate_1bd4707b` (`action`), - KEY `course_action_state_coursererunstate_ebfe36dd` (`source_course_key`), - CONSTRAINT `created_user_id_refs_id_1744bdeb` FOREIGN KEY (`created_user_id`) REFERENCES `auth_user` (`id`), - CONSTRAINT `updated_user_id_refs_id_1744bdeb` FOREIGN KEY (`updated_user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `course_creators_coursecreator`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `course_creators_coursecreator` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `state_changed` datetime NOT NULL, - `state` varchar(24) NOT NULL, - `note` varchar(512) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `user_id` (`user_id`), - CONSTRAINT `user_id_refs_id_6a0e6044` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `course_groups_coursecohort`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `course_groups_coursecohort` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_user_group_id` int(11) NOT NULL, - `assignment_type` varchar(20) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `course_user_group_id` (`course_user_group_id`), - CONSTRAINT `course_user_group_id_refs_id_8febc00f` FOREIGN KEY (`course_user_group_id`) REFERENCES `course_groups_courseusergroup` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `course_groups_coursecohortssettings`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `course_groups_coursecohortssettings` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `is_cohorted` tinyint(1) NOT NULL, - `course_id` varchar(255) NOT NULL, - `cohorted_discussions` longtext, - `always_cohort_inline_discussions` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `course_id` (`course_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `course_groups_courseusergroup`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `course_groups_courseusergroup` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) NOT NULL, - `course_id` varchar(255) NOT NULL, - `group_type` varchar(20) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `course_groups_courseusergroup_name_63f7511804c52f38_uniq` (`name`,`course_id`), - KEY `course_groups_courseusergroup_ff48d8e5` (`course_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `course_groups_courseusergroup_users`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `course_groups_courseusergroup_users` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `courseusergroup_id` int(11) NOT NULL, - `user_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `course_groups_courseus_courseusergroup_id_46691806058983eb_uniq` (`courseusergroup_id`,`user_id`), - KEY `course_groups_courseusergroup_users_caee1c64` (`courseusergroup_id`), - KEY `course_groups_courseusergroup_users_fbfc09f1` (`user_id`), - CONSTRAINT `courseusergroup_id_refs_id_d26180aa` FOREIGN KEY (`courseusergroup_id`) REFERENCES `course_groups_courseusergroup` (`id`), - CONSTRAINT `user_id_refs_id_bf33b47a` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `course_groups_courseusergrouppartitiongroup`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `course_groups_courseusergrouppartitiongroup` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_user_group_id` int(11) NOT NULL, - `partition_id` int(11) NOT NULL, - `group_id` int(11) NOT NULL, - `created_at` datetime NOT NULL, - `updated_at` datetime NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `course_user_group_id` (`course_user_group_id`), - CONSTRAINT `course_user_group_id_refs_id_145383c4` FOREIGN KEY (`course_user_group_id`) REFERENCES `course_groups_courseusergroup` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `course_modes_coursemode`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `course_modes_coursemode` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_id` varchar(255) NOT NULL, - `mode_slug` varchar(100) NOT NULL, - `mode_display_name` varchar(255) NOT NULL, - `min_price` int(11) NOT NULL, - `suggested_prices` varchar(255) NOT NULL, - `currency` varchar(8) NOT NULL, - `expiration_date` date DEFAULT NULL, - `expiration_datetime` datetime DEFAULT NULL, - `description` longtext, - `sku` varchar(255), - PRIMARY KEY (`id`), - UNIQUE KEY `course_modes_coursemode_course_id_69505c92fc09856_uniq` (`course_id`,`currency`,`mode_slug`), - KEY `course_modes_coursemode_ff48d8e5` (`course_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `course_modes_coursemodesarchive`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `course_modes_coursemodesarchive` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_id` varchar(255) NOT NULL, - `mode_slug` varchar(100) NOT NULL, - `mode_display_name` varchar(255) NOT NULL, - `min_price` int(11) NOT NULL, - `suggested_prices` varchar(255) NOT NULL, - `currency` varchar(8) NOT NULL, - `expiration_date` date DEFAULT NULL, - `expiration_datetime` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `course_modes_coursemodesarchive_ff48d8e5` (`course_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `course_structures_coursestructure`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `course_structures_coursestructure` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `course_id` varchar(255) NOT NULL, - `structure_json` longtext, - PRIMARY KEY (`id`), - UNIQUE KEY `course_id` (`course_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `courseware_offlinecomputedgrade`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `courseware_offlinecomputedgrade` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `course_id` varchar(255) NOT NULL, - `created` datetime DEFAULT NULL, - `updated` datetime NOT NULL, - `gradeset` longtext, - PRIMARY KEY (`id`), - UNIQUE KEY `courseware_offlinecomputedgrade_user_id_46133bbd0926078f_uniq` (`user_id`,`course_id`), - KEY `courseware_offlinecomputedgrade_fbfc09f1` (`user_id`), - KEY `courseware_offlinecomputedgrade_ff48d8e5` (`course_id`), - KEY `courseware_offlinecomputedgrade_3216ff68` (`created`), - KEY `courseware_offlinecomputedgrade_8aac229` (`updated`), - CONSTRAINT `user_id_refs_id_38cf339d` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `courseware_offlinecomputedgradelog`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `courseware_offlinecomputedgradelog` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_id` varchar(255) NOT NULL, - `created` datetime DEFAULT NULL, - `seconds` int(11) NOT NULL, - `nstudents` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `courseware_offlinecomputedgradelog_ff48d8e5` (`course_id`), - KEY `courseware_offlinecomputedgradelog_3216ff68` (`created`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `courseware_studentfieldoverride`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `courseware_studentfieldoverride` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_id` varchar(255) NOT NULL, - `location` varchar(255) NOT NULL, - `student_id` int(11) NOT NULL, - `field` varchar(255) NOT NULL, - `value` longtext NOT NULL, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `courseware_studentfieldoverride_course_id_39dd7eaeac5623d2_uniq` (`course_id`,`field`,`location`,`student_id`), - KEY `courseware_studentfieldoverride_ff48d8e5` (`course_id`), - KEY `courseware_studentfieldoverride_b54954de` (`location`), - KEY `courseware_studentfieldoverride_42ff452e` (`student_id`), - KEY `courseware_studentfieldoverride_course_id_344e77afe4983e04` (`course_id`,`location`,`student_id`), - CONSTRAINT `student_id_refs_id_7b49c12b` FOREIGN KEY (`student_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `courseware_studentmodule`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `courseware_studentmodule` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `module_type` varchar(32) NOT NULL, - `module_id` varchar(255) NOT NULL, - `student_id` int(11) NOT NULL, - `state` longtext, - `grade` double DEFAULT NULL, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `max_grade` double, - `done` varchar(8) NOT NULL, - `course_id` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `courseware_studentmodule_student_id_635d77aea1256de5_uniq` (`student_id`,`module_id`,`course_id`), - KEY `courseware_studentmodule_42ff452e` (`student_id`), - KEY `courseware_studentmodule_3216ff68` (`created`), - KEY `courseware_studentmodule_6dff86b5` (`grade`), - KEY `courseware_studentmodule_5436e97a` (`modified`), - KEY `courseware_studentmodule_2d8768ff` (`module_type`), - KEY `courseware_studentmodule_f53ed95e` (`module_id`), - KEY `courseware_studentmodule_1923c03f` (`done`), - KEY `courseware_studentmodule_ff48d8e5` (`course_id`), - CONSTRAINT `student_id_refs_id_79ba2570` FOREIGN KEY (`student_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `courseware_studentmodulehistory`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `courseware_studentmodulehistory` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `student_module_id` int(11) NOT NULL, - `version` varchar(255), - `created` datetime NOT NULL, - `state` longtext, - `grade` double DEFAULT NULL, - `max_grade` double DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `courseware_studentmodulehistory_5656f5fe` (`student_module_id`), - KEY `courseware_studentmodulehistory_659105e4` (`version`), - KEY `courseware_studentmodulehistory_3216ff68` (`created`), - CONSTRAINT `student_module_id_refs_id_e48636f4` FOREIGN KEY (`student_module_id`) REFERENCES `courseware_studentmodule` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `courseware_xmodulestudentinfofield`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `courseware_xmodulestudentinfofield` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `field_name` varchar(64) NOT NULL, - `value` longtext NOT NULL, - `student_id` int(11) NOT NULL, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `courseware_xmodulestudentinfof_student_id_33f2f772c49db067_uniq` (`student_id`,`field_name`), - KEY `courseware_xmodulestudentinfofield_7e1499` (`field_name`), - KEY `courseware_xmodulestudentinfofield_42ff452e` (`student_id`), - KEY `courseware_xmodulestudentinfofield_3216ff68` (`created`), - KEY `courseware_xmodulestudentinfofield_5436e97a` (`modified`), - CONSTRAINT `student_id_refs_id_bfcfbe68` FOREIGN KEY (`student_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `courseware_xmodulestudentprefsfield`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `courseware_xmodulestudentprefsfield` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `field_name` varchar(64) NOT NULL, - `module_type` varchar(64) NOT NULL, - `value` longtext NOT NULL, - `student_id` int(11) NOT NULL, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `courseware_xmodulestudentprefs_student_id_2a5d275498b7a407_uniq` (`student_id`,`module_type`,`field_name`), - KEY `courseware_xmodulestudentprefsfield_7e1499` (`field_name`), - KEY `courseware_xmodulestudentprefsfield_2d8768ff` (`module_type`), - KEY `courseware_xmodulestudentprefsfield_42ff452e` (`student_id`), - KEY `courseware_xmodulestudentprefsfield_3216ff68` (`created`), - KEY `courseware_xmodulestudentprefsfield_5436e97a` (`modified`), - CONSTRAINT `student_id_refs_id_d7b9940b` FOREIGN KEY (`student_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `courseware_xmoduleuserstatesummaryfield`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `courseware_xmoduleuserstatesummaryfield` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `field_name` varchar(64) NOT NULL, - `usage_id` varchar(255) NOT NULL, - `value` longtext NOT NULL, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `courseware_xmodulecontentfi_definition_id_50fa4fd570cf2f4a_uniq` (`usage_id`,`field_name`), - KEY `courseware_xmodulecontentfield_7e1499` (`field_name`), - KEY `courseware_xmodulecontentfield_1d304ded` (`usage_id`), - KEY `courseware_xmodulecontentfield_3216ff68` (`created`), - KEY `courseware_xmodulecontentfield_5436e97a` (`modified`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `credit_creditcourse`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `credit_creditcourse` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_key` varchar(255) NOT NULL, - `enabled` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `course_key` (`course_key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `credit_creditcourse_providers`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `credit_creditcourse_providers` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `creditcourse_id` int(11) NOT NULL, - `creditprovider_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `credit_creditcourse_provid_creditcourse_id_d626a766090895c_uniq` (`creditcourse_id`,`creditprovider_id`), - KEY `credit_creditcourse_providers_872fcb0` (`creditcourse_id`), - KEY `credit_creditcourse_providers_56a10efe` (`creditprovider_id`), - CONSTRAINT `creditcourse_id_refs_id_ada165e4` FOREIGN KEY (`creditcourse_id`) REFERENCES `credit_creditcourse` (`id`), - CONSTRAINT `creditprovider_id_refs_id_52467f1a` FOREIGN KEY (`creditprovider_id`) REFERENCES `credit_creditprovider` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `credit_crediteligibility`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `credit_crediteligibility` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `username` varchar(255) NOT NULL, - `course_id` int(11) NOT NULL, - `provider_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `credit_crediteligibility_username_936cb16677e83e_uniq` (`username`,`course_id`), - KEY `credit_crediteligibility_f774835d` (`username`), - KEY `credit_crediteligibility_ff48d8e5` (`course_id`), - KEY `credit_crediteligibility_d9e5df97` (`provider_id`), - CONSTRAINT `course_id_refs_id_eede15d0` FOREIGN KEY (`course_id`) REFERENCES `credit_creditcourse` (`id`), - CONSTRAINT `provider_id_refs_id_561c64e6` FOREIGN KEY (`provider_id`) REFERENCES `credit_creditprovider` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `credit_creditprovider`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `credit_creditprovider` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `provider_id` varchar(255) NOT NULL, - `display_name` varchar(255) NOT NULL, - `provider_url` varchar(200) NOT NULL, - `eligibility_duration` int(10) unsigned NOT NULL, - `active` tinyint(1) NOT NULL, - `enable_integration` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `provider_id` (`provider_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `credit_creditrequest`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `credit_creditrequest` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `uuid` varchar(32) NOT NULL, - `username` varchar(255) NOT NULL, - `course_id` int(11) NOT NULL, - `provider_id` int(11) NOT NULL, - `timestamp` datetime NOT NULL, - `parameters` longtext NOT NULL, - `status` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `uuid` (`uuid`), - UNIQUE KEY `credit_creditrequest_username_4f61c10bb0d67c01_uniq` (`username`,`course_id`,`provider_id`), - KEY `credit_creditrequest_f774835d` (`username`), - KEY `credit_creditrequest_ff48d8e5` (`course_id`), - KEY `credit_creditrequest_d9e5df97` (`provider_id`), - CONSTRAINT `course_id_refs_id_96abc610` FOREIGN KEY (`course_id`) REFERENCES `credit_creditcourse` (`id`), - CONSTRAINT `provider_id_refs_id_df6afe06` FOREIGN KEY (`provider_id`) REFERENCES `credit_creditprovider` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `credit_creditrequirement`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `credit_creditrequirement` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `course_id` int(11) NOT NULL, - `namespace` varchar(255) NOT NULL, - `name` varchar(255) NOT NULL, - `active` tinyint(1) NOT NULL, - `criteria` longtext NOT NULL, - `display_name` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `credit_creditrequirement_namespace_33039c83b3e69b8_uniq` (`namespace`,`name`,`course_id`), - KEY `credit_creditrequirement_ff48d8e5` (`course_id`), - CONSTRAINT `course_id_refs_id_a417c522` FOREIGN KEY (`course_id`) REFERENCES `credit_creditcourse` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `credit_creditrequirementstatus`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `credit_creditrequirementstatus` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `username` varchar(255) NOT NULL, - `requirement_id` int(11) NOT NULL, - `status` varchar(32) NOT NULL, - `reason` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `credit_creditrequirementstatus_f774835d` (`username`), - KEY `credit_creditrequirementstatus_99a85f32` (`requirement_id`), - CONSTRAINT `requirement_id_refs_id_1f08312b` FOREIGN KEY (`requirement_id`) REFERENCES `credit_creditrequirement` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `credit_historicalcreditrequest`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `credit_historicalcreditrequest` ( - `id` int(11) NOT NULL, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `uuid` varchar(32) NOT NULL, - `username` varchar(255) NOT NULL, - `timestamp` datetime NOT NULL, - `parameters` longtext NOT NULL, - `status` varchar(255) NOT NULL, - `course_id` int(11) DEFAULT NULL, - `provider_id` int(11) DEFAULT NULL, - `history_id` int(11) NOT NULL AUTO_INCREMENT, - `history_date` datetime NOT NULL, - `history_user_id` int(11) DEFAULT NULL, - `history_type` varchar(1) NOT NULL, - PRIMARY KEY (`history_id`), - KEY `credit_historicalcreditrequest_4a5fc416` (`id`), - KEY `credit_historicalcreditrequest_2bbc74ae` (`uuid`), - KEY `credit_historicalcreditrequest_f774835d` (`username`), - KEY `credit_historicalcreditrequest_ff48d8e5` (`course_id`), - KEY `credit_historicalcreditrequest_d9e5df97` (`provider_id`), - KEY `credit_historicalcreditrequest_e1a0ea2a` (`history_user_id`), - CONSTRAINT `course_id_refs_id_b034099e` FOREIGN KEY (`course_id`) REFERENCES `credit_creditcourse` (`id`), - CONSTRAINT `history_user_id_refs_id_3ef1516a` FOREIGN KEY (`history_user_id`) REFERENCES `auth_user` (`id`), - CONSTRAINT `provider_id_refs_id_72d984b8` FOREIGN KEY (`provider_id`) REFERENCES `credit_creditprovider` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `dark_lang_darklangconfig`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `dark_lang_darklangconfig` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - `released_languages` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `dark_lang_darklangconfig_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_5c5fe834` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `django_admin_log`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `django_admin_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `action_time` datetime NOT NULL, - `user_id` int(11) NOT NULL, - `content_type_id` int(11) DEFAULT NULL, - `object_id` longtext, - `object_repr` varchar(200) NOT NULL, - `action_flag` smallint(5) unsigned NOT NULL, - `change_message` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `django_admin_log_fbfc09f1` (`user_id`), - KEY `django_admin_log_e4470c6e` (`content_type_id`), - CONSTRAINT `content_type_id_refs_id_288599e6` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`), - CONSTRAINT `user_id_refs_id_c8665aa` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `django_comment_client_permission`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `django_comment_client_permission` ( - `name` varchar(30) NOT NULL, - PRIMARY KEY (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `django_comment_client_permission_roles`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `django_comment_client_permission_roles` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `permission_id` varchar(30) NOT NULL, - `role_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `django_comment_client_permi_permission_id_7a766da089425952_uniq` (`permission_id`,`role_id`), - KEY `django_comment_client_permission_roles_1e014c8f` (`permission_id`), - KEY `django_comment_client_permission_roles_bf07f040` (`role_id`), - CONSTRAINT `permission_id_refs_name_b6302d27` FOREIGN KEY (`permission_id`) REFERENCES `django_comment_client_permission` (`name`), - CONSTRAINT `role_id_refs_id_c1b5c854` FOREIGN KEY (`role_id`) REFERENCES `django_comment_client_role` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `django_comment_client_role`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `django_comment_client_role` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(30) NOT NULL, - `course_id` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - KEY `django_comment_client_role_ff48d8e5` (`course_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `django_comment_client_role_users`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `django_comment_client_role_users` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `role_id` int(11) NOT NULL, - `user_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `django_comment_client_role_users_role_id_78e483f531943614_uniq` (`role_id`,`user_id`), - KEY `django_comment_client_role_users_bf07f040` (`role_id`), - KEY `django_comment_client_role_users_fbfc09f1` (`user_id`), - CONSTRAINT `role_id_refs_id_ab82c838` FOREIGN KEY (`role_id`) REFERENCES `django_comment_client_role` (`id`), - CONSTRAINT `user_id_refs_id_441b79e7` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `django_content_type`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `django_content_type` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(100) NOT NULL, - `app_label` varchar(100) NOT NULL, - `model` varchar(100) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `app_label` (`app_label`,`model`) -) ENGINE=InnoDB AUTO_INCREMENT=191 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `django_openid_auth_association`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `django_openid_auth_association` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `server_url` longtext NOT NULL, - `handle` varchar(255) NOT NULL, - `secret` longtext NOT NULL, - `issued` int(11) NOT NULL, - `lifetime` int(11) NOT NULL, - `assoc_type` longtext NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `django_openid_auth_nonce`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `django_openid_auth_nonce` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `server_url` varchar(2047) NOT NULL, - `timestamp` int(11) NOT NULL, - `salt` varchar(40) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `django_openid_auth_useropenid`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `django_openid_auth_useropenid` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `claimed_id` longtext NOT NULL, - `display_id` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `django_openid_auth_useropenid_fbfc09f1` (`user_id`), - CONSTRAINT `user_id_refs_id_be7162f0` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `django_session`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `django_session` ( - `session_key` varchar(40) NOT NULL, - `session_data` longtext NOT NULL, - `expire_date` datetime NOT NULL, - PRIMARY KEY (`session_key`), - KEY `django_session_c25c2c28` (`expire_date`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `django_site`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `django_site` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `domain` varchar(100) NOT NULL, - `name` varchar(50) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `djcelery_crontabschedule`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `djcelery_crontabschedule` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `minute` varchar(64) NOT NULL, - `hour` varchar(64) NOT NULL, - `day_of_week` varchar(64) NOT NULL, - `day_of_month` varchar(64) NOT NULL, - `month_of_year` varchar(64) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `djcelery_intervalschedule`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `djcelery_intervalschedule` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `every` int(11) NOT NULL, - `period` varchar(24) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `djcelery_periodictask`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `djcelery_periodictask` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(200) NOT NULL, - `task` varchar(200) NOT NULL, - `interval_id` int(11) DEFAULT NULL, - `crontab_id` int(11) DEFAULT NULL, - `args` longtext NOT NULL, - `kwargs` longtext NOT NULL, - `queue` varchar(200) DEFAULT NULL, - `exchange` varchar(200) DEFAULT NULL, - `routing_key` varchar(200) DEFAULT NULL, - `expires` datetime DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - `last_run_at` datetime DEFAULT NULL, - `total_run_count` int(10) unsigned NOT NULL, - `date_changed` datetime NOT NULL, - `description` longtext NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`), - KEY `djcelery_periodictask_17d2d99d` (`interval_id`), - KEY `djcelery_periodictask_7aa5fda` (`crontab_id`), - CONSTRAINT `crontab_id_refs_id_ebff5e74` FOREIGN KEY (`crontab_id`) REFERENCES `djcelery_crontabschedule` (`id`), - CONSTRAINT `interval_id_refs_id_f2054349` FOREIGN KEY (`interval_id`) REFERENCES `djcelery_intervalschedule` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `djcelery_periodictasks`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `djcelery_periodictasks` ( - `ident` smallint(6) NOT NULL, - `last_update` datetime NOT NULL, - PRIMARY KEY (`ident`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `djcelery_taskstate`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `djcelery_taskstate` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `state` varchar(64) NOT NULL, - `task_id` varchar(36) NOT NULL, - `name` varchar(200) DEFAULT NULL, - `tstamp` datetime NOT NULL, - `args` longtext, - `kwargs` longtext, - `eta` datetime DEFAULT NULL, - `expires` datetime DEFAULT NULL, - `result` longtext, - `traceback` longtext, - `runtime` double DEFAULT NULL, - `retries` int(11) NOT NULL, - `worker_id` int(11) DEFAULT NULL, - `hidden` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `task_id` (`task_id`), - KEY `djcelery_taskstate_355bfc27` (`state`), - KEY `djcelery_taskstate_52094d6e` (`name`), - KEY `djcelery_taskstate_f0ba6500` (`tstamp`), - KEY `djcelery_taskstate_20fc5b84` (`worker_id`), - KEY `djcelery_taskstate_c91f1bf` (`hidden`), - CONSTRAINT `worker_id_refs_id_4e3453a` FOREIGN KEY (`worker_id`) REFERENCES `djcelery_workerstate` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `djcelery_workerstate`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `djcelery_workerstate` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `hostname` varchar(255) NOT NULL, - `last_heartbeat` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `hostname` (`hostname`), - KEY `djcelery_workerstate_eb8ac7e4` (`last_heartbeat`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `edxval_coursevideo`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `edxval_coursevideo` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_id` varchar(255) NOT NULL, - `video_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `edxval_coursevideo_course_id_42cecee05cff2d8c_uniq` (`course_id`,`video_id`), - KEY `edxval_coursevideo_fa26288c` (`video_id`), - CONSTRAINT `video_id_refs_id_7520c050` FOREIGN KEY (`video_id`) REFERENCES `edxval_video` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `edxval_encodedvideo`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `edxval_encodedvideo` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `url` varchar(200) NOT NULL, - `file_size` int(10) unsigned NOT NULL, - `bitrate` int(10) unsigned NOT NULL, - `profile_id` int(11) NOT NULL, - `video_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `edxval_encodedvideo_141c6eec` (`profile_id`), - KEY `edxval_encodedvideo_fa26288c` (`video_id`), - CONSTRAINT `profile_id_refs_id_692d754` FOREIGN KEY (`profile_id`) REFERENCES `edxval_profile` (`id`), - CONSTRAINT `video_id_refs_id_176ce1a0` FOREIGN KEY (`video_id`) REFERENCES `edxval_video` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `edxval_profile`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `edxval_profile` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `profile_name` varchar(50) NOT NULL, - `extension` varchar(10) DEFAULT 'mp4', - `width` int(10) unsigned DEFAULT '1', - `height` int(10) unsigned DEFAULT '1', - PRIMARY KEY (`id`), - UNIQUE KEY `profile_name` (`profile_name`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `edxval_subtitle`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `edxval_subtitle` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `video_id` int(11) NOT NULL, - `fmt` varchar(20) NOT NULL, - `language` varchar(8) NOT NULL, - `content` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `edxval_subtitle_fa26288c` (`video_id`), - KEY `edxval_subtitle_306df28f` (`fmt`), - KEY `edxval_subtitle_8a7ac9ab` (`language`), - CONSTRAINT `video_id_refs_id_788bc3d3` FOREIGN KEY (`video_id`) REFERENCES `edxval_video` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `edxval_video`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `edxval_video` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `edx_video_id` varchar(100) NOT NULL, - `client_video_id` varchar(255) NOT NULL, - `duration` double NOT NULL, - `created` datetime NOT NULL, - `status` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `edx_video_id` (`edx_video_id`), - KEY `edxval_video_de3f5709` (`client_video_id`), - KEY `edxval_video_c9ad71dd` (`status`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `embargo_country`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `embargo_country` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `country` varchar(2) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `country` (`country`) -) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `embargo_countryaccessrule`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `embargo_countryaccessrule` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `rule_type` varchar(255) NOT NULL, - `restricted_course_id` int(11) NOT NULL, - `country_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `embargo_countryacces_restricted_course_id_6f340c36c633cb0a_uniq` (`restricted_course_id`,`country_id`), - KEY `embargo_countryaccessrule_3cd064f4` (`restricted_course_id`), - KEY `embargo_countryaccessrule_534dd89` (`country_id`), - CONSTRAINT `country_id_refs_id_f679fa73` FOREIGN KEY (`country_id`) REFERENCES `embargo_country` (`id`), - CONSTRAINT `restricted_course_id_refs_id_c792331c` FOREIGN KEY (`restricted_course_id`) REFERENCES `embargo_restrictedcourse` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `embargo_courseaccessrulehistory`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `embargo_courseaccessrulehistory` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `timestamp` datetime NOT NULL, - `course_key` varchar(255) NOT NULL, - `snapshot` longtext, - PRIMARY KEY (`id`), - KEY `embargo_courseaccessrulehistory_67f1b7ce` (`timestamp`), - KEY `embargo_courseaccessrulehistory_b4b47e7a` (`course_key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `embargo_embargoedcourse`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `embargo_embargoedcourse` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_id` varchar(255) NOT NULL, - `embargoed` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `course_id` (`course_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `embargo_embargoedstate`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `embargo_embargoedstate` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - `embargoed_countries` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `embargo_embargoedstate_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_d0205d39` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `embargo_ipfilter`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `embargo_ipfilter` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - `whitelist` longtext NOT NULL, - `blacklist` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `embargo_ipfilter_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_22c1f5d3` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `embargo_restrictedcourse`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `embargo_restrictedcourse` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_key` varchar(255) NOT NULL, - `enroll_msg_key` varchar(255) NOT NULL, - `access_msg_key` varchar(255) NOT NULL, - `disable_access_check` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `course_key` (`course_key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `external_auth_externalauthmap`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `external_auth_externalauthmap` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `external_id` varchar(255) NOT NULL, - `external_domain` varchar(255) NOT NULL, - `external_credentials` longtext NOT NULL, - `external_email` varchar(255) NOT NULL, - `external_name` varchar(255) NOT NULL, - `user_id` int(11) DEFAULT NULL, - `internal_password` varchar(31) NOT NULL, - `dtcreated` datetime NOT NULL, - `dtsignup` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `external_auth_externalauthmap_external_id_7f035ef8bc4d313e_uniq` (`external_id`,`external_domain`), - UNIQUE KEY `user_id` (`user_id`), - KEY `external_auth_externalauthmap_d5e787` (`external_id`), - KEY `external_auth_externalauthmap_a570024c` (`external_domain`), - KEY `external_auth_externalauthmap_a142061d` (`external_email`), - KEY `external_auth_externalauthmap_c1a016f` (`external_name`), - CONSTRAINT `user_id_refs_id_f8635f67` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `foldit_puzzlecomplete`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `foldit_puzzlecomplete` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `unique_user_id` varchar(50) NOT NULL, - `puzzle_id` int(11) NOT NULL, - `puzzle_set` int(11) NOT NULL, - `puzzle_subset` int(11) NOT NULL, - `created` datetime NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `foldit_puzzlecomplete_user_id_4c63656af6674331_uniq` (`user_id`,`puzzle_id`,`puzzle_set`,`puzzle_subset`), - KEY `foldit_puzzlecomplete_fbfc09f1` (`user_id`), - KEY `foldit_puzzlecomplete_8027477e` (`unique_user_id`), - KEY `foldit_puzzlecomplete_4798a2b8` (`puzzle_set`), - KEY `foldit_puzzlecomplete_59f06bcd` (`puzzle_subset`), - CONSTRAINT `user_id_refs_id_37e9437b` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `foldit_score`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `foldit_score` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `unique_user_id` varchar(50) NOT NULL, - `puzzle_id` int(11) NOT NULL, - `best_score` double NOT NULL, - `current_score` double NOT NULL, - `score_version` int(11) NOT NULL, - `created` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `foldit_score_fbfc09f1` (`user_id`), - KEY `foldit_score_8027477e` (`unique_user_id`), - KEY `foldit_score_3624c060` (`best_score`), - KEY `foldit_score_b4627792` (`current_score`), - CONSTRAINT `user_id_refs_id_4c07957f` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `instructor_task_instructortask`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `instructor_task_instructortask` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `task_type` varchar(50) NOT NULL, - `course_id` varchar(255) NOT NULL, - `task_key` varchar(255) NOT NULL, - `task_input` varchar(255) NOT NULL, - `task_id` varchar(255) NOT NULL, - `task_state` varchar(50) DEFAULT NULL, - `task_output` varchar(1024) DEFAULT NULL, - `requester_id` int(11) NOT NULL, - `created` datetime DEFAULT NULL, - `updated` datetime NOT NULL, - `subtasks` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `instructor_task_instructortask_8ae638b4` (`task_type`), - KEY `instructor_task_instructortask_ff48d8e5` (`course_id`), - KEY `instructor_task_instructortask_cfc55170` (`task_key`), - KEY `instructor_task_instructortask_c00fe455` (`task_id`), - KEY `instructor_task_instructortask_731e67a4` (`task_state`), - KEY `instructor_task_instructortask_b8ca8b9f` (`requester_id`), - CONSTRAINT `requester_id_refs_id_a97278e6` FOREIGN KEY (`requester_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `licenses_coursesoftware`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `licenses_coursesoftware` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) NOT NULL, - `full_name` varchar(255) NOT NULL, - `url` varchar(255) NOT NULL, - `course_id` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `licenses_userlicense`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `licenses_userlicense` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `software_id` int(11) NOT NULL, - `user_id` int(11) DEFAULT NULL, - `serial` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - KEY `licenses_userlicense_4c6ed3c1` (`software_id`), - KEY `licenses_userlicense_fbfc09f1` (`user_id`), - CONSTRAINT `software_id_refs_id_f9e27be8` FOREIGN KEY (`software_id`) REFERENCES `licenses_coursesoftware` (`id`), - CONSTRAINT `user_id_refs_id_2f3a1cb3` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `lms_xblock_xblockasidesconfig`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `lms_xblock_xblockasidesconfig` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - `disabled_blocks` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `lms_xblock_xblockasidesconfig_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_552627bc` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `milestones_coursecontentmilestone`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `milestones_coursecontentmilestone` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `course_id` varchar(255) NOT NULL, - `content_id` varchar(255) NOT NULL, - `milestone_id` int(11) NOT NULL, - `milestone_relationship_type_id` int(11) NOT NULL, - `active` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `milestones_coursecontentmilesto_course_id_68d1457cd52d6dff_uniq` (`course_id`,`content_id`,`milestone_id`), - KEY `milestones_coursecontentmilestone_ff48d8e5` (`course_id`), - KEY `milestones_coursecontentmilestone_cc8ff3c` (`content_id`), - KEY `milestones_coursecontentmilestone_9cfa291f` (`milestone_id`), - KEY `milestones_coursecontentmilestone_595c57ff` (`milestone_relationship_type_id`), - CONSTRAINT `milestone_id_refs_id_d7fabedc` FOREIGN KEY (`milestone_id`) REFERENCES `milestones_milestone` (`id`), - CONSTRAINT `milestone_relationship_type_id_refs_id_d7ab186` FOREIGN KEY (`milestone_relationship_type_id`) REFERENCES `milestones_milestonerelationshiptype` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `milestones_coursemilestone`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `milestones_coursemilestone` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `course_id` varchar(255) NOT NULL, - `milestone_id` int(11) NOT NULL, - `milestone_relationship_type_id` int(11) NOT NULL, - `active` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `milestones_coursemilestone_course_id_5a06e10579eab3b7_uniq` (`course_id`,`milestone_id`), - KEY `milestones_coursemilestone_ff48d8e5` (`course_id`), - KEY `milestones_coursemilestone_9cfa291f` (`milestone_id`), - KEY `milestones_coursemilestone_595c57ff` (`milestone_relationship_type_id`), - CONSTRAINT `milestone_id_refs_id_cd764354` FOREIGN KEY (`milestone_id`) REFERENCES `milestones_milestone` (`id`), - CONSTRAINT `milestone_relationship_type_id_refs_id_874a03b6` FOREIGN KEY (`milestone_relationship_type_id`) REFERENCES `milestones_milestonerelationshiptype` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `milestones_milestone`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `milestones_milestone` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `namespace` varchar(255) NOT NULL, - `name` varchar(255) NOT NULL, - `display_name` varchar(255) NOT NULL, - `description` longtext NOT NULL, - `active` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `milestones_milestone_namespace_460a2f6943016c0b_uniq` (`namespace`,`name`), - KEY `milestones_milestone_eb040977` (`namespace`), - KEY `milestones_milestone_52094d6e` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `milestones_milestonerelationshiptype`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `milestones_milestonerelationshiptype` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `name` varchar(25) NOT NULL, - `description` longtext NOT NULL, - `active` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `milestones_usermilestone`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `milestones_usermilestone` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `user_id` int(11) NOT NULL, - `milestone_id` int(11) NOT NULL, - `source` longtext NOT NULL, - `collected` datetime DEFAULT NULL, - `active` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `milestones_usermilestone_user_id_10206aa452468351_uniq` (`user_id`,`milestone_id`), - KEY `milestones_usermilestone_fbfc09f1` (`user_id`), - KEY `milestones_usermilestone_9cfa291f` (`milestone_id`), - CONSTRAINT `milestone_id_refs_id_af7fa460` FOREIGN KEY (`milestone_id`) REFERENCES `milestones_milestone` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `mobile_api_mobileapiconfig`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `mobile_api_mobileapiconfig` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - `video_profiles` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `mobile_api_mobileapiconfig_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_97c2f4c8` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `notes_note`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `notes_note` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `course_id` varchar(255) NOT NULL, - `uri` varchar(255) NOT NULL, - `text` longtext NOT NULL, - `quote` longtext NOT NULL, - `range_start` varchar(2048) NOT NULL, - `range_start_offset` int(11) NOT NULL, - `range_end` varchar(2048) NOT NULL, - `range_end_offset` int(11) NOT NULL, - `tags` longtext NOT NULL, - `created` datetime DEFAULT NULL, - `updated` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `notes_note_fbfc09f1` (`user_id`), - KEY `notes_note_ff48d8e5` (`course_id`), - KEY `notes_note_a9794fa` (`uri`), - KEY `notes_note_3216ff68` (`created`), - KEY `notes_note_8aac229` (`updated`), - CONSTRAINT `user_id_refs_id_360715cc` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `notifications_articlesubscription`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `notifications_articlesubscription` ( - `subscription_ptr_id` int(11) NOT NULL, - `articleplugin_ptr_id` int(11) NOT NULL, - PRIMARY KEY (`articleplugin_ptr_id`), - UNIQUE KEY `subscription_ptr_id` (`subscription_ptr_id`), - CONSTRAINT `articleplugin_ptr_id_refs_id_71ed584a` FOREIGN KEY (`articleplugin_ptr_id`) REFERENCES `wiki_articleplugin` (`id`), - CONSTRAINT `subscription_ptr_id_refs_id_75c0b518` FOREIGN KEY (`subscription_ptr_id`) REFERENCES `notify_subscription` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `notify_notification`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `notify_notification` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `subscription_id` int(11) DEFAULT NULL, - `message` longtext NOT NULL, - `url` varchar(200) DEFAULT NULL, - `is_viewed` tinyint(1) NOT NULL, - `is_emailed` tinyint(1) NOT NULL, - `created` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `notify_notification_104f5ac1` (`subscription_id`), - CONSTRAINT `subscription_id_refs_id_baf93d4f` FOREIGN KEY (`subscription_id`) REFERENCES `notify_subscription` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `notify_notificationtype`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `notify_notificationtype` ( - `key` varchar(128) NOT NULL, - `label` varchar(128) DEFAULT NULL, - `content_type_id` int(11) DEFAULT NULL, - PRIMARY KEY (`key`), - KEY `notify_notificationtype_e4470c6e` (`content_type_id`), - CONSTRAINT `content_type_id_refs_id_f2478378` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `notify_settings`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `notify_settings` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `interval` smallint(6) NOT NULL, - PRIMARY KEY (`id`), - KEY `notify_settings_fbfc09f1` (`user_id`), - CONSTRAINT `user_id_refs_id_9a2911e6` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `notify_subscription`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `notify_subscription` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `settings_id` int(11) NOT NULL, - `notification_type_id` varchar(128) NOT NULL, - `object_id` varchar(64) DEFAULT NULL, - `send_emails` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `notify_subscription_83326d99` (`settings_id`), - KEY `notify_subscription_9955f091` (`notification_type_id`), - CONSTRAINT `notification_type_id_refs_key_baa41a19` FOREIGN KEY (`notification_type_id`) REFERENCES `notify_notificationtype` (`key`), - CONSTRAINT `settings_id_refs_id_3b7225d5` FOREIGN KEY (`settings_id`) REFERENCES `notify_settings` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `oauth2_accesstoken`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oauth2_accesstoken` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `token` varchar(255) NOT NULL, - `client_id` int(11) NOT NULL, - `expires` datetime NOT NULL, - `scope` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `oauth2_accesstoken_fbfc09f1` (`user_id`), - KEY `oauth2_accesstoken_4a4e8ffb` (`client_id`), - KEY `oauth2_accesstoken_bfac9f99` (`token`), - CONSTRAINT `client_id_refs_id_e566ebcc` FOREIGN KEY (`client_id`) REFERENCES `oauth2_client` (`id`), - CONSTRAINT `user_id_refs_id_c740ddb9` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `oauth2_client`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oauth2_client` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11), - `url` varchar(200) NOT NULL, - `redirect_uri` varchar(200) NOT NULL, - `client_id` varchar(255) NOT NULL, - `client_secret` varchar(255) NOT NULL, - `client_type` int(11) NOT NULL, - `name` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - KEY `oauth2_client_fbfc09f1` (`user_id`), - CONSTRAINT `user_id_refs_id_c2e3e9a0` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `oauth2_grant`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oauth2_grant` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `client_id` int(11) NOT NULL, - `code` varchar(255) NOT NULL, - `expires` datetime NOT NULL, - `redirect_uri` varchar(255) NOT NULL, - `scope` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `oauth2_grant_fbfc09f1` (`user_id`), - KEY `oauth2_grant_4a4e8ffb` (`client_id`), - CONSTRAINT `client_id_refs_id_b2f66ded` FOREIGN KEY (`client_id`) REFERENCES `oauth2_client` (`id`), - CONSTRAINT `user_id_refs_id_37f50fe6` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `oauth2_provider_trustedclient`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oauth2_provider_trustedclient` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `client_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `oauth2_provider_trustedclient_4a4e8ffb` (`client_id`), - CONSTRAINT `client_id_refs_id_f6dfcacc` FOREIGN KEY (`client_id`) REFERENCES `oauth2_client` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `oauth2_refreshtoken`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `oauth2_refreshtoken` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `token` varchar(255) NOT NULL, - `access_token_id` int(11) NOT NULL, - `client_id` int(11) NOT NULL, - `expired` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `access_token_id` (`access_token_id`), - KEY `oauth2_refreshtoken_fbfc09f1` (`user_id`), - KEY `oauth2_refreshtoken_4a4e8ffb` (`client_id`), - CONSTRAINT `access_token_id_refs_id_df7961b9` FOREIGN KEY (`access_token_id`) REFERENCES `oauth2_accesstoken` (`id`), - CONSTRAINT `client_id_refs_id_798730c8` FOREIGN KEY (`client_id`) REFERENCES `oauth2_client` (`id`), - CONSTRAINT `user_id_refs_id_78216905` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `psychometrics_psychometricdata`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `psychometrics_psychometricdata` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `studentmodule_id` int(11) NOT NULL, - `done` tinyint(1) NOT NULL, - `attempts` int(11) NOT NULL, - `checktimes` longtext, - PRIMARY KEY (`id`), - UNIQUE KEY `studentmodule_id` (`studentmodule_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_certificateitem`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_certificateitem` ( - `orderitem_ptr_id` int(11) NOT NULL, - `course_id` varchar(128) NOT NULL, - `course_enrollment_id` int(11) NOT NULL, - `mode` varchar(50) NOT NULL, - PRIMARY KEY (`orderitem_ptr_id`), - KEY `shoppingcart_certificateitem_ff48d8e5` (`course_id`), - KEY `shoppingcart_certificateitem_9e513f0b` (`course_enrollment_id`), - KEY `shoppingcart_certificateitem_4160619e` (`mode`), - CONSTRAINT `course_enrollment_id_refs_id_8048c435` FOREIGN KEY (`course_enrollment_id`) REFERENCES `student_courseenrollment` (`id`), - CONSTRAINT `orderitem_ptr_id_refs_id_d3ebc4d0` FOREIGN KEY (`orderitem_ptr_id`) REFERENCES `shoppingcart_orderitem` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_coupon`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_coupon` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(32) NOT NULL, - `description` varchar(255) DEFAULT NULL, - `course_id` varchar(255) NOT NULL, - `percentage_discount` int(11) NOT NULL, - `created_by_id` int(11) NOT NULL, - `created_at` datetime NOT NULL, - `is_active` tinyint(1) NOT NULL, - `expiration_date` datetime, - PRIMARY KEY (`id`), - KEY `shoppingcart_coupon_65da3d2c` (`code`), - KEY `shoppingcart_coupon_b5de30be` (`created_by_id`), - CONSTRAINT `created_by_id_refs_id_259aadc` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_couponredemption`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_couponredemption` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `order_id` int(11) NOT NULL, - `user_id` int(11) NOT NULL, - `coupon_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `shoppingcart_couponredemption_8337030b` (`order_id`), - KEY `shoppingcart_couponredemption_fbfc09f1` (`user_id`), - KEY `shoppingcart_couponredemption_c29b2e60` (`coupon_id`), - CONSTRAINT `coupon_id_refs_id_c11a8022` FOREIGN KEY (`coupon_id`) REFERENCES `shoppingcart_coupon` (`id`), - CONSTRAINT `order_id_refs_id_f5db1967` FOREIGN KEY (`order_id`) REFERENCES `shoppingcart_order` (`id`), - CONSTRAINT `user_id_refs_id_5e9b8167` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_courseregcodeitem`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_courseregcodeitem` ( - `orderitem_ptr_id` int(11) NOT NULL, - `course_id` varchar(128) NOT NULL, - `mode` varchar(50) NOT NULL, - PRIMARY KEY (`orderitem_ptr_id`), - KEY `shoppingcart_courseregcodeitem_ff48d8e5` (`course_id`), - KEY `shoppingcart_courseregcodeitem_4160619e` (`mode`), - CONSTRAINT `orderitem_ptr_id_refs_id_a466f07f` FOREIGN KEY (`orderitem_ptr_id`) REFERENCES `shoppingcart_orderitem` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_courseregcodeitemannotation`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_courseregcodeitemannotation` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_id` varchar(128) NOT NULL, - `annotation` longtext, - PRIMARY KEY (`id`), - UNIQUE KEY `course_id` (`course_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_courseregistrationcode`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_courseregistrationcode` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(32) NOT NULL, - `course_id` varchar(255) NOT NULL, - `created_by_id` int(11) NOT NULL, - `created_at` datetime NOT NULL, - `invoice_id` int(11), - `order_id` int(11), - `mode_slug` varchar(100), - `invoice_item_id` int(11), - `is_valid` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `shoppingcart_courseregistrationcode_code_6614bad3cae62199_uniq` (`code`), - KEY `shoppingcart_courseregistrationcode_65da3d2c` (`code`), - KEY `shoppingcart_courseregistrationcode_ff48d8e5` (`course_id`), - KEY `shoppingcart_courseregistrationcode_b5de30be` (`created_by_id`), - KEY `shoppingcart_courseregistrationcode_59f72b12` (`invoice_id`), - KEY `shoppingcart_courseregistrationcode_8337030b` (`order_id`), - KEY `shoppingcart_courseregistrationcode_80766641` (`invoice_item_id`), - CONSTRAINT `created_by_id_refs_id_38397037` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`), - CONSTRAINT `invoice_id_refs_id_995f0ae8` FOREIGN KEY (`invoice_id`) REFERENCES `shoppingcart_invoice` (`id`), - CONSTRAINT `invoice_item_id_refs_invoiceitem_ptr_id_8a5558e6` FOREIGN KEY (`invoice_item_id`) REFERENCES `shoppingcart_courseregistrationcodeinvoiceitem` (`invoiceitem_ptr_id`), - CONSTRAINT `order_id_refs_id_be36d837` FOREIGN KEY (`order_id`) REFERENCES `shoppingcart_order` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_courseregistrationcodeinvoiceitem`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_courseregistrationcodeinvoiceitem` ( - `invoiceitem_ptr_id` int(11) NOT NULL, - `course_id` varchar(128) NOT NULL, - PRIMARY KEY (`invoiceitem_ptr_id`), - KEY `shoppingcart_courseregistrationcodeinvoiceitem_ff48d8e5` (`course_id`), - CONSTRAINT `invoiceitem_ptr_id_refs_id_74a11b46` FOREIGN KEY (`invoiceitem_ptr_id`) REFERENCES `shoppingcart_invoiceitem` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_donation`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_donation` ( - `orderitem_ptr_id` int(11) NOT NULL, - `donation_type` varchar(32) NOT NULL, - `course_id` varchar(255) NOT NULL, - PRIMARY KEY (`orderitem_ptr_id`), - KEY `shoppingcart_donation_ff48d8e5` (`course_id`), - CONSTRAINT `orderitem_ptr_id_refs_id_b7138a4b` FOREIGN KEY (`orderitem_ptr_id`) REFERENCES `shoppingcart_orderitem` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_donationconfiguration`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_donationconfiguration` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `shoppingcart_donationconfiguration_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_b4a26b7f` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_invoice`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_invoice` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `total_amount` double NOT NULL, - `company_name` varchar(255) NOT NULL, - `course_id` varchar(255) NOT NULL, - `internal_reference` varchar(255), - `is_valid` tinyint(1) NOT NULL, - `address_line_1` varchar(255) NOT NULL, - `address_line_2` varchar(255), - `address_line_3` varchar(255), - `city` varchar(255), - `state` varchar(255), - `zip` varchar(15), - `country` varchar(64), - `recipient_name` varchar(255) NOT NULL, - `recipient_email` varchar(255) NOT NULL, - `customer_reference_number` varchar(63), - `company_contact_name` varchar(255) NOT NULL, - `company_contact_email` varchar(255) NOT NULL, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `shoppingcart_invoice_ca9021a2` (`company_name`), - KEY `shoppingcart_invoice_ff48d8e5` (`course_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_invoicehistory`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_invoicehistory` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `timestamp` datetime NOT NULL, - `invoice_id` int(11) NOT NULL, - `snapshot` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `shoppingcart_invoicehistory_67f1b7ce` (`timestamp`), - KEY `shoppingcart_invoicehistory_59f72b12` (`invoice_id`), - CONSTRAINT `invoice_id_refs_id_239c2b7c` FOREIGN KEY (`invoice_id`) REFERENCES `shoppingcart_invoice` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_invoiceitem`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_invoiceitem` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `invoice_id` int(11) NOT NULL, - `qty` int(11) NOT NULL, - `unit_price` decimal(30,2) NOT NULL, - `currency` varchar(8) NOT NULL, - PRIMARY KEY (`id`), - KEY `shoppingcart_invoiceitem_59f72b12` (`invoice_id`), - CONSTRAINT `invoice_id_refs_id_5c894802` FOREIGN KEY (`invoice_id`) REFERENCES `shoppingcart_invoice` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_invoicetransaction`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_invoicetransaction` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `invoice_id` int(11) NOT NULL, - `amount` decimal(30,2) NOT NULL, - `currency` varchar(8) NOT NULL, - `comments` longtext, - `status` varchar(32) NOT NULL, - `created_by_id` int(11) NOT NULL, - `last_modified_by_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `shoppingcart_invoicetransaction_59f72b12` (`invoice_id`), - KEY `shoppingcart_invoicetransaction_b5de30be` (`created_by_id`), - KEY `shoppingcart_invoicetransaction_bcd6c6d2` (`last_modified_by_id`), - CONSTRAINT `created_by_id_refs_id_7259d0bb` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`), - CONSTRAINT `invoice_id_refs_id_8e5b62ec` FOREIGN KEY (`invoice_id`) REFERENCES `shoppingcart_invoice` (`id`), - CONSTRAINT `last_modified_by_id_refs_id_7259d0bb` FOREIGN KEY (`last_modified_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_order`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_order` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `currency` varchar(8) NOT NULL, - `status` varchar(32) NOT NULL, - `purchase_time` datetime DEFAULT NULL, - `bill_to_first` varchar(64) NOT NULL, - `bill_to_last` varchar(64) NOT NULL, - `bill_to_street1` varchar(128) NOT NULL, - `bill_to_street2` varchar(128) NOT NULL, - `bill_to_city` varchar(64) NOT NULL, - `bill_to_state` varchar(8) NOT NULL, - `bill_to_postalcode` varchar(16) NOT NULL, - `bill_to_country` varchar(64) NOT NULL, - `bill_to_ccnum` varchar(8) NOT NULL, - `bill_to_cardtype` varchar(32) NOT NULL, - `processor_reply_dump` longtext NOT NULL, - `refunded_time` datetime, - `company_name` varchar(255), - `company_contact_name` varchar(255), - `company_contact_email` varchar(255), - `recipient_name` varchar(255), - `recipient_email` varchar(255), - `customer_reference_number` varchar(63), - `order_type` varchar(32) NOT NULL, - PRIMARY KEY (`id`), - KEY `shoppingcart_order_fbfc09f1` (`user_id`), - CONSTRAINT `user_id_refs_id_e1195673` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_orderitem`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_orderitem` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `order_id` int(11) NOT NULL, - `user_id` int(11) NOT NULL, - `status` varchar(32) NOT NULL, - `qty` int(11) NOT NULL, - `unit_cost` decimal(30,2) NOT NULL, - `line_desc` varchar(1024) NOT NULL, - `currency` varchar(8) NOT NULL, - `fulfilled_time` datetime, - `report_comments` longtext NOT NULL, - `refund_requested_time` datetime, - `service_fee` decimal(30,2) NOT NULL, - `list_price` decimal(30,2), - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `shoppingcart_orderitem_8337030b` (`order_id`), - KEY `shoppingcart_orderitem_fbfc09f1` (`user_id`), - KEY `shoppingcart_orderitem_c9ad71dd` (`status`), - KEY `shoppingcart_orderitem_8457f26a` (`fulfilled_time`), - KEY `shoppingcart_orderitem_416112c1` (`refund_requested_time`), - CONSTRAINT `order_id_refs_id_7c77b3f0` FOREIGN KEY (`order_id`) REFERENCES `shoppingcart_order` (`id`), - CONSTRAINT `user_id_refs_id_d92ae410` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_paidcourseregistration`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_paidcourseregistration` ( - `orderitem_ptr_id` int(11) NOT NULL, - `course_id` varchar(128) NOT NULL, - `mode` varchar(50) NOT NULL, - `course_enrollment_id` int(11), - PRIMARY KEY (`orderitem_ptr_id`), - KEY `shoppingcart_paidcourseregistration_ff48d8e5` (`course_id`), - KEY `shoppingcart_paidcourseregistration_4160619e` (`mode`), - KEY `shoppingcart_paidcourseregistration_9e513f0b` (`course_enrollment_id`), - CONSTRAINT `course_enrollment_id_refs_id_dc061be6` FOREIGN KEY (`course_enrollment_id`) REFERENCES `student_courseenrollment` (`id`), - CONSTRAINT `orderitem_ptr_id_refs_id_d8709d99` FOREIGN KEY (`orderitem_ptr_id`) REFERENCES `shoppingcart_orderitem` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_paidcourseregistrationannotation`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_paidcourseregistrationannotation` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_id` varchar(128) NOT NULL, - `annotation` longtext, - PRIMARY KEY (`id`), - UNIQUE KEY `course_id` (`course_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `shoppingcart_registrationcoderedemption`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `shoppingcart_registrationcoderedemption` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `order_id` int(11), - `registration_code_id` int(11) NOT NULL, - `redeemed_by_id` int(11) NOT NULL, - `redeemed_at` datetime DEFAULT NULL, - `course_enrollment_id` int(11), - PRIMARY KEY (`id`), - KEY `shoppingcart_registrationcoderedemption_8337030b` (`order_id`), - KEY `shoppingcart_registrationcoderedemption_d25b37dc` (`registration_code_id`), - KEY `shoppingcart_registrationcoderedemption_e151467a` (`redeemed_by_id`), - KEY `shoppingcart_registrationcoderedemption_9e513f0b` (`course_enrollment_id`), - CONSTRAINT `course_enrollment_id_refs_id_c9486127` FOREIGN KEY (`course_enrollment_id`) REFERENCES `student_courseenrollment` (`id`), - CONSTRAINT `order_id_refs_id_53a8a5c9` FOREIGN KEY (`order_id`) REFERENCES `shoppingcart_order` (`id`), - CONSTRAINT `redeemed_by_id_refs_id_4e320dc9` FOREIGN KEY (`redeemed_by_id`) REFERENCES `auth_user` (`id`), - CONSTRAINT `registration_code_id_refs_id_4d01e47b` FOREIGN KEY (`registration_code_id`) REFERENCES `shoppingcart_courseregistrationcode` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `south_migrationhistory`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `south_migrationhistory` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `app_name` varchar(255) NOT NULL, - `migration` varchar(255) NOT NULL, - `applied` datetime NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=259 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `splash_splashconfig`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `splash_splashconfig` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - `cookie_name` longtext NOT NULL, - `cookie_allowed_values` longtext NOT NULL, - `unaffected_usernames` longtext NOT NULL, - `redirect_url` varchar(200) NOT NULL, - `unaffected_url_paths` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `splash_splashconfig_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_9125b21c` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_anonymoususerid`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_anonymoususerid` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `anonymous_user_id` varchar(32) NOT NULL, - `course_id` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `anonymous_user_id` (`anonymous_user_id`), - KEY `student_anonymoususerid_fbfc09f1` (`user_id`), - KEY `student_anonymoususerid_ff48d8e5` (`course_id`), - CONSTRAINT `user_id_refs_id_c38f7a2a` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_courseaccessrole`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_courseaccessrole` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `org` varchar(64) NOT NULL, - `course_id` varchar(255) NOT NULL, - `role` varchar(64) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `student_courseaccessrole_user_id_3203176c4f474414_uniq` (`user_id`,`org`,`course_id`,`role`), - KEY `student_courseaccessrole_fbfc09f1` (`user_id`), - KEY `student_courseaccessrole_4f5f82e2` (`org`), - KEY `student_courseaccessrole_ff48d8e5` (`course_id`), - KEY `student_courseaccessrole_e0b082a1` (`role`), - CONSTRAINT `user_id_refs_id_6ac23885` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_courseenrollment`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_courseenrollment` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `course_id` varchar(255) NOT NULL, - `created` datetime DEFAULT NULL, - `is_active` tinyint(1) NOT NULL, - `mode` varchar(100) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `student_courseenrollment_user_id_2d2a572f07dd8e37_uniq` (`user_id`,`course_id`), - KEY `student_courseenrollment_fbfc09f1` (`user_id`), - KEY `student_courseenrollment_ff48d8e5` (`course_id`), - KEY `student_courseenrollment_3216ff68` (`created`), - CONSTRAINT `user_id_refs_id_ed37bc9d` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_courseenrollmentallowed`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_courseenrollmentallowed` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `email` varchar(255) NOT NULL, - `course_id` varchar(255) NOT NULL, - `created` datetime DEFAULT NULL, - `auto_enroll` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `student_courseenrollmentallowed_email_6f3eafd4a6c58591_uniq` (`email`,`course_id`), - KEY `student_courseenrollmentallowed_3904588a` (`email`), - KEY `student_courseenrollmentallowed_ff48d8e5` (`course_id`), - KEY `student_courseenrollmentallowed_3216ff68` (`created`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_courseenrollmentattribute`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_courseenrollmentattribute` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `enrollment_id` int(11) NOT NULL, - `namespace` varchar(255) NOT NULL, - `name` varchar(255) NOT NULL, - `value` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - KEY `student_courseenrollmentattribute_ab10102` (`enrollment_id`), - CONSTRAINT `enrollment_id_refs_id_974619de` FOREIGN KEY (`enrollment_id`) REFERENCES `student_courseenrollment` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_dashboardconfiguration`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_dashboardconfiguration` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - `recent_enrollment_time_delta` int(10) unsigned NOT NULL, - PRIMARY KEY (`id`), - KEY `student_dashboardconfiguration_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_eec78c18` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_entranceexamconfiguration`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_entranceexamconfiguration` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `course_id` varchar(255) NOT NULL, - `created` datetime DEFAULT NULL, - `updated` datetime NOT NULL, - `skip_entrance_exam` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `student_entranceexamconfiguration_user_id_714c2ef6a88504f0_uniq` (`user_id`,`course_id`), - KEY `student_entranceexamconfiguration_fbfc09f1` (`user_id`), - KEY `student_entranceexamconfiguration_ff48d8e5` (`course_id`), - KEY `student_entranceexamconfiguration_3216ff68` (`created`), - KEY `student_entranceexamconfiguration_8aac229` (`updated`), - CONSTRAINT `user_id_refs_id_9c93dc16` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_languageproficiency`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_languageproficiency` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_profile_id` int(11) NOT NULL, - `code` varchar(16) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `student_languageproficiency_code_68e76171684c62e5_uniq` (`code`,`user_profile_id`), - KEY `student_languageproficiency_634d39b9` (`user_profile_id`), - CONSTRAINT `user_profile_id_refs_id_ba5aae00` FOREIGN KEY (`user_profile_id`) REFERENCES `auth_userprofile` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_linkedinaddtoprofileconfiguration`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_linkedinaddtoprofileconfiguration` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - `dashboard_tracking_code` longtext NOT NULL, - `company_identifier` longtext NOT NULL, - `trk_partner_name` varchar(10) NOT NULL, - PRIMARY KEY (`id`), - KEY `student_linkedinaddtoprofileconfiguration_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_9469646a` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_loginfailures`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_loginfailures` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `failure_count` int(11) NOT NULL, - `lockout_until` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `student_loginfailures_fbfc09f1` (`user_id`), - CONSTRAINT `user_id_refs_id_e6a71045` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_manualenrollmentaudit`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_manualenrollmentaudit` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `enrollment_id` int(11) DEFAULT NULL, - `enrolled_by_id` int(11) DEFAULT NULL, - `enrolled_email` varchar(255) NOT NULL, - `time_stamp` datetime DEFAULT NULL, - `state_transition` varchar(255) NOT NULL, - `reason` longtext, - PRIMARY KEY (`id`), - KEY `student_manualenrollmentaudit_ab10102` (`enrollment_id`), - KEY `student_manualenrollmentaudit_a14a0576` (`enrolled_by_id`), - KEY `student_manualenrollmentaudit_3dd381cb` (`enrolled_email`), - CONSTRAINT `enrolled_by_id_refs_id_a8059256` FOREIGN KEY (`enrolled_by_id`) REFERENCES `auth_user` (`id`), - CONSTRAINT `enrollment_id_refs_id_a87a89ac` FOREIGN KEY (`enrollment_id`) REFERENCES `student_courseenrollment` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_passwordhistory`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_passwordhistory` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `password` varchar(128) NOT NULL, - `time_set` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `student_passwordhistory_fbfc09f1` (`user_id`), - CONSTRAINT `user_id_refs_id_ed0987da` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_pendingemailchange`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_pendingemailchange` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `new_email` varchar(255) NOT NULL, - `activation_key` varchar(32) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `user_id` (`user_id`), - UNIQUE KEY `activation_key` (`activation_key`), - KEY `student_pendingemailchange_856c86d7` (`new_email`), - CONSTRAINT `user_id_refs_id_a525fa67` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_pendingnamechange`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_pendingnamechange` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `new_name` varchar(255) NOT NULL, - `rationale` varchar(1024) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `user_id` (`user_id`), - CONSTRAINT `user_id_refs_id_d9359b27` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_usersignupsource`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_usersignupsource` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `site` varchar(255) NOT NULL, - `user_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `student_usersignupsource_e00a881a` (`site`), - KEY `student_usersignupsource_fbfc09f1` (`user_id`), - CONSTRAINT `user_id_refs_id_38a4bd6e` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_userstanding`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_userstanding` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `account_status` varchar(31) NOT NULL, - `changed_by_id` int(11) NOT NULL, - `standing_last_changed_at` datetime NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `user_id` (`user_id`), - KEY `student_userstanding_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_450a33b` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`), - CONSTRAINT `user_id_refs_id_450a33b` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_usertestgroup`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_usertestgroup` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(32) NOT NULL, - `description` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `student_usertestgroup_52094d6e` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `student_usertestgroup_users`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_usertestgroup_users` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `usertestgroup_id` int(11) NOT NULL, - `user_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `student_usertestgroup_us_usertestgroup_id_63c588e0372991b0_uniq` (`usertestgroup_id`,`user_id`), - KEY `student_usertestgroup_users_44f27cdf` (`usertestgroup_id`), - KEY `student_usertestgroup_users_fbfc09f1` (`user_id`), - CONSTRAINT `user_id_refs_id_8947584c` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`), - CONSTRAINT `usertestgroup_id_refs_id_6d724f9e` FOREIGN KEY (`usertestgroup_id`) REFERENCES `student_usertestgroup` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `submissions_score`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `submissions_score` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `student_item_id` int(11) NOT NULL, - `submission_id` int(11) DEFAULT NULL, - `points_earned` int(10) unsigned NOT NULL, - `points_possible` int(10) unsigned NOT NULL, - `created_at` datetime NOT NULL, - `reset` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `submissions_score_fa84001` (`student_item_id`), - KEY `submissions_score_b3d6235a` (`submission_id`), - KEY `submissions_score_3b1c9c31` (`created_at`), - CONSTRAINT `student_item_id_refs_id_8cd97385` FOREIGN KEY (`student_item_id`) REFERENCES `submissions_studentitem` (`id`), - CONSTRAINT `submission_id_refs_id_9e39cf2e` FOREIGN KEY (`submission_id`) REFERENCES `submissions_submission` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `submissions_scoresummary`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `submissions_scoresummary` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `student_item_id` int(11) NOT NULL, - `highest_id` int(11) NOT NULL, - `latest_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `student_item_id` (`student_item_id`), - KEY `submissions_scoresummary_d65f9365` (`highest_id`), - KEY `submissions_scoresummary_1efb24d9` (`latest_id`), - CONSTRAINT `highest_id_refs_id_1bdc0a18` FOREIGN KEY (`highest_id`) REFERENCES `submissions_score` (`id`), - CONSTRAINT `latest_id_refs_id_1bdc0a18` FOREIGN KEY (`latest_id`) REFERENCES `submissions_score` (`id`), - CONSTRAINT `student_item_id_refs_id_bd51e768` FOREIGN KEY (`student_item_id`) REFERENCES `submissions_studentitem` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `submissions_studentitem`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `submissions_studentitem` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `student_id` varchar(255) NOT NULL, - `course_id` varchar(255) NOT NULL, - `item_id` varchar(255) NOT NULL, - `item_type` varchar(100) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `submissions_studentitem_course_id_6a6eccbdec6ffd0b_uniq` (`course_id`,`student_id`,`item_id`), - KEY `submissions_studentitem_42ff452e` (`student_id`), - KEY `submissions_studentitem_ff48d8e5` (`course_id`), - KEY `submissions_studentitem_67b70d25` (`item_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `submissions_submission`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `submissions_submission` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `uuid` varchar(36) NOT NULL, - `student_item_id` int(11) NOT NULL, - `attempt_number` int(10) unsigned NOT NULL, - `submitted_at` datetime NOT NULL, - `created_at` datetime NOT NULL, - `raw_answer` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `submissions_submission_2bbc74ae` (`uuid`), - KEY `submissions_submission_fa84001` (`student_item_id`), - KEY `submissions_submission_4452d192` (`submitted_at`), - KEY `submissions_submission_3b1c9c31` (`created_at`), - CONSTRAINT `student_item_id_refs_id_b5cccc` FOREIGN KEY (`student_item_id`) REFERENCES `submissions_studentitem` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `survey_surveyanswer`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `survey_surveyanswer` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `user_id` int(11) NOT NULL, - `form_id` int(11) NOT NULL, - `field_name` varchar(255) NOT NULL, - `field_value` varchar(1024) NOT NULL, - PRIMARY KEY (`id`), - KEY `survey_surveyanswer_fbfc09f1` (`user_id`), - KEY `survey_surveyanswer_1d0aabf2` (`form_id`), - KEY `survey_surveyanswer_7e1499` (`field_name`), - CONSTRAINT `form_id_refs_id_f4c79f29` FOREIGN KEY (`form_id`) REFERENCES `survey_surveyform` (`id`), - CONSTRAINT `user_id_refs_id_e0ad4b5e` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `survey_surveyform`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `survey_surveyform` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `name` varchar(255) NOT NULL, - `form` longtext NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `teams_courseteam`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `teams_courseteam` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `team_id` varchar(255) NOT NULL, - `name` varchar(255) NOT NULL, - `is_active` tinyint(1) NOT NULL, - `course_id` varchar(255) NOT NULL, - `topic_id` varchar(255) NOT NULL, - `date_created` datetime NOT NULL, - `description` varchar(300) NOT NULL, - `country` varchar(2) NOT NULL, - `language` varchar(16) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `team_id` (`team_id`), - KEY `teams_courseteam_ff48d8e5` (`course_id`), - KEY `teams_courseteam_57732028` (`topic_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `teams_courseteammembership`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `teams_courseteammembership` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `team_id` int(11) NOT NULL, - `date_joined` datetime NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `teams_courseteammembership_user_id_48efa8e8971947c3_uniq` (`user_id`,`team_id`), - KEY `teams_courseteammembership_fbfc09f1` (`user_id`), - KEY `teams_courseteammembership_fcf8ac47` (`team_id`), - CONSTRAINT `team_id_refs_id_679497a3` FOREIGN KEY (`team_id`) REFERENCES `teams_courseteam` (`id`), - CONSTRAINT `user_id_refs_id_abc442bf` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `track_trackinglog`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `track_trackinglog` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `dtcreated` datetime NOT NULL, - `username` varchar(32) NOT NULL, - `ip` varchar(32) NOT NULL, - `event_source` varchar(32) NOT NULL, - `event_type` varchar(512) NOT NULL, - `event` longtext NOT NULL, - `agent` varchar(256) NOT NULL, - `page` varchar(512), - `time` datetime NOT NULL, - `host` varchar(64) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `user_api_usercoursetag`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `user_api_usercoursetag` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `key` varchar(255) NOT NULL, - `course_id` varchar(255) NOT NULL, - `value` longtext NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `user_api_usercoursetags_user_id_a734720a0483b08_uniq` (`user_id`,`course_id`,`key`), - KEY `user_api_usercoursetags_fbfc09f1` (`user_id`), - KEY `user_api_usercoursetags_45544485` (`key`), - KEY `user_api_usercoursetags_ff48d8e5` (`course_id`), - CONSTRAINT `user_id_refs_id_47a9a367` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `user_api_userorgtag`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `user_api_userorgtag` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `user_id` int(11) NOT NULL, - `key` varchar(255) NOT NULL, - `org` varchar(255) NOT NULL, - `value` longtext NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `user_api_userorgtag_user_id_694f9e3322120c6f_uniq` (`user_id`,`org`,`key`), - KEY `user_api_userorgtag_user_id_694f9e3322120c6f` (`user_id`,`org`,`key`), - KEY `user_api_userorgtag_fbfc09f1` (`user_id`), - KEY `user_api_userorgtag_45544485` (`key`), - KEY `user_api_userorgtag_4f5f82e2` (`org`), - CONSTRAINT `user_id_refs_id_e54b717f` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `user_api_userpreference`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `user_api_userpreference` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `key` varchar(255) NOT NULL, - `value` longtext NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `user_api_userpreference_user_id_4e4942d73f760072_uniq` (`user_id`,`key`), - KEY `user_api_userpreference_fbfc09f1` (`user_id`), - KEY `user_api_userpreference_45544485` (`key`), - CONSTRAINT `user_id_refs_id_f3473b9e` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `util_ratelimitconfiguration`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `util_ratelimitconfiguration` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `util_ratelimitconfiguration_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_76a26307` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `verify_student_incoursereverificationconfiguration`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `verify_student_incoursereverificationconfiguration` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `verify_student_incoursereverificationconfiguration_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_ab2dfc2a` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `verify_student_skippedreverification`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `verify_student_skippedreverification` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) NOT NULL, - `course_id` varchar(255) NOT NULL, - `checkpoint_id` int(11) NOT NULL, - `created_at` datetime NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `verify_student_skippedreverificat_user_id_1e8af5a5e735aa1a_uniq` (`user_id`,`course_id`), - KEY `verify_student_skippedreverification_fbfc09f1` (`user_id`), - KEY `verify_student_skippedreverification_ff48d8e5` (`course_id`), - KEY `verify_student_skippedreverification_a631e438` (`checkpoint_id`), - CONSTRAINT `checkpoint_id_refs_id_de8541b1` FOREIGN KEY (`checkpoint_id`) REFERENCES `verify_student_verificationcheckpoint` (`id`), - CONSTRAINT `user_id_refs_id_f26a5780` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `verify_student_softwaresecurephotoverification`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `verify_student_softwaresecurephotoverification` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `status` varchar(100) NOT NULL, - `status_changed` datetime NOT NULL, - `user_id` int(11) NOT NULL, - `name` varchar(255) NOT NULL, - `face_image_url` varchar(255) NOT NULL, - `photo_id_image_url` varchar(255) NOT NULL, - `receipt_id` varchar(255) NOT NULL, - `created_at` datetime NOT NULL, - `updated_at` datetime NOT NULL, - `submitted_at` datetime DEFAULT NULL, - `reviewing_user_id` int(11) DEFAULT NULL, - `reviewing_service` varchar(255) NOT NULL, - `error_msg` longtext NOT NULL, - `error_code` varchar(50) NOT NULL, - `photo_id_key` longtext NOT NULL, - `display` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `verify_student_softwaresecurephotoverification_fbfc09f1` (`user_id`), - KEY `verify_student_softwaresecurephotoverification_8713c555` (`receipt_id`), - KEY `verify_student_softwaresecurephotoverification_3b1c9c31` (`created_at`), - KEY `verify_student_softwaresecurephotoverification_f84f7de6` (`updated_at`), - KEY `verify_student_softwaresecurephotoverification_4452d192` (`submitted_at`), - KEY `verify_student_softwaresecurephotoverification_b2c165b4` (`reviewing_user_id`), - KEY `verify_student_softwaresecurephotoverification_35eebcb6` (`display`), - CONSTRAINT `reviewing_user_id_refs_id_d6ea4207` FOREIGN KEY (`reviewing_user_id`) REFERENCES `auth_user` (`id`), - CONSTRAINT `user_id_refs_id_d6ea4207` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `verify_student_verificationcheckpoint`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `verify_student_verificationcheckpoint` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `course_id` varchar(255) NOT NULL, - `checkpoint_location` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `verify_student_verificationchec_course_id_2c6a1f5c22b4cc19_uniq` (`course_id`,`checkpoint_location`), - KEY `verify_student_verificationcheckpoint_ff48d8e5` (`course_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `verify_student_verificationcheckpoint_photo_verification`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `verify_student_verificationcheckpoint_photo_verification` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `verificationcheckpoint_id` int(11) NOT NULL, - `softwaresecurephotoverification_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `verify_student_v_verificationcheckpoint_id_1df07f66c1a9271_uniq` (`verificationcheckpoint_id`,`softwaresecurephotoverification_id`), - KEY `verify_student_verificationcheckpoint_photo_verification_c30361a` (`verificationcheckpoint_id`), - KEY `verify_student_verificationcheckpoint_photo_verification_fdc8dba` (`softwaresecurephotoverification_id`), - CONSTRAINT `softwaresecurephotoverification_id_refs_id_5efb90e` FOREIGN KEY (`softwaresecurephotoverification_id`) REFERENCES `verify_student_softwaresecurephotoverification` (`id`), - CONSTRAINT `verificationcheckpoint_id_refs_id_9a387f43` FOREIGN KEY (`verificationcheckpoint_id`) REFERENCES `verify_student_verificationcheckpoint` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `verify_student_verificationstatus`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `verify_student_verificationstatus` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `checkpoint_id` int(11) NOT NULL, - `user_id` int(11) NOT NULL, - `status` varchar(32) NOT NULL, - `timestamp` datetime NOT NULL, - `response` longtext, - `error` longtext, - PRIMARY KEY (`id`), - KEY `verify_student_verificationstatus_a631e438` (`checkpoint_id`), - KEY `verify_student_verificationstatus_fbfc09f1` (`user_id`), - KEY `verify_student_verificationstatus_c9ad71dd` (`status`), - CONSTRAINT `checkpoint_id_refs_id_70d70b21` FOREIGN KEY (`checkpoint_id`) REFERENCES `verify_student_verificationcheckpoint` (`id`), - CONSTRAINT `user_id_refs_id_bfc6370` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_article`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_article` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `current_revision_id` int(11) DEFAULT NULL, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `owner_id` int(11) DEFAULT NULL, - `group_id` int(11) DEFAULT NULL, - `group_read` tinyint(1) NOT NULL, - `group_write` tinyint(1) NOT NULL, - `other_read` tinyint(1) NOT NULL, - `other_write` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `current_revision_id` (`current_revision_id`), - KEY `wiki_article_5d52dd10` (`owner_id`), - KEY `wiki_article_bda51c3c` (`group_id`), - CONSTRAINT `current_revision_id_refs_id_bafac304` FOREIGN KEY (`current_revision_id`) REFERENCES `wiki_articlerevision` (`id`), - CONSTRAINT `group_id_refs_id_108bfee4` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), - CONSTRAINT `owner_id_refs_id_9e14b583` FOREIGN KEY (`owner_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_articleforobject`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_articleforobject` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `article_id` int(11) NOT NULL, - `content_type_id` int(11) NOT NULL, - `object_id` int(10) unsigned NOT NULL, - `is_mptt` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `wiki_articleforobject_content_type_id_27c4cce189b3bcab_uniq` (`content_type_id`,`object_id`), - KEY `wiki_articleforobject_30525a19` (`article_id`), - KEY `wiki_articleforobject_e4470c6e` (`content_type_id`), - CONSTRAINT `article_id_refs_id_5099436` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`), - CONSTRAINT `content_type_id_refs_id_37828764` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_articleplugin`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_articleplugin` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `article_id` int(11) NOT NULL, - `deleted` tinyint(1) NOT NULL, - `created` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `wiki_articleplugin_30525a19` (`article_id`), - CONSTRAINT `article_id_refs_id_92c648ca` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_articlerevision`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_articlerevision` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `revision_number` int(11) NOT NULL, - `user_message` longtext NOT NULL, - `automatic_log` longtext NOT NULL, - `ip_address` char(15) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - `modified` datetime NOT NULL, - `created` datetime NOT NULL, - `previous_revision_id` int(11) DEFAULT NULL, - `deleted` tinyint(1) NOT NULL, - `locked` tinyint(1) NOT NULL, - `article_id` int(11) NOT NULL, - `content` longtext NOT NULL, - `title` varchar(512) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `wiki_articlerevision_article_id_4b4e7910c8e7b2d0_uniq` (`article_id`,`revision_number`), - KEY `wiki_articlerevision_fbfc09f1` (`user_id`), - KEY `wiki_articlerevision_49bc38cc` (`previous_revision_id`), - KEY `wiki_articlerevision_30525a19` (`article_id`), - CONSTRAINT `article_id_refs_id_5c88570a` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`), - CONSTRAINT `previous_revision_id_refs_id_a951e36b` FOREIGN KEY (`previous_revision_id`) REFERENCES `wiki_articlerevision` (`id`), - CONSTRAINT `user_id_refs_id_fbb26714` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_articlesubscription`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_articlesubscription` ( - `subscription_ptr_id` int(11) NOT NULL, - `articleplugin_ptr_id` int(11) NOT NULL, - PRIMARY KEY (`articleplugin_ptr_id`), - UNIQUE KEY `subscription_ptr_id` (`subscription_ptr_id`), - CONSTRAINT `articleplugin_ptr_id_refs_id_cbce00e3` FOREIGN KEY (`articleplugin_ptr_id`) REFERENCES `wiki_articleplugin` (`id`), - CONSTRAINT `subscription_ptr_id_refs_id_ae89f475` FOREIGN KEY (`subscription_ptr_id`) REFERENCES `notify_subscription` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_attachment`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_attachment` ( - `reusableplugin_ptr_id` int(11) NOT NULL, - `current_revision_id` int(11) DEFAULT NULL, - `original_filename` varchar(256) DEFAULT NULL, - PRIMARY KEY (`reusableplugin_ptr_id`), - UNIQUE KEY `current_revision_id` (`current_revision_id`), - CONSTRAINT `current_revision_id_refs_id_2198feb4` FOREIGN KEY (`current_revision_id`) REFERENCES `wiki_attachmentrevision` (`id`), - CONSTRAINT `reusableplugin_ptr_id_refs_articleplugin_ptr_id_6644e87a` FOREIGN KEY (`reusableplugin_ptr_id`) REFERENCES `wiki_reusableplugin` (`articleplugin_ptr_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_attachmentrevision`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_attachmentrevision` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `revision_number` int(11) NOT NULL, - `user_message` longtext NOT NULL, - `automatic_log` longtext NOT NULL, - `ip_address` char(15) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - `modified` datetime NOT NULL, - `created` datetime NOT NULL, - `previous_revision_id` int(11) DEFAULT NULL, - `deleted` tinyint(1) NOT NULL, - `locked` tinyint(1) NOT NULL, - `attachment_id` int(11) NOT NULL, - `file` varchar(100) NOT NULL, - `description` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `wiki_attachmentrevision_fbfc09f1` (`user_id`), - KEY `wiki_attachmentrevision_49bc38cc` (`previous_revision_id`), - KEY `wiki_attachmentrevision_edee6011` (`attachment_id`), - CONSTRAINT `attachment_id_refs_reusableplugin_ptr_id_640583da` FOREIGN KEY (`attachment_id`) REFERENCES `wiki_attachment` (`reusableplugin_ptr_id`), - CONSTRAINT `previous_revision_id_refs_id_41bbf5` FOREIGN KEY (`previous_revision_id`) REFERENCES `wiki_attachmentrevision` (`id`), - CONSTRAINT `user_id_refs_id_2eaca84c` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_image`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_image` ( - `revisionplugin_ptr_id` int(11) NOT NULL, - PRIMARY KEY (`revisionplugin_ptr_id`), - CONSTRAINT `revisionplugin_ptr_id_refs_articleplugin_ptr_id_fc42a0b1` FOREIGN KEY (`revisionplugin_ptr_id`) REFERENCES `wiki_revisionplugin` (`articleplugin_ptr_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_imagerevision`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_imagerevision` ( - `revisionpluginrevision_ptr_id` int(11) NOT NULL, - `image` varchar(2000), - `width` smallint(6), - `height` smallint(6), - PRIMARY KEY (`revisionpluginrevision_ptr_id`), - CONSTRAINT `revisionpluginrevision_ptr_id_refs_id_5b9fc791` FOREIGN KEY (`revisionpluginrevision_ptr_id`) REFERENCES `wiki_revisionpluginrevision` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_reusableplugin`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_reusableplugin` ( - `articleplugin_ptr_id` int(11) NOT NULL, - PRIMARY KEY (`articleplugin_ptr_id`), - CONSTRAINT `articleplugin_ptr_id_refs_id_4ca661fd` FOREIGN KEY (`articleplugin_ptr_id`) REFERENCES `wiki_articleplugin` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_reusableplugin_articles`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_reusableplugin_articles` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `reusableplugin_id` int(11) NOT NULL, - `article_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `wiki_reusableplugin_art_reusableplugin_id_6e34ac94afa8f9f2_uniq` (`reusableplugin_id`,`article_id`), - KEY `wiki_reusableplugin_articles_28b0b358` (`reusableplugin_id`), - KEY `wiki_reusableplugin_articles_30525a19` (`article_id`), - CONSTRAINT `article_id_refs_id_2f51faad` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`), - CONSTRAINT `reusableplugin_id_refs_articleplugin_ptr_id_44b45e30` FOREIGN KEY (`reusableplugin_id`) REFERENCES `wiki_reusableplugin` (`articleplugin_ptr_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_revisionplugin`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_revisionplugin` ( - `articleplugin_ptr_id` int(11) NOT NULL, - `current_revision_id` int(11), - PRIMARY KEY (`articleplugin_ptr_id`), - UNIQUE KEY `current_revision_id` (`current_revision_id`), - CONSTRAINT `articleplugin_ptr_id_refs_id_cac31401` FOREIGN KEY (`articleplugin_ptr_id`) REFERENCES `wiki_articleplugin` (`id`), - CONSTRAINT `current_revision_id_refs_id_44938e26` FOREIGN KEY (`current_revision_id`) REFERENCES `wiki_revisionpluginrevision` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_revisionpluginrevision`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_revisionpluginrevision` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `revision_number` int(11) NOT NULL, - `user_message` longtext NOT NULL, - `automatic_log` longtext NOT NULL, - `ip_address` char(15) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - `modified` datetime NOT NULL, - `created` datetime NOT NULL, - `previous_revision_id` int(11) DEFAULT NULL, - `deleted` tinyint(1) NOT NULL, - `locked` tinyint(1) NOT NULL, - `plugin_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `wiki_revisionpluginrevision_fbfc09f1` (`user_id`), - KEY `wiki_revisionpluginrevision_49bc38cc` (`previous_revision_id`), - KEY `wiki_revisionpluginrevision_2857ccbf` (`plugin_id`), - CONSTRAINT `plugin_id_refs_articleplugin_ptr_id_41bbc69c` FOREIGN KEY (`plugin_id`) REFERENCES `wiki_revisionplugin` (`articleplugin_ptr_id`), - CONSTRAINT `previous_revision_id_refs_id_78fffe43` FOREIGN KEY (`previous_revision_id`) REFERENCES `wiki_revisionpluginrevision` (`id`), - CONSTRAINT `user_id_refs_id_32d8f395` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_simpleplugin`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_simpleplugin` ( - `articleplugin_ptr_id` int(11) NOT NULL, - `article_revision_id` int(11) NOT NULL, - PRIMARY KEY (`articleplugin_ptr_id`), - KEY `wiki_simpleplugin_b3dc49fe` (`article_revision_id`), - CONSTRAINT `article_revision_id_refs_id_6df37b12` FOREIGN KEY (`article_revision_id`) REFERENCES `wiki_articlerevision` (`id`), - CONSTRAINT `articleplugin_ptr_id_refs_id_a25cbfd2` FOREIGN KEY (`articleplugin_ptr_id`) REFERENCES `wiki_articleplugin` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `wiki_urlpath`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `wiki_urlpath` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `slug` varchar(50) DEFAULT NULL, - `site_id` int(11) NOT NULL, - `parent_id` int(11) DEFAULT NULL, - `lft` int(10) unsigned NOT NULL, - `rght` int(10) unsigned NOT NULL, - `tree_id` int(10) unsigned NOT NULL, - `level` int(10) unsigned NOT NULL, - `article_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `wiki_urlpath_site_id_124f6aa7b2cc9b82_uniq` (`site_id`,`parent_id`,`slug`), - KEY `wiki_urlpath_a951d5d6` (`slug`), - KEY `wiki_urlpath_6223029` (`site_id`), - KEY `wiki_urlpath_63f17a16` (`parent_id`), - KEY `wiki_urlpath_42b06ff6` (`lft`), - KEY `wiki_urlpath_91543e5a` (`rght`), - KEY `wiki_urlpath_efd07f28` (`tree_id`), - KEY `wiki_urlpath_2a8f42e8` (`level`), - KEY `wiki_urlpath_30525a19` (`article_id`), - CONSTRAINT `article_id_refs_id_971759c9` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`), - CONSTRAINT `parent_id_refs_id_52d1e703` FOREIGN KEY (`parent_id`) REFERENCES `wiki_urlpath` (`id`), - CONSTRAINT `site_id_refs_id_f4bbaaa2` FOREIGN KEY (`site_id`) REFERENCES `django_site` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `workflow_assessmentworkflow`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `workflow_assessmentworkflow` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `status` varchar(100) NOT NULL, - `status_changed` datetime NOT NULL, - `submission_uuid` varchar(36) NOT NULL, - `uuid` varchar(36) NOT NULL, - `course_id` varchar(255) NOT NULL, - `item_id` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `submission_uuid` (`submission_uuid`), - UNIQUE KEY `uuid` (`uuid`), - KEY `workflow_assessmentworkflow_course_id_21b427c69fc666ad` (`course_id`,`item_id`,`status`), - KEY `workflow_assessmentworkflow_ff48d8e5` (`course_id`), - KEY `workflow_assessmentworkflow_67b70d25` (`item_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `workflow_assessmentworkflowcancellation`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `workflow_assessmentworkflowcancellation` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `workflow_id` int(11) NOT NULL, - `comments` longtext NOT NULL, - `cancelled_by_id` varchar(40) NOT NULL, - `created_at` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `workflow_assessmentworkflowcancellation_26cddbc7` (`workflow_id`), - KEY `workflow_assessmentworkflowcancellation_8569167` (`cancelled_by_id`), - KEY `workflow_assessmentworkflowcancellation_3b1c9c31` (`created_at`), - CONSTRAINT `workflow_id_refs_id_9b9e066a` FOREIGN KEY (`workflow_id`) REFERENCES `workflow_assessmentworkflow` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `workflow_assessmentworkflowstep`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `workflow_assessmentworkflowstep` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `workflow_id` int(11) NOT NULL, - `name` varchar(20) NOT NULL, - `submitter_completed_at` datetime DEFAULT NULL, - `assessment_completed_at` datetime DEFAULT NULL, - `order_num` int(10) unsigned NOT NULL, - PRIMARY KEY (`id`), - KEY `workflow_assessmentworkflowstep_26cddbc7` (`workflow_id`), - CONSTRAINT `workflow_id_refs_id_69d0b483` FOREIGN KEY (`workflow_id`) REFERENCES `workflow_assessmentworkflow` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `xblock_config_studioconfig`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `xblock_config_studioconfig` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `change_date` datetime NOT NULL, - `changed_by_id` int(11) DEFAULT NULL, - `enabled` tinyint(1) NOT NULL, - `disabled_blocks` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `xblock_config_studioconfig_16905482` (`changed_by_id`), - CONSTRAINT `changed_by_id_refs_id_6ef7f7d7` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - diff --git a/common/test/db_cache/lettuce.db b/common/test/db_cache/lettuce.db index 3bd9676090be6d130549e6a348fc13cb1ad4c49b..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 GIT binary patch literal 0 HcmV?d00001 literal 654336 zcmeEv31Az?dG5?EK-jV++p;BCq9}o+C<>xT;yxtHGEGsktjm%t+wuj2z>GvIt{LJR{gE|EA`*hpQ=Arf1rL( z{f_!g^{eWis-IRrrhZU;kNS4?&FbsaSE?^jA5-h}E z=_kS6svn1p|Chc8+`rJH;C@E$2KSTt72tkQSHS&11)LY$1J2%~;0%p`Gq4q$Eq)Tb zT)6{W<$(Gl^=s-Msk7=)bwuq}FIN6q`GoSgaz70Q3i&4ym=^*{a;--RE9ix}6WP+F zmdTZ8Dpl=NA+MG3o1yOhu-BuED(Jb{d_GgH&E&OGtyakvN`=zo>2l@dM6rAt>p=I( zD?PYRsc|mVT)Cp*yTQM{)`O!;fkfA)#Jb16N zm8Z-`ocxe~5&?<8g@nK|l36-8zmRe*^C}UL2oMD1 z_g~fniNJ-6fc*YnxMeSME)kI5e_0140v9d<^80_`mc7imM1Xw%z39UTeHed1@u(Zs z`_6w%>MO9%KQMr2kJhr|MJ+p1JCT{zDpLj6fPqaN`>Qf~WNhT-vB1qE*Y6(-^f*F$ z0-Kiw;IF5U?+Fx2HEmL>1P&g$IdJgU{{4ZQj_f@!a^!em-`Mf3jI5NM(s}}?vK81z zscepif+jI1$d!Rfsg@y|Lm4-wCLQc{*_eex4cv|$+#n4k6C!qy(t0JDvi|O>v2K1 zfoQ%UGX^cdvkKc4;=qxy-D5|_4vvl;bt`aE)60+p(c$0I-9|~XHbhI;SMT@v{39cH_PAA|WMei%9ji96Cgd7&kxPlY63({hMpFw1n3+*Ss;ghFz@Rf3eR$IEZKa9q`lA5kP0}mo|f%1urzflxv&4 z6r}|L+&U-$R+A-kO*@x$_>T_GjVQ~Uh$Hh^F6aMGUvDBgO9ak$1myhxd@ms>pG4s4 zLqLB2pFV6QXNkc1j)46BpYJ6k<&y|JeF%{6zoNVoDeqK2PX2rPQhKVK@z-UtQ8-_XUI;Yr?e_E!VCI`) z8-DDCaHQ{Xx&9|$DSt`?E-(b-`rids;4-@s0RaK>{qI0vkZ2pm_*(okG5U!f8;l$QndQ!AOGuaAmbEfdY) zslp_)hI0b!;*=|A-F^M`Ot=%xH$P-$%Pwyu9&b>oHU+dY?nVa8iUkeSxLpca-+!gg zpG@L+e69MHK{Q$Jh zo%(g)uFwS0OZWIK#L6dry?zzAuh3x{kDse!aIXO)qUg6^85I3p2Aq!_0q5hp z!THnp3Y4Q~itc82>{~1OatSuy#>?fRxf94YU9vUMz?!aA8?6Bu zhI>wExszlM5lF~>G;7o(m4iRC|0C`H+j~9vCK0$$5Rmi#3#FuG zJ|zN;2*~!|h>7%(2wW%#koK>lcOdi*`~~&wd7JBc=Ng}X&mKG*Z#EMoN1E8o&}AZM z1#Xyg9%#|dcN$1ywrT2-kOF(b(qm7qn1xk^JZ0cE3CtI&)5YxB#_(mq+3;Fw0`t*T zB0AapRH2lCn;tnJ=6km*24?Vlvz^V6%Pccws_&wF%jc+15gXy0zYSs0(l5`ZXcNEz zae4e+Emt!UB0U2AFf-bhF8y0p3us%qwG&^iEXS7%>8OkM`#;u2W(d|9BYwWfLGSi~!KGUNGdJe-T>tgB$e;E>DQuQ?B4 z3fMqIW`fLTRw7H$ z>3RZnEaGZrVtgVON>8xcSzJk?E`quen!E&IT?q-8G=O3`)W<|UHkYUd78Flc#<8|V zHF&inss)#v|6jQMk<7V7fFdC0|FR-T1TI_zWc$Bx%UCo>L`RVwZXq_2GhhX+P|Uz(4|&ZQwwbSy@XHdo zT7;8I>{AO)f6&rhOHC3vq@1ROG&KS=3el7{WXWSV~R*B}c@)zJj zm|7@F(Hb7R^V?EU5iQ4o*kH-7FhLFA+0Hcu>$@IAD9ezOMEs15!8;MN4m1Vz zBadC>^A8W>I=gmW1dN`+YVhc5jvbA#fT*=PX9bwq&R8XcN=5a5{OAS**1q1YKB(TU zZc|q)zft~5`Ka=iurQS!PQ=r#=|61HlKIK057|R#`G#L8pGQOIb5Ei)wF7zUObP=q zLSeuJzt>*wMSZx-M27@ZOyI|+%e*LzgCc)sc-3np!Cp75FzJj`IGvFYdkri%r6HN* z_D#JsIYu#jsTXa>VIf7XOBSe|oz^@&S?))?hA%NA@T6@Kc=|$w;4&|Y;{hYTHfkb> zKpME%6qh9&AS>u97lQl_Tx3%4)F}l|mHb}ov%yP)NiyU|Plp!`;yxj>bh||13DB1w zuSvsGU^F}l`m)aBMg4e#ktIez5~07gs$P_2)t~3WTAar`Da&W8Vp8+;tT4V zv*01UfE9pA^42T){;xuNkoqDel++|!Y`m%1o1_mP_($HUtEnYN=lLF+VAOfsY4Uk=u6+-bcZ{nK> zn(;U+4e_`T#NUb++U!L;SbZh{HAEtU*<%Fz&HBlU3v_D(TB%k!yPS `rr9$t2}M zS)^PVgS5BLi-uWMBXU@DL;!xnQ+bKLbD)sFQ~-vlKo9kr^dcw*y#NTK z-`qpwrQL}MhCyrq!8v!6E?evdgkiuXToA!)C}7faNrb>lxFCYp<_%sHwK@SIXTQxOkr6I;XCi+PG- z0P#<+HKX#xMG6*`3nB)PsL?gHZ;lwu;t}~oUmEFZGZGgSDm;t|%}+3wllk&bFq!}N zp|2qL_xI>mcm-aM!*~}yiZy&1zZhEoXYjZ1kMM7mWy(5bNZG4QD$i5isC-QMw(@iJ zQgsWA7Y?ZRsHfDIs_#_)Sp7@&XKvlYGvIfX2M4jEbHjcQ9>$HGqr&`+a?>hPFlq!H zcJ(q3-hdSXF72Q_D?PXmE4+}XmzR0*sMM=tg$H+GmBb>g(szXi_hOYtB0d)}A0CJJ zT)fJI2e5}k5x#26uJ!=<9v)K&xP%38213B4l(YDmUQTiFavuCUzJhu3_}ud{Dz-VI zxSX;Q#~)WPA0rlwI##ar;5haXv7G~+E4w^+JNEH(ouOB;P|nI3x{4OZMTD)bZmy=u zxsDwDEXa^ewBvm>4Z4_cbGDE*RE&$ckj~JxER^$fhIZ1rVRa1aXhm4YdC|V2i+OPd z)N4I0XlK{8ftIIB?-yVJoP*HWb<+~Olw^w3AJ!N5P~0x%B3S;t%%5|y{5MkhmJ=q% zhoz6S|6cgC!@uvMf5n&L%{Ybk;k$8-w*HUcFX6w&KUEavYH0m?U{vsc@_Wh?%D15P zU!wM^*Q&?WY4wF*8Tb=mE%>L;Ks$FPK>>DtfBPwpD-5`-um0vv4^HA00%TTLkcA1b zSz%jf>0d?|(sCW3P}+t!TbY+w`h!%s%SkMuEQhFYmvb3}fMFKUSo$H_RIea>$RbFX zHq0wH1L6~5K0GGziBf4+k|?!o^(5GA$;PNOD|s}-H_m){RKqtxeXlg4SG5}9kfZ`$ zDRAHcDHb3w;Q?vd7_TCHi1CUFTvA2M+7mM^+h}vUiZgSDZfBvKqcilHH69$rt0*89 zI2)85H@NOt=fP>b%D~1Rcr6PwV6q49q^)K(;R(azLOEZ^5j3jT(JZXy9Bn}(EQs^7 z1zo?|g9owS$!(Mh?ss9fi-oxG8lz=#HDPtSTsaAY*cx18v717EHRmJ*>|p_%kq~gh zl^)!W*APB5V}#3IHvYdAsozsSsMggZYC^qA`K9ut@@A!`j4GGnzr^o?k-!-4L_a~F zM8AV>bv8iP_vnZ@7GV;S83@HRK+|@GbMQLba)2X-6Uyq)PBO(w3p0isE74W%1w3@E zNzY|6=sAe|)u>9FcaSM$)R?>(#6%7UW#}3*XcZSGj0$@d7sYrtc!#!|F}N%SMY9I6 zWg8jF(ghZffSQ6Kt;w}%#nWE2$2Lf>W>3KhH9A}gRJ7_$v34bwj1~uL-tm+fjSJ-x zjbkN58%}!Bh&5z)iDOndmd=(0naR?LJ`;l0i2$wED+RGgm$M~q(sG$d%A8h^h0tz{ zkpiZ(b^?(=Xb3>40#S2ifTvFS%PV-g1y7CqUK_Tp9nfHs2Kg}*GG{!T zztF{B&XWK<59d@&JN$z5lD$7lXu7#wCJ)jyC!HJ3;NM z+i_NoE>pN2=3@bIu2v)3z#)s={D%9c2lrTPqI5&4>2W>W&qU~T7r}NQQ%EB*hX_VI z=Yc#+1p14fzusTr`%RX8))jAxU_47Q7K z(Et-6O!vVWL@;ina0YCjLj)sUa}oGqCVKFmZij)wT6vLFKxiosKf9uiJ>}%(_x~wF zC>clu7A*p@{V&?0lY&bGo-zVN|4&iAjntdLk$)0_#gD*4kHKA$I|miL)7_k0BA(Ai z^N}1o-EG;KQy#X@W}M*}BO;s4ID^TAik$xg({Y<0yIQ=kK%^uyQ1(s@{~H$;G$+~7 zT&O0z8pX2{+Gc+8`@i@ryv%__;9L027wQx06Z7Y%?~1^bYbUPz`33Yju+Lk8yXqY_pYr!M2^i(G9Bw_k zDIJ-+v|~ma%pRWYp+<5h!2sgHLpKKw9^1bktYkBzLY5Kjh-l&&GX9hKXMRz}(EDRP ze;O_%EZ9rTFuFwT`B!y#BS(%0_Kh8f zA}MC8wam;kn6T7(h;>Vi7_&BsgZttg{!AJpHkrS#2zCg`oV`rnGwvd0!tVZi^s$uB zACKeupgr4ynJhD=;J2?ymIabFYvze^wN}bbK~4=L;}Ow-d4L(RH&8jDWh=FDEej}G zz(7R~?n!s}?}*O{iXfi=iQv0me*YI`^OZtN1QrAV+5Q&wk-~*rd=B zfdxT8w*LizQ8JMTEJ_4q`(KpBCWV#=EC>R!{VxcNl8HoMQ6eDM{}yGjNuebI3xa_B z{x1lOl8HoMQ6fOv|4MfM@0-+tjc~NW(|TU0M7Rqcef2GP&lB->ge68w*rtrlzu$vjMoKzL;Of?^8O%=;#>*LdA(F z&7mV+l)(p#E4b$7NiJb(#qj#WUUUeL3U`K8YcqLJQ!%9F_jh;lJCb-P6Oo5qf0N0B z=d}qBoiZrox=51O~D@r#}84A#0yA3b13aus{6o4AAfZCA26 zl4+2yZy&iiYfylf=n<{q;!vF;Qp9~Xnq*uQO2!2+$u{gIw`}zrAW<5Uq)8CGf!v)e zUPjDRTdw8_3W_elJtiqnl9Td81=8N#UKF(MGvjn5VSy+-My`*hm&5TQFw~#uy<>hZ zf#FF+4(~Ffa1o497KKYNQO2mM9@?xvlOfxT3DeF5HTIW8t|W*7FDh+{lRQyvf2}y~2Z0@ApyE0QE+HpN_iC?y8NKnygm4XJ0iMpjj z-;q^W3WpiW#5qyOL&w(>7%!KB6VG9AbbE*Y*6^H)WoC&9YGtP1LEV3?&%Y;*^_|?D z2-o@)+D}FsPi1pSEoRmdA@B&VC)~on8;Kd;FfG!U1gT6^x6sm}3+f#^eg4rf*8A*| znX+f1@%Z>eE|N48HG_^ek;)`6<2qzA35Z0j?gn-5bxaU;^FU*2nRq0Wj^z_tW6-fV z1u^2b5`@_ z=TfE-x7AW6U$77A%dTgV3^tP_5}L@x$5Ym-v$-~V>ztApaa&1ZEw{r8@2Jl|(rT$W zmkv*a$0r(5xou8ac+^&+@b&%RBb~c^{$vtA|CoKBM%-sIMG!rYb19rQ8AKYgqMfUh zOTb#(W8k|m))q{JZm(F|C~liCJk;8u(ax|fF*_UJEpE72Jhf7Gyr{vxk8MYT?5~t( zYK78d=A;HTAyOd(0IfC! z8hnjD*V<>qjRa&m%sJRJ5S!R|b5+3$7_+kwnV!P5&(Pa*Oz+6lFkddY+0288cAY{# z@e7XbZKd7Un4e6z(Ql{j-6t+=G*V>v>O^D6_4b90Mgk)$Ti9p}Cjc7@8};iC`20I| z;71%rC;56rHFrWI3h3tAhQoiCy)c`R(G<%w6>H_dp>CSbp3RgeGE=Y!a>AX+EYbcg z{ZKSK!f8zd4|5-CWT4T-=xARxd0=Kz|F zA`w_32$1i;ivA0s|5DZ{w=I!O&7F<6*p(uoWP^wp zb(jGI9L5$)oEQ_alr+hfU_1MPRNb@ro}R-d2y7*>^hIkV;=UgcobwK2aL1tz|KWjV zJFN~3Z2N>nsKc{;8r__G-dzk}*g>mmU@1kj8#DraSy%rX9FR95BiQG_6iSV#{ko~g zPFAvTBR92{0%&maMWU{+SWIB$sQ_lDny}(VX9(B?`RtjDojJ1+m8qSb7WUer5nDyz zG@@}D+tx5JW{9+?Eynh6Kix~D8^A`jOIe9oyMv`HA#AceNbP@k(9HwNJ|%m#^rwkHvxpfd+ne_P&?ZEn2>s(Jv#8UZ`7H=l+A)dRrvSsj@LwwRg zXx51M!TRPCKL5Ubcy^DoS(Yaz;F3NqSDu=N-Qqm0+k%L0!FM%nq;Axtt%|kK=pP-o z0TMfKL{wAl!JxCDZT7Sc&8M+9VCIh41%pl6HqC8S1I>N2FAeIsg3o{7KDg7;S)OjW z%W%0fz39{D%+Y+1_@hti|%=9P=)q z$jocv3K80zyP8u!YbCJl`DqoV-le>|5#JJDfp7^8>erm~`S03?^}E`drcQuy+faHU zJO@bGri&16v&)RZwY|A0ECd*n(V%{9k%^yePyEKk6E}gz=P5qt+P3&sK?D9%^T9tF z2`45d5~(@x&&@9b2G{m8z?Vs+{{Q*c;Yo=k0?!x%a{m8}K`j%K2%L8a$o7BU6^Rr` zBJhkMAlv^l2DMB`B5>Xzz}EjBMd(pH3O9iL?Xx4GzOCf*-vNtQceJ$%l*(pvkw|)u zHI)4P)=)UpwwF*0g_59tW7+4=9mYBsTF8UVN=uQ*ZE1=uKN_k#bCXWYD-R;?w(`N3 zHklk$K}f%0nq{WYZf1AHaw+Os??09q3Fj}m6>9bp`B*wrMan2i5gXcAsM;;_w00d zGF6Gdd4Yf&|DPAdAcc?!JSzyu_W!KFE)$gqoEHeN^MBI_P2;yIZ+-ejs)zL}m^#k^ z=dA1uo5Aq;OrbPUhQnAz@fbxDiel5bS(6BJPS1=vl{jk>&Y^&yEe?vE$`;8T5w;3_(I%>`D~&}`ZnM@{F`kub!>9H3V}*`- zV->Kac;+B!R<-2!|LO1ZWC{|2^A!Q9|9`%gjFd|v@bn`f+yB##u}ncCaK0iS+yD7m zGEy#yz|)TaTmO3qp@;AvD!+XC)3c{g59+Hg^6Q;PalPDnWy@NHv8^--t0S3=wG7h6 z3eoiZ7P{t_{v69*7PE$RFCjz3zL1qAu-!AN`$0?U4m{gnQ;V;vkyCY4bEG;mHI=QL zZL$>RN_KLtzoIKgl(=#+{x|$}`~-eAz88<;_2@s)ljuF@ zWe};&zb$LMDA?W4H+TbVh-(eexj*w>yT*%Fb!{LPbB!Ar>4lnLU{_mzwHK}F>OEbq zoYX2tD0`!$-c5cl>hJ0^Zuty|Obk!rw|OQr`_FV2oy`8<;YPFmzWNV-@&I1LX z)t7mZztdkTmvTl_`g_X?FB;;ljRI~16!|z0|{lXgO`BJVVlei)Pnfk z%Ru}v7r%j!<|KNt7Y+9hPFK(7PLu(xN+CyV17}5#s`x?z`!9kz(b*4TfwFxdSE%G> z3N`*8$VA_=kH$oGFOdMAQ^pF!V6zr@S&R(udoqru< z=Ilp;9()w9<4LumJjy6}lC3Cj?(yI;+$AKYy;ITjLM#51J$h* zi}j7knTlPvZS>&1c)e?CCed+5OaW_xH5jf5Q zId4Z`jy9kk!jrIqk4hwk-~*rd=BfdxT8w*LizQ8JMT zEJ_5HD?YgY>j{LOzz^d;Q6C`xErN{byYx<a6a7h+fmTB;q zvF~p;gp-|Y@sNaZ+^5~^X#(uT3~aAvbG5=LDn#a_cGlX47Vm=M)WH#bU5EeJaI#@(iyT{!Bk-RKC~NySS*|lg+^f8xqFA5L5ecqn_{p-SgwE)q#KJ! zIuVUU_Q6(k_hCDWWF}iImQQC&GsR+t+hNNTN*TVN=f*4?j;15=eXvpOWR}RV%W93y zO5@hk7R*A4a6Fcnxwr#$>%Df-;$$bioS}Ji+p=OIGo`|PGn(tZ7%QNhTOOdCV(H`| z*c9(RZcjBP6pC&4)Vlbxfng{;l#a$ziRiVkdETA0GmK`)jmPXV-Apc!%&ii8YnfmMhnLi>2wk{8xC=|<_iiR?53(hsYa5@rAhLW&9Z;u$woQgmVpnKBp5o4)zIFf{2e0#(QM2xqJ z7)qv-(Qp)Y`n&o>QCs9MHIz;!Qqd%7|CgejNd1snRQ_9eR2fxP;*aAq_*(Q;q(eaK zzw0)EGQ-FSuLz+~gjEmLW^!7k26i%Xuu?N~FWF@SZ;4a7f?~rR50<6SYhZ zbRgh1SaDwO$|xL5$0C)D9jFu9h$Rcu46}i-o=YoL%EjUou%!}eaPctR5oK+p8BJrF zk)dQbl}g1^y&!y8NHPqED3K5dVhk@Q_4qX(#qT7{4I24UUr`MCR6BA7cWyih%&eF+H z?$9j2o+_~uLwhsG`9uNkkp^O-nBjXBp3T&XoP&V#R5Opy(W{Gqtos5z8 zzY-ln>KD}0YDD>k@?oW-?1JzAf8#IXH$gwJ8?QwFh(3j03`BGPU9;7Tc6M%O_1{CTzE%h|~27*MlZD1Po z$Ut2%Z>nsud%X>B<14(`i{hPO&{ZP}5&>-r7;~)-&YK6(5Z0ZC`n@RHIc&rsqaxQR zB!I=(2pwl%XP?-$aqgnmX6PITI{Qga0QQ8cHKsSn35hT9q-tJ68$r9UbC6P23zH?# zE(DFVN)E#5<>e%R`7`fc=(+kjdnr9{Gy)~}>4Q$Hzq5}q7 zBtRn+@|@K4C*Fnpbuk} zSuvIo?D=9r54DjIM%iX|$ehl^j#{oDX9p)?&Tl9oQL`4X66&U)6x0j)pwEALRH^sU zRd82inLv*0z+pV<1AJRVLeF)zUeO{(^JJLWiWX6+sR{=iLhgh5N`1)Z-?pt;P%Sc; ziNz)&$y|P-1r4gVBOzT1Fxj<`lV%_8j%U}d+iIG;|EG0#CqpFyOBw+=|6kI@D>Ek% zXo-Mq|1IH>ff9iwjeu zZcaImHAdIvL+jjPNjsgPI!)G*MVsZ^c^+-NS&w%3Cr1>-O6|TP*uJ8QYV_Syfo{xu z#w@kr1)vwUEHR64VGE3| zKL+ggf*-m$aFE>%&di6pm-W$sWh?j0T3x1IFiWY@_LPA|AdAj2m}8V6i2qBOQlF#FGOIH)lew z?Bk(yDs}_dMD9E+uulO8%AXvNVthpYuAIWLcr?6?*i4QKoRSc|1V<-p^h{`NBIOo0 zl7d5=>1)80a%WnIo5*NqromKYhMZzy=X_ja$K%OVGyxWtI|qf>aeCb{KRM?bF9fF? z6WhSrvQ1)kh>gyL*nYlS+;B7rM`*4GL(H9HLYl^59K+J4x!vx{BOFddBfG(DbLRnp zMlz^D27KR9=rO2MhukX-*;untZ# zk_aq11jzS)IogfXcd1$RO63d6!%7tY7{2}*?nd83FNdHu{`TJEMYrO;quEk`nI8_g zAI>7jyEujGiF63wn=x6jlX9(CF^XoaM(_5b!+4ZP1-)@AKBTj5a@g$pyWpf2W70Bf z8(63-o9pj1d9=*ah8Fp`<_<5~i+8ln%!Xzex$$-{I&Lc<^XM60(Grfpt>;;3ascke z<0dbjn^wGdmYVR|b(?b_Q(FU*L6<(wA1mw|+NQs8ki@?A91U5!%9c*SL;ZT)m4~!f+9@sZ_oP<=t=p5X0MMk|Y z@gTI8otS70q2jZwoS~BuB?5~c0XhF)^hGE$AQ3oc1Z4X^XXs=^iNK;qK(_xyUxYFP5`l9@K(_yL zhE7J52rPO8({Kr3bSMp{mm=ZoL-xZ|QSpQz)yXh! z^l3ay6&-?WwL;NwewZBj^9iD`3*y)j!egNHaFhLxDB*yiEwoT`xjqU~2_;hT^vy#c zX+cONoXJWVu8l_ros7+Qc5Kn@ z1YvY2o(h8{k2KuP)ETw7N7BY+Wz$-=QZ1LBW;#O^ zh%)0^?X;$qm>}f9nkAc|=j1M4ED=t}!y|B;lX#6-gxx#FZ)k&ZGp-wQ6Em8Mg_5Z| z;hrZEzX;sk2vRcTq0B@vJ4p}H!38)PIb6q1HIj>lGS=}=SMK339I&fyCLjps>)a_Ear*X9%m5pW0EmPqroYtiGe<4rX?OYN{1SA4W2mv|%UqXc`vmz0gCjzql z&l507E)iHl2*~ySB~+L)D-wZuA|Sv2^8`$iO9Yk>0`mL6gbGt;MItay1myRBo`6Ym ziNF#bLv+gM-TRue4t(HO*}9 zn0FBIcl3Kr?wI1?VlOxE>E_PeRT_>FZ3 z6EG-dOOrF%Nw`mn-><&eNinIF^5otqBRmm=XqLSgE5I4?ESS=PJAgCeg-Y#24_vBS z({ z|LEYH_fGLL6|Sr@YQgLDyXtrP{K=$Jzm?V-!(Nch=98-@`dxbsawQ_wNX)odU+f4p ztyhp?Zg`5=3@X*kauqKIgQ7fHo~dOZyigSH^nywo)K}H-^7;2B6+KR^1i6ZtnHZnQ zh0+sY*HH9Y_bcIS7?~{Wx53$HjQiV26AF^{uj2oQ@c&cSs+y`jwf4XCV*g<2Wl79Y z-CsZC^T*@L>>*pjBTd1uw`J5u(GR`Ez1fL0Pqo!qy*aU&1Sbc( zc!qxK?)tL#y+F~XHvSc_GkSN#!Yz5JqI7G(|?mc{LEU@?BuCd!lujGzs>qP7& z>lCnOvpGzLs!ITa2O}cbzzaozxBsso^cDOGHf{~<}eS%DmM(J8LF&eRIvi0#32d=_+HF&U|>+ol{&-HyW z(_{I!K2eSU^yd1edY*Lvci9kRwZ^iLX+Y@oN3V9r&`BruI>rP^97yLX8q7X~YjL5n zHoF4YHYp)?JuNiDA@N3HWAf5}qFgFh`fZKD98Wkqie}L3d+M6cpWA`;2V8my3n`)+c=aefyNzH7)A{ zw>R1>XFM3axV_rJ$=hscj=Pqf1?XCppl0!Dc|d4SP$L9`sg8T0&1x13>UY;Ceg3I^ zO8v5yWzX}Gp%S)H0SuU4IcQh}!fY^_8)i1b(s$KQ(a&n#-i^|USz)p?GhKxd1&prw zDA4JT-pU2LdF1;2W7cTVNhdZBvx75Nx{U8%h@({-1j7yqSxTgRuGQB$crc>c*=eCWjE9B!8Rl)_xv!BddNXvHbJj4#j-tSD?w!2tX$i@WO z|KETPBlwp`I(iHG6Z9jDa1Xu_pTIhPGyW9*9{#1WR@tp+N=>4tmY58%eun+cox_7jsC{Nc4<rW_XZ&}SAj2W1)`l^ z5BYZsU|i310(L_1w5C;zoIeMk8*CB=+@~H|<>_7{gjZ(9D}~%C$j^2GF8&Q{!0fpL zp6=1P=}1CIcVxm~rk%-7O&7I?S9n(WG1>c_tdwV_l`B1~pfuohTB}SIpeB?{c)4fQ zD(Xi*?*?-oAfc13q-$&%M6O{e!lyS)p|KJG zuwm;i)#vGpV_^rhD*Qfu0>Fme3LM1m-s6m!aX%+r* zQLm?OSb=d!4cbDrR<3BL3V981DVDQ*c!FNB&ePY6ISuKBs={y2W>0hw0_i#@x!a^% zqB|oR^QveS_{_sjiB|0K4D>@vl#up`5 z!@q++jQ;`ukFrYHq@IZ&9C6zp4IMX#LH94tx6d z7(&x(z$GE&P2Wi~DUi(2w?wC>uiKy}3p<>g{LBM_;U-~Ke#ws3>*hAEnwp-0k|LdmwqX-Ag*j-T6AM891x0DH;w=UwnJH>(9qHHt`I>&GBb_rWDkm+J zCd%|8m-V!#vC^@VO;@yuDy8d!mN_QK!|CX_m=t?;W@;*1IZJ8Rt@CUM;(WGp61Kcb zljH|^vQhA)-_zNP^V&pq21be1YB^V+ZR_&OJ)Nrz{~Q2*#TA}Tzu{3TmvY)=YdxL7 zmqn#1lgLHVs8_7_^!MTXy^u^fQ!0Zt!CC4OodPJ`gFT-9!REoFvhQ2#>F=_Wz^9-F zJ$iM2BlGIacon)++6f=%@q{5qEba2NR)Q6IB9oB0OV)Y9ke3D$nyqEso^ZEIAju(P zcj-D$*8ouDw4zoyo2x)G&O-VpK;NRMt?Kf0k-V`$GU%?H0zC;Hdes_F7XgNaLf=;? z=LoyJq`G>Qr;A|0A`xPuNV4*3PZ!Cjr)lv0s^{o0@=mGwwd82eAi6Qr~5Y9^ssdRd96895U z&}7Kqij1!ri|Tq0-hul$zlPu%3+7B4f@juwa2jtGIMdHC<92F;2k*q2?W~3H(=6Q1 zTL?cxGZduEp@BoK&hrlUEKN3OaJC2D&jJm$_P_^d8EqjvZ8|d#(t_B+Iog7r!-6)j@vJ<%_8pBaORZjZsUBgWV=?L~1sNYVg2?BoO>kv3NLq7fVyK_1 z0ooS(xJbm?Y-+KR8H>y0jK#&W#TuF-IT<$Oaz-Jd+32?wy=V{K?v#!7AOSXC-6)7B zb}idZnsG%5?QsPm#kjG1&D;_EsGRnQhNxn!;R4BB*eNaVL3;%`x!3RsGlD3h5kU}+ zdj%&+xenOyGpG%T_11U)} z)Qm=iG<{hd(*7?;<4FCo`a*TTx>EUb@CweGUIYY8{=|BopGZN6G&-?K_G36 zM<8v8^pF{ei4>q;g@AE+=@u@i?OPFjjv0vy>4?N7v_%?x(2LSmALEEYWV4YcAMm14 zTctD_Xdm7w zv>ZOH2+(hTfF-oq5R?sAgkiz8r_K0=tc=DU-;lQHMY%{>pn)z`u8#cx;Nqkd5RnEGk;Pt~u&s>FBH@2Njf|4IG1`XB0V z&bjkipom@-!yk1O>Z-(5Jk<44w}ZHRw7*?{ey{pzdYF?YNw} zS5S8)aeY@(_bTeHBJM@2sq3fi)x^Dc4RzO2x0ATb)={^My6cI1$p-2MsM}54OM9r> zOWlpcUEW9CP1Nlt?uyOS4N`XtaW5O7?pEp!68G{U>JC#kMBFRF)QwO#O5Bw(>c**? zAnuh(>ZYihChk?+sJorI*AREr4(eV@-JQf;eI0d2sCzwe{iD>~McpytUcH;Td#HN@ zao6mn?v2#lN8Gjhse6FB2Z`Hxh`KjX_b_qS9ii?~>fTJ;u4B}_g}S#Acl~YDJx<-* ziM!zr>fTA+yNDaOo4Oh5-b38(EOp1JnPmHu8c_S8)yLIqV2$BM^)R&g zj5?uCsWtThXz?#lUj};)Z&Kd|?fpaQC)Cfu$mJW*+W$`dq52c`m+G$0zXZhw`!HR{d~ck?Ogo~G^@;s(!B_kQX=K-?`4QujI3eTcXN4|k|o89>iv51l-= zqB?ubvd1IjF^HbW9*?re^T}ffJ;oj{V2>A)$1r*kd;AW2yqG*f=q2p&QucTmd4$o+ z+2a-L@w?;^L9b+wSFy*d$s>wh!yd0?kKZGY7kjFLXgY5Ak_V_S)>_8u3kB_p)6XbC%`WSnBoIO549y`$|+2d2}@yFzG9r`qT ze1<(fOCBTWbL{bX_V^R__*3@y0(*RsJg!GyVvjGg$5+T>6n&LFzQ!I;lE*Ieb@uo( z_V@;QjG=F`$G6zy&&gvq`Zjy~1$+D@8UL?BBM82juTm>&LivsIC1|HJ$_V}i{t|vS zz7G~~yy&OsFVP3ki_q;rYX9?(fcoI7PO^BPD{7|;Cky=N@O54k9O$oAW~#8@9>^67 zu-{Q8tFe&`%-hJOM}-Hnu#G#tsDDi#taHObw-bR{`J`52^xTX3^jzyjeQSD|ew0YW zd?*ck0+4@=9~SwI6zNa@HD0u4%^Fb>_B*oOi-!9L;E17CDP@ZRB4l7HJ8gK-HDu$3 z1VUJ18%$5TqkKj{Jk7l+YhQ_l+5(elm_?fL*pSxPmU2d>O3Oj4`Q6+x-_m-#^4Ri%L=W2PPMmBN`LgsDwh9f{b5G=sPS7jy# zn`!~FRBpXy?62f)TNnzWFK%w$1%%x@;b+w(5InbqXk5W3VD1kJp04|c-NTT1e=pT- zfW-+iH>AG}4|q=x!CFaY+SIgwd1s^6k{N0X92)eZaOWTgjkglvOacpF{=}Pn|JR}S zBl!0u`Uzf!x8lR_^?xyb2mT!XzT#2(;cI>`e7)bH{3(2^f2&>%U*`SrJ$|nGdiCS# zckP|Q)Bgrb)p2EzOl6!oLC>RWrh|Nj)DZkA3+B_WhT!LSd+>-dL^!)6iyqtP!F!Y; z&c6xK3m6ekr3ujsVeNiE87657rH)<%3)*32m?t2H{0SpNq(2+GD1?ZS}tj- z=#{W$pHw28za#KfERb_{1iqT`j8c5)4zAH-px4l7Q3Dx!;A>f+fr&lv_h|9O2v4EA zLa(Dq#W+JT0OX%UKq7DfB0$>zrRW$^pRcY^{t)*4*5JRxufgMZGx{_18VER- zzw3^8QTO%{YXlk!g(4Z=lTp2t3|WD!Mnd8EU?@Bojt4@~ZIRfvaB3))h$X|R_+jAC zXXg-xuL39tWs7dnqKQN_6}s&vm_leH?BmWyuQYAa6B5;-VrG=~<;S3#-9wboZZgKb z^sSL|awr{-MpE(AA>iECz`2D?5Hk`_grm`eUewh$VvJisoR*Oi$w)Ys*mVHLvuQYg zV~l6%0M^V3=)92cVuoVrCUh(o3P&T`_5+tb7cMO&h^CXtNbKM~7^WT_5l6Eid7RiG zfl(_3Gc!@HWI(ZvXmY}M3aJY_8GFqhq!otbIYPsZ^L?oGvrcU3`f%^1bXBv_A(jaxZr66tz zClkq7I(mAKYrn7sjd`S@0d^!W(|X zOTW~N!DTi=X$&r^;Ri8-`Xx3EIU|UY6Tu7*pdHhfdC_6KN6<|%*Cy?&%R^i=GuXDg zJf>f4^5IgNgbqGjU^CdpXQzG<(b5?)^i@nM2NRMFGt9Z__)>$UGY^k$DcBkz=~orZMRflU55l(X`UMLHBskF}znO0v^*v70xEN70xx~ zZqQYem0f&`)YPi8<-!W*tl0d&hF~rKxiACxC9DD54f;Lrf)hYd^f^?UPs4AQb{}ld z^&M~ynqaPzhqFDd(>IrSWqc?VPA1~9>1#TWAEs=yva<=YW6UQsgA6%h3C1|g0j(Hj zo%tjbZbPPc3MNg-5bPHE`^*Ge%%$T)v2-jEPFxRrg`Hy~{J>8r6pO&x1nf;_s#&n7 z1^I^4lFV?FTdJW1Oie>OVc)QGr@({aWi<}i4|~0i5`{SvwUow+lUN6X5_YM+ zv7uxv93>?S42FeF!F)(y;FgVK2!`&lG1&36p&?FoST?M_$Bj)W9u38kr2S*`Ekyn; ziN8k&X8Y;b^hKkMV^eb|B7C!jpHEJe!%B5y#l#Nqc*W7SlE(kQH4kb$7<5y|0s+U@Y04b~hZ>qXoeY2te=ZYNo>y z+qE1*kwh#;AY{#u&Ocmd7#1Hh0_}{XhBrpLe$@BS-|61OnvyFWdi;C`y?LiNL%OAnjj;6F_Jc_A39$qwB@l z%|8DO?C)-%#wUgGg8LE~SH`C+#bo3NKjw^sUdfl$?3W?T8P6pxmyJ)iu?`qPw^n3? zWwPLGaW+J)#y)zOt{GZGHL7;!7`n9%MPIY87Ph9Qd$H4GnF)5G$%EK-6s=WKH9v

dn`` zAnl5F-waq^X}(KO(;=&=!b)E}M8s~gq-A8tw%%uxELiu=hUr}qv%R#u4c$y$wTy{H z6L0h<_7ZMF)~1F+i}hH@$;3>tNY%ltQnO_RNI+Yyd7xF_-E|z~`ro{JOc_BUuyhcR zXrqxKNYP5!}f-8)dgLvMXfVGLebp5?Vf* z3%doPFYz4m`)%B4Oa^R@;zmN%1^8Mv$zf2xVm8JE3)AVBTO?EI(=8BvxedYWm+rW+ zp_3C1ZBT!3HV#7VQR*{HuY!&3>Fx_C{n9s54%CAWJKY1(SL_v|C2^ZIr1dCzu2C>l zAu4LdKGBK@6Rn_rbT;AhPeT4xHYaYCe}00)Ot)ng(N{Shj*0Mm65uo7R#9N~OHqQ% znsPDyUk{l6M|pfqDX1Hrt$!ij^{LsU&wuo&Qr|gu)nS@kEdgUB=*f9hBNnC2%ES^k zD|7q34!_qsSigKWb&+4c1aiEujmkn&YG^``YKBS;KiWa#>*r93=1jPaYQ>Q?mR4-2 z30-qgPtK-&{^NTT{dgOY7Gp-RARaP@3&D zeGY0?)55t#thG#(7JXwr*|4*3BQsXjXR_Ezh~EDp*Z&uymy(4ue7Uw6{3_})e$Ha++o*%d@?qRB8u_GmdtbxN z46-}5*Xv-QJczqZlbwu)+U2A_Q#xG0JciSRfLlN`uGls&;NH%y9~uF0@e#RuJEg<@ z%RDMKd}vTuQMoim0FN5c;rivBIBJMx1Y7ZlgoZDVv{Q!*nfYxMTvRrSq_NCh9c>08+Q5a_m8J- z8L-_xex1I>WMR*MgM}>zHWu6Tpn2&A2x^$|bi}u^V2iv_-)z=8o&|REd5X)--Ztv} zCK(r#lX1D&+j@PIt#Wc2k~aG}toNA)JzWq>HUc%QZ!}}L0F-RRC8+n>Os?`0rP)q8 zV7Nu^F)i!bfN))eE#8KMK9A8F6$a!-Z?gSpzqmNs~QOG2ddpokqL*z1Kh?3c!`TrHyzn~VC2a0 zz`n8LL4E7&Ek6G-5E88O!Mb8YlE$KtaE!iz2K^N08Ms)vnwnPtxQWIaGoJR#{U8I zX$1fN1!LTa<9H9g6W@nlhChh^0{^?RN=Yh5lxgK9%A1vsC|_0nR{4dhs%zDldQhEE zb@dH!bLh9!pFKO-8t{PCqC`9M9Q62V4<1mQ^D6WQYdo;==`uS*Z)G7i=JX?t-gbot zcPlAtwus(-l?V4LDcc+qy@Ppj25er5-nrg`w<~GK^v>v%(Yv}mctlAzP8LmycQcAc zu}q3Tq)BYElCZ5Kp!ZM)+iXeLDgKC2*pjeQymze!N0sd)3CB_idS90Zr?Euz+C)XGo?yH_ zN#WYbdD((K#ez69ThJe0?ZLy!b%a~3G6Ob}^K4}eeY(?wl|DPS)WvUW^^8o?b z{?CU}kTOUFo*e{8`(F;qJ?iJwht%!LFG2Swqg;*O0-8TD^fS2m_xL%=wJ+mEYmSeU z$-+@26bi+tzIKLeM6n$^akV8w*GU>LQ%?^i)6sM^Id(TNJ76)33d|-7S}~ttOCxk6 z%au(c9*;-H?y|Fqa5lLUlNlQuqAcOcCY+3>Lg71sO`j!A7&26-!A%2hQ4)!0G#N|X z;YIy@BgTRkN%sVR(lTZw7EPqnGq-o3ZoPNJ+FpWap$5U(@}js=Nr2{=qMK)Q?b6&& zVixKf1x^j6c%FSio`?7J+}dyy>>P! zS_k-!o^4&xol!iV2*+-?6&UTaGfHNPob+3%6p?ETq z42O0c1r~9;6wo}N@aKvikAz}r`Tak~{!K=c2rK~vw5~ z=inUvy!rY zg`)4ypBU@+CMk%vIfiq4zGWc#TRVg;i3x%tAm)i-K}!>~@=PABRQF7xe0d6#-YkVZ z=UulZA?PONwGx?gIqy9d)1<}H1~)g&IewQDup{Gd`=Mu>Rvpn*t(3CG%yhO|JzcH{ zDvHstrA-Ko^0k&KmHAq=Fj<0QJ>UE1W_xb~~_rQ&N7_Mhb((?c4~f9yL_oIx#aV7rYKg!?ARycSLZB#lNCXxq0$I~gzjM*qS^;&#Txur_!28@I=;t#huG?WQLH+ZefW9;_5Kv*)9o znJ&N)dT}@0Vhr2=5SXiFW-5i|EULNkG^D_-Nm&{hb>Hly&mRsevrJ`z=UO<*-{^yW z;);|IX94h{YVghT(;Ci}fHi|ce*c$Be*=Ly=G&NZAS*gae5@E?yh(*}2eB@=e>L_fc8_N33B>{IkB zsNx!@p*Hc%8`wlo^sn~S3o*=$z*Z~7AcDBDL=ddb7Fn9B8qvx;5`l$AfXx5lW@-fgzK6@oC)M5OoPxf5 zw(RqdMHSt)vmtK3nOh}%YeNh}|LMB7A(EKUZJQe+g?+2#ve{`SP*~h*5$Q9=c8Qxn zznWVhBYI1Lgzc944YO6BzrSC3;?UTr*7BGWr1Qg4fR$~sBK}#DzIy8 z_sFsRHwXIrfv}1CY$#;2S2a^93c9F{K%S}ESvL(^qTEZb<)S;F%`|*DNmT>0Si&Wo zPNQF<_OM`FEU5ctYiuX2Pb^+x<1I5jk^B6mGY?qxhBi3B1#O>D3UMbV%NEx-Tg+~3KF5`jgJ zfNcMZz6fOoBm(D*fNcNg44sT95m@vHkoo^rD1+3$RzIP>N}X1BsVkL#P(G+Uq}-^i z#XrRF#V^9+IE{Xbz5;5(nR#Y7rtk5h5gZ@QmI81mNnnKCI~;(EWCG>!d*KA<_2jCO zEb|6m<{8p=d(o}fPoq_dS>(X9R+%cm&vL06sFefd+6k=^Ad02c5vsE~tdDuoQM`sk zVK*ZO%BM>Ze4;QN`2Xy^37i|pbtha^4G@+sStkWiBZ?RfheK#IL!5&FDT*3V6h-k8 zFG&@sY$w>?A(o z9M0O#;oQFB?^Rb-cXgv11A0k{EYD8%tpp;Ec%lg5@X+Je&(AY9V|;{_*bZ{?!N z>X)Q(mtBWT=B~p9lj{r{o5LuFM}%DN3REnadZV!^j5gz>Bo$l2GokJlV^u2YO&DO1 zbEA>BYjBxdHMmHUA|P&zhfx*}3yECh*62Ch*BZGn8o`5-Jl5^Ig$rU`tTo1LA}#_W z;%!?Ow;5SDQwpyUtuhMQob_v+kqM)Xct~o9-6D7Kme>`2{zK?Z2)zmKA|D{%I>+bx zyptQbGbdR*)g!V}$6x>9)!zA2p>O-Ddi;rPmM*Q2KP^?iIJ%X%Sv#{}`P`pfV<~|a z%E!y%%_jdw-*u~ad_B0Jp%=Yw3wEW2M!5wp`K}WZXjAlc4&Cvq$jbaG#>dZ` zS`pnf7~~8gBU?zySLl1DcIGtrBIL-KfsWC#ze92rI}`n9@c7w8Jq{#)$Gfp~!W@)p zaJT@BGu5&N(XcP3t8~6fzi;}KJecKXVXoc+HLDByxU&B{@2@b$P$6*HAfVR&m(5Tq zK@|e$9Rd3NzZ%_%w2x>%tldYxLwyKr4;a6LeMthtMWF z4xug26=!sNPP$N@f&+;P&f&W5;#s{sGu!Go8#R?2&1B%n*Tk-;!f53&(OBn+w{C9M zl^?ToCYR0TD`i=9ILQ_cUZ}Cdh}jvrZf;z3x|s4S4i-I?%jS})+AM8tfXkkM18?ot zn&r8AMXy)pXUbL9zQBv+i7S3kvI|hZ?j^^^lZoW^8Nh14XfG$V$0wN0`N?LfQLeXO zvCzpTF$yRCCdS8}oThSz1s^yS*Ot53Y86Yfb1)h8k&p@NkodKb%O`T<<2!T^^ss0k z%NuZR5imKZ7vZkqV*4^m%OrC7?2eKwOXrc& zf>Re+#uB-)^w^$BU{n;ch(o2Fn};*tgU%OZeqGCElDSlRV-eU53Uvgn;_~OJJy< z3V~&YfcpL~vjJD#RR~B3(C>c;y$_-H;kS@=8j*@F`Jcw2GfzjNb2(yOYuO6;?$#DO zd#Htiy(GNiy(zAN1Mmm82qTV6EhnmkI=R?eFU@1@XMBz z(5CHi|J>a_*Cx1dh5>AOpM8tt#?x&=kB)}!v7@8AbpcEicfrZDFJ68HyrBx-%I{2rvy|8TsQ>O{QtsXt2iqJE_DRd^M9$2 zkdjX!aN!W3>wkjZi|~83w_LbZ6zB7gz?p~J8zB6}HnNzMSLMthz->&#*QI_%;2?5f z`^2H`F&<{53u(_wa_*B*ou8Z38=c4R!3xwm5MT~GZopn_ZL9^SCd#Jj)aq!i*eaI_ zmD)^aak*Xq+Zyo4g0lg^A*Qh*nT4<=;PfCEyFy~H{O*npU410#)ZnQ$Pgmms&KA%v z^QrOidZ4~z)W5=Ibq^J|F_24Cu6v1>+jm5w{r$w~a|YJ3PqPNc`i1ZC88)kgj*^g+ zH{wnU!9H7tsmcL zGI3*|y^cw{)7iJ{WKhtjbbSm?USk_i9b&-Q;XO$!*eofnBLa<`8#f+o4@RO}wh(i$ zV@FIrVNBi^lk@Sq;N3BqjshiL7rYT{L~P#}3(^c5V6Hv3V0vlSEdEe?{fcO5OD~59 zyM%EaBrKQUL1VN%6p3!!NX)AofaD|JEM(*iyxs>AnSf$(?wxZG2?$#xVhz#fU&F6L z_*LZd+N;m!6R3Fgf`ECr-De#d-j+6*`N?zE&BA}Xq&!O*os|H%K=1lnsA`v+Stir z!wLwNO~m8Io$cGe6k?DVaMI$Geo6+jz&lzf*rF8*l!Z)$HIBGXAb4>!U=Sba#VW=K z-e??M5Z7*&hU2zmkGI;ZndfJ;Q(R$K;Sw**#go5GLM~CkM-Jz8V!hJU{J)o{RM98| zu1o~f^M7TItLl|Ppce#`{=XNL6pcdQ%0xgt|5xU?s$MAsdO?8B|3hdKLYv4A?RKru zOC3hjzN&qDB)WMsd2z_mbvg=Tp<%al7MjiB)yUC3=xwQxu8N3jTKbP zc|ap5=DY)Mkdkk@T!DD}LXDP8Bp|Rp*AxTaDZN>0lt?G%&A2$xRW0C0aFfot% z-3*?a0I%vg_?AA?ea>Fs27voMD9tx4Rik}Bxb7V|3c%Sgs5Q!<7%Wx_w9nPzoYe1B zc8nb;5WlHRvXD7@AI3;>Su|LOgOrzjNyR~!Or{(r>{sp^nIpl1Zw{Qm)j9w4JySo`&! zD|!geOtyz3(QKA1>e2*|os2AIF>Ds-&cnC(O$FUFbi(3mHzRzcVQwlWG*VWuPqa0c zt>`VkgPFQ*IYYfA&Zg>qu+3 z&^wzQUoFPLY-iLuaNWet%`2!RSATaFeudAi>n5Rh?m4VUcz1g^w(I`(#ud>c>8=YC zw(ZbUYH zEKH`SN}2pL3+pbIVB(_>kqPXo(q};~r!Qvlof5A^%O1)YX(uDm!`q0l$5Ge_3ie_a zR|S{SM&!C_@C`nK`jgu1B$53oT?!myQ#-{3mh9a8>)BSy)@RtC2H)7bz`}OACxLw@ zaB*W}JI$ouza-qL@ocVCnw;(?{Y||~FWB`aJs1a;tLzSWuszPg0&Q_73)az_0#Qpq zR}LQLa>-$VToiOn7s^wu*|o9eT(MFqS6g%*HfJ4>DipG*1ZZTX35@$*>#%y3W^Pbv zRxevNqJq73WNKX5|6H{9ooYxSaLFN{=Kq)6kSKu^0v8Pd_5HtSP^*R%0+$>D>id7m z4T%y+A#l+UP~ZQH2DNHPA#lkdpq~FrZb+0s3W1A;0Gv#q3 z!&~qpcox4F{~Z1x{tEtgavjN$N5~2CljJwaN6DASH#MT&s@Kn%T++?vaQxnNlsW#te>g8KQeesU6W~(F9LZyfIr z4FRuH@ROQ}gW=DtxS+r1iuKK_LaX9lJgx9amxKV8vFwYfUAD|+ZUkc^i!OSOi+ zZ*6Eej?2|%t1(|{)f$CXv3cCNq*tlF(CRp@luLTG35NET%+1<#YXPEXq;CnW9gwW<(+3^!d=$LFv6KevD(@ah1-ymH1z3)-ki0nZtV{Z5Apm0+=lc9 zYryC=!D@`Lx@T=@Xav`rr%SW7Ila{=mzwg$RIydODiMnBz_2fT!%d+%EC0n_DKK6l)$0 zqrSnua`j{l9s-%3XRUiAjQR)H)EY1nG1_mL#>%CceGi9GbTDdNcMuF54x_=<{q$an z)fzLgR&mBM*(=t|G=(h4i6081;nhPH5$}$Nj^#q;9S13C+#-b??r9y|PfFmrqBjbh zrIWkvKo||J8f?}p#pWzvLZ41{!T!&3ZrC42E2AsvO>N)Z8yj#n25PdGjNglA zx!{gH7OfoE%0(*|tlb?(tA|!M z^;Qe+%%+=;XRhA`9U2;;&$O#tZj%-!9t@-G$~3pih{?^+4RxL`XXkdp9k((sw%ucF zI~;DklV$q&&|2cRd#8N;1AynsxG3ZmJL%W%fDv0c$P7m$D%p}`{r#NRe6u)N(IqPP zkxJ{fhf#dxkmw#0Na`5NxaB?obYWfR$~-bMpf z7B1Xe^UM1gZY+=0NE@)e*ow1~gkrMD2)1(pd9J7h>kVFu%jc=Z#dFmfFyk8%OR|Y6?tNS;KFu96V5!0>xjZ%{mxNRH8?aCrfsn`i&a%m9>zpQM zzyf6(&P(kIQN?U|n;R98oikwB!fSeP5hUB($cXHu0Sg&^FM=qsjs_)kM4e3rEM<1! z&61oG9n<%F-ICf<_)P{ZXLw~Us!wINuy$pt|67CpCxU;!i@t!qhQ5t&##wv_*YNA{ z&*Kl^Pvfrqx-#vKFta_OHbivq9Hs&c2FVZmoNIP1?djX(N**(tcde-6@AW<(B~6_K5q%} zfGr_Y81Rn$DJ!%kbQS(te+W;Iom4_GGOU`oLVvz4gm;jgzPxRsFEAqCHf*9VTKCz5 z(vZp85A-EVlm~f3{59jE_%fs5t@u&=1^fQzk@iv0uKvR#FB z(WMgF!@Di__YPy$C6ZjW$GWE^{u_)L`k@(?Ub#YzwOfe8HCP*rX`57t!i#nbG5Gab zL#H35LGe+tSz66=qC1T#&>6Yj_EZ73i#IC+NAvGAN;Wxf-XiBsd&$=ulc2z3^8jcy zX3=^Fgl29viea=1Pe=&xTf~L*gTc4YR^v&V1DDK~1DDk22Fx3UFxt+bpu+lAr^5Tx zz2A5uj1J-*lKkS);ZrMnwz-q{L6o~6+53%SHY45*LD<2FcSV%D8Qo(%9!7f@qO>=H zs)GydktlSt$QnoO`63hA%jE&zzGRKZ?0Wuv@PFH>^}p+_rY;l$%L)Ny|GTV)TXj|; z;6i|Y|6v`6a1wu)>>=NB6{?F)1dJW+ycPD;9I)KKt?Bn^*J_7Ot^=|`WyVhE;*Q_} zWYin{xPDp+#hDs+V*Yr7pH_;K^k5(1B%ZWLA=V}Md~?H{0+q-e^ApPBd)u2>4{@?kCs~m;EazQ{n|I1~hRX-I1 zod~GszY`OcqYzjw2+-$0j9!J%tMEHu{r_=o^5XW~jJ3D0Wf+Sa?6bD?$-)`mWthBX z>U9|=E$-Y)F}8x916K?y2Ael1FYK#3YicY_m|t0NwBooi z*uI+`BEe!3`T$}r@bye4mne+|>K?{8X#B+3rP#2*cmY%tUaxi`{#<)291lKBjMY{! zKVH>d>56!Xo_sK>a-CZ4DfYxg^psLLgbE-I5hd@5M7O7jk#z|mkMVdqof@0U=LH|B z43GN@B9RnCbr(3^<-gry&`ZRPTiX*%s2zbq<@4F>bRsV_D>6SYUh+jp7D`m_DwNe> zuR=kc|8a3&cd9joz$Jx%+W)(xhC>OX5V)uasOSHp!mS!p2wYMKsOSHZ8V)6lLg1nz zpq~GW3b$%ZA#h0{K=uD2^cjRcgR2nV>wTA$a6hOp#>)1+Oy$Z>7UH^Imj*PM$V_L8 zC82Va%kU;&m8(or5Y=5OSDAt;re!@Y-CT$pdV5?8dP}uE3+U*?D|mKE{1-n4?O^DKma{dGX2ieJi5#`?{JIc9W7D8FnMV_n7yz zw@0FbgQPuSp~(Us6{O%t>^C^%xQzB>ItquM_24;J8O~SBC+78n*oCkSF|+Q|(^>Q; z_a2jDz&8m2*O;_x!QrRqSm;qJPJXJn)v?ZEE4u(8#%R!^wc-Fw+r*DD0FKsSmk^Uo zZ z!U0=}@x;+)7_B-z!Ge+jyt0@KDmh+RVZK_No`&dBy5*N#pkb?gVHiv0lId)+0nB0C ztsrRKM?5{69Z!#C6NwWvpxXqz3iakvHPX<5O!l5SM0OaQ;Niv~UK$O5SfFXG+MPpc zG@nb1B~tg)d^uPl1efBF8;4tFELpWW%HB0gRmtQt>0EAn4#JID9krvhEz#lBXd*M7 z%IC%_R!vuYweD>uN5>P{>{y!4|JR}qA^7)Y^nH9Iz5`F-BjEY_Mu`0RVf+RB_k@s} zNdjyGo+3|^*ORxA-yokNf3Lkv8`SRAj%o|q4@2a@4{Lv>eWUvme}PIZAL(7(EmQtn z(k*fHm#mn(Om-Ci)r}!MNOsc~huE`4e|>WZ4->CrFZvsn%{kfBU$s2eJG_h0-&$_z zeqPGx|FR;%N!rLoU$eM%xKE?6TUGY@^b&o875VfK{oQpTyoT(vdPjqhqQAGgyN|Q6 zz8mNtSe}r^qWee7asDA%(H++mebe%de~5GN6#f${V70zJ4 z((Pe3cqW`RX8Mg+AnJKJu7y?A&I3^_Mfaw;^>rp-wNMwSTJN?EsU&Y z4olp40cHgfD_%gX(SMlov0`Cj%^K;4ISZB-qVxZo&|#!~T>A;_8SP;$Nxn~h7vg+0 z$Ubr>{!fSj^rLtR---SO{Wf|X5ccwyFOiBjvY7rvADyL1+A6Ww? zAMP+q>^)*fJ$;C`=6=0o4VYKB!z_90aS`10HX1Owkisl^D^a=JHP#w1x!@5VI0)8@ zbRUSQob$Fhv-`YXlIC!UCPXg%bu$2i!3;03my3u-8G|&Py0D z58zdJv#u(WXOnN)O_z;}mL6oWE9fTGJDta(Fw$IGI|jX7eLEEh3fxGa@5-SOiJDfuTfYG+fU z1HI+T0^i3GXIuL*?g;2hdv47!GYDTsYaItY*ox*r!IryoK_Qc_7>4l^?FZn#8YIT` zGA5Ri%ytRn4O*FaJMWykSMCZfIjtgkgHeSn-I$M`YVTxiuIX%ZJdw&}ayi}A=KWpT z6cqy6bT+1~rd#a?S<}(Zrqg4oObNCnT}|)k(zK}H-?U_Fp#1-&SDE^$5Lj*qDE;4Z z8*$ZNg@A*Adj1_O)Gvj=azj8p|I2N}Reu!%4g%`=cd$^u6avc)0jmFBfwm&}_nY_t z{wMMVZR8vt)-~oueEf0LB+wxZ+9fRGbdub z@mAcs2VO<7yA(g@D~y}SX5o^`P2BQJ%Y06)= zJ-x^#SoA0x-;yx)wI7N^CnktFWbJi%9gHmZphBZo(Su9yJ}w`3*bJuZaqEkEp*fK# z({86jX7f%r7;Lx1R5t4zC86~H=kT&qqzZv64FNU(ztToj^+zGlI|AzY?;R^esSvo* z5Kzzml{TWPKMH}~5unfiBtC#Z_jd$8iDz&X&*NwD8T=ajX8czCGx-0*zleVg{}#jo z`91uH_)j1%&|l+k;D5&7CYZd8Tnn*5R+DvPn50Oa+(UMdz2q=?oRlD1$O&?ayg(Kq zX2@H}Pm=#m-bH?e{5tsn`9I`i5JBWm$zPDaCI3MFjeJiFX|K?3&{krk?H9CP)!wUpNc*VvN$s=R7qq|9zOMa~ zc8Q!_xzZzRZ%ppvf-u6_)%Z zOa6)`yU|~>AN>nU{*@*FMw0{R-&yh>Ecq5q4x(?f-h@3G`RS@M0F9L9(xm?eZJ z4`YobA(n(`@(5nRk_by)Mw3VJRV;ZqOI|^fBlv2TT*H!A(&RCGElaLr$@Mfjif>@a zjV!r|CXeHlEV-E_QJNgXx3FXtOKzpf6S$8hx3Oe3O$zvSmaJh(j3!UwewM6d$pB4? zcpXayS+brclX!?F8(0#jNeSPKF{WAY}y#|%K+0G&6x(*O1HzEd;` zfh!XMHUGad$5r)8AigddN{U7yaAhK(zW-O|xT;<$1bRV0egAtwNzo_-u1o~z z_dkT*gV1~M?~;?+=F6j(<~8kyA!1&H>TA2`=q2SS)qpk&QU=x6bG7JF>S3fO#7BA--OYHZ z4mkTx4(1c>Bj?nK>B;F*B0n9l9bxfhop|gVJ0TeN-U-@{6?Ra4|1Xa>o{~}_a3K&- z&;Nx$Rq<2^TpkFh=l}8;Cncpq;6fmvp8pGhs^X~-xI7S``acad5NhDVBy}-lHVW;> zBGKcZx(j#F{Ya`Vsu*b&l6oSUDUDD2Yk<7u_-HRG6mKoNk#33QOONesT8H;Kzwi@W zHXh{4De2LyRp_TW3|7H}+0i5V$F!nW&W&8Icj7y5tM9{j{S^rJJoQLN7B zg=VYRfI26O4LCx#u_2Ynj5{&3fTcuLs7+4?odLth^r{?<%byj{bYlc3Xg51$^*LhZ z@b29dj`~!wr9-PUX_e=6yW=YU*Ts0{sWub>mnZ_t{^t@M7$ufM;36QP*8dj)WYvU1 z;1WfEe*agXM-lw{2u|T2BN~}IAEK7q$0E^mKQXSdR=~~z(2l3=WZ{B)CF_*f#B8wU;$m=HoY=1|XU!R(Y!_BUll|lcZ)3%LE}xk$N^MOB zw#8}vnxbphc)9�DS3Ga%_5fY+P!l6xfU)_G?G17UMJRVuW_chGF(E7M|sea%F-KiFG?vi__D3 z3D&uV`9`HsFScgAYvkB{+wY$^y!%jWXydF7EBZ;j*cyWMaj8~2Ue*iD9oefG(5uBs z2z0WEi*ih$S;RXNDft`CM4jhT?+I~c>|If$EPVrC(T&4)9 z`Tu1)a7t{2zc;rw~q&tI3D8(s^Kcg|jdoZtIcg=FP;MuTt6-C7s-dd!gi3gS>>@HjT@=
FsGcgL*PGEp+BFu52 z08IqY;A!4XcZlNvY8OYggBU;wK@hAG7XE;CF>b7G&p;q!ka|m3sfCk#0B2lwZ*2yU zd3K}&s9f9A#;W!#6ENFVz)Uuq$z;Z}0X*?jy$LATbjK0)&n@)S{QnAnU8(LV1iB!g z=Ko#5QAG-YD;xp!{9oY%th%QV=z@TH{=0yqiWCA@I0EYVzrqJtbx$GC1p!O{kLD4Y z$3IC9XxDZjJ%2^!+IH3Q136RfRH4@zGZ5aur37VJ_(T`gIV0&&Z7y72I^!XLYJ9FX zRh};UMoWNFOD@@&LON2gtHvD!JXdvmx?PJzA4wBqrc-as`s*mp;kr{F&xmkiX^Y>O$oD>3=9Rh0pf7uP05?CQ{-VmVk{~OUL(mtcTLu+b>w2j)! z$ydm)kwsD>o5=O}6ZkB?3w;y44edjtx0^SFQ5^SgD^_F0si_!DWa_o*QTSP4Klhr~ zhtW~Ij}lDj6}_d$8v0DR*=iJ9aELTin4&pT`dpn}KgMVZG7TkhDE6Ay*$kPFba#e~ zrVGOd%xlBwFy1M;AUEA19_^S+;Fj%v^Oa$A5buyW%Vu_+A|Bx#W#wL$_nX()jCdyl z8SxJKGrGsTI*j(<3DLPgE_}oq;E*m25AEK1^A%x~#Br%pPn=iKs zxzK`;%g8Td=2c-dj0c2Jf{Mz(e-E243!@w!ks7Tv;5LYrTl(B1yj?4YW(=DVo0_*Q zQS-)a>Ope_m2*fmFOgCSY`V2(IE+T{pjU>6<>uF#A)82U`eC`%+e|HthVU9!ix1n4 zjhZBkHsg&_Lv)!DgJnnz78i$kdo+)&Z$?dQSKy7hD)6?Q3L8umMp-t7&}_^_P33S% zmHp3odzC6i3W3WG0X6@>?1oGUtPnVF2+;3;7@bDwG~SE9L@MN4=Z$rDM#lbjBN8ox zru7w_YGO8Tg~^bk;AUA69H~>yZBygpOKZAq;vm*ON@Kf@TkCC$Fg9&R{Pqavoc&+TGuVA`-sVyxNXm`YPXm`gMk7GgK;`3EC@#iE>Lx8fkgGL0K6$3&Mhl=;c`{bePircYjN%QiZ@3jeuJJU(v&>I;RlmiU3{z_n{9U`1dLF zb*$l=@tycyJcVD4e+hpYe~+vu<75w+B+rwdBJU$#)HH2_wq4V;v)V6cpY6)}A{5>f z!b9W{TeC{%YIsF7gh$9DvO?C%kFb1Mn``C2?1m5?AdgZeTpNwAS{cG|@+fB^a$nAJ zIRlaVivAFuAV+9*HgEGP)bZ8pLU;!`!np+yUBiet^8lh(4up|AbcasboxLuZ|V!-EP0&c138kU zD{l|s&E#M_ngfM^vX;;jS_-FjOH=g1ST zQKq{k)*aNhCWN<;C!B7uZ56xxHdgNR!&AO`eF*O&1z+aHDnwtl_RjF_@etlm3PH_C zlxrAeP=gX>jDG(^2p;6m;xCY++V+d^&|ZWlU~zYSBsw!gOde=jUX=L{u>*>0wYL;8 zex}RvZ>h??tOsM$-4G zJuM{9i5wfo^x4}Y(H%R8xzlHbZS5R8PqT|RJj(7D#n~<(dx|D`%IN-l-Kg-1Yr|1Uhoss)9>rHTOk{=X7Ei?q*c@7A8x z?$JWzL*x|Mi2oJ;FFcReqd$Ve3-ouujD=AV@0T1QVY3vBBdGr@^Tnn16)|UDyRfuL z!vS-R&6Jr+P%q`KOqaH(*lpfUy^wbakItnyE@8^C#atamyYQAJI{rjZZ?~AY+4Z~h zG0-9hcbFEdkQz$}rlB zv(hklD)Rft)#5tyrZC#b{F(U>Fvdq+BCa!Uw8>n8xsA5y^M4h(8);jjHRJX(p%VKwoXDiJdx@$V=Y?>kjK|zg}y!{2I=s^7&Ni(Pse28846-sa-F}>G{fZxl-Z1_TxO3OXRZS z2cHJc$Gn`=oU?PcJ3~|{S9KWnrmwhT$y6$vJbD_K&Uu-pI>hw{t3aK9{3OnfB{SJE zHUID7HK#}v0#_&k^!dLP{Z|D4{s4U&uf%D*A2;xi;`c)2pTEZ6B{z^^av#|LpCRuc zpCsSYhQa!OQhPyrr}pU!4asN-A0rDS3F~VV3P-hwrrf8K(Fg6IMv{OMypj3E_=oN_5^@ zI#~sytU&bJDcEQMqPzJti;dE3`J|2$79e^DKbs)Q2s-%M1gSeh_#m04{F}Au)J7)4dMq6W!WQ^wR0_qp+I+RO7FLbLitMKSbh++SNM>mT znCMqq4XMSk49lLY7ptdXLRf7TORYk+I43!7r{oy1vHP~)KXG{Xq1ez6bqc7q^hOnA zuqAa`q}6}~ZZddqngwgdneHfV=%sSKOr6bpZWKb~wmjldQJMufU62~mPu6M<4z|2W ztNZSL>T|_%#VwKzpk2}GXsO0(b`cWzJDoWf&Qwce8TboNc^BYb2vcr(Y0sh0bRcFR zn3vmmz=eI%UD2wkhaBD9gbyN3qbFPyDd@sVF0?R*UFRgLRGv~%&( zT^>c7iaw0=#+q+BFr`y*8zpOW>G}>Hk~tb20q9!#sg_OPxnJO6Z21QBcIY}+M`NSo znRF_jp^ug&nXlgm6uK9NYwdvIP$VtBAs?QuIq9w7G@ckuBxp16jSUJr?hyM*IyRmj zAEzu%&{vqa0VSsv_*T**Nu{@qJKltAy$)bmOM6#eDxlRX)El5nu)6~7%~#8G6q@kL z^Y)LH(r_a3BOys7XS<&i>+Lk9H%rdwCljfRGyZY&!LxIb=+UEu2ak8%Y+n72qrmHt z4FA_IH)$|;de_pn^f`cU@^nzY;k8fSF+q_%4)5L#z;)bkkSDhckWaDql+Re(LKNw! zz^zZ!G{7JL@wnRm@8PYdNE8BBC<65PzYZNh+OKPG)uyxo@^$jl^&# z7n-g4DLUooz6{Oj5Pfwp$$A*0i|1yHFNgUDz{+F4t)IMf{ZtqY4E9SE{ptHlVYGU1 zwNMPmpEi+q*JK#w2Xo?*!@!jgeid9=ibN4m92}OE8&)J%;H)#(&3EO#tdxCb~ zq&-}j$x>RHT?M#32DfoQ;3EkAfB@2-U16CcBLzy~eebAz#-5L_bOehO3v-XsN>nbiPS+(hpGO(PKBvKIv$zpG`*I)YpjwgRYjm*i34$SLEKM(4gTsP2ZoF{z zSR}fCKQZCRIXLahm#=GLv@`|&;U31r#ghspFV6#p!`@z?I#;o>x3yld#AgJZ>IbG( z(5tkEUahQJ|M&KMDk_D*6^Ved|G6TERdq@s&=Ue`{ofNzibx@FMIxZS|5xO&s!k~c zdP0DH|1sKy=)eERzZa8dXCu*MlDy#+o!S&j`{dG|SULEuU9=?@1=Wt!8?_RcuGOd^ zUcGX+-RfA2shOW0HD=Y8$DsDo_j>}8P3}gHZVg!p)2@C=q zQx&&eO?@70V2fbyL2WP`oefphENPJ=jPZQz*MhA%EY3ZeEOs-`v4HQQ_Hzu9>UyII zX3iCAeq>`(Y)o}k8QO#{n@g~ObZN5!4gH|0B@Dzw10DlK_vi?sN|72c36npM6pkTb zr@^7r<>_*x3lq^&9ZaQ)6}tcCw3i(7?KLO}0}Mdv7;|U@k^em+S_K7dhpDLzw2J@x z|M=2V)fEDlGXnJce;pb};Lr0Q`3Ct7IOpR&62c$Ar|?0%0eufn1$jGa0)gjm+)Plv z=e*>*OnvNK#x4OaAtUBSuuXBDf6O+KtlCo@jvyoEs7=rIIKb4w^600nb$Y4{nImD8 zc1}N*iK(XryQXzFn0HdjVaf4Z>=c!R!v=Ta*@%XFy_ii$ z8y6Sb%y<~>!`pqDcH8PqdIWK89c?o=*jzkPdAN9FbaB~Y4u#Q9yj6^)kkP|J7T;Ar zXRZ&UZR}oP(#9m~Aj?{(C`Q%oOqDYS?V4Qvj+$I@DW97EB+YeTm4nklW~rDpXpOYH zwWH=h7?tr+3G*PM9?4$mNiMp-ZI5GKbktmHbLV~Og*)%wQrr)l{b5wXhedyTVND@e ziZ6ZsL+IlOeH_1yyk2{q=P|#$E{%O>pNK?D`-w3hyw&WwbqmR{d?K3}Pq~&R;sJ1x z;pNvG09V6zB&J|>bfX<`Wz1t2Q{?T&* zz^T{k4!vzzU@s?Jo##inzzkky&6csSNgqFPwg|_yXvcawuB8hco|9U-P~sn>&p#nA zBJ!ek|K;_tD`~GF1dPpR%iz?rlNiT3-`pKHaKYDFsDlij>hi|!pthO%ysbNktv9v( zxW|pLvrjSc5B4H{COMWEOXl77MjdV7pExJ+1=C)|x8B2+{m)fsJJQ~)Maf6VgZK~e z!|2b^k3m-NfBTG=Lx_^Yo)9HT5sN2q;^^njmK_7H%jCVrRlsqxm!lkHM|`AxnIzMB zh}2`e%rC-BvNL3kjlCVcifU;JOb;f71#;U_`?Z`I8_%Y)3r57ZWf4>drj$I;5O+bQ z&Wx7lucgb810#6}EC*k|meaXRG7BxQ@NHQ{)#+^6)>5+GG6&~C3H(}4rSoIsi3KC< z+p>tO)7f&XcnW3;attBSS-4{yU*#mD@M}4dN{*$I4;dl2SswA;EF$ao8Z7*AIW zLR-GZ+nb~m???1QihdLz2B-9EE|bVXq%QjXhXsK8QwS&omLURa|9=?{y6Un*fFq#3 z|LRsy2rOR&)bqc5$6obZA)w~}>K;%CEMElF_ka10z3RC_fIj~kz8c}HNk&_{yzwyC zovlWq2M>}nBc0|a{)SX8%M*VR{9+fQ6aOmi-DQ7c63Y&}hiH<)<~EKM|7@*VYfuyZ zV0#}aN@v`7>TE3%ojXd*XyxghW&b<4n%#`gMtE>7 z337LI&baZ|*?J_ZA0%d^v$y`^XN%zKsXs0L=`OwWuVS7jp(;NGeE|MGt4sopPd z1nBqwwxQ^munJ^I4HNu#fo3e%=p-NX6#AhTBy0;F(pX_0qgxbcJFdB4L3pRVdIt1 zM9JHPj4rdift!P#vF5ok{A5pzrPGQ0f^m(X1x~6HOt08Za7!_a(ihz}ndxkKY&4(G zf)!QWxSF=S(%UE50>^tmSc!$1mu;DxxfDDRR%my>Cdc!6FhE~0Ug6tW`5Zml!be0l zWsP-YJGRA+G`=k-lc_{bt^b$z`(O2bc_U!0|Ixb;dKZaZ(kB3!&9f&W(R7-e^@%RP zJ}$1+7R$mv(`E6^NZ8s)_DS(XxTL31G|F{q%IWy6@I!SxpEJkFKem^JT@)V%`8WpK z`x;iC(edlq8Pv3J#F&pMz_IyTXJ ze5Ft|Ix}N;L@eLMjF8t;=niRS5yj6W7I7rHc{4dXZ|$E3z#Wi{f3~N=qJz{`777?u zLHn%%ejxZgt+6#8T_AJ|;^u6w&Nrv%)@t`b?BSm3eVpZcSX#@05U!;x4Lo4^|6YT( zAnn~+T|?jj{3!l9{x#ghIZV)p&1-3)Z0;gyMQWq^WJ^EW&>Qnry6CkZj!p$;esp|%Jey13ZL9%)wszdZFIb=y zFi0oHQ)4OP_Au%joZttPb?pUI$|S~fWBI(XI*j7<04DjAu7k;@Z1Qg7wlG?g zpRms)v--`>XDEP*yj-PW;(XNlz6p;OpHzEu#AtUGvJAyE*q<8V_IipoeKP=8e=EB`L&hGrxUq!-nhjY zjE;VF1qHm8^Xc525v7{8-}iuwRn(X^sYmax_i89KgRjo!(`v1P*(=9LBs`D>M{l*S)uN9`;$(`ak&frb-k7 zS2_Y}{ePv8u)E|BoaNnnV7?tv24Iv-(}ldPT!X$-b*&#r` z|F1;rkoLc|=d}&wW28>DK>Y7Nz)#}=^fB~S^aNU$Gw-&eG(+Gsy`{&vvP_@ip}5N| zzhLLHS6t5AV%Ov`k!=c5lLtVy^I6TLd6z4`vt2BzQDa&=lhrw7ZVsa&i;>LboGVYU zvY1;_7h^i5SuVCs=B8pqhs;ejTiywqK7cLnlTGHwcCVQaqoa7Ai0Et+2k@jFwrTtr zj+x^W?3@(dnyMIM6$mKILwV2e{?dG!&7u#FnK`>6?_fto-XnL#ggHhBDJiX)=sL_Qt@0p+s z;C;|c)0^O+=&B&^!kBhmkOgqP+f0SgE*5#6-?995wX}^fu5Q$M|5=%=h`ifO+6;J? zeHrjhb}~@RvMzzX$bxg>?2_im4OI}vNTSkepSIckeL z->5hn=w2SyH;K9p^+3z_H$8^G_Qr7%)|#D%PT58YbXB^9g{sqcZ`YtQo7-5C`ngd7 zWX{*=j?q*h$mZ4V-f{hO=K*YNEMRNQI>A7;g?7dxcyAhx+S0+w+LB0|#^r@qZ#3W# zIQI!!@(BXa1x7O01p8m_0ddXw$+>dN+rPMRdhwN!=rd(vuCi9~=XMho(pg=fEKQD` zTQ&T1?lu0o)wUaDOa61KOdlI@@2T~_{U%gD6avc+0XqNh!^4Qg$^E2&e+j=Ce+hpC ze}~*iPLns1|3N-XzNlTVt<~<*4r&$c)!Kj4epCCr_7Av@cR{t~^tUE7G)PWOR%)f= z@Cm9;muH%-`KfY^{YGzD7h0Vs3$@1a=}K*(*lfayrE}oFBXYn*uZ~`fg;poK5TV7} zLIZ=?`cgHU;BnLh#~%oVKR-8DY@D8785)Ro6t->+4fMNm>35FR?h6eJxQakxkcl4Y z(};#v(Uz#`7W+R$tY6R@)s>-Dl%115U2DwE-4^N_!L-9rolYm3<(cYyy$M?KlD_Vi zP#>_83R}hM6im9-t_t-H$ptO2RJ6k353USF2QWm*FCDl32gH@y%*IFYu(`|v{f zc)8eUl}iIurn zzu=zq2hq`aiacH1%V&{Zb6jh>X_-3tPdWK~wBU7qV-8`=?rzF63x|nh12mm*c<+?e zwRxEN!z#lyql_Cvi`PY>`?e5ck2P@&>WF;~SP%jJCHG`7h|XrjrhP$V))tTZ7%}tq z#p@x6jZVzxtTBVzL~npodZ}ogP|;PdcrLW~m)&D~E_HhyZ+m0T4vgeoCcr|Z(dxJ( z#CTJcWDC}T!Z?l@FB{Fp8zRvKKxm~knCBw7y#seHmGG~)2mM^?+6}TB;asX(H-`6ur^ALI@h3WS{jK&Ze!(sd|c}zRj3joHh z#TzY84|CZ1obZh}?}l7JHvXUPk3<03dHNnWuHp7}q32^C-@ACzifD0jkhgV!e1&8{ z0e-iM7FR~1`8+wZ${!!9D$_fvTeJ^*|G&!=Nq*gX?ynNYbcJ#vH&5`KH z2syLSg+aMKU9PksB*5Hcu`yFCh->_7{{0r^FL93-W?|7(0T+AEED&ajlNDIS_!PyB zHH%U3X3G;}yEUf}UAED)hSHwZ`4{8=<(?<_Q`t<|jKH7B`u4jghIIXpweKMKr~VWI z3W4Q=KuAN_`u?l)|CZ07tDY(ZWCWD`kBo-;tq@pV2+;Mv`u;DkF;~4+2nYn!_g^5P zQiZ_sLqL81m*1GH9xDU{0_yn}NT^gHu>25E^Z(^H=BmdE0fB&e{sj^$RR}CU1nB%< zLysW%_Z2O4-uiDu7H^3}w~i2F#AW#;jJa%cC1I!}3h;aUt(`=yVok^s)*m2|3Vm~+lANB+-lS4`K;d1T} zY5d@rJvhOsR_)~m!0+WZjc*9Eb8V451HH8C1T>>#4|f6|L(BgEX7m`+KBK)yds=%` zOObDrFOuIRZz4~Ty<~u_z<-H<6~6&LiC3eqqW7cM0C7)$qc4QfNdGW+cfmQ85P?QN zRiutcj$@oC;RVU(!zkH5QrGoHO!&;jsH2)wgO-URTC(A}FdFI~bXD=E&O8f2!uyj> zVQgC0rzXK})5&sviL!}j!f2v@i&J3Niq)+1z?>52m#EAr?tD6ohWq1AajXu$DbA(y zi{=lU4x|45ekarK*XSt=SU8gmtZ3oB>yX7RVIuS|K(z4wHFmDU)6VKU331%}S2gA* z8{iUTyDqZp_&lIIFlad<#<(Y9fP><#tuTrXM7htR?S*JvuWLfz2KuF%j+>&BIn;pQ z)&m3Fm(Uu2r?APh>DUjP2%~{D{gv{}Y%5lpEmx+fvt_M89SLckm33PgpBSAR^%w_&S5Q#m=A_g9&e=7ZmBHST$fBVXT;oT)4L_I=w0&AoFVf8 zcs=5{M;eRRk%eAvGIvmHH%pRq-oOB+-B2q`5amO=<|t=2$)KNc{JIY1R=~MQ z1rVSDkC3XvhfPiJu3JMmO{y+Vyl6Koa`ECtd#o|4QEr`+FuXSw!dpp=^YkIu#|SuQ zAA*Oj58-|yO-%9rn?iVq)HzQs#sQYe`S8qx7Gfu;Y|csoAF_Zs!Rt!}hgkvVAr(Aq z4Rymp%n7@KAF*!0h5$?|d6bn1yrhyNmPkzozF1b_$E=o{f|I?R!be$wVB{1$eq9K! zAuWp!jVptXsr~sOCfM+AwcKr^;hfSgVYr>>LUdj2i47CKcX41v^zg=@z(O5eDI`0x@CVG?;<`vQohI!Y zJ0W9hR#z>)jQwC2*ci!$2hO_*FK^USyyWoXuClTYW(-|mhaGGfE}%JCtjxR20a6*q z93XC7vp5)uZchs{6d#-l)05MsM1Ixu!oKblcZI+ujewf}U(&;)gi{DyPz2QTe?j3@%oPHc zGy-b>?~)!KC7eRwf+9el{}6f{!M|@1Og?x%8#At69EwCIK>M=Masu*EXcTgKGLz5y zl;HO-t?FQvyDK^zO;X&vesM!2x?=}9v&K@SIac02Mkrki@&9ov*SZq-s%E=Dp}N5t zh#n_1Rj};bI}b70ycmx}kL(a<*mv!U?S0ji3jdCK=(-ZyEZH!2rKLzRYZvIvX{tPo zn|CdyttjK|xHYD>kv}&`_g>?VyGPDjPMhFf28D99KJOFm+b#xevG8$9ryQ-L<7Y)3 zjs%751?4zxP3hCc`AUoWZV9iaTGd|(EmYKnAc6q*CSdJWq{@;g{ona~;VE7Ufy)d5 zwf?`%226>o5IBzr(E0x>Pz7lp)!wWPkY6BU_^WUV=rsB!dIw~m*T1ZBC%AwPPB;#x zi9{j^)2woRcd40txW(tAJ3IX-}Usl7VgjEQfR|M$%U&HGVUWflq8#=G7uNY>= z_Qebwo;^ZL&DzJXC(&YIAkF!tX{|Mz_0r;xa{aSA0F;+ZniI?OSZ)%#Z*Od^w}unp z3G~3A^K}HFSC$4iZjLQ(ibS(n(!R!{EO+MX4qqn^|51?A+@Yb0bGM$kGb|XJ@q>kR z(PJp>meBP$W6kzW{Duu~3HM!K3+3DrYXAR=c}=N~CAfOihgzr}>fO?5GgsFz_pmm?Y z2$oyp^e1_MLw2>! zoU+My)0~XA%dT!WORf;+oQAf@ekRRHJDfLf&N9vsq3=P7ZG|qEEq0P-(XPYWcGuw| z$aRLzC*2{yX+TE15j#X954gY9EI`zM7H?XXswGRa)_lSylEr{v_{HjsUa*?K%{&GH z?C~0bx|QjKguK&yoQma+HEyrhMQgVC)1Br~n_M($7j}lGTyH)GQSaqQ<2Gxn$9C0? z<`FxRwdgOi7_!a;Xb3@^AekG@N9`Iy61j%Jz^M^8AF<ka@@zf?X!2qBxZ6%!BrQ&Lv^yMRhI& zyIN-+u*tXpoQ${4uGIHG_+_R_6arT|0(AX<5dSj5zl`65-;Y0n{{a6n{yhFNSONb% z{#X26qLG(F1n^tP8nT{@kPO)jvA}ndhsY!338KR}Ax-i$F~|>*H$rsqpCa!dKTqBb zrw4tI{4V(f`3(7U@|O@V{F~%IAZGXq?HY(1-lwhA;#xw>X?JVewcXl5?J=#W&1yC6 zr1qTF)?Taq7wyNjw`uRxentBY?So*K{D<1-v@dIatNo+)A6NQlEZM&m8YZ)N6H7MJ zq>S%k$rhH}O_QhaR+ikuk_nm|$M>>i8%yq^Nd<3b$^9(ZK@*4%&XS!hd5|Vmyo)8f zS+a*FHN2N4`&jZ2P3m|*OAfH)AWcr-Lo7MWl80&1z>l!xQI;H`NfSTDlA|nnoF*-N zj3rO7q(GB-{3J_?ESaRqNnB#d6ialPEZ}LD%&=sZCZ}+jB~P*BI89FD3QOi#Ql-h$ zxW8US3!vBi5L(LI}qv5ouk+7mZ<)ZWg>3rD&kmfGMAW21&a9D z-b55^mK4$6T{BKBJ{XB^*+NV>+5p^!T^P|7O6LJ!Y+1qc@t3${hbHdby&cSu>=`|5 z&`R~sb&pkSl9sD2eFjd56DR&T@fT;|)Gxi+vbIvaRAAXtDYk-2;}0$FS`jU62@caJ z-K0_LPbC0w{fWOjZs3p3BVB|B_5*fu^ zLMpEG|9)>fm8TF`9tf!Ce|e0v>ZL-!4*~W3`=O%p6avcw0j2+69^P&ye4`{Q7JREbd`?*6rQ(tVw-(GL@NvP@@4V+rR8l&ng%# zt!H&q&T;dh#eI=zK2O^DPPMutk@E{qL=tl1Pj*qM+f-DsJ3lW+oJ^0oU6I)NM};DU zwDddV$aZH6QniB;-HCPNao}|#TGCLK#TM|Ww+hwyxkBFD{%#fPk;q}m%hF=Z-m0U_Uez<<&ONm_$~XvL3O8=I`vDz=<<_Yy*` zX0u$Y%6kn^P_IEpn}vD}3SsM{d%rocUTgp$-AQ{H8R7aIG`c~K&FcGq`MvX$#0r7) zg#i2h>j>%i7s+p)FRmUw=6#EYBhg%rvwG#la;QVxcNtyVI?l-nCQLlT+_P4U& z{!k`U>5D#AYIYnZ&L>pyW{c4n*ACw)oh~ zqDH(x&P1%4pH#v5X}98JH6>u|Vu%1JWkZV&y_9d0JEcwhw;VBdKo^H%iTZxU9n!G5 zX3spqliH!Rg$AHIa8>cYJ+CTtsSsFB2q^vkavE*bSA~EZ0rmX5@laO^f#rmNdj6Nw zXsf;|1l$NH{l6Ozb)^tkP6*KFKZ-{Y9>quT8T?b=0sIC0FXUR1BW3a<;LrQN$)Ava z)~?e=wEbF3dxQ2rwBOUdx||S_`+8?+a2syU*6Q_gb*5Bow3usOL!T+trgZ8=SFBcR ztzwIA4iAL}^Zvx;W~*V*&{{`Ug$7r<=%#8_R=PeknDZ~GRj11{^Nh*lEuq0a7g@P_ zvQ{qXkKP;_jJgVH5I3Xo@U5Z2HJ#a1`bRost{2Nwb|-DQk0nEcdt5C1=^Qkk91aam zxM~1sHb063Y^qSB0YL7tSB9c1aT5fBjr5kj;?_`f1UGB*t=YNq4D0hORIN2mN1~xs zgSc6*6q~c`|0N5V1AU>sVa)f-4jDil;`eC^?ZP~T>EO{cI}snizqsXNz(`e4)7U@4x(ftKSNN<%NKH{+HKytKKREWCZB*zZM-q@NW*CMQ=mDg+7kH zg8m&}4JQKKg&)E5_=oYk@Q3lA;eRDJkd5RZ#QXVguqybnhP72%M%$+y*IuK&OZ$lS z6`3!(F@y(+D>@x6L_>Il%v+Jwq>u#o$y-A>P3C!AGC4{FF0vvX+00cmd3^}?larJi zGuXkUn?iVqoaB6X<`m219C)T~WxB%*;%Q5~jwpqAhUIe(c346@Ysq$s3Sei}tO+bG zuMXinImIRMmOjNwy$pHX<10frPEJ#{ju8j0+!DeY$!X3}DwtyhoS9TmT@}Jf^0b>z z9o8(kc3TMN$kQFXtin1g?BHh=o)`$>?c^CZPhnufkXK2AD@PaJU(R&?sJ^8tLQW<;yhhN zPxpmzmOSs}MweFjncG8nGkM;JqgDJYEB4`P6+dS+`U2$)YezUT7iRybigWdfj-R(6 zdVw?cmcGDBIbUz-tCarV_101s3V~&XfSUg=tKn9iRS38cP~U$S9O^WTeqQ?Lz`DSKpvq51qC0cMU@;)1+fVwL&QB#$34Kh;a(?1}uldu>mFawlkA){wg>8Y`d??TE;O|I@?Vdbr4H_>IG<*h?khK@v{l*vp( z+{Desi=jw#^JdaM-A%#b@Ng+t@Yi}$tWYURHEK8FRcBB=1v3!u7QASwICI{$Z|r2T z0hTF^4Xz+d&Z#}l*+@2}CtMQM8o4BLaRRBqC4d^k7yP>w<2o2Q%+NyzcJ7%ta3r>C z`;qwG7sD%}#mzxy{{*02NCp((?-+NyxPl$=^oaMKl{H+2snXO~Dwz&s^!32|(w9xg zohVb$QTK((TK`{*Qb_xl_EtEDZyot6`Bie7Y{lQgzle))>hJr}EEG$B=`)cq+Dg*m z{MceSRs#QvW_h{{=Q1_*7BVest+JB~nFr3S2%`eoPirw-B>T8kVUrXS##hz>tjORd zOZ=u3RDy`!76;CRZKllpX-THsN~#Of-Dg5!bcE~@{o|xDA%Is*+SxAbcAn9~=rGyY zOUKcxy7zhK8DjHVs=w$}-MhN&3=X4xWZRP6M6c@7!`vAZM%!>+>Ya@fw@-V)-}EeJ zzF^nned(yldm!>T!=(AVeb_RH<_wHzkjm?+v&noejCSD7lAQGUaF6BlTvGYTp|{y4 z^I5wx7uBaS7uH)jV?Gl`6F4hy_Nhtb^;S!oPurbjV#QoFpYxG5X`Z(0_{r&K%}Brh z*P}erKBfH(X#a=dxWP|>*I$EdA_V^yuHt_5RrGUc21wk0!{#a1@zrkWyj|L2E`-re zyj8;Ad4a~n$M9L+DW^!3Y%x#T^?BDEBBwqd1E)yT&zbY~-A3;jhr+2$Wp?sK%?Hg^ z7(Ifm*8v|0hsdrRW8d*-0z1IUA2gdbv*2zBW`Vt7%iJ(zqy7K4 z_a)$Q9M_pu)fkRMi4rA>98na-0cnUDo^v0hC~5?fFvUw02}#u9(O{+lj0s>s%nT3N za@5lx2DVO0a%4O470Z@v$@e8YKD4pp&+(Tpahz;oJGR%cyeXLW-PP~Cdd1ty5wIe_=f4#X{uf7JAtA5?e-!-x?nmf;yh6B$ z{x^%QmzGcT`2#)RxRtW2N{z3uTr3(*MZ;m!9phL0Gfyq4L8NhTs7MVG#cfLu>`xuG z3auTsGX05oI+4g5Y)twC{EK!Z(^#}4n&QPsy$0``#V&dos(S8a;4vF4q!SbU{y-T{ zS6Jgc8a1_$si!NsM7lrHAD+UQ0l#WvY&5H>$#8Ki=5BgYj86RhKN~}f*TE5(n+S0K zpSjsDTq=&hY#_kr|7@Vl>);5?O$7M*e{S{*mx?1W8wl|EKN~3XIyeGz6M-e<8AR|4 z2)`g45Dv^u8M#zW1f=5=1OC7XP*z_yMP+p%l1%qUiv?G!g`4&mzcgKKwN}-P)YXcb z8UT2o6NI^TN7_0u><{#I6X~$MQ|$h|InDB8>IORvL7u?dNp*G(sO^-xrAsv@@$dh+ zHi)=99D&(GfUo~&4{Kf%M_{fYK;Qp9^d*G8gzqB<$ftz&%ryyH$|J=lPN=J{V=Y%* z+KRNVkc{uR*D;$JL!3#(k6fiIs#bV$vVY z-n4&r(6r;&vj|-gns>))(bIyaZL+YkuGKf`MiYrpP^auYxc6}H?oj_kWl`YF zkv8_y8ZEJkZ`oJtMMV6tFZ?t(j`fiGq1MjcC+_nH zZii?9CtCNq77d_j?`uT(e@D1!a$B$4VCF)l@x?!82&#{QV6!-SIu2?T6*smmWO6)k z4I%B^*SdvWppdpeJS62OUhfYKz;L^C3i!6=3&Frj*~vDhCt ze3;0+ZDQOSU;Lj_#kNgc+k5*f$kmE)?5NUYEsV-kgQK*FucFL<0e>Ii?~^Bl{j)SB zcr~+z0H~x#+Eqyx3h8(<6ZVQoLqlN@?D@vBE1Gi}JI9O4PD$rYUXRlpk`fbTRpfi@ z?_GOIJtD7ZI@@UoXmWk=f@|#B z!rJsi4sre8tW8B;5l3LoA;9PVoa+)U5JzCv5a9EF)}ZDUaRlZZ0(}0@xh~-XaRg=! z0Y3j{4QgHyM_|q&K<)n>s0TrCz@<^3hUIz1(LBr?8Y_bNz7cUA7WZQ7gu(iSBnPJN#i|b1pOZAG1F}$>dP!x8e&94|WpO+rb58#r_8m0RF=f;0P>01o--Y0d_iXGDmE2K;o+$QAYGS975O-kvNI83rl z3QLftOFKfm$U~ZJ=gvHt*66NrxMkfe*uB zBAscoC*8L5d0;}8O|^kK^L88OzQ=EW<8rl8<#rntkM{S+6H&8Ij8~(sm~x{u=2L1^ zRo_>v*#8%!dyp_Gq{w%PNS5GF;wl!emCfG!` zq|>QHCfO@Rfq`gckYWNC1_yHeC2`1nm^nQ~JEsN4a1$(=Z70-JZh<_5;{MG+3SF4w>jOX+a6b_bDLdlJb=JRQ4T+6wI{ zS*wjZ+T-A;RqMt%mP|*Zk%Q6};C#E4b4-y^c`W2cPf^LoDq>C<9&Ez9G7M)Dk#J4g z>;h5LB&#urw2oxXQaJ-aCymA&D>3!v$3%pjyB2? z>43dC8q!)g|7fbvmq~}sep@yYa;2yEHp-mF%ptaokb3qQ0boMX>Bb6wpa#KK*0mDX z5m!Xa$BX$`q~A2AY?V1er;wFxH^{TPRxNZ?N}FsKjE+41{y%@8-CS~xz)TU~^M9rY z^70&k^A`a=|IgpPYKLcS-_g^m&Pcjn>1JY11AoX`m#3hu|97Sc^70&k z^A`dB{y%^Fj!VuFm?;8FgdK>W=Mj1y|2_OVr+?~e8ml34)^V3Z#_}c2xk*>!Xg9Q& zR27p(rX6y!mZ@isW^dZRJGgd=#i_#;Xp$VKiv@4Fb?<@ft;d4)f%%F6pa1i$5`j3mO|#IHsp2blLXmQj zL#uY$aA*=4dd#&{i}(9^JMLRGjKBX|A;j}J0`nIEKL6)$-}07m1X>|L_5TF@3ZY+N z_y|}qKhkhxvp=wXJE@ne`Mx3Z*-ZITVF*_FB{*$n%(B`yZj)=8xCR(x)CEA_Z9}(} zIGh2%u56I!Dq_`(%3Rp$Kwv6g%vbYkgD3N2g~9yTb&+s56g+t7Xz*a~{{5lxD;nGU zf!(`FBjju_J!+>kGN4)fEv>fYksF&d-9}5>U#n5kHJM^bLnLTB+ZdxXS|f>@qy`d` zEG7(S*;?Ol3A(8~lC#zkiKZ=;6w1S+Lt+)q^vPG(1_2|nS{fFcB2Vib8YqvIs)NH8 z;q1J{N+o|LR~1hKXPWAG2Y2n>lkMGqG`M~}Fw^2Z={VT=7{Q3#hKQ-*Ht!K5=913Z zhF_&HC>Co&w$|%%^7uas=8?x6$`NoP!0rD|O!ys+z(PTQfB!F(p62c32sjbo?|&yI z{0>K8p&-ED{|lw3c{@1*P6X)tzXKgc=rH~!IVbFQQcUrVEHtk72YPzQS;47j*4!^# zHO=-+(%D4SY$tB1Yknowz|Hl$HeImE3}Dmbv-9Fj`f{@}*UF}qURO#qcK8FwdWh89 zhQE_`c!5dV?sVrNYo_A7qp@tmRY%z>Srrvkdq_$(Zcqh3)`sBPK?ThPf7Mh3*I2eG zxS@g%N#Vv$f8a1+exwc2snw#n*w-?#Jp-gU`-s^>4jr^uPMmbG(^0XSgw*-}4usx; z50a;aBU7C1uQ0i^sd1w}aA-G?4mlCES(}umTL85YkoB$cv=#A!(?+JFS--V$lRuEn zlJU*Xho51o14ExhP)iQkz{GUhcWj|l?TaEATMp-t?)C?^ZYA}d_D_EGYuEH`r`{l&JU{SN0{T5! zsgBhO)!LYt8_ZV*4G&sxjbNcXQWZz4&FED{64eU0DCgp@Haibc5Ou+AGw~; zh3YFC2mOIWg2+egJ*0bQo0_5DBVo^e(rIW{jgEnbvE2a}Kpx2ti$=#;+_52dDBmXz zd1PCaCdMfRx^r-Cq*59f5sPL`4+F^DwVL;LlOCt@UqF9A=nv$WaO*VZz~f>*oEp?pdsW)$XYwPI{Ha2qad zjw*emPjP2LNUAk%@dtM9B=u8vXbmh!^J5lGXr%%k^~3NKqZ#mQ{ zbykkYqLq#!Wx+ww|1CqeBjF1|MaT*($oI&zq(Ty8CBgVR_>=f4T)~^s@6hMaqd?Z~ zPeQufhhkk@PnL>eIanJVD(8zqctiD<2H1P5QZ0{(O17G-W^Rx!^Py1Z`dURC3l5it zL?9ax^Njjw^KD4HDjZUEdQqg}~C0*=8t5>du zT`tv9bqI#q>67^(?XOo!7x~com0jXUp1Euic@! zQE3s3jn$^5gI-!Aa~6zAJ}A_=HD3xck@BelmX`GHDF#iys^Zy$38U+8&LKyIWLjQ#~;5}HxQHn$Xm##$+yUFg=>Ue!fS;$2yYgihgHKr3QhJ6U)w?U67&GkPPIp8tvJWESuG0&wk^T9b_{>vYj)2lUk+h!WKWs@?3c0ht&GURfhI=8-BR6 zgX|<|TxaW`c!W{t%pDYuuI?Zyg3hW{*xtJMv0w+;0l9h&c7k(^K(D|~@VMH935CDD zYSv!Q_z6|O39SMr#gmLetHDX}=CvIpOHjkT3c66if7;bSdVs{U8ind9M&((RLiLtq z9b_Frle9XvjKXhS(Lq9RkMY-Tzm45y47J;Tc3B5mL(m&32W5$d|NM#$(gk-|dG+So z*-chjz4?wn2iZu_n`l|n;t#)*e*bg(|NMKd^A>Rg+ChM?|Jy-{({KdlCjxx_&(D74 zt>Or@gMjM){~SWkks|rLu%ewZeiyQ30M_PB#dBKRi!7#<4|#Qn!~^L6aWHMVe%i%x#T3 zr^`6njPW+9zj2p8aHgBoS1FzkO^Dg&G~k$vM*8B>R3Vw^FC>%6e6dL>lC)a(nvgcB zK(+QYDXZA~^qmQt^gv{rv~jK2|CXRTknmBVEUYG9CXbLS@!#M#<2&%>=-cRV$ePwq zN;&|xr>?Bo+7}LoBe~K@sanbpMZ=NA=5SM5XgYD5vT&7W_?AdC5syT7N;d(=jFn?lg;Xi)Ik4he!s&D@mfkOAfx{6ihlss#Oq`M05O5t5 zolT5w$z))trTO}QT8}qgh$ApB5TNV-rDy{ZzAQ`%$Anjr|3^MfPLQqmm*D$T!`slW z(F>>w1gJ+2_|Os3)14m)s>{Hj@xax+Dir^Z78aANyuybLkSyf{@1`bfyx&|m$jiZr zg6yO`R7-~&8#Li*l(|8^LTBLJ9OP|cO3TZ@8Hi+>v;uk9uXf1b9krM2FbnVWYe8o< z;q7iMJ7n;ZV&yg2-O8(ZV6L>8*HSV#PIZ%%F1lM`1$%qRoieyg?X$w};#-5pb>8Cmj+&S!Gcx#3?KT1LDu61!##dVvMP=}-+CgGg?kLja@n!PDGQpNjCsH>uNEQZnCs(wOWjANk^0ERHj?n z0gSVjm02W}V}99IhkiHlQps2-Iv^2lZ2IdCR3BPxzw95HK#UGI#Gj72F`QGscJ=C8S6B*=a^f) z@kBC{f_gJ9^=jV)bn>we6KAzdhhq86u~E6!8%{(rsXL`K^j_HtGkh`V-(gy{wwC0K zNaAkHW8q9D8aphdfcZUE=F!}6`6S?HidUY4k3QqcLc_|t@r=gPiA09m|EKYc<3%_E z^8^7^|Nj6&58xR7k+6NXnlUwS{+SLTS~ahNR7ndsLARv=mv3$ElJ~F;a z*^1Ld80xClBAax#Z9t*iD0psr(rhPL=#{$B!fqSuzNx77kPyX&QUz@utXJF)`%sQR z0Vc-crv+gh`Zxk}2m!wSpF^F&Md1j{G6LNGH_L$Y>No;(2m$*3zXIKfgii^N z3xmQ9!ZqY2@(uD{G6s9Zmg0ZK@52w^qxd?E&^OT2K-l(AkGxU07lOjo*p~0yG>;yk z8d=@p$L!@poqRUR8(sS(xug}-A516 z>b1Y3@~dAtsBt&?b4U#cX9OL4`7thviNm+D;-S zSj^D|(3_ZCrafn2Ij9$5Vp)qYsZ2#S$ZKeqD&T_z5b2>dRuR>(2aY{$>*Q;6L>X4f z9ys(yCX4ddI(fBD#iU?Vta|0I)$-L42LJ+}v(dpwC<@B2>*ZBG6d@r~^Vx1aG|6gX zf3KIX(kWSeIwh--{oN_A^r4MpomQt#Mr&n%^vGB0bBndnP$uX$RA!53f*1sv0)Q$6 z==}Ey5)ytad`@D%*Ye>eghf!RXf3g05MY8fGC%C%~(PaGbN`yc2?2Rguf33rFf zeGq&lH&i|a8RP*xc%`riturzPO9O+DBfLnizKSeDUCRk6ik0Kl@@Vdq*f&i7_aXB2 zE3sNi%Y!2DkLJ+zzfbrC5`HTD58>~H7vWd_!x7*J%wYsB5>{dMxbR&fbYkNn(Q&D; zPWzKS8ib`n7uF^{eHai*pxuB+09M}rXcI!4a2S`#2J&y-4X>ldz5YNbMC6QOM^ZiH zwKa+LFS5sKC9>wWX%u3sot)M9lQ0>7j7>Ih`nm{F5ozE&W3P^}_XVs!r%J^tMAC%N zc;Wy=7jp}WHz)#V5X#Y$CUkuxzbJ4Bf;K27A4h~tYcq2Z>))gYPPZxg1Ca=+2h0$f z*1D{O=?>ZF3Z;pnO*qvO-aCE(BV|>qP-qZnF(gA$tRcd|JP{%dC~bENYW5b=7&)oP ze%2i8u{KUZH+HI#%Sj6-uo$f~wK1BY@iS~a-fzUFhv|qTSh7kAQrITkCDg!Y;KRaKg&%qIx8z*a zK_U=@lo=#V3M~9?H3sg3cKb5^3pLK|gUm*1wmswbusp`klJ~S41=V6j$M036pxSNl z_W~gP$R@P_j16`UDrVl5cCLZ zs$Sgg4uPL%g!XzIgdbD^dX&nqqOCKQ_ZC&3Ghfbn(`d`6Y|2@^zAEm$7IpH;KP^J-5&$yi$QzQFPrM@!xp>H2>WDkJ#!d;A8N>8}(1+A?Qf z-an+pjS|H0iV$g|mlC-@ABC->>4HSQTKos{pZZve+L@_uB=yt+@bNF;4-g z9vK=x(ya06d@5haz#&!2$s@Wa61ly3-C8lvx^+EusJ^FB@dvuP$oK)XW?n&u)vEkX z?qF521JTWS6i$1HHjkKRd%%z$>}LCel#|Qpq;id`&RS4NSSQA(9oGfAn?9^>EtFYg16bK?k{PYBTUKM{V6gr7sge>egh zfq96)#lmVlCZ4F3#>5JtfArUe;8eGv3g-I1dDz{&NgRPT5#a0pHi6<~9D#X=0Du3_ z!%pQ*;s~^f0Db=x;bJ6AK*E1G0t*;{)5MRm+0`}d43`OqLnJfNOxPnQ8B1uN*I5Yl zIUtURp!bK9*>!uXbJKfptyW|$K8>5!oJdAIYEDMOY3*Bn3N>p**7EQF1w7t)(>Vfs z{m;h$M_}P1z~}$M?R(yGjsVyH^D)2?ShxuA_y5A}d){)60Db>=pv?$v#&!Hl;XqSF z>W3ROe;^hk<2`1NZS%$(=A3Q5MfSS-Z<|RhUh#VL9aH3!rblSk#)iycQB2{1zyn*0 zA!PQQHZg7j7f%IHx3j4iB`gG#KxDRrY& zC8Sgp!b_RG_w$8n=_ClyS1ub~{UJEa<}{oPlOPftb6pfqyWykMs)(Oces!ZEM;Ol5 z5J_&Nc6MsVyHP@jBm+4OBjx<>4mbf6Eyca~MPYS4+c*PF=p}N&b7fgM)jql{(Hr~0h8R*YL2&Ag=5Cs%GpDs=^{}ql=%+}0RF=f;0P>01o-#= z0_=3&WR3tsfb0MHP~ZqGTmGm`;JO`TJY-*OTLL_qR%({}B=5Plw$Q!uOKMu3mqALG z-ix3DXJAqjxZN^cC=U&Z1zTLZ-u?Sw<>z7KIy{N|fzl3A_uGwJ7Ce-|n;?znde}lu z3aysG7IJsyj`gmk3@mf$-xMInvQ}C)iT!~du*4_qjWUoG`@->XCY93fnA{&ok;%_u zO}f$KGzJbib!s|@46A!cx@3~5VyWRTbvjecxkNOai5HWiTP6|P5KCjwS}eZ)pN%IL zuY)5nR}tXf|8uoxxLh28R~`XA|6h5Gc?}$axrzXv|8uoxxLh28R~`YX|MQ_e2>$&N zKSPcS$?4Q7ZJZSRfg@QW9k8ogY~IMZ{{DEnm=+Tz?S_qn^n2B9ka2QvJ;& zF10PO#%yX5ySm+nq@Kw|{y_c^kxK4uu-mcq?$xpI^p|*TixzpZ_Gp-$-adf#O#1zS z+!UHpD5U%QV};f&IX=~vFwRqI$VinQU&8JG(|OkMG8}>Vg8*Ou&!4{JE#U}E6#+i~ zr-~S-=LpOn1o-@)KYhtt!V#D%0(|~Y6){fF5tu&+DE_}#Kv=;4Kt3wmHh)^yc1xt2 zCofR-(&aYw(wZK>wKjKXs@hzQ^%T^(x)iFV;O@x_mDbdkwb>d?$FKA8)UuCEwKW>+ zX|=|~iqJW^7&cq(AX3)eK8ts7uD`Fp5YF_Q<0x4ONZGSB7CN1gqY)M|Y9XLE)K0i| z@*-8pea(f`y4!@kg)13tQ%H?bYa#WjxcxL4Rneo8(`PLTEZyZCur!#Cg#^kp;-*;D!1B5(7d4B6V9 z9|`7*#h~hV7gQoXm&ec(aE}E$VYhb386Vn9cF+PvaY(F+K_z5$ur@kW&Qk^>{iOl) zxSE$!^3*IfXNR2D%NGXoBLg1g)jVhUl$`RRZj#ajcCDOB?Wj2}Cw*uqNth(3pKr#o zkLVl|+VWKwmlJw1Ca}F2lhsmeiyXHAYcE4Zv=r!(V?K0*^q9ocI-{((fSCk+j0vg| z*!|ynBX@_N;?b1omqn7sQ_tWxL zy{NSzIthBz(g6K_RNmr4J4nnXxt@<6H6+$=9*{Tt&@pnrB&we0JQEZ>!lc$|%u0~z znNjh8yh-QB3BL4 zO(BRof4o{A%?*#nH)+4068nZX4VU}qu@pn)Q=86|Yt>qx*sHuJOCtlD_KpN^87mKr ziIvKx?(*;`eVK0BlLz`DTVWrrwd`Bjr;gbp8wIhY0wSIPp z*I5|Knk83Mju4?~wKOc6Pn%F5;>BFw8LG22*r{PX#F2a-^sntO3J8gz9er|Yuv8U? zN|mZJT1cguuhuF#FN%<~b8?A4aMxZUiHah-d3$q_WG0-5r=!iuNY$#;ZceQ;RaM)~ zi4{M61x^jEQ2naOOCaV(50N9R`)gwrF~`=Px~*eO%)@|CS0f&oq-O8@CY;*rd%9k; zcIu&{!GqAT#sL(xk3e3vRcnK814JP)9b^$V4zhr8FjA&x)11tY0gtik5|OBptHl4q z!fz4$<3Ah$j=;h}paZP_n7;q{`5z0X(|Jod0%iob{@;uS|D7YSun=D|@_AzSmau$tjjwEQ&Xnb2Nvn3IUCDX}m(m@~E*p;>EE?N~1 zN7KnNH>`kIUEV&LK=N>vTp>Fv%|A#tnAxFRq0pfg$rU}mO{abvk$tyJ`;TgQy2y$AOm?%f?^=PG#9=PZ0xVyKsJlzWs2q3yR>)CTC2&o31NG-eouR^YOhy-G;Fmolc|=qO1I-i z6A8nP3z_2S>R6sS5#()V{*bhF@-j7eV6S4tw=5qm?;hRO?oC4Ow;J!gDRpLQ-+2?d z813(zymV1uxQ8G`;L3?1@L-^WPaTZfS$Xa@{9HtR!+BZpPu4G(TuR3Ukyk3?!do)$ z9CDv^V0cru=?K7H&M&(YNU>B=+(UATVxeLm8$LXYPU2V7$HVpbC_aW?g9~^NpTcAK z^;p6a_(A*_elva>ekXn!zaM`He*%9Nzlgtr{}z7(e-nQX{|Nsd{8Rj&_;+xA&;{fY zas|1H1j)5z6N!>Exq<8=H?z^A@3khlMj%OkWZ1% zk-s8eC4Wc$iF})UpZu8oJNX%TiTpw65Ectdg%!fp!dl@vVT%wKwh1>1dxZVMt->9` zYlNckT47W;DZE~&g9h^v;Ys0b!n=g`3C{~36J8L$AbeT)n(%eupM~!TKM;N*{D<%h z;Wzl8+F-9|;xzAvCIg^LdEMkPD8JYT$wkz-vh)&2meXhI)mK77@1s|BK@#kQBzher znFu5|W+1uwMo4bi1bd%BA$`7n8qyEe?}zlW^0knDUS1FBU&&OCzm{nP z*ssXjApHmVR!IL@z7x{#%Q;AYAQvG0i97)5zsvNrsGrMJs+Z(5;75wa38WW}Lu>J+ zT!??uNa3~aK|{vjMt2V%(!zr4QXWjdPo!FSxC2!?}oH{{ANh^j^6_5 z;qhKbZy!Gf>D}XZLwfIc5z>M2K}d(kPe58ZyA;w>XQ3@vJ_~KflV_pr__4FlcKq;J zN_p-qv>lJ11t9TT&yGU+_Olg8-!*|DeR@KG^w|mMEd1QW<&b`Gg3ABtiB3qrI6*mo zc_Ies*Cw_@`nMA|K>Cjp`yu_-1eNn&Cjcef)Uf%osTu%GA!;YH!A z@b3Ml@O^mm{#1Br0m93hY(u~=5Q4_>BkcO9ay^S5W7l)+`nYnPz)!I2lkECt<=Vi1 z%C1kb>syrTBz`NqzKvb~Ou4=h|2ez9on7CdT;GJ>$*%8W*LN$|2k~F9>wDPsY32G5 zelNSek6oWpt`Fm9+4cSG`T^zo2!4)TpJ&$(D%VHxhuHPQ?D`Sq`WXHwyMByaKdxNQ z;ZLyZC)xE=%Jp&lX?A^qT|c8-pTM7G*S}=f&ned@@#op~3+(zu{{FWOQ2r-JU;!cU F{{fn%fjs~K diff --git a/conf/locale/ru/LC_MESSAGES/django.po b/conf/locale/ru/LC_MESSAGES/django.po index 0568bc319085..89d1e7883c17 100644 --- a/conf/locale/ru/LC_MESSAGES/django.po +++ b/conf/locale/ru/LC_MESSAGES/django.po @@ -19663,8 +19663,8 @@ msgstr "" #: wiki/views/article.py #, python-format -msgid "The article %s is now set to display revision #%d" -msgstr "Отображается версия #%d статьи %s " +msgid "The article %(title)s is now set to display revision #%(revision_number)d" +msgstr "Отображается версия #%(revision_number)d статьи %(title)s " #: wiki/views/article.py msgid "New title" diff --git a/docs/en_us/enrollment_api/source/conf.py b/docs/en_us/enrollment_api/source/conf.py index b70c7549de55..62367fc2bcf2 100644 --- a/docs/en_us/enrollment_api/source/conf.py +++ b/docs/en_us/enrollment_api/source/conf.py @@ -30,10 +30,6 @@ 'Location', 'opaque_keys.edx.locator', 'Locator', - 'south', - 'modelsinspector', - 'south.modelsinspector', - 'add_introspection_rules' ] for mod_name in MOCK_MODULES: diff --git a/docs/en_us/platform_api/source/conf.py b/docs/en_us/platform_api/source/conf.py index 4bcb92d0964f..73e37cd84340 100644 --- a/docs/en_us/platform_api/source/conf.py +++ b/docs/en_us/platform_api/source/conf.py @@ -58,10 +58,6 @@ 'opaque_keys.edx.locations', 'SlashSeparatedCourseKey', 'Locator', - 'south', - 'modelsinspector', - 'south.modelsinspector', - 'add_introspection_rules', 'courseware', 'access', 'courseware.access', diff --git a/docs/shared/requirements.txt b/docs/shared/requirements.txt index 0e0b949de2af..de66975c0a33 100644 --- a/docs/shared/requirements.txt +++ b/docs/shared/requirements.txt @@ -50,7 +50,6 @@ PyYAML==3.10 requests==2.3.0 Shapely==1.2.16 sorl-thumbnail==12.3 -South==1.0.1 sympy==0.7.1 xmltodict==0.4.1 diff --git a/lms/djangoapps/branding/migrations/0001_initial.py b/lms/djangoapps/branding/migrations/0001_initial.py index 44d24c69ed52..7b2b9d83628a 100644 --- a/lms/djangoapps/branding/migrations/0001_initial.py +++ b/lms/djangoapps/branding/migrations/0001_initial.py @@ -1,74 +1,43 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'BrandingInfoConfig' - db.create_table('branding_brandinginfoconfig', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('configuration', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('branding', ['BrandingInfoConfig']) - - - def backwards(self, orm): - # Deleting model 'BrandingInfoConfig' - db.delete_table('branding_brandinginfoconfig') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'branding.brandinginfoconfig': { - 'Meta': {'object_name': 'BrandingInfoConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'configuration': ('django.db.models.fields.TextField', [], {}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['branding'] +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='BrandingApiConfig', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + migrations.CreateModel( + name='BrandingInfoConfig', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('configuration', models.TextField(help_text=b'JSON data of Configuration for Video Branding.')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + ] diff --git a/lms/djangoapps/branding/migrations/0002_auto__add_brandingapiconfig.py b/lms/djangoapps/branding/migrations/0002_auto__add_brandingapiconfig.py deleted file mode 100644 index ffa45652a635..000000000000 --- a/lms/djangoapps/branding/migrations/0002_auto__add_brandingapiconfig.py +++ /dev/null @@ -1,80 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'BrandingApiConfig' - db.create_table('branding_brandingapiconfig', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('branding', ['BrandingApiConfig']) - - - def backwards(self, orm): - # Deleting model 'BrandingApiConfig' - db.delete_table('branding_brandingapiconfig') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'branding.brandingapiconfig': { - 'Meta': {'object_name': 'BrandingApiConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'branding.brandinginfoconfig': { - 'Meta': {'object_name': 'BrandingInfoConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'configuration': ('django.db.models.fields.TextField', [], {}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['branding'] diff --git a/lms/djangoapps/branding/models.py b/lms/djangoapps/branding/models.py index 67a51d4f2695..1dbed47baeea 100644 --- a/lms/djangoapps/branding/models.py +++ b/lms/djangoapps/branding/models.py @@ -24,6 +24,9 @@ class BrandingInfoConfig(ConfigurationModel): } } """ + class Meta(ConfigurationModel.Meta): + app_label = "branding" + configuration = TextField( help_text="JSON data of Configuration for Video Branding." ) @@ -54,4 +57,5 @@ class BrandingApiConfig(ConfigurationModel): When the flag is enabled, the api will returns the valid reponse. """ - pass + class Meta(ConfigurationModel.Meta): + app_label = "branding" diff --git a/lms/djangoapps/bulk_email/forms.py b/lms/djangoapps/bulk_email/forms.py index b86443245790..6fdec1459fa5 100644 --- a/lms/djangoapps/bulk_email/forms.py +++ b/lms/djangoapps/bulk_email/forms.py @@ -78,6 +78,7 @@ class CourseAuthorizationAdminForm(forms.ModelForm): class Meta(object): model = CourseAuthorization + fields = '__all__' def clean_course_id(self): """Validate the course id""" diff --git a/lms/djangoapps/bulk_email/migrations/0001_initial.py b/lms/djangoapps/bulk_email/migrations/0001_initial.py index c3672a6de859..479a1b3a97b9 100644 --- a/lms/djangoapps/bulk_email/migrations/0001_initial.py +++ b/lms/djangoapps/bulk_email/migrations/0001_initial.py @@ -1,101 +1,62 @@ # -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseEmail' - db.create_table('bulk_email_courseemail', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('sender', self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['auth.User'], null=True, blank=True)), - ('hash', self.gf('django.db.models.fields.CharField')(max_length=128, db_index=True)), - ('subject', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), - ('html_message', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('to', self.gf('django.db.models.fields.CharField')(default='myself', max_length=64)), - )) - db.send_create_signal('bulk_email', ['CourseEmail']) - - # Adding model 'Optout' - db.create_table('bulk_email_optout', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('email', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - )) - db.send_create_signal('bulk_email', ['Optout']) - - # Adding unique constraint on 'Optout', fields ['email', 'course_id'] - db.create_unique('bulk_email_optout', ['email', 'course_id']) - - def backwards(self, orm): - # Removing unique constraint on 'Optout', fields ['email', 'course_id'] - db.delete_unique('bulk_email_optout', ['email', 'course_id']) - - # Deleting model 'CourseEmail' - db.delete_table('bulk_email_courseemail') - - # Deleting model 'Optout' - db.delete_table('bulk_email_optout') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'bulk_email.courseemail': { - 'Meta': {'object_name': 'CourseEmail'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'hash': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'html_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'sender': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'subject': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'to': ('django.db.models.fields.CharField', [], {'default': "'myself'", 'max_length': '64'}) - }, - 'bulk_email.optout': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'Optout'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['bulk_email'] +from __future__ import unicode_literals + +from django.db import migrations, models +from django.conf import settings +import xmodule_django.models + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='CourseAuthorization', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(unique=True, max_length=255, db_index=True)), + ('email_enabled', models.BooleanField(default=False)), + ], + ), + migrations.CreateModel( + name='CourseEmail', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('slug', models.CharField(max_length=128, db_index=True)), + ('subject', models.CharField(max_length=128, blank=True)), + ('html_message', models.TextField(null=True, blank=True)), + ('text_message', models.TextField(null=True, blank=True)), + ('created', models.DateTimeField(auto_now_add=True)), + ('modified', models.DateTimeField(auto_now=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('to_option', models.CharField(default=b'myself', max_length=64, choices=[(b'myself', b'Myself'), (b'staff', b'Staff and instructors'), (b'all', b'All')])), + ('template_name', models.CharField(max_length=255, null=True)), + ('from_addr', models.CharField(max_length=255, null=True)), + ('sender', models.ForeignKey(default=1, blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ], + ), + migrations.CreateModel( + name='CourseEmailTemplate', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('html_template', models.TextField(null=True, blank=True)), + ('plain_template', models.TextField(null=True, blank=True)), + ('name', models.CharField(max_length=255, unique=True, null=True, blank=True)), + ], + ), + migrations.CreateModel( + name='Optout', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True)), + ], + ), + migrations.AlterUniqueTogether( + name='optout', + unique_together=set([('user', 'course_id')]), + ), + ] diff --git a/lms/djangoapps/bulk_email/migrations/0002_change_field_names.py b/lms/djangoapps/bulk_email/migrations/0002_change_field_names.py deleted file mode 100644 index 93fa33a54401..000000000000 --- a/lms/djangoapps/bulk_email/migrations/0002_change_field_names.py +++ /dev/null @@ -1,88 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Renaming field 'CourseEmail.to' - db.rename_column('bulk_email_courseemail', 'to', 'to_option') - - # Renaming field 'CourseEmail.hash' - db.rename_column('bulk_email_courseemail', 'hash', 'slug') - - # Adding field 'CourseEmail.text_message' - db.add_column('bulk_email_courseemail', 'text_message', - self.gf('django.db.models.fields.TextField')(null=True, blank=True), - keep_default=False) - - def backwards(self, orm): - # Renaming field 'CourseEmail.to_option' - db.rename_column('bulk_email_courseemail', 'to_option', 'to') - - # Renaming field 'CourseEmail.slug' - db.rename_column('bulk_email_courseemail', 'slug', 'hash') - - # Deleting field 'CourseEmail.text_message' - db.delete_column('bulk_email_courseemail', 'text_message') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'bulk_email.courseemail': { - 'Meta': {'object_name': 'CourseEmail'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'html_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'sender': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'subject': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'text_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'to_option': ('django.db.models.fields.CharField', [], {'default': "'myself'", 'max_length': '64'}) - }, - 'bulk_email.optout': { - 'Meta': {'unique_together': "(('email', 'course_id'),)", 'object_name': 'Optout'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['bulk_email'] diff --git a/lms/djangoapps/bulk_email/migrations/0002_data__load_course_email_template.py b/lms/djangoapps/bulk_email/migrations/0002_data__load_course_email_template.py new file mode 100644 index 000000000000..fe5a40232d64 --- /dev/null +++ b/lms/djangoapps/bulk_email/migrations/0002_data__load_course_email_template.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.core.management import call_command +from django.db import migrations, models + +def forwards(apps, schema_editor): + """Load data from the fixture""" + CourseEmailTemplate = apps.get_model("bulk_email", "CourseEmailTemplate") + if not CourseEmailTemplate.objects.exists(): + call_command("loaddata", "course_email_template.json") + +def backwards(apps, schema_editor): + CourseEmailTemplate = apps.get_model("bulk_email", "CourseEmailTemplate") + CourseEmailTemplate.objects.all().delete() + +class Migration(migrations.Migration): + + dependencies = [ + ('bulk_email', '0001_initial'), + ] + + operations = [ + migrations.RunPython(forwards, backwards), + ] diff --git a/lms/djangoapps/bulk_email/migrations/0003_add_optout_user.py b/lms/djangoapps/bulk_email/migrations/0003_add_optout_user.py deleted file mode 100644 index 1bf344f6e930..000000000000 --- a/lms/djangoapps/bulk_email/migrations/0003_add_optout_user.py +++ /dev/null @@ -1,91 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'Optout.user' - db.add_column('bulk_email_optout', 'user', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True), - keep_default=False) - - # Removing unique constraint on 'Optout', fields ['course_id', 'email'] - db.delete_unique('bulk_email_optout', ['course_id', 'email']) - - # Adding unique constraint on 'Optout', fields ['course_id', 'user'] - db.create_unique('bulk_email_optout', ['course_id', 'user_id']) - - def backwards(self, orm): - - # Removing unique constraint on 'Optout', fields ['course_id', 'user'] - db.delete_unique('bulk_email_optout', ['course_id', 'user_id']) - - # Deleting field 'Optout.email' - db.delete_column('bulk_email_optout', 'user_id') - - # Creating unique constraint on 'Optout', fields ['course_id', 'email'] - db.create_unique('bulk_email_optout', ['course_id', 'email']) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'bulk_email.courseemail': { - 'Meta': {'object_name': 'CourseEmail'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'html_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'sender': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'subject': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'text_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'to_option': ('django.db.models.fields.CharField', [], {'default': "'myself'", 'max_length': '64'}) - }, - 'bulk_email.optout': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'Optout'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['bulk_email'] diff --git a/lms/djangoapps/bulk_email/migrations/0004_migrate_optout_user.py b/lms/djangoapps/bulk_email/migrations/0004_migrate_optout_user.py deleted file mode 100644 index 6dd2129466db..000000000000 --- a/lms/djangoapps/bulk_email/migrations/0004_migrate_optout_user.py +++ /dev/null @@ -1,91 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import DataMigration -from django.core.exceptions import ObjectDoesNotExist - - -class Migration(DataMigration): - - def forwards(self, orm): - - # forwards data migration to copy over existing emails to associated ids - if not db.dry_run: - for optout in orm.Optout.objects.all(): - try: - user = orm['auth.User'].objects.get(email=optout.email) - optout.user = user - optout.save() - except ObjectDoesNotExist: - # if user is not found (because they have already changed their email) - # then delete the optout, as it's no longer useful. - optout.delete() - - def backwards(self, orm): - - # backwards data migration to copy over emails of students to old email slot - if not db.dry_run: - for optout in orm.Optout.objects.all(): - if optout.user is not None: - optout.email = optout.user.email - optout.save() - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'bulk_email.courseemail': { - 'Meta': {'object_name': 'CourseEmail'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'html_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'sender': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'subject': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'text_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'to_option': ('django.db.models.fields.CharField', [], {'default': "'myself'", 'max_length': '64'}) - }, - 'bulk_email.optout': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'Optout'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['bulk_email'] diff --git a/lms/djangoapps/bulk_email/migrations/0005_remove_optout_email.py b/lms/djangoapps/bulk_email/migrations/0005_remove_optout_email.py deleted file mode 100644 index 3639d1e473a3..000000000000 --- a/lms/djangoapps/bulk_email/migrations/0005_remove_optout_email.py +++ /dev/null @@ -1,78 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Deleting field 'Optout.email' - db.delete_column('bulk_email_optout', 'email') - - def backwards(self, orm): - - # Adding field 'Optout.email' - db.add_column('bulk_email_optout', 'email', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), - keep_default=False) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'bulk_email.courseemail': { - 'Meta': {'object_name': 'CourseEmail'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'html_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'sender': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'subject': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'text_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'to_option': ('django.db.models.fields.CharField', [], {'default': "'myself'", 'max_length': '64'}) - }, - 'bulk_email.optout': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'Optout'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['bulk_email'] diff --git a/lms/djangoapps/bulk_email/migrations/0006_add_course_email_template.py b/lms/djangoapps/bulk_email/migrations/0006_add_course_email_template.py deleted file mode 100644 index 69ec3fe3b3ec..000000000000 --- a/lms/djangoapps/bulk_email/migrations/0006_add_course_email_template.py +++ /dev/null @@ -1,87 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseEmailTemplate' - db.create_table('bulk_email_courseemailtemplate', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('html_template', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('plain_template', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - )) - db.send_create_signal('bulk_email', ['CourseEmailTemplate']) - - def backwards(self, orm): - # Deleting model 'CourseEmailTemplate' - db.delete_table('bulk_email_courseemailtemplate') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'bulk_email.courseemail': { - 'Meta': {'object_name': 'CourseEmail'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'html_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'sender': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'subject': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'text_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'to_option': ('django.db.models.fields.CharField', [], {'default': "'myself'", 'max_length': '64'}) - }, - 'bulk_email.courseemailtemplate': { - 'Meta': {'object_name': 'CourseEmailTemplate'}, - 'html_template': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'plain_template': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - }, - 'bulk_email.optout': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'Optout'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['bulk_email'] diff --git a/lms/djangoapps/bulk_email/migrations/0007_load_course_email_template.py b/lms/djangoapps/bulk_email/migrations/0007_load_course_email_template.py deleted file mode 100644 index 7ccaaf07f9bd..000000000000 --- a/lms/djangoapps/bulk_email/migrations/0007_load_course_email_template.py +++ /dev/null @@ -1,81 +0,0 @@ -# -*- coding: utf-8 -*- -from south.v2 import DataMigration - - -class Migration(DataMigration): - - def forwards(self, orm): - "Load data from fixture." - from django.core.management import call_command - call_command("loaddata", "course_email_template.json") - - def backwards(self, orm): - "Perform a no-op to go backwards." - pass - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'bulk_email.courseemail': { - 'Meta': {'object_name': 'CourseEmail'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'html_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'sender': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'subject': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'text_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'to_option': ('django.db.models.fields.CharField', [], {'default': "'myself'", 'max_length': '64'}) - }, - 'bulk_email.courseemailtemplate': { - 'Meta': {'object_name': 'CourseEmailTemplate'}, - 'html_template': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'plain_template': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - }, - 'bulk_email.optout': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'Optout'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['bulk_email'] - symmetrical = True diff --git a/lms/djangoapps/bulk_email/migrations/0008_add_course_authorizations.py b/lms/djangoapps/bulk_email/migrations/0008_add_course_authorizations.py deleted file mode 100644 index a24e48d6e5b5..000000000000 --- a/lms/djangoapps/bulk_email/migrations/0008_add_course_authorizations.py +++ /dev/null @@ -1,95 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseAuthorization' - db.create_table('bulk_email_courseauthorization', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('email_enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('bulk_email', ['CourseAuthorization']) - - - def backwards(self, orm): - # Deleting model 'CourseAuthorization' - db.delete_table('bulk_email_courseauthorization') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'bulk_email.courseauthorization': { - 'Meta': {'object_name': 'CourseAuthorization'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'email_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'bulk_email.courseemail': { - 'Meta': {'object_name': 'CourseEmail'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'html_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'sender': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'subject': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'text_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'to_option': ('django.db.models.fields.CharField', [], {'default': "'myself'", 'max_length': '64'}) - }, - 'bulk_email.courseemailtemplate': { - 'Meta': {'object_name': 'CourseEmailTemplate'}, - 'html_template': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'plain_template': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - }, - 'bulk_email.optout': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'Optout'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['bulk_email'] diff --git a/lms/djangoapps/bulk_email/migrations/0009_force_unique_course_ids.py b/lms/djangoapps/bulk_email/migrations/0009_force_unique_course_ids.py deleted file mode 100644 index d4a329b7277f..000000000000 --- a/lms/djangoapps/bulk_email/migrations/0009_force_unique_course_ids.py +++ /dev/null @@ -1,90 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding unique constraint on 'CourseAuthorization', fields ['course_id'] - db.create_unique('bulk_email_courseauthorization', ['course_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'CourseAuthorization', fields ['course_id'] - db.delete_unique('bulk_email_courseauthorization', ['course_id']) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'bulk_email.courseauthorization': { - 'Meta': {'object_name': 'CourseAuthorization'}, - 'course_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'email_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'bulk_email.courseemail': { - 'Meta': {'object_name': 'CourseEmail'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'html_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'sender': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'subject': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'text_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'to_option': ('django.db.models.fields.CharField', [], {'default': "'myself'", 'max_length': '64'}) - }, - 'bulk_email.courseemailtemplate': { - 'Meta': {'object_name': 'CourseEmailTemplate'}, - 'html_template': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'plain_template': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - }, - 'bulk_email.optout': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'Optout'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['bulk_email'] diff --git a/lms/djangoapps/bulk_email/migrations/0010_auto__chg_field_optout_course_id__add_field_courseemail_template_name_.py b/lms/djangoapps/bulk_email/migrations/0010_auto__chg_field_optout_course_id__add_field_courseemail_template_name_.py deleted file mode 100644 index 3e55dfb22670..000000000000 --- a/lms/djangoapps/bulk_email/migrations/0010_auto__chg_field_optout_course_id__add_field_courseemail_template_name_.py +++ /dev/null @@ -1,125 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'Optout.course_id' - db.alter_column('bulk_email_optout', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)) - # Adding field 'CourseEmail.template_name' - db.add_column('bulk_email_courseemail', 'template_name', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True), - keep_default=False) - - # Adding field 'CourseEmail.from_addr' - db.add_column('bulk_email_courseemail', 'from_addr', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True), - keep_default=False) - - # Changing field 'CourseEmail.course_id' - db.alter_column('bulk_email_courseemail', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)) - # Adding field 'CourseEmailTemplate.name' - db.add_column('bulk_email_courseemailtemplate', 'name', - self.gf('django.db.models.fields.CharField')(max_length=255, unique=True, null=True), - keep_default=False) - - # Changing field 'CourseAuthorization.course_id' - db.alter_column('bulk_email_courseauthorization', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(unique=True, max_length=255)) - - def backwards(self, orm): - - # Changing field 'Optout.course_id' - db.alter_column('bulk_email_optout', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255)) - # Deleting field 'CourseEmail.template_name' - db.delete_column('bulk_email_courseemail', 'template_name') - - # Deleting field 'CourseEmail.from_addr' - db.delete_column('bulk_email_courseemail', 'from_addr') - - # Changing field 'CourseEmail.course_id' - db.alter_column('bulk_email_courseemail', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255)) - # Deleting field 'CourseEmailTemplate.name' - db.delete_column('bulk_email_courseemailtemplate', 'name') - - # Changing field 'CourseAuthorization.course_id' - db.alter_column('bulk_email_courseauthorization', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255, unique=True)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'bulk_email.courseauthorization': { - 'Meta': {'object_name': 'CourseAuthorization'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'email_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'bulk_email.courseemail': { - 'Meta': {'object_name': 'CourseEmail'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'from_addr': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'html_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'sender': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'subject': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'template_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'text_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'to_option': ('django.db.models.fields.CharField', [], {'default': "'myself'", 'max_length': '64'}) - }, - 'bulk_email.courseemailtemplate': { - 'Meta': {'object_name': 'CourseEmailTemplate'}, - 'html_template': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'unique': 'True', 'null': 'True'}), - 'plain_template': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - }, - 'bulk_email.optout': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'Optout'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['bulk_email'] diff --git a/lms/djangoapps/bulk_email/models.py b/lms/djangoapps/bulk_email/models.py index 6fab5559d827..0c8347d8191e 100644 --- a/lms/djangoapps/bulk_email/models.py +++ b/lms/djangoapps/bulk_email/models.py @@ -45,6 +45,7 @@ class Email(models.Model): modified = models.DateTimeField(auto_now=True) class Meta(object): + app_label = "bulk_email" abstract = True @@ -52,6 +53,9 @@ class CourseEmail(Email): """ Stores information for an email to a course. """ + class Meta(object): + app_label = "bulk_email" + # Three options for sending that we provide from the instructor dashboard: # * Myself: This sends an email to the staff member that is composing the email. # @@ -80,13 +84,6 @@ def create( text_message=None, template_name=None, from_addr=None): """ Create an instance of CourseEmail. - - The CourseEmail.save_now method makes sure the CourseEmail entry is committed. - When called from any view that is wrapped by TransactionMiddleware, - and thus in a "commit-on-success" transaction, an autocommit buried within here - will cause any pending transaction to be committed by a successful - save here. Any future database operations will take place in a - separate transaction. """ # automatically generate the stripped version of the text from the HTML markup: if text_message is None: @@ -109,24 +106,10 @@ def create( template_name=template_name, from_addr=from_addr, ) - course_email.save_now() + course_email.save() return course_email - @transaction.autocommit - def save_now(self): - """ - Writes CourseEmail immediately, ensuring the transaction is committed. - - Autocommit annotation makes sure the database entry is committed. - When called from any view that is wrapped by TransactionMiddleware, - and thus in a "commit-on-success" transaction, this autocommit here - will cause any pending transaction to be committed by a successful - save here. Any future database operations will take place in a - separate transaction. - """ - self.save() - def get_template(self): """ Returns the corresponding CourseEmailTemplate for this CourseEmail. @@ -145,6 +128,7 @@ class Optout(models.Model): course_id = CourseKeyField(max_length=255, db_index=True) class Meta(object): + app_label = "bulk_email" unique_together = ('user', 'course_id') @@ -162,6 +146,9 @@ class CourseEmailTemplate(models.Model): The admin console interface disables add and delete operations. Validation is handled in the CourseEmailTemplateForm class. """ + class Meta(object): + app_label = "bulk_email" + html_template = models.TextField(null=True, blank=True) plain_template = models.TextField(null=True, blank=True) name = models.CharField(null=True, max_length=255, unique=True, blank=True) @@ -235,6 +222,9 @@ class CourseAuthorization(models.Model): """ Enable the course email feature on a course-by-course basis. """ + class Meta(object): + app_label = "bulk_email" + # The course that these features are attached to. course_id = CourseKeyField(max_length=255, db_index=True, unique=True) diff --git a/lms/djangoapps/ccx/migrations/0001_initial.py b/lms/djangoapps/ccx/migrations/0001_initial.py index 6ec2fe67cef8..c13c74f9968d 100644 --- a/lms/djangoapps/ccx/migrations/0001_initial.py +++ b/lms/djangoapps/ccx/migrations/0001_initial.py @@ -1,136 +1,43 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name, missing-docstring, unused-argument, unused-import, line-too-long -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CustomCourseForEdX' - db.create_table('ccx_customcourseforedx', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('display_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('coach', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - )) - db.send_create_signal('ccx', ['CustomCourseForEdX']) - - # Adding model 'CcxMembership' - db.create_table('ccx_ccxmembership', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('ccx', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ccx.CustomCourseForEdX'])), - ('student', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('active', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('ccx', ['CcxMembership']) - - # Adding model 'CcxFutureMembership' - db.create_table('ccx_ccxfuturemembership', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('ccx', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ccx.CustomCourseForEdX'])), - ('email', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('auto_enroll', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('ccx', ['CcxFutureMembership']) - - # Adding model 'CcxFieldOverride' - db.create_table('ccx_ccxfieldoverride', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('ccx', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ccx.CustomCourseForEdX'])), - ('location', self.gf('xmodule_django.models.LocationKeyField')(max_length=255, db_index=True)), - ('field', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('value', self.gf('django.db.models.fields.TextField')(default='null')), - )) - db.send_create_signal('ccx', ['CcxFieldOverride']) - - # Adding unique constraint on 'CcxFieldOverride', fields ['ccx', 'location', 'field'] - db.create_unique('ccx_ccxfieldoverride', ['ccx_id', 'location', 'field']) - - def backwards(self, orm): - # Removing unique constraint on 'CcxFieldOverride', fields ['ccx', 'location', 'field'] - db.delete_unique('ccx_ccxfieldoverride', ['ccx_id', 'location', 'field']) - - # Deleting model 'CustomCourseForEdX' - db.delete_table('ccx_customcourseforedx') - - # Deleting model 'CcxMembership' - db.delete_table('ccx_ccxmembership') - - # Deleting model 'CcxFutureMembership' - db.delete_table('ccx_ccxfuturemembership') - - # Deleting model 'CcxFieldOverride' - db.delete_table('ccx_ccxfieldoverride') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'ccx.ccxfieldoverride': { - 'Meta': {'unique_together': "(('ccx', 'location', 'field'),)", 'object_name': 'CcxFieldOverride'}, - 'ccx': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ccx.CustomCourseForEdX']"}), - 'field': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'location': ('xmodule_django.models.LocationKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'ccx.ccxfuturemembership': { - 'Meta': {'object_name': 'CcxFutureMembership'}, - 'auto_enroll': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'ccx': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ccx.CustomCourseForEdX']"}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'ccx.ccxmembership': { - 'Meta': {'object_name': 'CcxMembership'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'ccx': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ccx.CustomCourseForEdX']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'ccx.customcourseforedx': { - 'Meta': {'object_name': 'CustomCourseForEdX'}, - 'coach': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['ccx'] +from __future__ import unicode_literals + +from django.db import migrations, models +from django.conf import settings +import xmodule_django.models + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='CcxFieldOverride', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('location', xmodule_django.models.LocationKeyField(max_length=255, db_index=True)), + ('field', models.CharField(max_length=255)), + ('value', models.TextField(default=b'null')), + ], + ), + migrations.CreateModel( + name='CustomCourseForEdX', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('display_name', models.CharField(max_length=255)), + ('coach', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.AddField( + model_name='ccxfieldoverride', + name='ccx', + field=models.ForeignKey(to='ccx.CustomCourseForEdX'), + ), + migrations.AlterUniqueTogether( + name='ccxfieldoverride', + unique_together=set([('ccx', 'location', 'field')]), + ), + ] diff --git a/lms/djangoapps/ccx/migrations/0002_convert_memberships.py b/lms/djangoapps/ccx/migrations/0002_convert_memberships.py deleted file mode 100644 index 4f595eb312f6..000000000000 --- a/lms/djangoapps/ccx/migrations/0002_convert_memberships.py +++ /dev/null @@ -1,102 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models -from opaque_keys import InvalidKeyError - -class Migration(DataMigration): - - def forwards(self, orm): - "Convert CCX Memberships to Course Enrollments." - from ccx_keys.locator import CCXLocator - memberships = orm['ccx.CcxMembership'].objects.select_related('ccx', 'student').all() - for membership in memberships: - ccx = membership.ccx - try: - course_key = CCXLocator.from_course_locator(ccx.course_id, ccx.id) - enrollment, created = orm['student.CourseEnrollment'].objects.get_or_create( - user=membership.student, - course_id=course_key, - ) - except InvalidKeyError: - membership.delete() - - - def backwards(self, orm): - """In the future, here we will convert back CCX Course Enrollments to CCX - Memberships. - """ - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'ccx.ccxfieldoverride': { - 'Meta': {'unique_together': "(('ccx', 'location', 'field'),)", 'object_name': 'CcxFieldOverride'}, - 'ccx': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ccx.CustomCourseForEdX']"}), - 'field': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'location': ('xmodule_django.models.LocationKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'ccx.customcourseforedx': { - 'Meta': {'object_name': 'CustomCourseForEdX'}, - 'coach': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'ccx.ccxmembership': { - 'Meta': {'object_name': 'CcxMembership'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': False}), - 'ccx': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ccx.CustomCourseForEdX']"}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.courseenrollment': { - 'Meta': {'object_name': 'CourseEnrollment'}, - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': True}), - 'mode': ('django.db.models.fields.CharField', [], {'max_length': '100', 'default': '"honor"'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['ccx', 'ccx'] - symmetrical = True diff --git a/lms/djangoapps/ccx/models.py b/lms/djangoapps/ccx/models.py index 70121dc43e99..241d488a0401 100644 --- a/lms/djangoapps/ccx/models.py +++ b/lms/djangoapps/ccx/models.py @@ -25,6 +25,9 @@ class CustomCourseForEdX(models.Model): display_name = models.CharField(max_length=255) coach = models.ForeignKey(User, db_index=True) + class Meta(object): + app_label = 'ccx' + @lazy def course(self): """Return the CourseDescriptor of the course related to this CCX""" @@ -104,6 +107,7 @@ class CcxFieldOverride(models.Model): field = models.CharField(max_length=255) class Meta(object): + app_label = 'ccx' unique_together = (('ccx', 'location', 'field'),) value = models.TextField(default='null') diff --git a/lms/djangoapps/ccx/overrides.py b/lms/djangoapps/ccx/overrides.py index bf5aa34145f6..44838ecf081e 100644 --- a/lms/djangoapps/ccx/overrides.py +++ b/lms/djangoapps/ccx/overrides.py @@ -13,7 +13,7 @@ from opaque_keys.edx.keys import CourseKey, UsageKey from ccx_keys.locator import CCXLocator, CCXBlockUsageLocator -from .models import CcxFieldOverride, CustomCourseForEdX +from lms.djangoapps.ccx.models import CcxFieldOverride, CustomCourseForEdX log = logging.getLogger(__name__) @@ -125,7 +125,7 @@ def _get_overrides_for_ccx(ccx): return overrides_cache[ccx] -@transaction.commit_on_success +@transaction.atomic def override_field_for_ccx(ccx, block, name, value): """ Overrides a field for the `ccx`. `block` and `name` specify the block @@ -142,18 +142,15 @@ def override_field_for_ccx(ccx, block, name, value): override_has_changes = serialized_value != override.value if not override: - try: - override = CcxFieldOverride.objects.create( - ccx=ccx, - location=block.location, - field=name, - value=serialized_value - ) + override, created = CcxFieldOverride.objects.get_or_create( + ccx=ccx, + location=block.location, + field=name, + defaults={'value': serialized_value}, + ) + if created: _get_overrides_for_ccx(ccx).setdefault(block.location, {})[name + "_id"] = override.id - except IntegrityError: - transaction.commit() - kwargs = {'ccx': ccx, 'location': block.location, 'field': name} - override = CcxFieldOverride.objects.get(**kwargs) + else: override_has_changes = serialized_value != override.value if override_has_changes: diff --git a/lms/djangoapps/ccx/tasks.py b/lms/djangoapps/ccx/tasks.py index 10c8492c8325..8a95c4cdbfd1 100644 --- a/lms/djangoapps/ccx/tasks.py +++ b/lms/djangoapps/ccx/tasks.py @@ -11,7 +11,7 @@ from xmodule.modulestore.django import SignalHandler from lms import CELERY_APP -from .models import CustomCourseForEdX +from lms.djangoapps.ccx.models import CustomCourseForEdX log = logging.getLogger("edx.ccx") diff --git a/lms/djangoapps/ccx/tests/factories.py b/lms/djangoapps/ccx/tests/factories.py index 19ead8722468..4d2d55445724 100644 --- a/lms/djangoapps/ccx/tests/factories.py +++ b/lms/djangoapps/ccx/tests/factories.py @@ -4,7 +4,7 @@ from factory import SubFactory from factory.django import DjangoModelFactory from student.tests.factories import UserFactory -from ccx.models import CustomCourseForEdX # pylint: disable=import-error +from lms.djangoapps.ccx.models import CustomCourseForEdX class CcxFactory(DjangoModelFactory): # pylint: disable=missing-docstring diff --git a/lms/djangoapps/ccx/tests/test_ccx_modulestore.py b/lms/djangoapps/ccx/tests/test_ccx_modulestore.py index 161037a50f16..98ca36138d12 100644 --- a/lms/djangoapps/ccx/tests/test_ccx_modulestore.py +++ b/lms/djangoapps/ccx/tests/test_ccx_modulestore.py @@ -14,7 +14,7 @@ from student.tests.factories import UserFactory from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory -from ..models import CustomCourseForEdX +from lms.djangoapps.ccx.models import CustomCourseForEdX class TestCCXModulestoreWrapper(SharedModuleStoreTestCase): diff --git a/lms/djangoapps/ccx/tests/test_field_override_performance.py b/lms/djangoapps/ccx/tests/test_field_override_performance.py index ed0f7a278272..6a63c9825ad7 100644 --- a/lms/djangoapps/ccx/tests/test_field_override_performance.py +++ b/lms/djangoapps/ccx/tests/test_field_override_performance.py @@ -11,7 +11,7 @@ from courseware.field_overrides import OverrideFieldData from datetime import datetime from django.conf import settings -from django.core.cache import get_cache +from django.core.cache import caches from django.test.client import RequestFactory from django.test.utils import override_settings from edxmako.middleware import MakoMiddleware # pylint: disable=import-error @@ -27,7 +27,7 @@ from xmodule.modulestore.tests.factories import check_mongo_calls_range, CourseFactory, check_sum_of_calls from xmodule.modulestore.tests.utils import ProceduralCourseTestMixin from ccx_keys.locator import CCXLocator -from ccx.tests.factories import CcxFactory +from lms.djangoapps.ccx.tests.factories import CcxFactory @attr('shard_1') @@ -161,7 +161,7 @@ def instrument_course_progress_render(self, course_width, enable_ccx, view_as_cc with self.settings(MODULESTORE_BRANCH='published-only'): # Clear all caches before measuring for cache in settings.CACHES: - get_cache(cache).clear() + caches[cache].clear() # Refill the metadata inheritance cache modulestore().get_course(self.course.id, depth=None) @@ -214,24 +214,24 @@ class TestFieldOverrideMongoPerformance(FieldOverridePerformanceTestCase): TEST_DATA = { # (providers, course_width, enable_ccx, view_as_ccx): # of sql queries, # of mongo queries, # of xblocks - ('no_overrides', 1, True, False): (24, 6, 13), - ('no_overrides', 2, True, False): (69, 6, 84), - ('no_overrides', 3, True, False): (264, 6, 335), - ('ccx', 1, True, False): (24, 6, 13), - ('ccx', 2, True, False): (69, 6, 84), - ('ccx', 3, True, False): (264, 6, 335), - ('ccx', 1, True, True): (24, 6, 13), - ('ccx', 2, True, True): (69, 6, 84), - ('ccx', 3, True, True): (264, 6, 335), - ('no_overrides', 1, False, False): (24, 6, 13), - ('no_overrides', 2, False, False): (69, 6, 84), - ('no_overrides', 3, False, False): (264, 6, 335), - ('ccx', 1, False, False): (24, 6, 13), - ('ccx', 2, False, False): (69, 6, 84), - ('ccx', 3, False, False): (264, 6, 335), - ('ccx', 1, False, True): (24, 6, 13), - ('ccx', 2, False, True): (69, 6, 84), - ('ccx', 3, False, True): (264, 6, 335), + ('no_overrides', 1, True, False): (48, 6, 13), + ('no_overrides', 2, True, False): (135, 6, 84), + ('no_overrides', 3, True, False): (480, 6, 335), + ('ccx', 1, True, False): (48, 6, 13), + ('ccx', 2, True, False): (135, 6, 84), + ('ccx', 3, True, False): (480, 6, 335), + ('ccx', 1, True, True): (48, 6, 13), + ('ccx', 2, True, True): (135, 6, 84), + ('ccx', 3, True, True): (480, 6, 335), + ('no_overrides', 1, False, False): (48, 6, 13), + ('no_overrides', 2, False, False): (135, 6, 84), + ('no_overrides', 3, False, False): (480, 6, 335), + ('ccx', 1, False, False): (48, 6, 13), + ('ccx', 2, False, False): (135, 6, 84), + ('ccx', 3, False, False): (480, 6, 335), + ('ccx', 1, False, True): (48, 6, 13), + ('ccx', 2, False, True): (135, 6, 84), + ('ccx', 3, False, True): (480, 6, 335), } @@ -243,22 +243,22 @@ class TestFieldOverrideSplitPerformance(FieldOverridePerformanceTestCase): __test__ = True TEST_DATA = { - ('no_overrides', 1, True, False): (24, 4, 9), - ('no_overrides', 2, True, False): (69, 19, 54), - ('no_overrides', 3, True, False): (264, 84, 215), - ('ccx', 1, True, False): (24, 4, 9), - ('ccx', 2, True, False): (69, 19, 54), - ('ccx', 3, True, False): (264, 84, 215), - ('ccx', 1, True, True): (26, 4, 13), - ('ccx', 2, True, True): (71, 19, 84), - ('ccx', 3, True, True): (266, 84, 335), - ('no_overrides', 1, False, False): (24, 4, 9), - ('no_overrides', 2, False, False): (69, 19, 54), - ('no_overrides', 3, False, False): (264, 84, 215), - ('ccx', 1, False, False): (24, 4, 9), - ('ccx', 2, False, False): (69, 19, 54), - ('ccx', 3, False, False): (264, 84, 215), - ('ccx', 1, False, True): (24, 4, 9), - ('ccx', 2, False, True): (69, 19, 54), - ('ccx', 3, False, True): (264, 84, 215), + ('no_overrides', 1, True, False): (48, 4, 9), + ('no_overrides', 2, True, False): (135, 19, 54), + ('no_overrides', 3, True, False): (480, 84, 215), + ('ccx', 1, True, False): (48, 4, 9), + ('ccx', 2, True, False): (135, 19, 54), + ('ccx', 3, True, False): (480, 84, 215), + ('ccx', 1, True, True): (50, 4, 13), + ('ccx', 2, True, True): (137, 19, 84), + ('ccx', 3, True, True): (482, 84, 335), + ('no_overrides', 1, False, False): (48, 4, 9), + ('no_overrides', 2, False, False): (135, 19, 54), + ('no_overrides', 3, False, False): (480, 84, 215), + ('ccx', 1, False, False): (48, 4, 9), + ('ccx', 2, False, False): (135, 19, 54), + ('ccx', 3, False, False): (480, 84, 215), + ('ccx', 1, False, True): (48, 4, 9), + ('ccx', 2, False, True): (135, 19, 54), + ('ccx', 3, False, True): (480, 84, 215), } diff --git a/lms/djangoapps/ccx/tests/test_overrides.py b/lms/djangoapps/ccx/tests/test_overrides.py index d88a8d4c3582..4b1be35e3937 100644 --- a/lms/djangoapps/ccx/tests/test_overrides.py +++ b/lms/djangoapps/ccx/tests/test_overrides.py @@ -17,10 +17,10 @@ TEST_DATA_SPLIT_MODULESTORE) from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory -from ..models import CustomCourseForEdX -from ..overrides import override_field_for_ccx +from lms.djangoapps.ccx.models import CustomCourseForEdX +from lms.djangoapps.ccx.overrides import override_field_for_ccx -from .test_views import flatten, iter_blocks +from lms.djangoapps.ccx.tests.test_views import flatten, iter_blocks @attr('shard_1') @@ -95,7 +95,12 @@ def test_override_num_queries_new_field(self): """ ccx_start = datetime.datetime(2014, 12, 25, 00, 00, tzinfo=pytz.UTC) chapter = self.ccx.course.get_children()[0] - with self.assertNumQueries(1): + # One outer SAVEPOINT/RELEASE SAVEPOINT pair around everything caused by the + # transaction.atomic decorator wrapping override_field_for_ccx. + # One SELECT and one INSERT. + # One inner SAVEPOINT/RELEASE SAVEPOINT pair around the INSERT caused by the + # transaction.atomic down in Django's get_or_create()/_create_object_from_params(). + with self.assertNumQueries(6): override_field_for_ccx(self.ccx, chapter, 'start', ccx_start) def test_override_num_queries_update_existing_field(self): @@ -106,7 +111,7 @@ def test_override_num_queries_update_existing_field(self): new_ccx_start = datetime.datetime(2015, 12, 25, 00, 00, tzinfo=pytz.UTC) chapter = self.ccx.course.get_children()[0] override_field_for_ccx(self.ccx, chapter, 'start', ccx_start) - with self.assertNumQueries(2): + with self.assertNumQueries(3): override_field_for_ccx(self.ccx, chapter, 'start', new_ccx_start) def test_override_num_queries_field_value_not_changed(self): @@ -116,7 +121,7 @@ def test_override_num_queries_field_value_not_changed(self): ccx_start = datetime.datetime(2014, 12, 25, 00, 00, tzinfo=pytz.UTC) chapter = self.ccx.course.get_children()[0] override_field_for_ccx(self.ccx, chapter, 'start', ccx_start) - with self.assertNumQueries(0): + with self.assertNumQueries(2): # 2 savepoints override_field_for_ccx(self.ccx, chapter, 'start', ccx_start) def test_overriden_field_access_produces_no_extra_queries(self): @@ -125,7 +130,12 @@ def test_overriden_field_access_produces_no_extra_queries(self): """ ccx_start = datetime.datetime(2014, 12, 25, 00, 00, tzinfo=pytz.UTC) chapter = self.ccx.course.get_children()[0] - with self.assertNumQueries(1): + # One outer SAVEPOINT/RELEASE SAVEPOINT pair around everything caused by the + # transaction.atomic decorator wrapping override_field_for_ccx. + # One SELECT and one INSERT. + # One inner SAVEPOINT/RELEASE SAVEPOINT pair around the INSERT caused by the + # transaction.atomic down in Django's get_or_create()/_create_object_from_params(). + with self.assertNumQueries(6): override_field_for_ccx(self.ccx, chapter, 'start', ccx_start) def test_override_is_inherited(self): diff --git a/lms/djangoapps/ccx/tests/test_tasks.py b/lms/djangoapps/ccx/tests/test_tasks.py index c1f568b4e2c2..be8d0097ef92 100644 --- a/lms/djangoapps/ccx/tests/test_tasks.py +++ b/lms/djangoapps/ccx/tests/test_tasks.py @@ -4,9 +4,7 @@ from mock_django import mock_signal_receiver -from ccx.tests.factories import ( # pylint: disable=import-error - CcxFactory, -) +from lms.djangoapps.ccx.tests.factories import CcxFactory from student.roles import CourseCcxCoachRole # pylint: disable=import-error from student.tests.factories import ( # pylint: disable=import-error AdminFactory, @@ -21,7 +19,7 @@ from ccx_keys.locator import CCXLocator -from ..tasks import send_ccx_course_published +from lms.djangoapps.ccx.tasks import send_ccx_course_published class TestSendCCXCoursePublished(ModuleStoreTestCase): diff --git a/lms/djangoapps/ccx/tests/test_utils.py b/lms/djangoapps/ccx/tests/test_utils.py index 01c0bc7cc098..cd592185e74a 100644 --- a/lms/djangoapps/ccx/tests/test_utils.py +++ b/lms/djangoapps/ccx/tests/test_utils.py @@ -3,9 +3,7 @@ """ from nose.plugins.attrib import attr -from ccx.tests.factories import ( # pylint: disable=import-error - CcxFactory, -) +from lms.djangoapps.ccx.tests.factories import CcxFactory from student.roles import CourseCcxCoachRole # pylint: disable=import-error from student.tests.factories import ( # pylint: disable=import-error AdminFactory, @@ -33,7 +31,7 @@ def setUp(self): def call_fut(self, course_id): """call the function under test in this test case""" - from ccx.utils import get_ccx_from_ccx_locator + from lms.djangoapps.ccx.utils import get_ccx_from_ccx_locator return get_ccx_from_ccx_locator(course_id) def test_non_ccx_locator(self): diff --git a/lms/djangoapps/ccx/tests/test_views.py b/lms/djangoapps/ccx/tests/test_views.py index 1839cfd20031..f05950034ae1 100644 --- a/lms/djangoapps/ccx/tests/test_views.py +++ b/lms/djangoapps/ccx/tests/test_views.py @@ -46,13 +46,9 @@ ) from ccx_keys.locator import CCXLocator -from ..models import ( - CustomCourseForEdX, -) -from ..overrides import get_override_for_ccx, override_field_for_ccx -from .factories import ( - CcxFactory, -) +from lms.djangoapps.ccx.models import CustomCourseForEdX +from lms.djangoapps.ccx.overrides import get_override_for_ccx, override_field_for_ccx +from lms.djangoapps.ccx.tests.factories import CcxFactory def intercept_renderer(path, context): diff --git a/lms/djangoapps/ccx/utils.py b/lms/djangoapps/ccx/utils.py index 8cbcb8ece155..8b9d80d919b0 100644 --- a/lms/djangoapps/ccx/utils.py +++ b/lms/djangoapps/ccx/utils.py @@ -5,7 +5,7 @@ """ import logging -from .models import CustomCourseForEdX +from lms.djangoapps.ccx.models import CustomCourseForEdX log = logging.getLogger("edx.ccx") diff --git a/lms/djangoapps/ccx/views.py b/lms/djangoapps/ccx/views.py index cabb554b6336..a14c3ddb09d9 100644 --- a/lms/djangoapps/ccx/views.py +++ b/lms/djangoapps/ccx/views.py @@ -20,6 +20,7 @@ from django.contrib import messages from django.core.exceptions import ValidationError from django.core.validators import validate_email +from django.db import transaction from django.http import Http404 from django.shortcuts import redirect from django.utils.translation import ugettext as _ @@ -47,8 +48,9 @@ unenroll_email, get_email_params, ) -from .models import CustomCourseForEdX -from .overrides import ( + +from lms.djangoapps.ccx.models import CustomCourseForEdX +from lms.djangoapps.ccx.overrides import ( get_override_for_ccx, override_field_for_ccx, clear_ccx_field_info_from_ccx_map, @@ -404,7 +406,7 @@ def ccx_schedule(request, course, ccx=None): # pylint: disable=unused-argument schedule = get_ccx_schedule(course, ccx) json_schedule = json.dumps(schedule, indent=4) - return HttpResponse(json_schedule, mimetype='application/json') + return HttpResponse(json_schedule, content_type='application/json') @ensure_csrf_cookie @@ -539,6 +541,8 @@ def prep_course_for_grading(course, request): course.set_grading_policy(course.grading_policy) +# Grades can potentially be written - if so, let grading manage the transaction. +@transaction.non_atomic_requests @cache_control(no_cache=True, no_store=True, must_revalidate=True) @coach_dashboard def ccx_gradebook(request, course, ccx=None): @@ -578,6 +582,8 @@ def ccx_gradebook(request, course, ccx=None): }) +# Grades can potentially be written - if so, let grading manage the transaction. +@transaction.non_atomic_requests @cache_control(no_cache=True, no_store=True, must_revalidate=True) @coach_dashboard def ccx_grades_csv(request, course, ccx=None): diff --git a/lms/djangoapps/certificates/admin.py b/lms/djangoapps/certificates/admin.py index f878e083b2a3..54eccb0ac8c8 100644 --- a/lms/djangoapps/certificates/admin.py +++ b/lms/djangoapps/certificates/admin.py @@ -30,6 +30,7 @@ def __init__(self, *args, **kwargs): class Meta(object): model = CertificateTemplate + fields = '__all__' class CertificateTemplateAdmin(admin.ModelAdmin): diff --git a/lms/djangoapps/certificates/migrations/0001_added_generatedcertificates.py b/lms/djangoapps/certificates/migrations/0001_added_generatedcertificates.py deleted file mode 100644 index 094a439085db..000000000000 --- a/lms/djangoapps/certificates/migrations/0001_added_generatedcertificates.py +++ /dev/null @@ -1,93 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'GeneratedCertificate' - db.create_table('certificates_generatedcertificate', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('certificate_id', self.gf('django.db.models.fields.CharField')(max_length=32)), - )) - db.send_create_signal('certificates', ['GeneratedCertificate']) - - def backwards(self, orm): - # Deleting model 'GeneratedCertificate' - db.delete_table('certificates_generatedcertificate') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'object_name': 'GeneratedCertificate'}, - 'certificate_id': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0001_initial.py b/lms/djangoapps/certificates/migrations/0001_initial.py new file mode 100644 index 000000000000..79801ff8b98a --- /dev/null +++ b/lms/djangoapps/certificates/migrations/0001_initial.py @@ -0,0 +1,188 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import certificates.models +import model_utils.fields +import xmodule_django.models +import django_extensions.db.fields +import django_extensions.db.fields.json +import django.db.models.deletion +import django.utils.timezone +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='BadgeAssertion', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(default=None, max_length=255, blank=True)), + ('mode', models.CharField(max_length=100)), + ('data', django_extensions.db.fields.json.JSONField()), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='BadgeImageConfiguration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('mode', models.CharField(help_text='The course mode for this badge image. For example, "verified" or "honor".', unique=True, max_length=125)), + ('icon', models.ImageField(help_text='Badge images must be square PNG files. The file size should be under 250KB.', upload_to=b'badges', validators=[certificates.models.validate_badge_image])), + ('default', models.BooleanField(default=False, help_text='Set this value to True if you want this image to be the default image for any course modes that do not have a specified badge image. You can have only one default image.')), + ], + ), + migrations.CreateModel( + name='CertificateGenerationConfiguration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + migrations.CreateModel( + name='CertificateGenerationCourseSetting', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('course_key', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('enabled', models.BooleanField(default=False)), + ], + options={ + 'get_latest_by': 'created', + }, + ), + migrations.CreateModel( + name='CertificateHtmlViewConfiguration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('configuration', models.TextField(help_text=b'Certificate HTML View Parameters (JSON)')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + migrations.CreateModel( + name='CertificateTemplate', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('name', models.CharField(help_text='Name of template.', max_length=255)), + ('description', models.CharField(help_text='Description and/or admin notes.', max_length=255, null=True, blank=True)), + ('template', models.TextField(help_text='Django template HTML.')), + ('organization_id', models.IntegerField(help_text='Organization of template.', null=True, db_index=True, blank=True)), + ('course_key', xmodule_django.models.CourseKeyField(db_index=True, max_length=255, null=True, blank=True)), + ('mode', models.CharField(default=b'honor', choices=[(b'verified', b'verified'), (b'honor', b'honor'), (b'audit', b'audit'), (b'professional', b'professional'), (b'no-id-professional', b'no-id-professional')], max_length=125, blank=True, help_text='The course mode for this template.', null=True)), + ('is_active', models.BooleanField(default=False, help_text='On/Off switch.')), + ], + options={ + 'get_latest_by': 'created', + }, + ), + migrations.CreateModel( + name='CertificateTemplateAsset', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('description', models.CharField(help_text='Description of the asset.', max_length=255, null=True, blank=True)), + ('asset', models.FileField(help_text='Asset file. It could be an image or css file.', max_length=255, upload_to=certificates.models.template_assets_path)), + ], + options={ + 'get_latest_by': 'created', + }, + ), + migrations.CreateModel( + name='CertificateWhitelist', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(default=None, max_length=255, blank=True)), + ('whitelist', models.BooleanField(default=0)), + ('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), + ('notes', models.TextField(default=None, null=True)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='ExampleCertificate', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('description', models.CharField(help_text="A human-readable description of the example certificate. For example, 'verified' or 'honor' to differentiate between two types of certificates.", max_length=255)), + ('uuid', models.CharField(default=certificates.models._make_uuid, help_text='A unique identifier for the example certificate. This is used when we receive a response from the queue to determine which example certificate was processed.', unique=True, max_length=255, db_index=True)), + ('access_key', models.CharField(default=certificates.models._make_uuid, help_text='An access key for the example certificate. This is used when we receive a response from the queue to validate that the sender is the same entity we asked to generate the certificate.', max_length=255, db_index=True)), + ('full_name', models.CharField(default='John Do\xeb', help_text='The full name that will appear on the certificate.', max_length=255)), + ('template', models.CharField(help_text='The template file to use when generating the certificate.', max_length=255)), + ('status', models.CharField(default=b'started', help_text='The status of the example certificate.', max_length=255, choices=[(b'started', b'Started'), (b'success', b'Success'), (b'error', b'Error')])), + ('error_reason', models.TextField(default=None, help_text='The reason an error occurred during certificate generation.', null=True)), + ('download_url', models.CharField(default=None, max_length=255, null=True, help_text='The download URL for the generated certificate.')), + ], + ), + migrations.CreateModel( + name='ExampleCertificateSet', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('course_key', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ], + options={ + 'get_latest_by': 'created', + }, + ), + migrations.CreateModel( + name='GeneratedCertificate', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(default=None, max_length=255, blank=True)), + ('verify_uuid', models.CharField(default=b'', max_length=32, blank=True)), + ('download_uuid', models.CharField(default=b'', max_length=32, blank=True)), + ('download_url', models.CharField(default=b'', max_length=128, blank=True)), + ('grade', models.CharField(default=b'', max_length=5, blank=True)), + ('key', models.CharField(default=b'', max_length=32, blank=True)), + ('distinction', models.BooleanField(default=False)), + ('status', models.CharField(default=b'unavailable', max_length=32)), + ('mode', models.CharField(default=b'honor', max_length=32, choices=[(b'verified', b'verified'), (b'honor', b'honor'), (b'audit', b'audit'), (b'professional', b'professional'), (b'no-id-professional', b'no-id-professional')])), + ('name', models.CharField(max_length=255, blank=True)), + ('created_date', models.DateTimeField(auto_now_add=True)), + ('modified_date', models.DateTimeField(auto_now=True)), + ('error_reason', models.CharField(default=b'', max_length=512, blank=True)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.AddField( + model_name='examplecertificate', + name='example_cert_set', + field=models.ForeignKey(to='certificates.ExampleCertificateSet'), + ), + migrations.AlterUniqueTogether( + name='certificatetemplate', + unique_together=set([('organization_id', 'course_key', 'mode')]), + ), + migrations.AlterUniqueTogether( + name='generatedcertificate', + unique_together=set([('user', 'course_id')]), + ), + migrations.AlterUniqueTogether( + name='badgeassertion', + unique_together=set([('course_id', 'user', 'mode')]), + ), + ] diff --git a/lms/djangoapps/certificates/migrations/0002_auto__add_field_generatedcertificate_download_url.py b/lms/djangoapps/certificates/migrations/0002_auto__add_field_generatedcertificate_download_url.py deleted file mode 100644 index 0019a0c491df..000000000000 --- a/lms/djangoapps/certificates/migrations/0002_auto__add_field_generatedcertificate_download_url.py +++ /dev/null @@ -1,91 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'GeneratedCertificate.download_url' - db.add_column('certificates_generatedcertificate', 'download_url', - self.gf('django.db.models.fields.CharField')(max_length=128, null=True), - keep_default=False) - - def backwards(self, orm): - # Deleting field 'GeneratedCertificate.download_url' - db.delete_column('certificates_generatedcertificate', 'download_url') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'object_name': 'GeneratedCertificate'}, - 'certificate_id': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'download_url': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0002_data__certificatehtmlviewconfiguration_data.py b/lms/djangoapps/certificates/migrations/0002_data__certificatehtmlviewconfiguration_data.py new file mode 100644 index 000000000000..3d508eb6d6df --- /dev/null +++ b/lms/djangoapps/certificates/migrations/0002_data__certificatehtmlviewconfiguration_data.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- + +from __future__ import unicode_literals +import json + +# Converted from the original South migration 0020_certificatehtmlviewconfiguration_data.py + +from django.db import migrations, models + + +def forwards(apps, schema_editor): + """ + Bootstraps the HTML view template with some default configuration parameters + """ + config = { + "default": { + "accomplishment_class_append": "accomplishment-certificate", + "platform_name": "Your Platform Name Here", + "company_about_url": "http://www.example.com/about-us", + "company_privacy_url": "http://www.example.com/privacy-policy", + "company_tos_url": "http://www.example.com/terms-service", + "company_verified_certificate_url": "http://www.example.com/verified-certificate", + "logo_src": "/static/certificates/images/logo.png", + "logo_url": "http://www.example.com" + }, + "honor": { + "certificate_type": "Honor Code", + "certificate_title": "Certificate of Achievement", + }, + "verified": { + "certificate_type": "Verified", + "certificate_title": "Verified Certificate of Achievement", + } + } + certificate_html_view_configuration_model = apps.get_model("certificates", "CertificateHtmlViewConfiguration") + db_alias = schema_editor.connection.alias + + objects = certificate_html_view_configuration_model.objects.using(db_alias) + if not objects.exists(): + objects.create( + configuration=json.dumps(config), + enabled=False, + ) + +def backwards(apps, schema_editor): + """ + Rolling back to zero-state, so remove all currently-defined configurations + """ + certificate_html_view_configuration_model = apps.get_model("certificates", "CertificateHtmlViewConfiguration") + db_alias = schema_editor.connection.alias + + certificate_html_view_configuration_model.objects.using(db_alias).all().delete() + +class Migration(migrations.Migration): + + dependencies = [ + ('certificates', '0001_initial'), + ] + + operations = [ + migrations.RunPython(forwards, backwards) + ] diff --git a/lms/djangoapps/certificates/migrations/0003_auto__add_field_generatedcertificate_enabled.py b/lms/djangoapps/certificates/migrations/0003_auto__add_field_generatedcertificate_enabled.py deleted file mode 100644 index 8c1150f49735..000000000000 --- a/lms/djangoapps/certificates/migrations/0003_auto__add_field_generatedcertificate_enabled.py +++ /dev/null @@ -1,92 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'GeneratedCertificate.enabled' - db.add_column('certificates_generatedcertificate', 'enabled', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - def backwards(self, orm): - # Deleting field 'GeneratedCertificate.enabled' - db.delete_column('certificates_generatedcertificate', 'enabled') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'object_name': 'GeneratedCertificate'}, - 'certificate_id': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'download_url': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0003_data__default_modes.py b/lms/djangoapps/certificates/migrations/0003_data__default_modes.py new file mode 100644 index 000000000000..a5db2aa3bd92 --- /dev/null +++ b/lms/djangoapps/certificates/migrations/0003_data__default_modes.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +# Converted from the original South migration 0002_default_rate_limit_config.py + +from django.db import migrations, models +from django.conf import settings +from django.core.files import File + +def forwards(apps, schema_editor): + """Add default modes""" + badge_image_configuration_model = apps.get_model("certificates", "BadgeImageConfiguration") + + for mode in ['honor', 'verified', 'professional']: + conf, created = badge_image_configuration_model.objects.get_or_create(mode=mode) + if created: + file_name = '{0}{1}'.format(mode, '.png') + conf.icon.save( + 'badges/{}'.format(file_name), + File(open(settings.PROJECT_ROOT / 'static' / 'images' / 'default-badges' / file_name)) + ) + + conf.save() + + +class Migration(migrations.Migration): + + dependencies = [ + ('certificates', '0002_data__certificatehtmlviewconfiguration_data'), + ] + + operations = [ + migrations.RunPython(forwards) + ] diff --git a/lms/djangoapps/certificates/migrations/0004_auto__add_field_generatedcertificate_graded_certificate_id__add_field_.py b/lms/djangoapps/certificates/migrations/0004_auto__add_field_generatedcertificate_graded_certificate_id__add_field_.py deleted file mode 100644 index 6d7b41a1d6dd..000000000000 --- a/lms/djangoapps/certificates/migrations/0004_auto__add_field_generatedcertificate_graded_certificate_id__add_field_.py +++ /dev/null @@ -1,107 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'GeneratedCertificate.graded_certificate_id' - db.add_column('certificates_generatedcertificate', 'graded_certificate_id', self.gf('django.db.models.fields.CharField')(max_length=32, null=True), keep_default=False) - - # Adding field 'GeneratedCertificate.graded_download_url' - db.add_column('certificates_generatedcertificate', 'graded_download_url', self.gf('django.db.models.fields.CharField')(max_length=128, null=True), keep_default=False) - - # Adding field 'GeneratedCertificate.grade' - db.add_column('certificates_generatedcertificate', 'grade', self.gf('django.db.models.fields.CharField')(max_length=5, null=True), keep_default=False) - - def backwards(self, orm): - - # Deleting field 'GeneratedCertificate.graded_certificate_id' - db.delete_column('certificates_generatedcertificate', 'graded_certificate_id') - - # Deleting field 'GeneratedCertificate.graded_download_url' - db.delete_column('certificates_generatedcertificate', 'graded_download_url') - - # Deleting field 'GeneratedCertificate.grade' - db.delete_column('certificates_generatedcertificate', 'grade') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'object_name': 'GeneratedCertificate'}, - 'certificate_id': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'download_url': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'grade': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True'}), - 'graded_certificate_id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'graded_download_url': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0005_auto__add_field_generatedcertificate_name.py b/lms/djangoapps/certificates/migrations/0005_auto__add_field_generatedcertificate_name.py deleted file mode 100644 index 9b3660a5b336..000000000000 --- a/lms/djangoapps/certificates/migrations/0005_auto__add_field_generatedcertificate_name.py +++ /dev/null @@ -1,96 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'GeneratedCertificate.name' - db.add_column('certificates_generatedcertificate', 'name', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), keep_default=False) - - def backwards(self, orm): - - # Deleting field 'GeneratedCertificate.name' - db.delete_column('certificates_generatedcertificate', 'name') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'object_name': 'GeneratedCertificate'}, - 'certificate_id': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'download_url': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'grade': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True'}), - 'graded_certificate_id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'graded_download_url': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0006_auto__chg_field_generatedcertificate_certificate_id.py b/lms/djangoapps/certificates/migrations/0006_auto__chg_field_generatedcertificate_certificate_id.py deleted file mode 100644 index 947f0f967dc6..000000000000 --- a/lms/djangoapps/certificates/migrations/0006_auto__chg_field_generatedcertificate_certificate_id.py +++ /dev/null @@ -1,96 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'GeneratedCertificate.certificate_id' - db.alter_column('certificates_generatedcertificate', 'certificate_id', self.gf('django.db.models.fields.CharField')(max_length=32, null=True)) - - def backwards(self, orm): - - # Changing field 'GeneratedCertificate.certificate_id' - db.alter_column('certificates_generatedcertificate', 'certificate_id', self.gf('django.db.models.fields.CharField')(default=None, max_length=32)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'object_name': 'GeneratedCertificate'}, - 'certificate_id': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '32', 'null': 'True'}), - 'download_url': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'grade': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True'}), - 'graded_certificate_id': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '32', 'null': 'True'}), - 'graded_download_url': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0007_auto__add_revokedcertificate.py b/lms/djangoapps/certificates/migrations/0007_auto__add_revokedcertificate.py deleted file mode 100644 index 03f254867991..000000000000 --- a/lms/djangoapps/certificates/migrations/0007_auto__add_revokedcertificate.py +++ /dev/null @@ -1,121 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'RevokedCertificate' - db.create_table('certificates_revokedcertificate', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('explanation', self.gf('django.db.models.fields.TextField')(blank=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('name', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('certificate_id', self.gf('django.db.models.fields.CharField')(default=None, max_length=32, null=True)), - ('graded_certificate_id', self.gf('django.db.models.fields.CharField')(default=None, max_length=32, null=True)), - ('download_url', self.gf('django.db.models.fields.CharField')(max_length=128, null=True)), - ('graded_download_url', self.gf('django.db.models.fields.CharField')(max_length=128, null=True)), - ('grade', self.gf('django.db.models.fields.CharField')(max_length=5, null=True)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('certificates', ['RevokedCertificate']) - - def backwards(self, orm): - - # Deleting model 'RevokedCertificate' - db.delete_table('certificates_revokedcertificate') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'object_name': 'GeneratedCertificate'}, - 'certificate_id': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '32', 'null': 'True'}), - 'download_url': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'grade': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True'}), - 'graded_certificate_id': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '32', 'null': 'True'}), - 'graded_download_url': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'certificates.revokedcertificate': { - 'Meta': {'object_name': 'RevokedCertificate'}, - 'certificate_id': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '32', 'null': 'True'}), - 'download_url': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'explanation': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True'}), - 'graded_certificate_id': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '32', 'null': 'True'}), - 'graded_download_url': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0008_auto__del_revokedcertificate__del_field_generatedcertificate_name__add.py b/lms/djangoapps/certificates/migrations/0008_auto__del_revokedcertificate__del_field_generatedcertificate_name__add.py deleted file mode 100644 index 872804d2868e..000000000000 --- a/lms/djangoapps/certificates/migrations/0008_auto__del_revokedcertificate__del_field_generatedcertificate_name__add.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'RevokedCertificate' - db.delete_table('certificates_revokedcertificate') - - # Deleting field 'GeneratedCertificate.name' - db.delete_column('certificates_generatedcertificate', 'name') - - # Adding field 'GeneratedCertificate.course_id' - db.add_column('certificates_generatedcertificate', 'course_id', - self.gf('django.db.models.fields.CharField')(default=False, max_length=255), - keep_default=False) - - # Adding field 'GeneratedCertificate.key' - db.add_column('certificates_generatedcertificate', 'key', - self.gf('django.db.models.fields.CharField')(default=False, max_length=32), - keep_default=False) - - - # Changing field 'GeneratedCertificate.grade' - db.alter_column('certificates_generatedcertificate', 'grade', self.gf('django.db.models.fields.CharField')(max_length=5)) - - # Changing field 'GeneratedCertificate.certificate_id' - db.alter_column('certificates_generatedcertificate', 'certificate_id', self.gf('django.db.models.fields.CharField')(max_length=32)) - - # Changing field 'GeneratedCertificate.download_url' - db.alter_column('certificates_generatedcertificate', 'download_url', self.gf('django.db.models.fields.CharField')(max_length=128)) - - # Changing field 'GeneratedCertificate.graded_download_url' - db.alter_column('certificates_generatedcertificate', 'graded_download_url', self.gf('django.db.models.fields.CharField')(max_length=128)) - - # Changing field 'GeneratedCertificate.graded_certificate_id' - db.alter_column('certificates_generatedcertificate', 'graded_certificate_id', self.gf('django.db.models.fields.CharField')(max_length=32)) - - def backwards(self, orm): - # Adding model 'RevokedCertificate' - db.create_table('certificates_revokedcertificate', ( - ('grade', self.gf('django.db.models.fields.CharField')(max_length=5, null=True)), - ('certificate_id', self.gf('django.db.models.fields.CharField')(default=None, max_length=32, null=True)), - ('explanation', self.gf('django.db.models.fields.TextField')(blank=True)), - ('graded_download_url', self.gf('django.db.models.fields.CharField')(max_length=128, null=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('download_url', self.gf('django.db.models.fields.CharField')(max_length=128, null=True)), - ('graded_certificate_id', self.gf('django.db.models.fields.CharField')(default=None, max_length=32, null=True)), - )) - db.send_create_signal('certificates', ['RevokedCertificate']) - - # Adding field 'GeneratedCertificate.name' - db.add_column('certificates_generatedcertificate', 'name', - self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), - keep_default=False) - - # Deleting field 'GeneratedCertificate.course_id' - db.delete_column('certificates_generatedcertificate', 'course_id') - - # Deleting field 'GeneratedCertificate.key' - db.delete_column('certificates_generatedcertificate', 'key') - - - # Changing field 'GeneratedCertificate.grade' - db.alter_column('certificates_generatedcertificate', 'grade', self.gf('django.db.models.fields.CharField')(max_length=5, null=True)) - - # Changing field 'GeneratedCertificate.certificate_id' - db.alter_column('certificates_generatedcertificate', 'certificate_id', self.gf('django.db.models.fields.CharField')(max_length=32, null=True)) - - # Changing field 'GeneratedCertificate.download_url' - db.alter_column('certificates_generatedcertificate', 'download_url', self.gf('django.db.models.fields.CharField')(max_length=128, null=True)) - - # Changing field 'GeneratedCertificate.graded_download_url' - db.alter_column('certificates_generatedcertificate', 'graded_download_url', self.gf('django.db.models.fields.CharField')(max_length=128, null=True)) - - # Changing field 'GeneratedCertificate.graded_certificate_id' - db.alter_column('certificates_generatedcertificate', 'graded_certificate_id', self.gf('django.db.models.fields.CharField')(max_length=32, null=True)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'object_name': 'GeneratedCertificate'}, - 'certificate_id': ('django.db.models.fields.CharField', [], {'default': 'False', 'max_length': '32'}), - 'course_id': ('django.db.models.fields.CharField', [], {'default': 'False', 'max_length': '255'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': 'False', 'max_length': '128'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': 'False', 'max_length': '5'}), - 'graded_certificate_id': ('django.db.models.fields.CharField', [], {'default': 'False', 'max_length': '32'}), - 'graded_download_url': ('django.db.models.fields.CharField', [], {'default': 'False', 'max_length': '128'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': 'False', 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0009_auto__del_field_generatedcertificate_graded_download_url__del_field_ge.py b/lms/djangoapps/certificates/migrations/0009_auto__del_field_generatedcertificate_graded_download_url__del_field_ge.py deleted file mode 100644 index 2ff143431454..000000000000 --- a/lms/djangoapps/certificates/migrations/0009_auto__del_field_generatedcertificate_graded_download_url__del_field_ge.py +++ /dev/null @@ -1,95 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'GeneratedCertificate.graded_download_url' - db.delete_column('certificates_generatedcertificate', 'graded_download_url') - - # Deleting field 'GeneratedCertificate.graded_certificate_id' - db.delete_column('certificates_generatedcertificate', 'graded_certificate_id') - - # Adding field 'GeneratedCertificate.distinction' - db.add_column('certificates_generatedcertificate', 'distinction', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - # Adding unique constraint on 'GeneratedCertificate', fields ['course_id', 'user'] - db.create_unique('certificates_generatedcertificate', ['course_id', 'user_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'GeneratedCertificate', fields ['course_id', 'user'] - db.delete_unique('certificates_generatedcertificate', ['course_id', 'user_id']) - - # Adding field 'GeneratedCertificate.graded_download_url' - db.add_column('certificates_generatedcertificate', 'graded_download_url', - self.gf('django.db.models.fields.CharField')(default=False, max_length=128), - keep_default=False) - - # Adding field 'GeneratedCertificate.graded_certificate_id' - db.add_column('certificates_generatedcertificate', 'graded_certificate_id', - self.gf('django.db.models.fields.CharField')(default=False, max_length=32), - keep_default=False) - - # Deleting field 'GeneratedCertificate.distinction' - db.delete_column('certificates_generatedcertificate', 'distinction') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'certificate_id': ('django.db.models.fields.CharField', [], {'default': 'False', 'max_length': '32'}), - 'course_id': ('django.db.models.fields.CharField', [], {'default': 'False', 'max_length': '255'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': 'False', 'max_length': '128'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': 'False', 'max_length': '5'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': 'False', 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0010_auto__del_field_generatedcertificate_enabled__add_field_generatedcerti.py b/lms/djangoapps/certificates/migrations/0010_auto__del_field_generatedcertificate_enabled__add_field_generatedcerti.py deleted file mode 100644 index a41e58cc3b8c..000000000000 --- a/lms/djangoapps/certificates/migrations/0010_auto__del_field_generatedcertificate_enabled__add_field_generatedcerti.py +++ /dev/null @@ -1,81 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'GeneratedCertificate.enabled' - db.delete_column('certificates_generatedcertificate', 'enabled') - - # Adding field 'GeneratedCertificate.status' - db.add_column('certificates_generatedcertificate', 'status', - self.gf('django.db.models.fields.CharField')(default='unavailable', max_length=32), - keep_default=False) - - - def backwards(self, orm): - # Adding field 'GeneratedCertificate.enabled' - db.add_column('certificates_generatedcertificate', 'enabled', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - # Deleting field 'GeneratedCertificate.status' - db.delete_column('certificates_generatedcertificate', 'status') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'certificate_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'course_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0011_auto__del_field_generatedcertificate_certificate_id__add_field_generat.py b/lms/djangoapps/certificates/migrations/0011_auto__del_field_generatedcertificate_certificate_id__add_field_generat.py deleted file mode 100644 index 155839a82f25..000000000000 --- a/lms/djangoapps/certificates/migrations/0011_auto__del_field_generatedcertificate_certificate_id__add_field_generat.py +++ /dev/null @@ -1,90 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'GeneratedCertificate.certificate_id' - db.delete_column('certificates_generatedcertificate', 'certificate_id') - - # Adding field 'GeneratedCertificate.verify_uuid' - db.add_column('certificates_generatedcertificate', 'verify_uuid', - self.gf('django.db.models.fields.CharField')(default='', max_length=32, blank=True), - keep_default=False) - - # Adding field 'GeneratedCertificate.download_uuid' - db.add_column('certificates_generatedcertificate', 'download_uuid', - self.gf('django.db.models.fields.CharField')(default='', max_length=32, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Adding field 'GeneratedCertificate.certificate_id' - db.add_column('certificates_generatedcertificate', 'certificate_id', - self.gf('django.db.models.fields.CharField')(default='', max_length=32, blank=True), - keep_default=False) - - # Deleting field 'GeneratedCertificate.verify_uuid' - db.delete_column('certificates_generatedcertificate', 'verify_uuid') - - # Deleting field 'GeneratedCertificate.download_uuid' - db.delete_column('certificates_generatedcertificate', 'download_uuid') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0012_auto__add_field_generatedcertificate_name__add_field_generatedcertific.py b/lms/djangoapps/certificates/migrations/0012_auto__add_field_generatedcertificate_name__add_field_generatedcertific.py deleted file mode 100644 index 9261654ec885..000000000000 --- a/lms/djangoapps/certificates/migrations/0012_auto__add_field_generatedcertificate_name__add_field_generatedcertific.py +++ /dev/null @@ -1,93 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'GeneratedCertificate.name' - db.add_column('certificates_generatedcertificate', 'name', - self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), - keep_default=False) - - # Adding field 'GeneratedCertificate.created_date' - db.add_column('certificates_generatedcertificate', 'created_date', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, auto_now_add=True, blank=True), - keep_default=False) - - # Adding field 'GeneratedCertificate.modified_date' - db.add_column('certificates_generatedcertificate', 'modified_date', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, auto_now=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'GeneratedCertificate.name' - db.delete_column('certificates_generatedcertificate', 'name') - - # Deleting field 'GeneratedCertificate.created_date' - db.delete_column('certificates_generatedcertificate', 'created_date') - - # Deleting field 'GeneratedCertificate.modified_date' - db.delete_column('certificates_generatedcertificate', 'modified_date') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'modified_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0013_auto__add_field_generatedcertificate_error_reason.py b/lms/djangoapps/certificates/migrations/0013_auto__add_field_generatedcertificate_error_reason.py deleted file mode 100644 index 6031c8055b6e..000000000000 --- a/lms/djangoapps/certificates/migrations/0013_auto__add_field_generatedcertificate_error_reason.py +++ /dev/null @@ -1,78 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'GeneratedCertificate.error_reason' - db.add_column('certificates_generatedcertificate', 'error_reason', - self.gf('django.db.models.fields.CharField')(default='', max_length=512, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'GeneratedCertificate.error_reason' - db.delete_column('certificates_generatedcertificate', 'error_reason') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'error_reason': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '512', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'modified_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0014_adding_whitelist.py b/lms/djangoapps/certificates/migrations/0014_adding_whitelist.py deleted file mode 100644 index 0aafea406788..000000000000 --- a/lms/djangoapps/certificates/migrations/0014_adding_whitelist.py +++ /dev/null @@ -1,89 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CertificateWhitelist' - db.create_table('certificates_certificatewhitelist', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('course_id', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True)), - ('whitelist', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('certificates', ['CertificateWhitelist']) - - - def backwards(self, orm): - # Deleting model 'CertificateWhitelist' - db.delete_table('certificates_certificatewhitelist') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.certificatewhitelist': { - 'Meta': {'object_name': 'CertificateWhitelist'}, - 'course_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'whitelist': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'error_reason': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '512', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'modified_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0015_adding_mode_for_verified_certs.py b/lms/djangoapps/certificates/migrations/0015_adding_mode_for_verified_certs.py deleted file mode 100644 index 4423f4e2261f..000000000000 --- a/lms/djangoapps/certificates/migrations/0015_adding_mode_for_verified_certs.py +++ /dev/null @@ -1,86 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'GeneratedCertificate.mode' - db.add_column('certificates_generatedcertificate', 'mode', - self.gf('django.db.models.fields.CharField')(default='honor', max_length=32), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'GeneratedCertificate.mode' - db.delete_column('certificates_generatedcertificate', 'mode') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.certificatewhitelist': { - 'Meta': {'object_name': 'CertificateWhitelist'}, - 'course_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'whitelist': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'error_reason': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '512', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '32'}), - 'modified_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0016_change_course_key_fields.py b/lms/djangoapps/certificates/migrations/0016_change_course_key_fields.py deleted file mode 100644 index 68937509038f..000000000000 --- a/lms/djangoapps/certificates/migrations/0016_change_course_key_fields.py +++ /dev/null @@ -1,90 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'GeneratedCertificate.course_id' - db.alter_column('certificates_generatedcertificate', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)) - - # Changing field 'CertificateWhitelist.course_id' - db.alter_column('certificates_certificatewhitelist', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)) - - def backwards(self, orm): - - # Changing field 'GeneratedCertificate.course_id' - db.alter_column('certificates_generatedcertificate', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255)) - - # Changing field 'CertificateWhitelist.course_id' - db.alter_column('certificates_certificatewhitelist', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.certificatewhitelist': { - 'Meta': {'object_name': 'CertificateWhitelist'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'whitelist': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'error_reason': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '512', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '32'}), - 'modified_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0017_auto__add_certificategenerationconfiguration.py b/lms/djangoapps/certificates/migrations/0017_auto__add_certificategenerationconfiguration.py deleted file mode 100644 index 5bf618a49d5e..000000000000 --- a/lms/djangoapps/certificates/migrations/0017_auto__add_certificategenerationconfiguration.py +++ /dev/null @@ -1,96 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CertificateGenerationConfiguration' - db.create_table('certificates_certificategenerationconfiguration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('certificates', ['CertificateGenerationConfiguration']) - - def backwards(self, orm): - # Deleting model 'CertificateGenerationConfiguration' - db.delete_table('certificates_certificategenerationconfiguration') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.certificategenerationconfiguration': { - 'Meta': {'object_name': 'CertificateGenerationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificatewhitelist': { - 'Meta': {'object_name': 'CertificateWhitelist'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'whitelist': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'error_reason': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '512', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '32'}), - 'modified_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0018_add_example_cert_models.py b/lms/djangoapps/certificates/migrations/0018_add_example_cert_models.py deleted file mode 100644 index 372f45fd1668..000000000000 --- a/lms/djangoapps/certificates/migrations/0018_add_example_cert_models.py +++ /dev/null @@ -1,159 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CertificateGenerationCourseSetting' - db.create_table('certificates_certificategenerationcoursesetting', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('course_key', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('certificates', ['CertificateGenerationCourseSetting']) - - # Adding model 'ExampleCertificate' - db.create_table('certificates_examplecertificate', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('example_cert_set', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['certificates.ExampleCertificateSet'])), - ('description', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('uuid', self.gf('django.db.models.fields.CharField')(default='2017ea093523484cb355fac9c3e7a22b', unique=True, max_length=255, db_index=True)), - ('access_key', self.gf('django.db.models.fields.CharField')(default='8dc842be46484291a65b9ea34c3a8af8', max_length=255, db_index=True)), - ('full_name', self.gf('django.db.models.fields.CharField')(default=u'John Do\xeb', max_length=255)), - ('template', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('status', self.gf('django.db.models.fields.CharField')(default='started', max_length=255)), - ('error_reason', self.gf('django.db.models.fields.TextField')(default=None, null=True)), - ('download_url', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, null=True)), - )) - db.create_index('certificates_examplecertificate', ['uuid', 'access_key']) - db.send_create_signal('certificates', ['ExampleCertificate']) - - # Adding model 'ExampleCertificateSet' - db.create_table('certificates_examplecertificateset', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('course_key', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - )) - db.send_create_signal('certificates', ['ExampleCertificateSet']) - - def backwards(self, orm): - # Deleting model 'CertificateGenerationCourseSetting' - db.delete_table('certificates_certificategenerationcoursesetting') - - # Deleting model 'ExampleCertificate' - db.delete_table('certificates_examplecertificate') - - # Deleting model 'ExampleCertificateSet' - db.delete_table('certificates_examplecertificateset') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.certificategenerationconfiguration': { - 'Meta': {'object_name': 'CertificateGenerationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificategenerationcoursesetting': { - 'Meta': {'object_name': 'CertificateGenerationCourseSetting'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.certificatewhitelist': { - 'Meta': {'object_name': 'CertificateWhitelist'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'whitelist': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'certificates.examplecertificate': { - 'Meta': {'object_name': 'ExampleCertificate'}, - 'access_key': ('django.db.models.fields.CharField', [], {'default': "'616e8368b9b2458b8ef8217713275322'", 'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}), - 'error_reason': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}), - 'example_cert_set': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['certificates.ExampleCertificateSet']"}), - 'full_name': ('django.db.models.fields.CharField', [], {'default': "u'John Do\\xeb'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'started'", 'max_length': '255'}), - 'template': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "'f38e7389280d4776907ebf96ac728bac'", 'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'certificates.examplecertificateset': { - 'Meta': {'object_name': 'ExampleCertificateSet'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'error_reason': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '512', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '32'}), - 'modified_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0019_auto__add_certificatehtmlviewconfiguration.py b/lms/djangoapps/certificates/migrations/0019_auto__add_certificatehtmlviewconfiguration.py deleted file mode 100644 index fe5d4b9a4b6f..000000000000 --- a/lms/djangoapps/certificates/migrations/0019_auto__add_certificatehtmlviewconfiguration.py +++ /dev/null @@ -1,104 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CertificateHtmlViewConfiguration' - db.create_table('certificates_certificatehtmlviewconfiguration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('configuration', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('certificates', ['CertificateHtmlViewConfiguration']) - - def backwards(self, orm): - # Deleting model 'CertificateHtmlViewConfiguration' - db.delete_table('certificates_certificatehtmlviewconfiguration') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.certificategenerationconfiguration': { - 'Meta': {'object_name': 'CertificateGenerationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificatehtmlviewconfiguration': { - 'Meta': {'object_name': 'CertificateHtmlViewConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'configuration': ('django.db.models.fields.TextField', [], {}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificatewhitelist': { - 'Meta': {'object_name': 'CertificateWhitelist'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'whitelist': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'error_reason': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '512', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '32'}), - 'modified_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0020_certificatehtmlviewconfiguration_data.py b/lms/djangoapps/certificates/migrations/0020_certificatehtmlviewconfiguration_data.py deleted file mode 100644 index 5ba8142ec36b..000000000000 --- a/lms/djangoapps/certificates/migrations/0020_certificatehtmlviewconfiguration_data.py +++ /dev/null @@ -1,156 +0,0 @@ -# -*- coding: utf-8 -*- -import json -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - - -class Migration(DataMigration): - - def forwards(self, orm): - """ - Bootstraps the HTML view template with some default configuration parameters - """ - config = { - "default": { - "accomplishment_class_append": "accomplishment-certificate", - "platform_name": "Your Platform Name Here", - "company_about_url": "http://www.example.com/about-us", - "company_privacy_url": "http://www.example.com/privacy-policy", - "company_tos_url": "http://www.example.com/terms-service", - "company_verified_certificate_url": "http://www.example.com/verified-certificate", - "logo_src": "/static/certificates/images/logo.png", - "logo_url": "http://www.example.com" - }, - "honor": { - "certificate_type": "Honor Code", - "certificate_title": "Certificate of Achievement", - }, - "verified": { - "certificate_type": "Verified", - "certificate_title": "Verified Certificate of Achievement", - } - } - orm.CertificateHtmlViewConfiguration.objects.create( - configuration=json.dumps(config), - enabled=False, - ) - - def backwards(self, orm): - """ - Rolling back to zero-state, so remove all currently-defined configurations - """ - orm.CertificateHtmlViewConfiguration.objects.all().delete() - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.certificategenerationconfiguration': { - 'Meta': {'object_name': 'CertificateGenerationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificategenerationcoursesetting': { - 'Meta': {'object_name': 'CertificateGenerationCourseSetting'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.certificatehtmlviewconfiguration': { - 'Meta': {'object_name': 'CertificateHtmlViewConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'configuration': ('django.db.models.fields.TextField', [], {}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificatewhitelist': { - 'Meta': {'object_name': 'CertificateWhitelist'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'whitelist': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'certificates.examplecertificate': { - 'Meta': {'object_name': 'ExampleCertificate'}, - 'access_key': ('django.db.models.fields.CharField', [], {'default': "'0836d966ec2047e18114969f89ee5270'", 'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}), - 'error_reason': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}), - 'example_cert_set': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['certificates.ExampleCertificateSet']"}), - 'full_name': ('django.db.models.fields.CharField', [], {'default': "u'John Do\\xeb'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'started'", 'max_length': '255'}), - 'template': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "'558539cc3a114c48a1cc404a73d4cfcd'", 'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'certificates.examplecertificateset': { - 'Meta': {'object_name': 'ExampleCertificateSet'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'error_reason': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '512', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '32'}), - 'modified_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] - symmetrical = True diff --git a/lms/djangoapps/certificates/migrations/0021_auto__add_badgeassertion__add_unique_badgeassertion_course_id_user__ad.py b/lms/djangoapps/certificates/migrations/0021_auto__add_badgeassertion__add_unique_badgeassertion_course_id_user__ad.py deleted file mode 100644 index 90dd7a0cbaf3..000000000000 --- a/lms/djangoapps/certificates/migrations/0021_auto__add_badgeassertion__add_unique_badgeassertion_course_id_user__ad.py +++ /dev/null @@ -1,169 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'BadgeAssertion' - db.create_table('certificates_badgeassertion', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(default=None, max_length=255, blank=True)), - ('mode', self.gf('django.db.models.fields.CharField')(max_length=100)), - ('data', self.gf('django.db.models.fields.TextField')(default='{}')), - )) - db.send_create_signal('certificates', ['BadgeAssertion']) - - # Adding unique constraint on 'BadgeAssertion', fields ['course_id', 'user'] - db.create_unique('certificates_badgeassertion', ['course_id', 'user_id']) - - # Adding model 'BadgeImageConfiguration' - db.create_table('certificates_badgeimageconfiguration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('mode', self.gf('django.db.models.fields.CharField')(unique=True, max_length=125)), - ('icon', self.gf('django.db.models.fields.files.ImageField')(max_length=100)), - ('default', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('certificates', ['BadgeImageConfiguration']) - - - def backwards(self, orm): - # Removing unique constraint on 'BadgeAssertion', fields ['course_id', 'user'] - db.delete_unique('certificates_badgeassertion', ['course_id', 'user_id']) - - # Deleting model 'BadgeAssertion' - db.delete_table('certificates_badgeassertion') - - # Deleting model 'BadgeImageConfiguration' - db.delete_table('certificates_badgeimageconfiguration') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.badgeassertion': { - 'Meta': {'unique_together': "(('course_id', 'user'),)", 'object_name': 'BadgeAssertion'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'data': ('django.db.models.fields.TextField', [], {'default': "'{}'"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'certificates.badgeimageconfiguration': { - 'Meta': {'object_name': 'BadgeImageConfiguration'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'icon': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '125'}) - }, - 'certificates.certificategenerationconfiguration': { - 'Meta': {'object_name': 'CertificateGenerationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificategenerationcoursesetting': { - 'Meta': {'object_name': 'CertificateGenerationCourseSetting'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.certificatehtmlviewconfiguration': { - 'Meta': {'object_name': 'CertificateHtmlViewConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'configuration': ('django.db.models.fields.TextField', [], {}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificatewhitelist': { - 'Meta': {'object_name': 'CertificateWhitelist'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'whitelist': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'certificates.examplecertificate': { - 'Meta': {'object_name': 'ExampleCertificate'}, - 'access_key': ('django.db.models.fields.CharField', [], {'default': "'fa917079f0aa4f969e92bd8722d082c6'", 'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}), - 'error_reason': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}), - 'example_cert_set': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['certificates.ExampleCertificateSet']"}), - 'full_name': ('django.db.models.fields.CharField', [], {'default': "u'John Do\\xeb'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'started'", 'max_length': '255'}), - 'template': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "'ac948bae296c4d54a87bdd3e6c177adf'", 'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'certificates.examplecertificateset': { - 'Meta': {'object_name': 'ExampleCertificateSet'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'error_reason': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '512', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '32'}), - 'modified_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] \ No newline at end of file diff --git a/lms/djangoapps/certificates/migrations/0022_default_modes.py b/lms/djangoapps/certificates/migrations/0022_default_modes.py deleted file mode 100644 index 10d6334b04e0..000000000000 --- a/lms/djangoapps/certificates/migrations/0022_default_modes.py +++ /dev/null @@ -1,152 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models -from django.core.files import File -from django.conf import settings - - -class Migration(DataMigration): - - def forwards(self, orm): - """Add default modes""" - for mode in ['honor', 'verified', 'professional']: - conf = orm.BadgeImageConfiguration() - conf.mode = mode - file_name = mode + '.png' - conf.icon.save( - 'badges/{}'.format(file_name), - File(open(settings.PROJECT_ROOT / 'static' / 'images' / 'default-badges' / file_name)) - ) - conf.save() - - def backwards(self, orm): - """Do nothing, assumptions too dangerous.""" - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.badgeassertion': { - 'Meta': {'unique_together': "(('course_id', 'user'),)", 'object_name': 'BadgeAssertion'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'data': ('django.db.models.fields.TextField', [], {'default': "'{}'"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'certificates.badgeimageconfiguration': { - 'Meta': {'object_name': 'BadgeImageConfiguration'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'icon': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '125'}) - }, - 'certificates.certificategenerationconfiguration': { - 'Meta': {'object_name': 'CertificateGenerationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificategenerationcoursesetting': { - 'Meta': {'object_name': 'CertificateGenerationCourseSetting'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.certificatehtmlviewconfiguration': { - 'Meta': {'object_name': 'CertificateHtmlViewConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'configuration': ('django.db.models.fields.TextField', [], {}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificatewhitelist': { - 'Meta': {'object_name': 'CertificateWhitelist'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'whitelist': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'certificates.examplecertificate': { - 'Meta': {'object_name': 'ExampleCertificate'}, - 'access_key': ('django.db.models.fields.CharField', [], {'default': "'6712301c558d4f41a0491bb12c9ab688'", 'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}), - 'error_reason': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}), - 'example_cert_set': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['certificates.ExampleCertificateSet']"}), - 'full_name': ('django.db.models.fields.CharField', [], {'default': "u'John Do\\xeb'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'started'", 'max_length': '255'}), - 'template': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "'86d042630fdf4efcb8e705baad30c89f'", 'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'certificates.examplecertificateset': { - 'Meta': {'object_name': 'ExampleCertificateSet'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'error_reason': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '512', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '32'}), - 'modified_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] - symmetrical = True diff --git a/lms/djangoapps/certificates/migrations/0023_auto__del_unique_badgeassertion_course_id_user__add_unique_badgeassert.py b/lms/djangoapps/certificates/migrations/0023_auto__del_unique_badgeassertion_course_id_user__add_unique_badgeassert.py deleted file mode 100644 index 66035e395c3d..000000000000 --- a/lms/djangoapps/certificates/migrations/0023_auto__del_unique_badgeassertion_course_id_user__add_unique_badgeassert.py +++ /dev/null @@ -1,150 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Removing unique constraint on 'BadgeAssertion', fields ['course_id', 'user'] - db.delete_unique('certificates_badgeassertion', ['course_id', 'user_id']) - - # Adding unique constraint on 'BadgeAssertion', fields ['course_id', 'user', 'mode'] - db.create_unique('certificates_badgeassertion', ['course_id', 'user_id', 'mode']) - - - def backwards(self, orm): - # Removing unique constraint on 'BadgeAssertion', fields ['course_id', 'user', 'mode'] - db.delete_unique('certificates_badgeassertion', ['course_id', 'user_id', 'mode']) - - # Adding unique constraint on 'BadgeAssertion', fields ['course_id', 'user'] - db.create_unique('certificates_badgeassertion', ['course_id', 'user_id']) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.badgeassertion': { - 'Meta': {'unique_together': "(('course_id', 'user', 'mode'),)", 'object_name': 'BadgeAssertion'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'data': ('django.db.models.fields.TextField', [], {'default': "'{}'"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'certificates.badgeimageconfiguration': { - 'Meta': {'object_name': 'BadgeImageConfiguration'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'icon': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '125'}) - }, - 'certificates.certificategenerationconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'CertificateGenerationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificategenerationcoursesetting': { - 'Meta': {'object_name': 'CertificateGenerationCourseSetting'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.certificatehtmlviewconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'CertificateHtmlViewConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'configuration': ('django.db.models.fields.TextField', [], {}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificatewhitelist': { - 'Meta': {'object_name': 'CertificateWhitelist'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'whitelist': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'certificates.examplecertificate': { - 'Meta': {'object_name': 'ExampleCertificate'}, - 'access_key': ('django.db.models.fields.CharField', [], {'default': "'25c5af67da3d47039aa8b00b3a929fa9'", 'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}), - 'error_reason': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}), - 'example_cert_set': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['certificates.ExampleCertificateSet']"}), - 'full_name': ('django.db.models.fields.CharField', [], {'default': "u'John Do\\xeb'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'started'", 'max_length': '255'}), - 'template': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "'88190407a2f14c429a7b5336e3fb0189'", 'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'certificates.examplecertificateset': { - 'Meta': {'object_name': 'ExampleCertificateSet'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'error_reason': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '512', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '32'}), - 'modified_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] \ No newline at end of file diff --git a/lms/djangoapps/certificates/migrations/0024_auto__add_certificatetemplate__add_unique_certificatetemplate_organiza.py b/lms/djangoapps/certificates/migrations/0024_auto__add_certificatetemplate__add_unique_certificatetemplate_organiza.py deleted file mode 100644 index 006342f6e7ad..000000000000 --- a/lms/djangoapps/certificates/migrations/0024_auto__add_certificatetemplate__add_unique_certificatetemplate_organiza.py +++ /dev/null @@ -1,197 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'CertificateTemplate' - db.create_table('certificates_certificatetemplate', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('description', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)), - ('template', self.gf('django.db.models.fields.TextField')()), - ('organization_id', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)), - ('course_key', self.gf('xmodule_django.models.CourseKeyField')(db_index=True, max_length=255, null=True, blank=True)), - ('mode', self.gf('django.db.models.fields.CharField')(default='honor', max_length=125, null=True, blank=True)), - ('is_active', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('certificates', ['CertificateTemplate']) - - # Adding unique constraint on 'CertificateTemplate', fields ['organization_id', 'course_key', 'mode'] - db.create_unique('certificates_certificatetemplate', ['organization_id', 'course_key', 'mode']) - - # Adding model 'CertificateTemplateAsset' - db.create_table('certificates_certificatetemplateasset', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('description', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)), - ('asset', self.gf('django.db.models.fields.files.FileField')(max_length=255)), - )) - db.send_create_signal('certificates', ['CertificateTemplateAsset']) - - - def backwards(self, orm): - # Removing unique constraint on 'CertificateTemplate', fields ['organization_id', 'course_key', 'mode'] - db.delete_unique('certificates_certificatetemplate', ['organization_id', 'course_key', 'mode']) - - # Deleting model 'CertificateTemplate' - db.delete_table('certificates_certificatetemplate') - - # Deleting model 'CertificateTemplateAsset' - db.delete_table('certificates_certificatetemplateasset') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.badgeassertion': { - 'Meta': {'unique_together': "(('course_id', 'user', 'mode'),)", 'object_name': 'BadgeAssertion'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'data': ('django.db.models.fields.TextField', [], {'default': "'{}'"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'certificates.badgeimageconfiguration': { - 'Meta': {'object_name': 'BadgeImageConfiguration'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'icon': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '125'}) - }, - 'certificates.certificategenerationconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'CertificateGenerationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificategenerationcoursesetting': { - 'Meta': {'object_name': 'CertificateGenerationCourseSetting'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.certificatehtmlviewconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'CertificateHtmlViewConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'configuration': ('django.db.models.fields.TextField', [], {}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificatetemplate': { - 'Meta': {'unique_together': "(('organization_id', 'course_key', 'mode'),)", 'object_name': 'CertificateTemplate'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '125', 'null': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'organization_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'template': ('django.db.models.fields.TextField', [], {}) - }, - 'certificates.certificatetemplateasset': { - 'Meta': {'object_name': 'CertificateTemplateAsset'}, - 'asset': ('django.db.models.fields.files.FileField', [], {'max_length': '255'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.certificatewhitelist': { - 'Meta': {'object_name': 'CertificateWhitelist'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'whitelist': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'certificates.examplecertificate': { - 'Meta': {'object_name': 'ExampleCertificate'}, - 'access_key': ('django.db.models.fields.CharField', [], {'default': "'f14d7721cd154a57a4fb52b9d4b4bc75'", 'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}), - 'error_reason': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}), - 'example_cert_set': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['certificates.ExampleCertificateSet']"}), - 'full_name': ('django.db.models.fields.CharField', [], {'default': "u'John Do\\xeb'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'started'", 'max_length': '255'}), - 'template': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "'789810b9a54b4dd5bae3feec5b4e9fdb'", 'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'certificates.examplecertificateset': { - 'Meta': {'object_name': 'ExampleCertificateSet'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'error_reason': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '512', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '32'}), - 'modified_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] \ No newline at end of file diff --git a/lms/djangoapps/certificates/migrations/0025_auto__add_field_certificatewhitelist_created__add_field_certificatewhi.py b/lms/djangoapps/certificates/migrations/0025_auto__add_field_certificatewhitelist_created__add_field_certificatewhi.py deleted file mode 100644 index cb1ec5b86310..000000000000 --- a/lms/djangoapps/certificates/migrations/0025_auto__add_field_certificatewhitelist_created__add_field_certificatewhi.py +++ /dev/null @@ -1,177 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CertificateWhitelist.created' - db.add_column('certificates_certificatewhitelist', 'created', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, blank=True), - keep_default=False) - - # Adding field 'CertificateWhitelist.notes' - db.add_column('certificates_certificatewhitelist', 'notes', - self.gf('django.db.models.fields.TextField')(default=None, null=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CertificateWhitelist.created' - db.delete_column('certificates_certificatewhitelist', 'created') - - # Deleting field 'CertificateWhitelist.notes' - db.delete_column('certificates_certificatewhitelist', 'notes') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'certificates.badgeassertion': { - 'Meta': {'unique_together': "(('course_id', 'user', 'mode'),)", 'object_name': 'BadgeAssertion'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'data': ('django.db.models.fields.TextField', [], {'default': "'{}'"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'certificates.badgeimageconfiguration': { - 'Meta': {'object_name': 'BadgeImageConfiguration'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'icon': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '125'}) - }, - 'certificates.certificategenerationconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'CertificateGenerationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificategenerationcoursesetting': { - 'Meta': {'object_name': 'CertificateGenerationCourseSetting'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.certificatehtmlviewconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'CertificateHtmlViewConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'configuration': ('django.db.models.fields.TextField', [], {}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'certificates.certificatetemplate': { - 'Meta': {'unique_together': "(('organization_id', 'course_key', 'mode'),)", 'object_name': 'CertificateTemplate'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '125', 'null': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'organization_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'template': ('django.db.models.fields.TextField', [], {}) - }, - 'certificates.certificatetemplateasset': { - 'Meta': {'object_name': 'CertificateTemplateAsset'}, - 'asset': ('django.db.models.fields.files.FileField', [], {'max_length': '255'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.certificatewhitelist': { - 'Meta': {'object_name': 'CertificateWhitelist'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'notes': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'whitelist': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'certificates.examplecertificate': { - 'Meta': {'object_name': 'ExampleCertificate'}, - 'access_key': ('django.db.models.fields.CharField', [], {'default': "'7c97c3537f944135b53a6d44ad8774b8'", 'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}), - 'error_reason': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}), - 'example_cert_set': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['certificates.ExampleCertificateSet']"}), - 'full_name': ('django.db.models.fields.CharField', [], {'default': "u'John Do\\xeb'", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'started'", 'max_length': '255'}), - 'template': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "'82a6c6ad7a624746910b0dc584d950e0'", 'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'certificates.examplecertificateset': { - 'Meta': {'object_name': 'ExampleCertificateSet'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'certificates.generatedcertificate': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'GeneratedCertificate'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'default': 'None', 'max_length': '255', 'blank': 'True'}), - 'created_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}), - 'distinction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'download_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'blank': 'True'}), - 'download_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'error_reason': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '512', 'blank': 'True'}), - 'grade': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '5', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '32'}), - 'modified_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'unavailable'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'verify_uuid': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '32', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['certificates'] \ No newline at end of file diff --git a/lms/djangoapps/certificates/models.py b/lms/djangoapps/certificates/models.py index 5e34632c81e0..52ea79ce23a8 100644 --- a/lms/djangoapps/certificates/models.py +++ b/lms/djangoapps/certificates/models.py @@ -103,6 +103,8 @@ class CertificateWhitelist(models.Model): embargoed country restriction list (allow_certificate set to False in userprofile). """ + class Meta(object): + app_label = "certificates" objects = NoneToEmptyManager() @@ -165,14 +167,13 @@ class GeneratedCertificate(models.Model): status = models.CharField(max_length=32, default='unavailable') mode = models.CharField(max_length=32, choices=MODES, default=MODES.honor) name = models.CharField(blank=True, max_length=255) - created_date = models.DateTimeField( - auto_now_add=True, default=datetime.now) - modified_date = models.DateTimeField( - auto_now=True, default=datetime.now) + created_date = models.DateTimeField(auto_now_add=True) + modified_date = models.DateTimeField(auto_now=True) error_reason = models.CharField(max_length=512, blank=True, default='') class Meta(object): unique_together = (('user', 'course_id'),) + app_label = "certificates" @classmethod def certificate_for_student(cls, student, course_id): @@ -289,9 +290,10 @@ class ExampleCertificateSet(TimeStampedModel): class Meta(object): get_latest_by = 'created' + app_label = "certificates" @classmethod - @transaction.commit_on_success + @transaction.atomic def create_example_set(cls, course_key): """Create a set of example certificates for a course. @@ -379,6 +381,9 @@ class ExampleCertificate(TimeStampedModel): 3) We use dummy values. """ + class Meta(object): + app_label = "certificates" + # Statuses STATUS_STARTED = 'started' STATUS_SUCCESS = 'success' @@ -546,6 +551,7 @@ class CertificateGenerationCourseSetting(TimeStampedModel): class Meta(object): get_latest_by = 'created' + app_label = "certificates" @classmethod def is_enabled_for_course(cls, course_key): @@ -592,7 +598,8 @@ class CertificateGenerationConfiguration(ConfigurationModel): certificates. """ - pass + class Meta(ConfigurationModel.Meta): + app_label = "certificates" class CertificateHtmlViewConfiguration(ConfigurationModel): @@ -611,6 +618,9 @@ class CertificateHtmlViewConfiguration(ConfigurationModel): } } """ + class Meta(ConfigurationModel.Meta): + app_label = "certificates" + configuration = models.TextField( help_text="Certificate HTML View Parameters (JSON)" ) @@ -661,6 +671,7 @@ def assertion_url(self): class Meta(object): unique_together = (('course_id', 'user', 'mode'),) + app_label = "certificates" def validate_badge_image(image): @@ -677,6 +688,9 @@ class BadgeImageConfiguration(models.Model): """ Contains the configuration for badges for a specific mode. The mode """ + class Meta(object): + app_label = "certificates" + mode = models.CharField( max_length=125, help_text=_(u'The course mode for this badge image. For example, "verified" or "honor".'), @@ -691,6 +705,7 @@ class BadgeImageConfiguration(models.Model): validators=[validate_badge_image] ) default = models.BooleanField( + default=False, help_text=_( u"Set this value to True if you want this image to be the default image for any course modes " u"that do not have a specified badge image. You can have only one default image." @@ -771,6 +786,7 @@ def __unicode__(self): class Meta(object): get_latest_by = 'created' unique_together = (('organization_id', 'course_key', 'mode'),) + app_label = "certificates" def template_assets_path(instance, filename): @@ -822,6 +838,7 @@ def __unicode__(self): class Meta(object): get_latest_by = 'created' + app_label = "certificates" @receiver(post_save, sender=GeneratedCertificate) diff --git a/lms/djangoapps/certificates/queue.py b/lms/djangoapps/certificates/queue.py index 1279bcdd091c..f8db3a4bd813 100644 --- a/lms/djangoapps/certificates/queue.py +++ b/lms/djangoapps/certificates/queue.py @@ -17,7 +17,7 @@ from capa.xqueue_interface import make_xheader, make_hashkey from course_modes.models import CourseMode from student.models import UserProfile, CourseEnrollment -from verify_student.models import SoftwareSecurePhotoVerification +from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification from certificates.models import ( GeneratedCertificate, diff --git a/lms/djangoapps/certificates/tests/test_queue.py b/lms/djangoapps/certificates/tests/test_queue.py index 1060580a7960..9dede744c5f4 100644 --- a/lms/djangoapps/certificates/tests/test_queue.py +++ b/lms/djangoapps/certificates/tests/test_queue.py @@ -29,7 +29,7 @@ GeneratedCertificate, CertificateStatuses, ) -from verify_student.tests.factories import SoftwareSecurePhotoVerificationFactory +from lms.djangoapps.verify_student.tests.factories import SoftwareSecurePhotoVerificationFactory @ddt.ddt diff --git a/lms/djangoapps/certificates/views/support.py b/lms/djangoapps/certificates/views/support.py index 9cabc9baff68..801775ee8ae2 100644 --- a/lms/djangoapps/certificates/views/support.py +++ b/lms/djangoapps/certificates/views/support.py @@ -14,6 +14,7 @@ HttpResponseServerError ) from django.views.decorators.http import require_GET, require_POST +from django.db import transaction from django.db.models import Q from django.utils.translation import ugettext as _ @@ -122,6 +123,8 @@ def _validate_regen_post_params(params): return {"user": user, "course_key": course_key}, None +# Grades can potentially be written - if so, let grading manage the transaction. +@transaction.non_atomic_requests @require_POST @require_certificate_permission def regenerate_certificate_for_user(request): diff --git a/lms/djangoapps/certificates/views/xqueue.py b/lms/djangoapps/certificates/views/xqueue.py index 453fe9c0b923..bd60e5221b78 100644 --- a/lms/djangoapps/certificates/views/xqueue.py +++ b/lms/djangoapps/certificates/views/xqueue.py @@ -5,6 +5,7 @@ import logging from django.contrib.auth.models import User +from django.db import transaction from django.http import HttpResponse, Http404, HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST @@ -27,6 +28,8 @@ log = logging.getLogger(__name__) +# Grades can potentially be written - if so, let grading manage the transaction. +@transaction.non_atomic_requests @csrf_exempt def request_certificate(request): """Request the on-demand creation of a certificate for some user, course. @@ -48,8 +51,8 @@ def request_certificate(request): log_msg = u'Grading and certification requested for user %s in course %s via /request_certificate call' log.info(log_msg, username, course_key) status = generate_user_certificates(student, course_key, course=course) - return HttpResponse(json.dumps({'add_status': status}), mimetype='application/json') - return HttpResponse(json.dumps({'add_status': 'ERRORANONYMOUSUSER'}), mimetype='application/json') + return HttpResponse(json.dumps({'add_status': status}), content_type='application/json') + return HttpResponse(json.dumps({'add_status': 'ERRORANONYMOUSUSER'}), content_type='application/json') @csrf_exempt @@ -89,7 +92,7 @@ def update_certificate(request): return HttpResponse(json.dumps({ 'return_code': 1, 'content': 'unable to lookup key' - }), mimetype='application/json') + }), content_type='application/json') if 'error' in xqueue_body: cert.status = status.error @@ -123,7 +126,7 @@ def update_certificate(request): 'return_code': 1, 'content': 'invalid cert status' }), - mimetype='application/json' + content_type='application/json' ) dog_stats_api.increment(XQUEUE_METRIC_NAME, tags=[ @@ -133,7 +136,7 @@ def update_certificate(request): cert.save() return HttpResponse(json.dumps({'return_code': 0}), - mimetype='application/json') + content_type='application/json') @csrf_exempt diff --git a/lms/djangoapps/class_dashboard/views.py b/lms/djangoapps/class_dashboard/views.py index afb89c1e1028..c5d6db4be595 100644 --- a/lms/djangoapps/class_dashboard/views.py +++ b/lms/djangoapps/class_dashboard/views.py @@ -49,7 +49,7 @@ def all_sequential_open_distrib(request, course_id): else: data = {'error': "Access Denied: User does not have access to this course's data"} - return HttpResponse(json.dumps(data), mimetype="application/json") + return HttpResponse(json.dumps(data), content_type="application/json") def all_problem_grade_distribution(request, course_id): @@ -75,7 +75,7 @@ def all_problem_grade_distribution(request, course_id): else: data = {'error': "Access Denied: User does not have access to this course's data"} - return HttpResponse(json.dumps(data), mimetype="application/json") + return HttpResponse(json.dumps(data), content_type="application/json") def section_problem_grade_distrib(request, course_id, section): @@ -106,4 +106,4 @@ def section_problem_grade_distrib(request, course_id, section): else: data = {'error': "Access Denied: User does not have access to this course's data"} - return HttpResponse(json.dumps(data), mimetype="application/json") + return HttpResponse(json.dumps(data), content_type="application/json") diff --git a/lms/djangoapps/commerce/api/v1/models.py b/lms/djangoapps/commerce/api/v1/models.py index be014afeed5b..38fdefad48ec 100644 --- a/lms/djangoapps/commerce/api/v1/models.py +++ b/lms/djangoapps/commerce/api/v1/models.py @@ -7,7 +7,7 @@ from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from course_modes.models import CourseMode -from verify_student.models import VerificationDeadline +from lms.djangoapps.verify_student.models import VerificationDeadline log = logging.getLogger(__name__) @@ -54,7 +54,7 @@ def get_mode_display_name(self, mode): return mode.mode_slug - @transaction.commit_on_success + @transaction.atomic def save(self, *args, **kwargs): # pylint: disable=unused-argument """ Save the CourseMode objects to the database. """ @@ -88,6 +88,7 @@ def update(self, attrs): merged_mode.currency = posted_mode.currency merged_mode.sku = posted_mode.sku merged_mode.expiration_datetime = posted_mode.expiration_datetime + merged_mode.save() merged_modes.add(merged_mode) merged_mode_keys.add(merged_mode.mode_slug) diff --git a/lms/djangoapps/commerce/api/v1/tests/test_views.py b/lms/djangoapps/commerce/api/v1/tests/test_views.py index d86ddad5b248..f3db3da0cfcf 100644 --- a/lms/djangoapps/commerce/api/v1/tests/test_views.py +++ b/lms/djangoapps/commerce/api/v1/tests/test_views.py @@ -22,7 +22,7 @@ from commerce.tests.test_views import UserMixin from course_modes.models import CourseMode from student.tests.factories import UserFactory -from verify_student.models import VerificationDeadline +from lms.djangoapps.verify_student.models import VerificationDeadline PASSWORD = 'test' JSON_CONTENT_TYPE = 'application/json' diff --git a/lms/djangoapps/commerce/http.py b/lms/djangoapps/commerce/http.py index ba9e067c0a99..865d69045ee8 100644 --- a/lms/djangoapps/commerce/http.py +++ b/lms/djangoapps/commerce/http.py @@ -10,7 +10,7 @@ class DetailResponse(JsonResponse): def __init__(self, message, status=HTTP_200_OK): data = {'detail': message} - super(DetailResponse, self).__init__(object=data, status=status) + super(DetailResponse, self).__init__(resp_obj=data, status=status) class InternalRequestErrorResponse(DetailResponse): diff --git a/lms/djangoapps/commerce/migrations/0001_add_ecommerce_service_user.py b/lms/djangoapps/commerce/migrations/0001_add_ecommerce_service_user.py deleted file mode 100644 index 2c96467493e7..000000000000 --- a/lms/djangoapps/commerce/migrations/0001_add_ecommerce_service_user.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -from django.conf import settings -from django.contrib.auth.models import User -from django.db import models -from south.db import db -from south.utils import datetime_utils as datetime -from south.v2 import DataMigration - - -class Migration(DataMigration): - username = settings.ECOMMERCE_SERVICE_WORKER_USERNAME - email = username + '@fake.email' - - def forwards(self, orm): - """Add the service user.""" - user = User.objects.create(username=self.username, email=self.email) - user.set_unusable_password() - user.save() - - def backwards(self, orm): - """Remove the service user.""" - User.objects.get(username=self.username, email=self.email).delete() - - models = {} - complete_apps = ['commerce'] - symmetrical = True diff --git a/lms/djangoapps/commerce/migrations/0001_data__add_ecommerce_service_user.py b/lms/djangoapps/commerce/migrations/0001_data__add_ecommerce_service_user.py new file mode 100644 index 000000000000..6d6de14ecda5 --- /dev/null +++ b/lms/djangoapps/commerce/migrations/0001_data__add_ecommerce_service_user.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +from django.conf import settings +from django.contrib.auth.models import User +from django.db import models, migrations + + +USERNAME = settings.ECOMMERCE_SERVICE_WORKER_USERNAME +EMAIL = USERNAME + '@fake.email' + +def forwards(apps, schema_editor): + """Add the service user.""" + user, created = User.objects.get_or_create(username=USERNAME, email=EMAIL) + if created: + user.set_unusable_password() + user.save() + +def backwards(apps, schema_editor): + """Remove the service user.""" + User.objects.get(username=USERNAME, email=EMAIL).delete() + +class Migration(migrations.Migration): + + operations = [ + migrations.RunPython(forwards, backwards), + ] diff --git a/lms/djangoapps/commerce/views.py b/lms/djangoapps/commerce/views.py index 92094e5986b8..75750d598f25 100644 --- a/lms/djangoapps/commerce/views.py +++ b/lms/djangoapps/commerce/views.py @@ -7,7 +7,7 @@ from edxmako.shortcuts import render_to_response from microsite_configuration import microsite -from verify_student.models import SoftwareSecurePhotoVerification +from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification from shoppingcart.processors.CyberSource2 import is_user_payment_error from django.utils.translation import ugettext as _ diff --git a/lms/djangoapps/course_api/blocks/views.py b/lms/djangoapps/course_api/blocks/views.py index ed44d1f496e0..1fb437640829 100644 --- a/lms/djangoapps/course_api/blocks/views.py +++ b/lms/djangoapps/course_api/blocks/views.py @@ -161,7 +161,7 @@ def list(self, request, usage_key_string): # pylint: disable=arguments-differ """ # validate request parameters - requested_params = request.QUERY_PARAMS.copy() + requested_params = request.query_params.copy() requested_params.update({'usage_key': usage_key_string}) params = BlockListGetForm(requested_params, initial={'requesting_user': request.user}) if not params.is_valid(): @@ -236,7 +236,7 @@ def list(self, request): # pylint: disable=arguments-differ """ # convert the requested course_key to the course's root block's usage_key - course_key_string = request.QUERY_PARAMS.get('course_id', None) + course_key_string = request.query_params.get('course_id', None) if not course_key_string: raise ValidationError('course_id is required.') diff --git a/lms/djangoapps/course_wiki/editors.py b/lms/djangoapps/course_wiki/editors.py index ad6631c500cf..eb20915b47a9 100644 --- a/lms/djangoapps/course_wiki/editors.py +++ b/lms/djangoapps/course_wiki/editors.py @@ -1,5 +1,5 @@ from django import forms -from django.forms.util import flatatt +from django.forms.utils import flatatt from django.utils.encoding import force_unicode from django.utils.html import conditional_escape from django.utils.safestring import mark_safe diff --git a/lms/djangoapps/courseware/date_summary.py b/lms/djangoapps/courseware/date_summary.py index 6db3ca131586..86caa903580a 100644 --- a/lms/djangoapps/courseware/date_summary.py +++ b/lms/djangoapps/courseware/date_summary.py @@ -12,7 +12,7 @@ import pytz from course_modes.models import CourseMode -from verify_student.models import VerificationDeadline, SoftwareSecurePhotoVerification +from lms.djangoapps.verify_student.models import VerificationDeadline, SoftwareSecurePhotoVerification from student.models import CourseEnrollment diff --git a/lms/djangoapps/courseware/grades.py b/lms/djangoapps/courseware/grades.py index 008e0644e496..06a5fff5c9f6 100644 --- a/lms/djangoapps/courseware/grades.py +++ b/lms/djangoapps/courseware/grades.py @@ -8,7 +8,6 @@ from contextlib import contextmanager from django.conf import settings -from django.db import transaction from django.test.client import RequestFactory from django.core.cache import cache @@ -18,6 +17,7 @@ from courseware.access import has_access from courseware.model_data import FieldDataCache, ScoresClient from student.models import anonymous_id_for_user +from util.db import outer_atomic from util.module_utils import yield_dynamic_descriptor_descendants from xmodule import graders from xmodule.graders import Score @@ -295,27 +295,25 @@ def url_and_display_name(usage_key): return answer_counts -@transaction.commit_manually def grade(student, request, course, keep_raw_scores=False, field_data_cache=None, scores_client=None): """ - Wraps "_grade" with the manual_transaction context manager just in case - there are unanticipated errors. - Send a signal to update the minimum grade requirement status. + Returns the grade of the student. + + Also sends a signal to update the minimum grade requirement status. """ - with manual_transaction(): - grade_summary = _grade(student, request, course, keep_raw_scores, field_data_cache, scores_client) - responses = GRADES_UPDATED.send_robust( - sender=None, - username=student.username, - grade_summary=grade_summary, - course_key=course.id, - deadline=course.end - ) + grade_summary = _grade(student, request, course, keep_raw_scores, field_data_cache, scores_client) + responses = GRADES_UPDATED.send_robust( + sender=None, + username=student.username, + grade_summary=grade_summary, + course_key=course.id, + deadline=course.end + ) - for receiver, response in responses: - log.info('Signal fired when student grade is calculated. Receiver: %s. Response: %s', receiver, response) + for receiver, response in responses: + log.info('Signal fired when student grade is calculated. Receiver: %s. Response: %s', receiver, response) - return grade_summary + return grade_summary def _grade(student, request, course, keep_raw_scores, field_data_cache, scores_client): @@ -339,11 +337,11 @@ def _grade(student, request, course, keep_raw_scores, field_data_cache, scores_c More information on the format is in the docstring for CourseGrader. """ - if field_data_cache is None: - with manual_transaction(): + with outer_atomic(): + if field_data_cache is None: field_data_cache = field_data_cache_for_grading(course, student) - if scores_client is None: - scores_client = ScoresClient.from_field_data_cache(field_data_cache) + if scores_client is None: + scores_client = ScoresClient.from_field_data_cache(field_data_cache) # Dict of item_ids -> (earned, possible) point tuples. This *only* grabs # scores that were registered with the submissions API, which for the moment @@ -352,14 +350,19 @@ def _grade(student, request, course, keep_raw_scores, field_data_cache, scores_c # XBlock --> submissions --> Django Rest Framework error strings --> # Django translation --> ... --> courseware --> submissions from submissions import api as sub_api # installed from the edx-submissions repository - submissions_scores = sub_api.get_scores(course.id.to_deprecated_string(), anonymous_id_for_user(student, course.id)) - max_scores_cache = MaxScoresCache.create_for_course(course) - # For the moment, we have to get scorable_locations from field_data_cache - # and not from scores_client, because scores_client is ignorant of things - # in the submissions API. As a further refactoring step, submissions should - # be hidden behind the ScoresClient. - max_scores_cache.fetch_from_remote(field_data_cache.scorable_locations) + with outer_atomic(): + submissions_scores = sub_api.get_scores( + course.id.to_deprecated_string(), + anonymous_id_for_user(student, course.id) + ) + max_scores_cache = MaxScoresCache.create_for_course(course) + + # For the moment, we have to get scorable_locations from field_data_cache + # and not from scores_client, because scores_client is ignorant of things + # in the submissions API. As a further refactoring step, submissions should + # be hidden behind the ScoresClient. + max_scores_cache.fetch_from_remote(field_data_cache.scorable_locations) grading_context = course.grading_context raw_scores = [] @@ -373,113 +376,120 @@ def _grade(student, request, course, keep_raw_scores, field_data_cache, scores_c section_descriptor = section['section_descriptor'] section_name = section_descriptor.display_name_with_default - # some problems have state that is updated independently of interaction - # with the LMS, so they need to always be scored. (E.g. foldit., - # combinedopenended) - should_grade_section = any( - descriptor.always_recalculate_grades for descriptor in section['xmoduledescriptors'] - ) - - # If there are no problems that always have to be regraded, check to - # see if any of our locations are in the scores from the submissions - # API. If scores exist, we have to calculate grades for this section. - if not should_grade_section: + with outer_atomic(): + # some problems have state that is updated independently of interaction + # with the LMS, so they need to always be scored. (E.g. foldit., + # combinedopenended) + # TODO This block is causing extra savepoints to be fired that are empty because no queries are executed + # during the loop. When refactoring this code please keep this outer_atomic call in mind and ensure we + # are not making unnecessary database queries. should_grade_section = any( - descriptor.location.to_deprecated_string() in submissions_scores - for descriptor in section['xmoduledescriptors'] + descriptor.always_recalculate_grades for descriptor in section['xmoduledescriptors'] ) - if not should_grade_section: - should_grade_section = any( - descriptor.location in scores_client - for descriptor in section['xmoduledescriptors'] - ) - - # If we haven't seen a single problem in the section, we don't have - # to grade it at all! We can assume 0% - if should_grade_section: - scores = [] - - def create_module(descriptor): - '''creates an XModule instance given a descriptor''' - # TODO: We need the request to pass into here. If we could forego that, our arguments - # would be simpler - return get_module_for_descriptor( - student, request, descriptor, field_data_cache, course.id, course=course + # If there are no problems that always have to be regraded, check to + # see if any of our locations are in the scores from the submissions + # API. If scores exist, we have to calculate grades for this section. + if not should_grade_section: + should_grade_section = any( + descriptor.location.to_deprecated_string() in submissions_scores + for descriptor in section['xmoduledescriptors'] ) - descendants = yield_dynamic_descriptor_descendants(section_descriptor, student.id, create_module) - for module_descriptor in descendants: - user_access = has_access(student, 'load', module_descriptor, module_descriptor.location.course_key) - if not user_access: - continue - - (correct, total) = get_score( - student, - module_descriptor, - create_module, - scores_client, - submissions_scores, - max_scores_cache, + if not should_grade_section: + should_grade_section = any( + descriptor.location in scores_client + for descriptor in section['xmoduledescriptors'] ) - if correct is None and total is None: - continue - if settings.GENERATE_PROFILE_SCORES: # for debugging! - if total > 1: - correct = random.randrange(max(total - 2, 1), total + 1) - else: - correct = total - - graded = module_descriptor.graded - if not total > 0: - # We simply cannot grade a problem that is 12/0, because we might need it as a percentage - graded = False - - scores.append( - Score( - correct, - total, - graded, - module_descriptor.display_name_with_default, - module_descriptor.location + # If we haven't seen a single problem in the section, we don't have + # to grade it at all! We can assume 0% + if should_grade_section: + scores = [] + + def create_module(descriptor): + '''creates an XModule instance given a descriptor''' + # TODO: We need the request to pass into here. If we could forego that, our arguments + # would be simpler + return get_module_for_descriptor( + student, request, descriptor, field_data_cache, course.id, course=course ) - ) - __, graded_total = graders.aggregate_scores(scores, section_name) - if keep_raw_scores: - raw_scores += scores - else: - graded_total = Score(0.0, 1.0, True, section_name, None) - - #Add the graded total to totaled_scores - if graded_total.possible > 0: - format_scores.append(graded_total) - else: - log.info( - "Unable to grade a section with a total possible score of zero. " + - str(section_descriptor.location) - ) + descendants = yield_dynamic_descriptor_descendants(section_descriptor, student.id, create_module) + for module_descriptor in descendants: + user_access = has_access( + student, 'load', module_descriptor, module_descriptor.location.course_key + ) + if not user_access: + continue + + (correct, total) = get_score( + student, + module_descriptor, + create_module, + scores_client, + submissions_scores, + max_scores_cache, + ) + if correct is None and total is None: + continue + + if settings.GENERATE_PROFILE_SCORES: # for debugging! + if total > 1: + correct = random.randrange(max(total - 2, 1), total + 1) + else: + correct = total + + graded = module_descriptor.graded + if not total > 0: + # We simply cannot grade a problem that is 12/0, because we might need it as a percentage + graded = False + + scores.append( + Score( + correct, + total, + graded, + module_descriptor.display_name_with_default, + module_descriptor.location + ) + ) + + __, graded_total = graders.aggregate_scores(scores, section_name) + if keep_raw_scores: + raw_scores += scores + else: + graded_total = Score(0.0, 1.0, True, section_name, None) + + #Add the graded total to totaled_scores + if graded_total.possible > 0: + format_scores.append(graded_total) + else: + log.info( + "Unable to grade a section with a total possible score of zero. " + + str(section_descriptor.location) + ) totaled_scores[section_format] = format_scores - # Grading policy might be overriden by a CCX, need to reset it - course.set_grading_policy(course.grading_policy) - grade_summary = course.grader.grade(totaled_scores, generate_random_scores=settings.GENERATE_PROFILE_SCORES) + with outer_atomic(): + # Grading policy might be overriden by a CCX, need to reset it + course.set_grading_policy(course.grading_policy) + grade_summary = course.grader.grade(totaled_scores, generate_random_scores=settings.GENERATE_PROFILE_SCORES) - # We round the grade here, to make sure that the grade is an whole percentage and - # doesn't get displayed differently than it gets grades - grade_summary['percent'] = round(grade_summary['percent'] * 100 + 0.05) / 100 + # We round the grade here, to make sure that the grade is an whole percentage and + # doesn't get displayed differently than it gets grades + grade_summary['percent'] = round(grade_summary['percent'] * 100 + 0.05) / 100 - letter_grade = grade_for_percentage(course.grade_cutoffs, grade_summary['percent']) - grade_summary['grade'] = letter_grade - grade_summary['totaled_scores'] = totaled_scores # make this available, eg for instructor download & debugging - if keep_raw_scores: - # way to get all RAW scores out to instructor - # so grader can be double-checked - grade_summary['raw_scores'] = raw_scores + letter_grade = grade_for_percentage(course.grade_cutoffs, grade_summary['percent']) + grade_summary['grade'] = letter_grade + grade_summary['totaled_scores'] = totaled_scores # make this available, eg for instructor download & debugging + if keep_raw_scores: + # way to get all RAW scores out to instructor + # so grader can be double-checked + grade_summary['raw_scores'] = raw_scores - max_scores_cache.push_to_remote() + max_scores_cache.push_to_remote() return grade_summary @@ -506,29 +516,24 @@ def grade_for_percentage(grade_cutoffs, percentage): return letter_grade -@transaction.commit_manually def progress_summary(student, request, course, field_data_cache=None, scores_client=None): """ - Wraps "_progress_summary" with the manual_transaction context manager just - in case there are unanticipated errors. + Returns progress summary for all chapters in the course. """ - with manual_transaction(): - progress = _progress_summary(student, request, course, field_data_cache, scores_client) - if progress: - return progress.chapters - else: - return None + progress = _progress_summary(student, request, course, field_data_cache, scores_client) + if progress: + return progress.chapters + else: + return None -@transaction.commit_manually def get_weighted_scores(student, course, field_data_cache=None, scores_client=None): """ Uses the _progress_summary method to return a ProgressSummmary object containing details of a students weighted scores for the course. """ - with manual_transaction(): - request = _get_mock_request(student) - return _progress_summary(student, request, course, field_data_cache, scores_client) + request = _get_mock_request(student) + return _progress_summary(student, request, course, field_data_cache, scores_client) # TODO: This method is not very good. It was written in the old course style and @@ -555,7 +560,7 @@ def _progress_summary(student, request, course, field_data_cache=None, scores_cl will return None. """ - with manual_transaction(): + with outer_atomic(): if field_data_cache is None: field_data_cache = field_data_cache_for_grading(course, student) if scores_client is None: @@ -573,14 +578,17 @@ def _progress_summary(student, request, course, field_data_cache=None, scores_cl # XBlock --> submissions --> Django Rest Framework error strings --> # Django translation --> ... --> courseware --> submissions from submissions import api as sub_api # installed from the edx-submissions repository - submissions_scores = sub_api.get_scores(course.id.to_deprecated_string(), anonymous_id_for_user(student, course.id)) + with outer_atomic(): + submissions_scores = sub_api.get_scores( + course.id.to_deprecated_string(), anonymous_id_for_user(student, course.id) + ) - max_scores_cache = MaxScoresCache.create_for_course(course) - # For the moment, we have to get scorable_locations from field_data_cache - # and not from scores_client, because scores_client is ignorant of things - # in the submissions API. As a further refactoring step, submissions should - # be hidden behind the ScoresClient. - max_scores_cache.fetch_from_remote(field_data_cache.scorable_locations) + max_scores_cache = MaxScoresCache.create_for_course(course) + # For the moment, we have to get scorable_locations from field_data_cache + # and not from scores_client, because scores_client is ignorant of things + # in the submissions API. As a further refactoring step, submissions should + # be hidden behind the ScoresClient. + max_scores_cache.fetch_from_remote(field_data_cache.scorable_locations) chapters = [] locations_to_children = defaultdict(list) @@ -594,7 +602,7 @@ def _progress_summary(student, request, course, field_data_cache=None, scores_cl sections = [] for section_module in chapter_module.get_display_items(): # Skip if the section is hidden - with manual_transaction(): + with outer_atomic(): if section_module.hide_from_toc: continue @@ -745,19 +753,6 @@ def get_score(user, problem_descriptor, module_creator, scores_client, submissio return weighted_score(correct, total, problem_descriptor.weight) -@contextmanager -def manual_transaction(): - """A context manager for managing manual transactions""" - try: - yield - except Exception: - transaction.rollback() - log.exception('Due to an error, this transaction has been rolled back') - raise - else: - transaction.commit() - - def iterate_grades_for(course_or_id, students, keep_raw_scores=False): """Given a course_id and an iterable of students (User), yield a tuple of: diff --git a/lms/djangoapps/courseware/management/commands/clean_history.py b/lms/djangoapps/courseware/management/commands/clean_history.py index 788ac6e39944..d4f22a0e3e5c 100644 --- a/lms/djangoapps/courseware/management/commands/clean_history.py +++ b/lms/djangoapps/courseware/management/commands/clean_history.py @@ -74,20 +74,21 @@ def main(self, batch_size=None, sleep=0): batch_size = batch_size or self.BATCH_SIZE - transaction.enter_transaction_management() - self.last_student_module_id = self.get_last_student_module_id() self.load_state() while self.next_student_module_id <= self.last_student_module_id: - for smid in self.module_ids_to_check(batch_size): - try: - self.clean_one_student_module(smid) - except Exception: # pylint: disable=broad-except - trace = traceback.format_exc() - self.say("Couldn't clean student_module_id {}:\n{}".format(smid, trace)) - if not self.dry_run: - self.commit() + with transaction.atomic(): + for smid in self.module_ids_to_check(batch_size): + try: + self.clean_one_student_module(smid) + except Exception: # pylint: disable=broad-except + trace = traceback.format_exc() + self.say("Couldn't clean student_module_id {}:\n{}".format(smid, trace)) + if self.dry_run: + transaction.set_rollback(True) + else: + self.say("Committing") self.save_state() if sleep: time.sleep(sleep) @@ -101,13 +102,6 @@ def say(self, message): """ print message - def commit(self): - """ - Commit the transaction. - """ - self.say("Committing") - transaction.commit() - def load_state(self): """ Load the latest state from disk. diff --git a/lms/djangoapps/courseware/management/commands/dump_course_ids.py b/lms/djangoapps/courseware/management/commands/dump_course_ids.py index 715fe7cc30fc..95577023dfe8 100644 --- a/lms/djangoapps/courseware/management/commands/dump_course_ids.py +++ b/lms/djangoapps/courseware/management/commands/dump_course_ids.py @@ -35,7 +35,6 @@ def handle(self, *args, **options): if store is None: raise CommandError("Unknown modulestore {}".format(name)) + output = u'\n'.join(unicode(course.id) for course in store.get_courses()) + '\n' - output = u'\n'.join(course.id.to_deprecated_string() for course in store.get_courses()) + '\n' - - return output.encode('utf-8') + return output diff --git a/lms/djangoapps/courseware/management/commands/export_course.py b/lms/djangoapps/courseware/management/commands/export_course.py index 3f09950f8cd6..1b6bb0b594ca 100644 --- a/lms/djangoapps/courseware/management/commands/export_course.py +++ b/lms/djangoapps/courseware/management/commands/export_course.py @@ -37,7 +37,7 @@ def handle(self, *args, **options): results = self._get_results(filename) if pipe_results else None - return results + self.stdout.write(results, ending="") def _parse_arguments(self, args): """Parse command line arguments""" diff --git a/lms/djangoapps/courseware/management/commands/tests/test_clean_history.py b/lms/djangoapps/courseware/management/commands/tests/test_clean_history.py index 01026751c08b..e0c7da7af981 100644 --- a/lms/djangoapps/courseware/management/commands/tests/test_clean_history.py +++ b/lms/djangoapps/courseware/management/commands/tests/test_clean_history.py @@ -393,9 +393,6 @@ def clean_one_student_module(self, smid): if smid in self.exception_smids: raise Exception("Something went wrong!") - def commit(self): - self.say("(not really committing)") - @attr('shard_1') class HistoryCleanerMainTest(HistoryCleanerTest): @@ -413,7 +410,7 @@ def test_only_one_record(self): 'No stored state', '(not really cleaning 0)', '(not really cleaning 1)', - '(not really committing)', + 'Committing', 'Saved state: {"next_student_module_id": 2}', ) @@ -434,7 +431,7 @@ def test_already_processed_some(self): 'Loaded stored state: {"next_student_module_id": 25}', '(not really cleaning 25)', '(not really cleaning 26)', - '(not really committing)', + 'Committing', 'Saved state: {"next_student_module_id": 27}' ) @@ -457,11 +454,11 @@ def test_working_in_batches(self): '(not really cleaning 25)', '(not really cleaning 26)', '(not really cleaning 27)', - '(not really committing)', + 'Committing', 'Saved state: {"next_student_module_id": 28}', '(not really cleaning 28)', '(not really cleaning 29)', - '(not really committing)', + 'Committing', 'Saved state: {"next_student_module_id": 30}', ) @@ -485,10 +482,10 @@ def test_something_failing_while_cleaning(self): '(not really cleaning 26)', "Couldn't clean student_module_id 26:\nTraceback*Exception: Something went wrong!\n", '(not really cleaning 27)', - '(not really committing)', + 'Committing', 'Saved state: {"next_student_module_id": 28}', '(not really cleaning 28)', '(not really cleaning 29)', - '(not really committing)', + 'Committing', 'Saved state: {"next_student_module_id": 30}', ) diff --git a/lms/djangoapps/courseware/migrations/0001_initial.py b/lms/djangoapps/courseware/migrations/0001_initial.py index 4c29ca17a565..a852b54e02c6 100644 --- a/lms/djangoapps/courseware/migrations/0001_initial.py +++ b/lms/djangoapps/courseware/migrations/0001_initial.py @@ -1,111 +1,148 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +# -*- coding: utf-8 -*- +from __future__ import unicode_literals +from django.db import migrations, models +import openedx.core.djangoapps.call_stack_manager.core +import model_utils.fields +import xmodule_django.models +import django.utils.timezone +from django.conf import settings -class Migration(SchemaMigration): - def forwards(self, orm): +class Migration(migrations.Migration): - # Adding model 'StudentModule' - db.create_table('courseware_studentmodule', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('module_type', self.gf('django.db.models.fields.CharField')(default='problem', max_length=32)), - ('module_id', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('student', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('state', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('grade', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - )) - db.send_create_signal('courseware', ['StudentModule']) + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] - # Adding unique constraint on 'StudentModule', fields ['student', 'module_id', 'module_type'] - db.create_unique('courseware_studentmodule', ['student_id', 'module_id', 'module_type']) - - def backwards(self, orm): - - # Removing unique constraint on 'StudentModule', fields ['student', 'module_id', 'module_type'] - db.delete_unique('courseware_studentmodule', ['student_id', 'module_id', 'module_type']) - - # Deleting model 'StudentModule' - db.delete_table('courseware_studentmodule') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'courseware.studentmodule': { - 'Meta': {'unique_together': "(('student', 'module_id', 'module_type'),)", 'object_name': 'StudentModule'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'module_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'module_type': ('django.db.models.fields.CharField', [], {'default': "'problem'", 'max_length': '32'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['courseware'] + operations = [ + migrations.CreateModel( + name='OfflineComputedGrade', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('created', models.DateTimeField(db_index=True, auto_now_add=True, null=True)), + ('updated', models.DateTimeField(auto_now=True, db_index=True)), + ('gradeset', models.TextField(null=True, blank=True)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='OfflineComputedGradeLog', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('created', models.DateTimeField(db_index=True, auto_now_add=True, null=True)), + ('seconds', models.IntegerField(default=0)), + ('nstudents', models.IntegerField(default=0)), + ], + options={ + 'ordering': ['-created'], + 'get_latest_by': 'created', + }, + ), + migrations.CreateModel( + name='StudentFieldOverride', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('location', xmodule_django.models.LocationKeyField(max_length=255, db_index=True)), + ('field', models.CharField(max_length=255)), + ('value', models.TextField(default=b'null')), + ('student', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='StudentModule', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('module_type', models.CharField(default=b'problem', max_length=32, db_index=True, choices=[(b'problem', b'problem'), (b'video', b'video'), (b'html', b'html'), (b'course', b'course'), (b'chapter', b'Section'), (b'sequential', b'Subsection'), (b'library_content', b'Library Content')])), + ('module_state_key', xmodule_django.models.LocationKeyField(max_length=255, db_column=b'module_id', db_index=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('state', models.TextField(null=True, blank=True)), + ('grade', models.FloatField(db_index=True, null=True, blank=True)), + ('max_grade', models.FloatField(null=True, blank=True)), + ('done', models.CharField(default=b'na', max_length=8, db_index=True, choices=[(b'na', b'NOT_APPLICABLE'), (b'f', b'FINISHED'), (b'i', b'INCOMPLETE')])), + ('created', models.DateTimeField(auto_now_add=True, db_index=True)), + ('modified', models.DateTimeField(auto_now=True, db_index=True)), + ('student', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + bases=(openedx.core.djangoapps.call_stack_manager.core.CallStackMixin, models.Model), + ), + migrations.CreateModel( + name='StudentModuleHistory', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('version', models.CharField(db_index=True, max_length=255, null=True, blank=True)), + ('created', models.DateTimeField(db_index=True)), + ('state', models.TextField(null=True, blank=True)), + ('grade', models.FloatField(null=True, blank=True)), + ('max_grade', models.FloatField(null=True, blank=True)), + ('student_module', models.ForeignKey(to='courseware.StudentModule')), + ], + options={ + 'get_latest_by': 'created', + }, + bases=(openedx.core.djangoapps.call_stack_manager.core.CallStackMixin, models.Model), + ), + migrations.CreateModel( + name='XModuleStudentInfoField', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('field_name', models.CharField(max_length=64, db_index=True)), + ('value', models.TextField(default=b'null')), + ('created', models.DateTimeField(auto_now_add=True, db_index=True)), + ('modified', models.DateTimeField(auto_now=True, db_index=True)), + ('student', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='XModuleStudentPrefsField', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('field_name', models.CharField(max_length=64, db_index=True)), + ('value', models.TextField(default=b'null')), + ('created', models.DateTimeField(auto_now_add=True, db_index=True)), + ('modified', models.DateTimeField(auto_now=True, db_index=True)), + ('module_type', xmodule_django.models.BlockTypeKeyField(max_length=64, db_index=True)), + ('student', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='XModuleUserStateSummaryField', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('field_name', models.CharField(max_length=64, db_index=True)), + ('value', models.TextField(default=b'null')), + ('created', models.DateTimeField(auto_now_add=True, db_index=True)), + ('modified', models.DateTimeField(auto_now=True, db_index=True)), + ('usage_id', xmodule_django.models.LocationKeyField(max_length=255, db_index=True)), + ], + ), + migrations.AlterUniqueTogether( + name='xmoduleuserstatesummaryfield', + unique_together=set([('usage_id', 'field_name')]), + ), + migrations.AlterUniqueTogether( + name='xmodulestudentprefsfield', + unique_together=set([('student', 'module_type', 'field_name')]), + ), + migrations.AlterUniqueTogether( + name='xmodulestudentinfofield', + unique_together=set([('student', 'field_name')]), + ), + migrations.AlterUniqueTogether( + name='studentmodule', + unique_together=set([('student', 'module_state_key', 'course_id')]), + ), + migrations.AlterUniqueTogether( + name='studentfieldoverride', + unique_together=set([('course_id', 'field', 'location', 'student')]), + ), + migrations.AlterUniqueTogether( + name='offlinecomputedgrade', + unique_together=set([('user', 'course_id')]), + ), + ] diff --git a/lms/djangoapps/courseware/migrations/0002_add_indexes.py b/lms/djangoapps/courseware/migrations/0002_add_indexes.py deleted file mode 100644 index 7de33b4c52cb..000000000000 --- a/lms/djangoapps/courseware/migrations/0002_add_indexes.py +++ /dev/null @@ -1,119 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding index on 'StudentModule', fields ['created'] - db.create_index('courseware_studentmodule', ['created']) - - # Adding index on 'StudentModule', fields ['grade'] - db.create_index('courseware_studentmodule', ['grade']) - - # Adding index on 'StudentModule', fields ['modified'] - db.create_index('courseware_studentmodule', ['modified']) - - # Adding index on 'StudentModule', fields ['module_type'] - db.create_index('courseware_studentmodule', ['module_type']) - - # Adding index on 'StudentModule', fields ['module_id'] - db.create_index('courseware_studentmodule', ['module_id']) - - def backwards(self, orm): - - # Removing index on 'StudentModule', fields ['module_id'] - db.delete_index('courseware_studentmodule', ['module_id']) - - # Removing index on 'StudentModule', fields ['module_type'] - db.delete_index('courseware_studentmodule', ['module_type']) - - # Removing index on 'StudentModule', fields ['modified'] - db.delete_index('courseware_studentmodule', ['modified']) - - # Removing index on 'StudentModule', fields ['grade'] - db.delete_index('courseware_studentmodule', ['grade']) - - # Removing index on 'StudentModule', fields ['created'] - db.delete_index('courseware_studentmodule', ['created']) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'courseware.studentmodule': { - 'Meta': {'unique_together': "(('student', 'module_id', 'module_type'),)", 'object_name': 'StudentModule'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'default': "'problem'", 'max_length': '32', 'db_index': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0003_done_grade_cache.py b/lms/djangoapps/courseware/migrations/0003_done_grade_cache.py deleted file mode 100644 index 0ab35551c906..000000000000 --- a/lms/djangoapps/courseware/migrations/0003_done_grade_cache.py +++ /dev/null @@ -1,117 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # NOTE (vshnayder): This constraint has the wrong field order, so it doesn't actually - # do anything in sqlite. Migration 0004 actually removes this index for sqlite. - # Removing unique constraint on 'StudentModule', fields ['module_id', 'module_type', 'student'] - db.delete_unique('courseware_studentmodule', ['module_id', 'module_type', 'student_id']) - - # Adding field 'StudentModule.max_grade' - db.add_column('courseware_studentmodule', 'max_grade', self.gf('django.db.models.fields.FloatField')(null=True, blank=True), keep_default=False) - - # Adding field 'StudentModule.done' - db.add_column('courseware_studentmodule', 'done', self.gf('django.db.models.fields.CharField')(default='na', max_length=8, db_index=True), keep_default=False) - - # Adding unique constraint on 'StudentModule', fields ['module_id', 'student'] - db.create_unique('courseware_studentmodule', ['module_id', 'student_id']) - - def backwards(self, orm): - - # Removing unique constraint on 'StudentModule', fields ['module_id', 'student'] - db.delete_unique('courseware_studentmodule', ['module_id', 'student_id']) - - # Deleting field 'StudentModule.max_grade' - db.delete_column('courseware_studentmodule', 'max_grade') - - # Deleting field 'StudentModule.done' - db.delete_column('courseware_studentmodule', 'done') - - # Adding unique constraint on 'StudentModule', fields ['module_id', 'module_type', 'student'] - db.create_unique('courseware_studentmodule', ['module_id', 'module_type', 'student_id']) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'courseware.studentmodule': { - 'Meta': {'unique_together': "(('student', 'module_id'),)", 'object_name': 'StudentModule'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'done': ('django.db.models.fields.CharField', [], {'default': "'na'", 'max_length': '8', 'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'default': "'problem'", 'max_length': '32', 'db_index': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0004_add_field_studentmodule_course_id.py b/lms/djangoapps/courseware/migrations/0004_add_field_studentmodule_course_id.py deleted file mode 100644 index ff79901824d8..000000000000 --- a/lms/djangoapps/courseware/migrations/0004_add_field_studentmodule_course_id.py +++ /dev/null @@ -1,120 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'StudentModule.course_id' - db.add_column('courseware_studentmodule', 'course_id', - self.gf('django.db.models.fields.CharField')(default="", max_length=255, db_index=True), - keep_default=False) - - # Removing unique constraint on 'StudentModule', fields ['module_id', 'student'] - db.delete_unique('courseware_studentmodule', ['module_id', 'student_id']) - - # NOTE: manually remove this constaint (from 0001)--0003 tries, but fails for sqlite. - # Removing unique constraint on 'StudentModule', fields ['module_id', 'module_type', 'student'] - if db.backend_name == "sqlite3": - db.delete_unique('courseware_studentmodule', ['student_id', 'module_id', 'module_type']) - - # Adding unique constraint on 'StudentModule', fields ['course_id', 'module_state_key', 'student'] - db.create_unique('courseware_studentmodule', ['student_id', 'module_id', 'course_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'StudentModule', fields ['studnet_id', 'module_state_key', 'course_id'] - db.delete_unique('courseware_studentmodule', ['student_id', 'module_id', 'course_id']) - - # Deleting field 'StudentModule.course_id' - db.delete_column('courseware_studentmodule', 'course_id') - - # Adding unique constraint on 'StudentModule', fields ['module_id', 'student'] - db.create_unique('courseware_studentmodule', ['module_id', 'student_id']) - - # Adding unique constraint on 'StudentModule', fields ['module_id', 'module_type', 'student'] - db.create_unique('courseware_studentmodule', ['student_id', 'module_id', 'module_type']) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'courseware.studentmodule': { - 'Meta': {'unique_together': "(('course_id', 'student', 'module_state_key'),)", 'object_name': 'StudentModule'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'done': ('django.db.models.fields.CharField', [], {'default': "'na'", 'max_length': '8', 'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_state_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_column': "'module_id'", 'db_index': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'default': "'problem'", 'max_length': '32', 'db_index': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0005_auto__add_offlinecomputedgrade__add_unique_offlinecomputedgrade_user_c.py b/lms/djangoapps/courseware/migrations/0005_auto__add_offlinecomputedgrade__add_unique_offlinecomputedgrade_user_c.py deleted file mode 100644 index 4c21d2293769..000000000000 --- a/lms/djangoapps/courseware/migrations/0005_auto__add_offlinecomputedgrade__add_unique_offlinecomputedgrade_user_c.py +++ /dev/null @@ -1,117 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'OfflineComputedGrade' - db.create_table('courseware_offlinecomputedgrade', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True, db_index=True, blank=True)), - ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, db_index=True, blank=True)), - ('gradeset', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - )) - db.send_create_signal('courseware', ['OfflineComputedGrade']) - - # Adding unique constraint on 'OfflineComputedGrade', fields ['user', 'course_id'] - db.create_unique('courseware_offlinecomputedgrade', ['user_id', 'course_id']) - - # Adding model 'OfflineComputedGradeLog' - db.create_table('courseware_offlinecomputedgradelog', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True, db_index=True, blank=True)), - ('seconds', self.gf('django.db.models.fields.IntegerField')(default=0)), - ('nstudents', self.gf('django.db.models.fields.IntegerField')(default=0)), - )) - db.send_create_signal('courseware', ['OfflineComputedGradeLog']) - - - def backwards(self, orm): - # Removing unique constraint on 'OfflineComputedGrade', fields ['user', 'course_id'] - db.delete_unique('courseware_offlinecomputedgrade', ['user_id', 'course_id']) - - # Deleting model 'OfflineComputedGrade' - db.delete_table('courseware_offlinecomputedgrade') - - # Deleting model 'OfflineComputedGradeLog' - db.delete_table('courseware_offlinecomputedgradelog') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'courseware.offlinecomputedgrade': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'OfflineComputedGrade'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'gradeset': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.offlinecomputedgradelog': { - 'Meta': {'object_name': 'OfflineComputedGradeLog'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'nstudents': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'seconds': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'courseware.studentmodule': { - 'Meta': {'unique_together': "(('student', 'module_state_key', 'course_id'),)", 'object_name': 'StudentModule'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'done': ('django.db.models.fields.CharField', [], {'default': "'na'", 'max_length': '8', 'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_state_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_column': "'module_id'", 'db_index': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'default': "'problem'", 'max_length': '32', 'db_index': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0006_create_student_module_history.py b/lms/djangoapps/courseware/migrations/0006_create_student_module_history.py deleted file mode 100644 index c1243510b764..000000000000 --- a/lms/djangoapps/courseware/migrations/0006_create_student_module_history.py +++ /dev/null @@ -1,109 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'StudentModuleHistory' - db.create_table('courseware_studentmodulehistory', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('student_module', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['courseware.StudentModule'])), - ('version', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('created', self.gf('django.db.models.fields.DateTimeField')(db_index=True)), - ('state', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('grade', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), - ('max_grade', self.gf('django.db.models.fields.FloatField')(null=True, blank=True)), - )) - db.send_create_signal('courseware', ['StudentModuleHistory']) - - - def backwards(self, orm): - # Deleting model 'StudentModuleHistory' - db.delete_table('courseware_studentmodulehistory') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'courseware.offlinecomputedgrade': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'OfflineComputedGrade'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'gradeset': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.offlinecomputedgradelog': { - 'Meta': {'ordering': "['-created']", 'object_name': 'OfflineComputedGradeLog'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'nstudents': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'seconds': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'courseware.studentmodule': { - 'Meta': {'unique_together': "(('student', 'module_state_key', 'course_id'),)", 'object_name': 'StudentModule'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'done': ('django.db.models.fields.CharField', [], {'default': "'na'", 'max_length': '8', 'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_state_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_column': "'module_id'", 'db_index': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'default': "'problem'", 'max_length': '32', 'db_index': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.studentmodulehistory': { - 'Meta': {'object_name': 'StudentModuleHistory'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student_module': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['courseware.StudentModule']"}), - 'version': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0007_allow_null_version_in_history.py b/lms/djangoapps/courseware/migrations/0007_allow_null_version_in_history.py deleted file mode 100644 index 4b459c165571..000000000000 --- a/lms/djangoapps/courseware/migrations/0007_allow_null_version_in_history.py +++ /dev/null @@ -1,100 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'StudentModuleHistory.version' - db.alter_column('courseware_studentmodulehistory', 'version', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)) - - def backwards(self, orm): - - # User chose to not deal with backwards NULL issues for 'StudentModuleHistory.version' - raise RuntimeError("Cannot reverse this migration. 'StudentModuleHistory.version' and its values cannot be restored.") - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'courseware.offlinecomputedgrade': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'OfflineComputedGrade'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'gradeset': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.offlinecomputedgradelog': { - 'Meta': {'ordering': "['-created']", 'object_name': 'OfflineComputedGradeLog'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'nstudents': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'seconds': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'courseware.studentmodule': { - 'Meta': {'unique_together': "(('student', 'module_state_key', 'course_id'),)", 'object_name': 'StudentModule'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'done': ('django.db.models.fields.CharField', [], {'default': "'na'", 'max_length': '8', 'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_state_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_column': "'module_id'", 'db_index': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'default': "'problem'", 'max_length': '32', 'db_index': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.studentmodulehistory': { - 'Meta': {'object_name': 'StudentModuleHistory'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student_module': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['courseware.StudentModule']"}), - 'version': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'db_index': 'True'}) - } - } - - complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0008_add_xmodule_storage.py b/lms/djangoapps/courseware/migrations/0008_add_xmodule_storage.py deleted file mode 100644 index edbbc427531c..000000000000 --- a/lms/djangoapps/courseware/migrations/0008_add_xmodule_storage.py +++ /dev/null @@ -1,185 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'XModuleStudentInfoField' - db.create_table('courseware_xmodulestudentinfofield', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('field_name', self.gf('django.db.models.fields.CharField')(max_length=64, db_index=True)), - ('value', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('student', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)), - ('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, db_index=True, blank=True)), - )) - db.send_create_signal('courseware', ['XModuleStudentInfoField']) - - # Adding unique constraint on 'XModuleStudentInfoField', fields ['student', 'field_name'] - db.create_unique('courseware_xmodulestudentinfofield', ['student_id', 'field_name']) - - # Adding model 'XModuleContentField' - db.create_table('courseware_xmodulecontentfield', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('field_name', self.gf('django.db.models.fields.CharField')(max_length=64, db_index=True)), - ('definition_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('value', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)), - ('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, db_index=True, blank=True)), - )) - db.send_create_signal('courseware', ['XModuleContentField']) - - # Adding unique constraint on 'XModuleContentField', fields ['definition_id', 'field_name'] - db.create_unique('courseware_xmodulecontentfield', ['definition_id', 'field_name']) - - # Adding model 'XModuleSettingsField' - db.create_table('courseware_xmodulesettingsfield', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('field_name', self.gf('django.db.models.fields.CharField')(max_length=64, db_index=True)), - ('usage_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('value', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)), - ('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, db_index=True, blank=True)), - )) - db.send_create_signal('courseware', ['XModuleSettingsField']) - - # Adding unique constraint on 'XModuleSettingsField', fields ['usage_id', 'field_name'] - db.create_unique('courseware_xmodulesettingsfield', ['usage_id', 'field_name']) - - # Adding model 'XModuleStudentPrefsField' - db.create_table('courseware_xmodulestudentprefsfield', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('field_name', self.gf('django.db.models.fields.CharField')(max_length=64, db_index=True)), - ('module_type', self.gf('django.db.models.fields.CharField')(max_length=64, db_index=True)), - ('value', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('student', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)), - ('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, db_index=True, blank=True)), - )) - db.send_create_signal('courseware', ['XModuleStudentPrefsField']) - - # Adding unique constraint on 'XModuleStudentPrefsField', fields ['student', 'module_type', 'field_name'] - db.create_unique('courseware_xmodulestudentprefsfield', ['student_id', 'module_type', 'field_name']) - - - def backwards(self, orm): - # Removing unique constraint on 'XModuleStudentPrefsField', fields ['student', 'module_type', 'field_name'] - db.delete_unique('courseware_xmodulestudentprefsfield', ['student_id', 'module_type', 'field_name']) - - # Removing unique constraint on 'XModuleSettingsField', fields ['usage_id', 'field_name'] - db.delete_unique('courseware_xmodulesettingsfield', ['usage_id', 'field_name']) - - # Removing unique constraint on 'XModuleContentField', fields ['definition_id', 'field_name'] - db.delete_unique('courseware_xmodulecontentfield', ['definition_id', 'field_name']) - - # Removing unique constraint on 'XModuleStudentInfoField', fields ['student', 'field_name'] - db.delete_unique('courseware_xmodulestudentinfofield', ['student_id', 'field_name']) - - # Deleting model 'XModuleStudentInfoField' - db.delete_table('courseware_xmodulestudentinfofield') - - # Deleting model 'XModuleContentField' - db.delete_table('courseware_xmodulecontentfield') - - # Deleting model 'XModuleSettingsField' - db.delete_table('courseware_xmodulesettingsfield') - - # Deleting model 'XModuleStudentPrefsField' - db.delete_table('courseware_xmodulestudentprefsfield') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'courseware.studentmodule': { - 'Meta': {'unique_together': "(('student', 'module_state_key', 'course_id'),)", 'object_name': 'StudentModule'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'done': ('django.db.models.fields.CharField', [], {'default': "'na'", 'max_length': '8', 'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_state_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_column': "'module_id'", 'db_index': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'default': "'problem'", 'max_length': '32', 'db_index': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.xmodulecontentfield': { - 'Meta': {'unique_together': "(('definition_id', 'field_name'),)", 'object_name': 'XModuleContentField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'definition_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - }, - 'courseware.xmodulesettingsfield': { - 'Meta': {'unique_together': "(('usage_id', 'field_name'),)", 'object_name': 'XModuleSettingsField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'usage_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - }, - 'courseware.xmodulestudentinfofield': { - 'Meta': {'unique_together': "(('student', 'field_name'),)", 'object_name': 'XModuleStudentInfoField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - }, - 'courseware.xmodulestudentprefsfield': { - 'Meta': {'unique_together': "(('student', 'module_type', 'field_name'),)", 'object_name': 'XModuleStudentPrefsField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0009_add_field_default.py b/lms/djangoapps/courseware/migrations/0009_add_field_default.py deleted file mode 100644 index 50be9f343bd5..000000000000 --- a/lms/djangoapps/courseware/migrations/0009_add_field_default.py +++ /dev/null @@ -1,128 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'XModuleContentField.value' - db.alter_column('courseware_xmodulecontentfield', 'value', self.gf('django.db.models.fields.TextField')()) - - # Changing field 'XModuleStudentInfoField.value' - db.alter_column('courseware_xmodulestudentinfofield', 'value', self.gf('django.db.models.fields.TextField')()) - - # Changing field 'XModuleSettingsField.value' - db.alter_column('courseware_xmodulesettingsfield', 'value', self.gf('django.db.models.fields.TextField')()) - - # Changing field 'XModuleStudentPrefsField.value' - db.alter_column('courseware_xmodulestudentprefsfield', 'value', self.gf('django.db.models.fields.TextField')()) - - def backwards(self, orm): - - # Changing field 'XModuleContentField.value' - db.alter_column('courseware_xmodulecontentfield', 'value', self.gf('django.db.models.fields.TextField')(null=True)) - - # Changing field 'XModuleStudentInfoField.value' - db.alter_column('courseware_xmodulestudentinfofield', 'value', self.gf('django.db.models.fields.TextField')(null=True)) - - # Changing field 'XModuleSettingsField.value' - db.alter_column('courseware_xmodulesettingsfield', 'value', self.gf('django.db.models.fields.TextField')(null=True)) - - # Changing field 'XModuleStudentPrefsField.value' - db.alter_column('courseware_xmodulestudentprefsfield', 'value', self.gf('django.db.models.fields.TextField')(null=True)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'courseware.studentmodule': { - 'Meta': {'unique_together': "(('student', 'module_state_key', 'course_id'),)", 'object_name': 'StudentModule'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'done': ('django.db.models.fields.CharField', [], {'default': "'na'", 'max_length': '8', 'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_state_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_column': "'module_id'", 'db_index': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'default': "'problem'", 'max_length': '32', 'db_index': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.xmodulecontentfield': { - 'Meta': {'unique_together': "(('definition_id', 'field_name'),)", 'object_name': 'XModuleContentField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'definition_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'courseware.xmodulesettingsfield': { - 'Meta': {'unique_together': "(('usage_id', 'field_name'),)", 'object_name': 'XModuleSettingsField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'usage_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'courseware.xmodulestudentinfofield': { - 'Meta': {'unique_together': "(('student', 'field_name'),)", 'object_name': 'XModuleStudentInfoField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'courseware.xmodulestudentprefsfield': { - 'Meta': {'unique_together': "(('student', 'module_type', 'field_name'),)", 'object_name': 'XModuleStudentPrefsField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - } - } - - complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0010_rename_xblock_field_content_to_user_state_summary.py b/lms/djangoapps/courseware/migrations/0010_rename_xblock_field_content_to_user_state_summary.py deleted file mode 100644 index d2025c36ec33..000000000000 --- a/lms/djangoapps/courseware/migrations/0010_rename_xblock_field_content_to_user_state_summary.py +++ /dev/null @@ -1,148 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Removing unique constraint on 'XModuleSettingsField', fields ['usage_id', 'field_name'] - db.delete_unique('courseware_xmodulesettingsfield', ['usage_id', 'field_name']) - - # Deleting model 'XModuleSettingsField' - db.delete_table('courseware_xmodulesettingsfield') - - # Move all content currently stored as Scope.content to Scope.user_state_summary - db.rename_table('courseware_xmodulecontentfield', 'courseware_xmoduleuserstatesummaryfield') - db.rename_column('courseware_xmoduleuserstatesummaryfield', 'definition_id', 'usage_id') - - - def backwards(self, orm): - # Adding model 'XModuleSettingsField' - db.create_table('courseware_xmodulesettingsfield', ( - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True, db_index=True)), - ('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True, db_index=True)), - ('value', self.gf('django.db.models.fields.TextField')(default='null')), - ('field_name', self.gf('django.db.models.fields.CharField')(max_length=64, db_index=True)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('usage_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - )) - db.send_create_signal('courseware', ['XModuleSettingsField']) - - # Adding unique constraint on 'XModuleSettingsField', fields ['usage_id', 'field_name'] - db.create_unique('courseware_xmodulesettingsfield', ['usage_id', 'field_name']) - - db.rename_table('courseware_xmoduleuserstatesummaryfield', 'courseware_xmodulecontentfield') - db.rename_column('courseware_xmodulecontentfield', 'usage_id', 'definition_id') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'courseware.offlinecomputedgrade': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'OfflineComputedGrade'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'gradeset': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.offlinecomputedgradelog': { - 'Meta': {'ordering': "['-created']", 'object_name': 'OfflineComputedGradeLog'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'nstudents': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'seconds': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'courseware.studentmodule': { - 'Meta': {'unique_together': "(('student', 'module_state_key', 'course_id'),)", 'object_name': 'StudentModule'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'done': ('django.db.models.fields.CharField', [], {'default': "'na'", 'max_length': '8', 'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_state_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_column': "'module_id'", 'db_index': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'default': "'problem'", 'max_length': '32', 'db_index': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.studentmodulehistory': { - 'Meta': {'object_name': 'StudentModuleHistory'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student_module': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['courseware.StudentModule']"}), - 'version': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - 'courseware.xmodulestudentinfofield': { - 'Meta': {'unique_together': "(('student', 'field_name'),)", 'object_name': 'XModuleStudentInfoField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'courseware.xmodulestudentprefsfield': { - 'Meta': {'unique_together': "(('student', 'module_type', 'field_name'),)", 'object_name': 'XModuleStudentPrefsField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'courseware.xmoduleuserstatesummaryfield': { - 'Meta': {'unique_together': "(('usage_id', 'field_name'),)", 'object_name': 'XModuleUserStateSummaryField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'usage_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - } - } - - complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0011_add_model_StudentFieldOverride.py b/lms/djangoapps/courseware/migrations/0011_add_model_StudentFieldOverride.py deleted file mode 100644 index 22bc4ae6896b..000000000000 --- a/lms/djangoapps/courseware/migrations/0011_add_model_StudentFieldOverride.py +++ /dev/null @@ -1,145 +0,0 @@ -# -*- coding: utf-8 -*- -# pylint: disable=invalid-name, missing-docstring, unused-argument, unused-import, line-too-long - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'StudentFieldOverride' - db.create_table('courseware_studentfieldoverride', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('location', self.gf('xmodule_django.models.LocationKeyField')(max_length=255, db_index=True)), - ('student', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('field', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('value', self.gf('django.db.models.fields.TextField')(default='null')), - )) - db.send_create_signal('courseware', ['StudentFieldOverride']) - - def backwards(self, orm): - # Deleting model 'StudentFieldOverride' - db.delete_table('courseware_studentfieldoverride') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'courseware.offlinecomputedgrade': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'OfflineComputedGrade'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'gradeset': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.offlinecomputedgradelog': { - 'Meta': {'ordering': "['-created']", 'object_name': 'OfflineComputedGradeLog'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'nstudents': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'seconds': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'courseware.studentfieldoverride': { - 'Meta': {'unique_together': "(('course_id', 'location', 'student'),)", 'object_name': 'StudentFieldOverride'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'field': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'location': ('xmodule_django.models.LocationKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'courseware.studentmodule': { - 'Meta': {'unique_together': "(('student', 'module_state_key', 'course_id'),)", 'object_name': 'StudentModule'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'done': ('django.db.models.fields.CharField', [], {'default': "'na'", 'max_length': '8', 'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_state_key': ('xmodule_django.models.LocationKeyField', [], {'max_length': '255', 'db_column': "'module_id'", 'db_index': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'default': "'problem'", 'max_length': '32', 'db_index': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.studentmodulehistory': { - 'Meta': {'object_name': 'StudentModuleHistory'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student_module': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['courseware.StudentModule']"}), - 'version': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - 'courseware.xmodulestudentinfofield': { - 'Meta': {'unique_together': "(('student', 'field_name'),)", 'object_name': 'XModuleStudentInfoField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'courseware.xmodulestudentprefsfield': { - 'Meta': {'unique_together': "(('student', 'module_type', 'field_name'),)", 'object_name': 'XModuleStudentPrefsField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'courseware.xmoduleuserstatesummaryfield': { - 'Meta': {'unique_together': "(('usage_id', 'field_name'),)", 'object_name': 'XModuleUserStateSummaryField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'usage_id': ('xmodule_django.models.LocationKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - } - } - - complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0012_auto__del_unique_studentfieldoverride_course_id_location_student__add_.py b/lms/djangoapps/courseware/migrations/0012_auto__del_unique_studentfieldoverride_course_id_location_student__add_.py deleted file mode 100644 index 380913837342..000000000000 --- a/lms/djangoapps/courseware/migrations/0012_auto__del_unique_studentfieldoverride_course_id_location_student__add_.py +++ /dev/null @@ -1,138 +0,0 @@ -# -*- coding: utf-8 -*- -# pylint: disable=invalid-name, missing-docstring, unused-argument, unused-import, line-too-long - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding unique constraint on 'StudentFieldOverride', fields ['course_id', 'field', 'location', 'student'] - db.create_unique('courseware_studentfieldoverride', ['course_id', 'field', 'location', 'student_id']) - - def backwards(self, orm): - # Removing unique constraint on 'StudentFieldOverride', fields ['course_id', 'field', 'location', 'student'] - db.delete_unique('courseware_studentfieldoverride', ['course_id', 'field', 'location', 'student_id']) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'courseware.offlinecomputedgrade': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'OfflineComputedGrade'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'gradeset': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.offlinecomputedgradelog': { - 'Meta': {'ordering': "['-created']", 'object_name': 'OfflineComputedGradeLog'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'nstudents': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'seconds': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'courseware.studentfieldoverride': { - 'Meta': {'unique_together': "(('course_id', 'field', 'location', 'student'),)", 'object_name': 'StudentFieldOverride'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'field': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'location': ('xmodule_django.models.LocationKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'courseware.studentmodule': { - 'Meta': {'unique_together': "(('student', 'module_state_key', 'course_id'),)", 'object_name': 'StudentModule'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'done': ('django.db.models.fields.CharField', [], {'default': "'na'", 'max_length': '8', 'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_state_key': ('xmodule_django.models.LocationKeyField', [], {'max_length': '255', 'db_column': "'module_id'", 'db_index': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'default': "'problem'", 'max_length': '32', 'db_index': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.studentmodulehistory': { - 'Meta': {'object_name': 'StudentModuleHistory'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student_module': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['courseware.StudentModule']"}), - 'version': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - 'courseware.xmodulestudentinfofield': { - 'Meta': {'unique_together': "(('student', 'field_name'),)", 'object_name': 'XModuleStudentInfoField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'courseware.xmodulestudentprefsfield': { - 'Meta': {'unique_together': "(('student', 'module_type', 'field_name'),)", 'object_name': 'XModuleStudentPrefsField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'courseware.xmoduleuserstatesummaryfield': { - 'Meta': {'unique_together': "(('usage_id', 'field_name'),)", 'object_name': 'XModuleUserStateSummaryField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'usage_id': ('xmodule_django.models.LocationKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - } - } - - complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/migrations/0013_auto__add_field_studentfieldoverride_created__add_field_studentfieldov.py b/lms/djangoapps/courseware/migrations/0013_auto__add_field_studentfieldoverride_created__add_field_studentfieldov.py deleted file mode 100644 index 28b82c842526..000000000000 --- a/lms/djangoapps/courseware/migrations/0013_auto__add_field_studentfieldoverride_created__add_field_studentfieldov.py +++ /dev/null @@ -1,155 +0,0 @@ -# -*- coding: utf-8 -*- -# pylint: disable=invalid-name, missing-docstring, unused-argument, unused-import, line-too-long - -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'StudentFieldOverride.created' - db.add_column('courseware_studentfieldoverride', 'created', - self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now), - keep_default=False) - - # Adding field 'StudentFieldOverride.modified' - db.add_column('courseware_studentfieldoverride', 'modified', - self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now), - keep_default=False) - - # Adding index on 'StudentFieldOverride', fields ['course_id', 'location', 'student'] - db.create_index('courseware_studentfieldoverride', ['course_id', 'location', 'student_id']) - - def backwards(self, orm): - # Deleting field 'StudentFieldOverride.created' - db.delete_column('courseware_studentfieldoverride', 'created') - - # Deleting field 'StudentFieldOverride.modified' - db.delete_column('courseware_studentfieldoverride', 'modified') - - # Removing index on 'StudentFieldOverride', fields ['course_id', 'location', 'student'] - db.delete_index('courseware_studentfieldoverride', ['course_id', 'location', 'student_id']) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'courseware.offlinecomputedgrade': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'OfflineComputedGrade'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'gradeset': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.offlinecomputedgradelog': { - 'Meta': {'ordering': "['-created']", 'object_name': 'OfflineComputedGradeLog'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'nstudents': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'seconds': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'courseware.studentfieldoverride': { - 'Meta': {'unique_together': "(('course_id', 'field', 'location', 'student'),)", 'object_name': 'StudentFieldOverride'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'field': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'location': ('xmodule_django.models.LocationKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'courseware.studentmodule': { - 'Meta': {'unique_together': "(('student', 'module_state_key', 'course_id'),)", 'object_name': 'StudentModule'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'done': ('django.db.models.fields.CharField', [], {'default': "'na'", 'max_length': '8', 'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_state_key': ('xmodule_django.models.LocationKeyField', [], {'max_length': '255', 'db_column': "'module_id'", 'db_index': 'True'}), - 'module_type': ('django.db.models.fields.CharField', [], {'default': "'problem'", 'max_length': '32', 'db_index': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'courseware.studentmodulehistory': { - 'Meta': {'object_name': 'StudentModuleHistory'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), - 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'student_module': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['courseware.StudentModule']"}), - 'version': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - 'courseware.xmodulestudentinfofield': { - 'Meta': {'unique_together': "(('student', 'field_name'),)", 'object_name': 'XModuleStudentInfoField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'courseware.xmodulestudentprefsfield': { - 'Meta': {'unique_together': "(('student', 'module_type', 'field_name'),)", 'object_name': 'XModuleStudentPrefsField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'module_type': ('xmodule_django.models.BlockTypeKeyField', [], {'max_length': '64', 'db_index': 'True'}), - 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - }, - 'courseware.xmoduleuserstatesummaryfield': { - 'Meta': {'unique_together': "(('usage_id', 'field_name'),)", 'object_name': 'XModuleUserStateSummaryField'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'usage_id': ('xmodule_django.models.LocationKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'value': ('django.db.models.fields.TextField', [], {'default': "'null'"}) - } - } - - complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/models.py b/lms/djangoapps/courseware/models.py index e849e6c1b0a8..2ea9b0e2573b 100644 --- a/lms/djangoapps/courseware/models.py +++ b/lms/djangoapps/courseware/models.py @@ -45,6 +45,9 @@ class ChunkingManager(models.Manager): :class:`~Manager` that adds an additional method :meth:`chunked_filter` to provide the ability to make select queries with specific chunk sizes. """ + class Meta(object): + app_label = "courseware" + def chunked_filter(self, chunk_field, items, **kwargs): """ Queries model_class with `chunk_field` set to chunks of size `chunk_size`, @@ -106,6 +109,7 @@ class StudentModule(CallStackMixin, models.Model): course_id = CourseKeyField(max_length=255, db_index=True) class Meta(object): + app_label = "courseware" unique_together = (('student', 'module_state_key', 'course_id'),) # Internal state of the object @@ -165,6 +169,7 @@ class StudentModuleHistory(CallStackMixin, models.Model): HISTORY_SAVING_TYPES = {'problem'} class Meta(object): + app_label = "courseware" get_latest_by = "created" student_module = models.ForeignKey(StudentModule, db_index=True) @@ -200,6 +205,7 @@ class XBlockFieldBase(models.Model): objects = ChunkingManager() class Meta(object): + app_label = "courseware" abstract = True # The name of the field @@ -227,6 +233,7 @@ class XModuleUserStateSummaryField(XBlockFieldBase): Stores data set in the Scope.user_state_summary scope by an xmodule field """ class Meta(object): + app_label = "courseware" unique_together = (('usage_id', 'field_name'),) # The definition id for the module @@ -238,6 +245,7 @@ class XModuleStudentPrefsField(XBlockFieldBase): Stores data set in the Scope.preferences scope by an xmodule field """ class Meta(object): + app_label = "courseware" unique_together = (('student', 'module_type', 'field_name'),) # The type of the module for these preferences @@ -251,6 +259,7 @@ class XModuleStudentInfoField(XBlockFieldBase): Stores data set in the Scope.preferences scope by an xmodule field """ class Meta(object): + app_label = "courseware" unique_together = (('student', 'field_name'),) student = models.ForeignKey(User, db_index=True) @@ -269,6 +278,7 @@ class OfflineComputedGrade(models.Model): gradeset = models.TextField(null=True, blank=True) # grades, stored as JSON class Meta(object): + app_label = "courseware" unique_together = (('user', 'course_id'), ) def __unicode__(self): @@ -281,6 +291,7 @@ class OfflineComputedGradeLog(models.Model): Use this to be able to show instructor when the last computed grades were done. """ class Meta(object): + app_label = "courseware" ordering = ["-created"] get_latest_by = "created" @@ -304,6 +315,7 @@ class StudentFieldOverride(TimeStampedModel): student = models.ForeignKey(User, db_index=True) class Meta(object): + app_label = "courseware" unique_together = (('course_id', 'field', 'location', 'student'),) field = models.CharField(max_length=255) diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index bf0decad3df7..f7cc6c6bd231 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -77,7 +77,7 @@ from util.model_utils import slugify from util.sandboxing import can_execute_unsafe_code, get_python_lib_zip from util import milestones_helpers -from verify_student.services import ReverificationService +from lms.djangoapps.verify_student.services import ReverificationService from edx_proctoring.services import ProctoringService from openedx.core.djangoapps.credit.services import CreditService @@ -1022,7 +1022,7 @@ def _invoke_xblock_handler(request, course_id, usage_id, handler, suffix, course files = request.FILES or {} error_msg = _check_files_limits(files) if error_msg: - return JsonResponse(object={'success': error_msg}, status=413) + return JsonResponse({'success': error_msg}, status=413) # Make a CourseKey from the course_id, raising a 404 upon parse error. try: @@ -1065,7 +1065,7 @@ def _invoke_xblock_handler(request, course_id, usage_id, handler, suffix, course except ProcessingError as err: log.warning("Module encountered an error while processing AJAX call", exc_info=True) - return JsonResponse(object={'success': err.args[0]}, status=200) + return JsonResponse({'success': err.args[0]}, status=200) # If any other error occurred, re-raise it to trigger a 500 response except Exception: diff --git a/lms/djangoapps/courseware/tests/__init__.py b/lms/djangoapps/courseware/tests/__init__.py index 9259f4ceb253..383a1b8c99cd 100644 --- a/lms/djangoapps/courseware/tests/__init__.py +++ b/lms/djangoapps/courseware/tests/__init__.py @@ -85,7 +85,7 @@ def initialize_module(self, **kwargs): #self.item_module = self.item_descriptor.xmodule_runtime.xmodule_instance #self.item_module is None at this time - self.item_url = self.item_descriptor.location.to_deprecated_string() + self.item_url = unicode(self.item_descriptor.location) def setup_course(self): self.course = CourseFactory.create(data=self.COURSE_DATA) @@ -131,7 +131,7 @@ def get_url(self, dispatch): """Return item url with dispatch.""" return reverse( 'xblock_handler', - args=(self.course.id.to_deprecated_string(), quote_slashes(self.item_url), 'xmodule_handler', dispatch) + args=(unicode(self.course.id), quote_slashes(self.item_url), 'xmodule_handler', dispatch) ) diff --git a/lms/djangoapps/courseware/tests/test_comp_theming.py b/lms/djangoapps/courseware/tests/test_comp_theming.py index 66f930eeef9e..65803687b411 100644 --- a/lms/djangoapps/courseware/tests/test_comp_theming.py +++ b/lms/djangoapps/courseware/tests/test_comp_theming.py @@ -18,7 +18,7 @@ def setUp(self): super(TestComprehensiveTheming, self).setUp() # Clear the internal staticfiles caches, to get test isolation. - staticfiles.finders._finders.clear() # pylint: disable=protected-access + staticfiles.finders.get_finder.cache_clear() @with_comp_theme(settings.REPO_ROOT / 'themes/red-theme') @unittest.skip("Disabled until we can release theming to production") diff --git a/lms/djangoapps/courseware/tests/test_course_info.py b/lms/djangoapps/courseware/tests/test_course_info.py index 9feb521a2319..1c9217d495b1 100644 --- a/lms/djangoapps/courseware/tests/test_course_info.py +++ b/lms/djangoapps/courseware/tests/test_course_info.py @@ -142,7 +142,7 @@ def fetch_course_info_with_queries(self, course, sql_queries, mongo_queries): self.assertEqual(resp.status_code, 200) def test_num_queries_instructor_paced(self): - self.fetch_course_info_with_queries(self.instructor_paced_course, 14, 4) + self.fetch_course_info_with_queries(self.instructor_paced_course, 17, 4) def test_num_queries_self_paced(self): - self.fetch_course_info_with_queries(self.self_paced_course, 14, 4) + self.fetch_course_info_with_queries(self.self_paced_course, 17, 4) diff --git a/lms/djangoapps/courseware/tests/test_date_summary.py b/lms/djangoapps/courseware/tests/test_date_summary.py index 0d0fa634f0f2..5d371e6540de 100644 --- a/lms/djangoapps/courseware/tests/test_date_summary.py +++ b/lms/djangoapps/courseware/tests/test_date_summary.py @@ -21,8 +21,8 @@ ) from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration from student.tests.factories import CourseEnrollmentFactory, UserFactory -from verify_student.models import VerificationDeadline -from verify_student.tests.factories import SoftwareSecurePhotoVerificationFactory +from lms.djangoapps.verify_student.models import VerificationDeadline +from lms.djangoapps.verify_student.tests.factories import SoftwareSecurePhotoVerificationFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/lms/djangoapps/courseware/tests/test_model_data.py b/lms/djangoapps/courseware/tests/test_model_data.py index 38b51b9fdfa9..e8c2a275f137 100644 --- a/lms/djangoapps/courseware/tests/test_model_data.py +++ b/lms/djangoapps/courseware/tests/test_model_data.py @@ -249,7 +249,7 @@ def test_set_field_in_missing_student_module(self): # to discover if something other than the DjangoXBlockUserStateClient # has written to the StudentModule (such as UserStateCache setting the score # on the StudentModule). - with self.assertNumQueries(3): + with self.assertNumQueries(5): self.kvs.set(user_state_key('a_field'), 'a_value') self.assertEquals(1, sum(len(cache) for cache in self.field_data_cache.cache.values())) diff --git a/lms/djangoapps/courseware/tests/test_video_handlers.py b/lms/djangoapps/courseware/tests/test_video_handlers.py index 7db94a718e0d..72356c1cce49 100644 --- a/lms/djangoapps/courseware/tests/test_video_handlers.py +++ b/lms/djangoapps/courseware/tests/test_video_handlers.py @@ -145,12 +145,12 @@ def test_handle_ajax_wrong_dispatch(self): def test_handle_ajax(self): data = [ - {'speed': 2.0}, - {'saved_video_position': "00:00:10"}, - {'transcript_language': 'uk'}, - {'bumper_do_not_show_again': True}, - {'bumper_last_view_date': True}, - {'demoo�': 'sample'} + {u'speed': 2.0}, + {u'saved_video_position': "00:00:10"}, + {u'transcript_language': 'uk'}, + {u'bumper_do_not_show_again': True}, + {u'bumper_last_view_date': True}, + {u'demoo�': 'sample'} ] for sample in data: response = self.clients[self.users[0].username].post( diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index e32d3078a47d..4a87ae8887a1 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -818,7 +818,7 @@ def test_view_certificate_link_hidden(self): self.assertContains(resp, u"Download Your Certificate") @ddt.data( - *itertools.product(((18, 4, True), (18, 4, False)), (True, False)) + *itertools.product(((38, 4, True), (38, 4, False)), (True, False)) ) @ddt.unpack def test_query_counts(self, (sql_calls, mongo_calls, self_paced), self_paced_enabled): diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index 047372d1f89f..34c88ec76b6b 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -15,6 +15,7 @@ from django.core.urlresolvers import reverse from django.contrib.auth.models import User, AnonymousUser from django.contrib.auth.decorators import login_required +from django.db import transaction from django.utils.timezone import UTC from django.views.decorators.http import require_GET, require_POST, require_http_methods from django.http import Http404, HttpResponse, HttpResponseBadRequest @@ -23,7 +24,6 @@ from edxmako.shortcuts import render_to_response, render_to_string, marketing_link from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.cache import cache_control -from django.db import transaction from markupsafe import escape from courseware import grades @@ -61,6 +61,7 @@ from student.views import is_course_blocked from util.cache import cache, cache_if_anonymous from util.date_utils import strftime_localized +from util.db import outer_atomic from xblock.fragment import Fragment from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError, NoPathToItem @@ -77,8 +78,6 @@ from opaque_keys.edx.keys import CourseKey, UsageKey from instructor.enrollment import uses_shib -from util.db import commit_on_success_with_read_committed - import survey.utils import survey.views @@ -281,11 +280,12 @@ def save_positions_recursively_up(user, request, field_data_cache, xmodule, cour current_module = parent +@transaction.non_atomic_requests @login_required @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @ensure_valid_course_key -@commit_on_success_with_read_committed +@outer_atomic(read_committed=True) def index(request, course_id, chapter=None, section=None, position=None): """ @@ -879,21 +879,17 @@ def course_about(request, course_id): }) +@transaction.non_atomic_requests @login_required @cache_control(no_cache=True, no_store=True, must_revalidate=True) -@transaction.commit_manually @ensure_valid_course_key def progress(request, course_id, student_id=None): - """ - Wraps "_progress" with the manual_transaction context manager just in case - there are unanticipated errors. - """ + """ Display the progress page. """ course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id) with modulestore().bulk_operations(course_key): - with grades.manual_transaction(): - return _progress(request, course_key, student_id) + return _progress(request, course_key, student_id) def _progress(request, course_key, student_id): @@ -932,8 +928,11 @@ def _progress(request, course_key, student_id): # The pre-fetching of groups is done to make auth checks not require an # additional DB lookup (this kills the Progress page in particular). student = User.objects.prefetch_related("groups").get(id=student.id) - field_data_cache = grades.field_data_cache_for_grading(course, student) - scores_client = ScoresClient.from_field_data_cache(field_data_cache) + + with outer_atomic(): + field_data_cache = grades.field_data_cache_for_grading(course, student) + scores_client = ScoresClient.from_field_data_cache(field_data_cache) + courseware_summary = grades.progress_summary( student, request, course, field_data_cache=field_data_cache, scores_client=scores_client ) @@ -982,7 +981,7 @@ def _progress(request, course_key, student_id): 'download_url': None }) - with grades.manual_transaction(): + with outer_atomic(): response = render_to_response('courseware/progress.html', context) return response @@ -1275,6 +1274,8 @@ def is_course_passed(course, grade_summary=None, student=None, request=None): return success_cutoff and grade_summary['percent'] >= success_cutoff +# Grades can potentially be written - if so, let grading manage the transaction. +@transaction.non_atomic_requests @require_POST def generate_user_cert(request, course_id): """Start generating a new certificate for the user. diff --git a/lms/djangoapps/dashboard/management/commands/git_add_course.py b/lms/djangoapps/dashboard/management/commands/git_add_course.py index c48d854d66a0..fad6b5e10e2c 100644 --- a/lms/djangoapps/dashboard/management/commands/git_add_course.py +++ b/lms/djangoapps/dashboard/management/commands/git_add_course.py @@ -29,29 +29,26 @@ class Command(BaseCommand): '\n{0}'.format(_('Import the specified git repository and optional branch into the ' 'modulestore and optionally specified directory.'))) + def add_arguments(self, parser): + # Positional arguments + parser.add_argument('repository_url') + parser.add_argument('--directory_path', action='store') + parser.add_argument('--repository_branch', action='store') + def handle(self, *args, **options): """Check inputs and run the command""" if isinstance(modulestore, XMLModuleStore): raise CommandError('This script requires a mongo module store') - if len(args) < 1: - raise CommandError('This script requires at least one argument, ' - 'the git URL') - - if len(args) > 3: - raise CommandError('Expected no more than three ' - 'arguments; received {0}'.format(len(args))) - rdir_arg = None branch = None - - if len(args) > 1: - rdir_arg = args[1] - if len(args) > 2: - branch = args[2] + if options['directory_path']: + rdir_arg = options['directory_path'] + if options['repository_branch']: + branch = options['repository_branch'] try: - dashboard.git_import.add_repo(args[0], rdir_arg, branch) + dashboard.git_import.add_repo(options['repository_url'], rdir_arg, branch) except GitImportError as ex: raise CommandError(str(ex)) diff --git a/lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py b/lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py index f74983425908..d2da5a1417df 100644 --- a/lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py +++ b/lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py @@ -52,22 +52,22 @@ def assertCommandFailureRegexp(self, regex, *args): """ Convenience function for testing command failures """ - with self.assertRaises(SystemExit): - with self.assertRaisesRegexp(CommandError, regex): - call_command('git_add_course', *args, - stderr=StringIO.StringIO()) + with self.assertRaisesRegexp(CommandError, regex): + call_command('git_add_course', *args, stderr=StringIO.StringIO()) def test_command_args(self): """ Validate argument checking """ + # No argument given. + self.assertCommandFailureRegexp('Error: too few arguments') + # Extra/Un-named arguments given. self.assertCommandFailureRegexp( - 'This script requires at least one argument, the git URL') - self.assertCommandFailureRegexp( - 'Expected no more than three arguments; recieved 4', + 'Error: unrecognized arguments: blah blah blah', 'blah', 'blah', 'blah', 'blah') + # Not a valid path. self.assertCommandFailureRegexp( - 'Repo was not added, check log output for details', + 'Path {0} doesn\'t exist, please create it,'.format(self.GIT_REPO_DIR), 'blah') # Test successful import from command if not os.path.isdir(self.GIT_REPO_DIR): @@ -80,12 +80,12 @@ def test_command_args(self): os.mkdir(self.GIT_REPO_DIR / 'edx4edx') call_command('git_add_course', self.TEST_REPO, - self.GIT_REPO_DIR / 'edx4edx_lite') + directory_path=self.GIT_REPO_DIR / 'edx4edx_lite') # Test with all three args (branch) call_command('git_add_course', self.TEST_REPO, - self.GIT_REPO_DIR / 'edx4edx_lite', - self.TEST_BRANCH) + directory_path=self.GIT_REPO_DIR / 'edx4edx_lite', + repository_branch=self.TEST_BRANCH) def test_add_repo(self): """ diff --git a/lms/djangoapps/dashboard/sysadmin.py b/lms/djangoapps/dashboard/sysadmin.py index fa72795a3048..f175d513287e 100644 --- a/lms/djangoapps/dashboard/sysadmin.py +++ b/lms/djangoapps/dashboard/sysadmin.py @@ -107,7 +107,7 @@ def csv_data(): writer.writerow(row) csv_data = read_and_flush() yield csv_data - response = HttpResponse(csv_data(), mimetype='text/csv') + response = HttpResponse(csv_data(), content_type='text/csv') response['Content-Disposition'] = 'attachment; filename={0}'.format( filename) return response diff --git a/lms/djangoapps/django_comment_client/base/tests.py b/lms/djangoapps/django_comment_client/base/tests.py index 3e0dfd81291e..e9ee82d712a2 100644 --- a/lms/djangoapps/django_comment_client/base/tests.py +++ b/lms/djangoapps/django_comment_client/base/tests.py @@ -5,7 +5,7 @@ import ddt from django.conf import settings -from django.core.cache import get_cache +from django.core.cache import caches from django.test.client import Client, RequestFactory from django.contrib.auth.models import User from django.core.management import call_command @@ -24,7 +24,7 @@ from django_comment_common.models import Role from django_comment_common.utils import seed_permissions_roles, ThreadContext from student.tests.factories import CourseEnrollmentFactory, UserFactory, CourseAccessRoleFactory -from teams.tests.factories import CourseTeamFactory, CourseTeamMembershipFactory +from lms.djangoapps.teams.tests.factories import CourseTeamFactory, CourseTeamMembershipFactory from util.testing import UrlResetMixin from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase @@ -360,7 +360,7 @@ def setUp(self): def clear_caches(self): """Clears caches so that query count numbers are accurate.""" for cache in settings.CACHES: - get_cache(cache).clear() + caches[cache].clear() RequestCache.clear_request_cache() def count_queries(func): # pylint: disable=no-self-argument @@ -378,10 +378,10 @@ def inner(self, default_store, module_count, mongo_calls, sql_queries, *args, ** return inner @ddt.data( - (ModuleStoreEnum.Type.mongo, 3, 4, 22), - (ModuleStoreEnum.Type.mongo, 20, 4, 22), - (ModuleStoreEnum.Type.split, 3, 13, 22), - (ModuleStoreEnum.Type.split, 20, 13, 22), + (ModuleStoreEnum.Type.mongo, 3, 4, 26), + (ModuleStoreEnum.Type.mongo, 20, 4, 26), + (ModuleStoreEnum.Type.split, 3, 13, 26), + (ModuleStoreEnum.Type.split, 20, 13, 26), ) @ddt.unpack @count_queries @@ -389,10 +389,10 @@ def test_create_thread(self, mock_request): self.create_thread_helper(mock_request) @ddt.data( - (ModuleStoreEnum.Type.mongo, 3, 3, 16), - (ModuleStoreEnum.Type.mongo, 20, 3, 16), - (ModuleStoreEnum.Type.split, 3, 10, 16), - (ModuleStoreEnum.Type.split, 20, 10, 16), + (ModuleStoreEnum.Type.mongo, 3, 3, 20), + (ModuleStoreEnum.Type.mongo, 20, 3, 20), + (ModuleStoreEnum.Type.split, 3, 10, 20), + (ModuleStoreEnum.Type.split, 20, 10, 20), ) @ddt.unpack @count_queries diff --git a/lms/djangoapps/django_comment_client/base/urls.py b/lms/djangoapps/django_comment_client/base/urls.py index e49278ad7c13..f3a2f9244a8c 100644 --- a/lms/djangoapps/django_comment_client/base/urls.py +++ b/lms/djangoapps/django_comment_client/base/urls.py @@ -1,4 +1,7 @@ -from django.conf.urls.defaults import url, patterns +""" +Base urls for the django_comment_client. +""" +from django.conf.urls import url, patterns urlpatterns = patterns( 'django_comment_client.base.views', diff --git a/lms/djangoapps/django_comment_client/forum/tests.py b/lms/djangoapps/django_comment_client/forum/tests.py index a2db0d556991..7d12715ef053 100644 --- a/lms/djangoapps/django_comment_client/forum/tests.py +++ b/lms/djangoapps/django_comment_client/forum/tests.py @@ -35,7 +35,7 @@ from openedx.core.djangoapps.course_groups.models import CourseUserGroup -from teams.tests.factories import CourseTeamFactory +from lms.djangoapps.teams.tests.factories import CourseTeamFactory log = logging.getLogger(__name__) @@ -337,11 +337,11 @@ class SingleThreadQueryCountTestCase(ModuleStoreTestCase): @ddt.data( # old mongo with cache - (ModuleStoreEnum.Type.mongo, 1, 6, 4, 14, 8), - (ModuleStoreEnum.Type.mongo, 50, 6, 4, 14, 8), + (ModuleStoreEnum.Type.mongo, 1, 6, 4, 16, 8), + (ModuleStoreEnum.Type.mongo, 50, 6, 4, 16, 8), # split mongo: 3 queries, regardless of thread response size. - (ModuleStoreEnum.Type.split, 1, 3, 3, 14, 8), - (ModuleStoreEnum.Type.split, 50, 3, 3, 14, 8), + (ModuleStoreEnum.Type.split, 1, 3, 3, 16, 8), + (ModuleStoreEnum.Type.split, 50, 3, 3, 16, 8), ) @ddt.unpack def test_number_of_mongo_queries( diff --git a/lms/djangoapps/django_comment_client/forum/urls.py b/lms/djangoapps/django_comment_client/forum/urls.py index cb11d99571a8..7064858ed5dc 100644 --- a/lms/djangoapps/django_comment_client/forum/urls.py +++ b/lms/djangoapps/django_comment_client/forum/urls.py @@ -1,4 +1,7 @@ -from django.conf.urls.defaults import url, patterns +""" +Forum urls for the django_comment_client. +""" +from django.conf.urls import url, patterns urlpatterns = patterns( 'django_comment_client.forum.views', diff --git a/lms/djangoapps/django_comment_client/migrations/0001_initial.py b/lms/djangoapps/django_comment_client/migrations/0001_initial.py deleted file mode 100644 index 0b5f88e2f2a7..000000000000 --- a/lms/djangoapps/django_comment_client/migrations/0001_initial.py +++ /dev/null @@ -1,132 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Role' - db.create_table('django_comment_client_role', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=30)), - ('course_id', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=255, blank=True)), - )) - db.send_create_signal('django_comment_client', ['Role']) - - # Adding M2M table for field users on 'Role' - db.create_table('django_comment_client_role_users', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('role', models.ForeignKey(orm['django_comment_client.role'], null=False)), - ('user', models.ForeignKey(orm['auth.user'], null=False)) - )) - db.create_unique('django_comment_client_role_users', ['role_id', 'user_id']) - - # Adding model 'Permission' - db.create_table('django_comment_client_permission', ( - ('name', self.gf('django.db.models.fields.CharField')(max_length=30, primary_key=True)), - )) - db.send_create_signal('django_comment_client', ['Permission']) - - # Adding M2M table for field roles on 'Permission' - db.create_table('django_comment_client_permission_roles', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('permission', models.ForeignKey(orm['django_comment_client.permission'], null=False)), - ('role', models.ForeignKey(orm['django_comment_client.role'], null=False)) - )) - db.create_unique('django_comment_client_permission_roles', ['permission_id', 'role_id']) - - - def backwards(self, orm): - # Deleting model 'Role' - db.delete_table('django_comment_client_role') - - # Removing M2M table for field users on 'Role' - db.delete_table('django_comment_client_role_users') - - # Deleting model 'Permission' - db.delete_table('django_comment_client_permission') - - # Removing M2M table for field roles on 'Permission' - db.delete_table('django_comment_client_permission_roles') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'django_comment_client.permission': { - 'Meta': {'object_name': 'Permission'}, - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'primary_key': 'True'}), - 'roles': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'permissions'", 'symmetrical': 'False', 'to': "orm['django_comment_client.Role']"}) - }, - 'django_comment_client.role': { - 'Meta': {'object_name': 'Role'}, - 'course_id': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'roles'", 'symmetrical': 'False', 'to': "orm['auth.User']"}) - } - } - - complete_apps = ['django_comment_client'] diff --git a/lms/djangoapps/django_comment_client/permissions.py b/lms/djangoapps/django_comment_client/permissions.py index 5770ac681765..c9a3910930f5 100644 --- a/lms/djangoapps/django_comment_client/permissions.py +++ b/lms/djangoapps/django_comment_client/permissions.py @@ -10,7 +10,7 @@ from opaque_keys.edx.keys import CourseKey from django_comment_common.models import all_permissions_for_user_in_course -from teams.models import CourseTeam +from lms.djangoapps.teams.models import CourseTeam def has_permission(user, permission, course_id=None): diff --git a/lms/djangoapps/django_comment_client/tests/group_id.py b/lms/djangoapps/django_comment_client/tests/group_id.py index f5eca815d377..1c8eea1c2d40 100644 --- a/lms/djangoapps/django_comment_client/tests/group_id.py +++ b/lms/djangoapps/django_comment_client/tests/group_id.py @@ -1,6 +1,6 @@ import json import re -from teams.tests.factories import CourseTeamFactory +from lms.djangoapps.teams.tests.factories import CourseTeamFactory class GroupIdAssertionMixin(object): diff --git a/lms/djangoapps/django_comment_client/tests/test_utils.py b/lms/djangoapps/django_comment_client/tests/test_utils.py index 241ae24cf40b..b8762232f8e1 100644 --- a/lms/djangoapps/django_comment_client/tests/test_utils.py +++ b/lms/djangoapps/django_comment_client/tests/test_utils.py @@ -27,7 +27,7 @@ from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, TEST_DATA_MIXED_TOY_MODULESTORE from xmodule.modulestore.django import modulestore from opaque_keys.edx.locator import CourseLocator -from teams.tests.factories import CourseTeamFactory +from lms.djangoapps.teams.tests.factories import CourseTeamFactory @attr('shard_1') diff --git a/lms/djangoapps/django_comment_client/urls.py b/lms/djangoapps/django_comment_client/urls.py index eee27ada4b03..03e18b38c29f 100644 --- a/lms/djangoapps/django_comment_client/urls.py +++ b/lms/djangoapps/django_comment_client/urls.py @@ -1,4 +1,7 @@ -from django.conf.urls.defaults import url, patterns, include +""" +Urls for the django_comment_client. +""" +from django.conf.urls import url, patterns, include urlpatterns = patterns( '', diff --git a/lms/djangoapps/django_comment_client/utils.py b/lms/djangoapps/django_comment_client/utils.py index 0807a66fa815..1b73a0bf20a9 100644 --- a/lms/djangoapps/django_comment_client/utils.py +++ b/lms/djangoapps/django_comment_client/utils.py @@ -431,7 +431,7 @@ def __init__(self, data=None): """ content = json.dumps(data, cls=i4xEncoder) super(JsonResponse, self).__init__(content, - mimetype='application/json; charset=utf-8') + content_type='application/json; charset=utf-8') class JsonError(HttpResponse): @@ -446,7 +446,7 @@ def __init__(self, error_messages=[], status=400): error_messages = [error_messages] content = json.dumps({'errors': error_messages}, indent=2, ensure_ascii=False) super(JsonError, self).__init__(content, - mimetype='application/json; charset=utf-8', status=status) + content_type='application/json; charset=utf-8', status=status) class HtmlResponse(HttpResponse): diff --git a/lms/djangoapps/foldit/migrations/0001_initial.py b/lms/djangoapps/foldit/migrations/0001_initial.py index d288e5174281..e73af4e03957 100644 --- a/lms/djangoapps/foldit/migrations/0001_initial.py +++ b/lms/djangoapps/foldit/migrations/0001_initial.py @@ -1,111 +1,47 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Score' - db.create_table('foldit_score', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='foldit_scores', to=orm['auth.User'])), - ('unique_user_id', self.gf('django.db.models.fields.CharField')(max_length=50, db_index=True)), - ('puzzle_id', self.gf('django.db.models.fields.IntegerField')()), - ('best_score', self.gf('django.db.models.fields.FloatField')(db_index=True)), - ('current_score', self.gf('django.db.models.fields.FloatField')(db_index=True)), - ('score_version', self.gf('django.db.models.fields.IntegerField')()), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - )) - db.send_create_signal('foldit', ['Score']) - - # Adding model 'PuzzleComplete' - db.create_table('foldit_puzzlecomplete', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='foldit_puzzles_complete', to=orm['auth.User'])), - ('unique_user_id', self.gf('django.db.models.fields.CharField')(max_length=50, db_index=True)), - ('puzzle_id', self.gf('django.db.models.fields.IntegerField')()), - ('puzzle_set', self.gf('django.db.models.fields.IntegerField')(db_index=True)), - ('puzzle_subset', self.gf('django.db.models.fields.IntegerField')(db_index=True)), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - )) - db.send_create_signal('foldit', ['PuzzleComplete']) - - # Adding unique constraint on 'PuzzleComplete', fields ['user', 'puzzle_id', 'puzzle_set', 'puzzle_subset'] - db.create_unique('foldit_puzzlecomplete', ['user_id', 'puzzle_id', 'puzzle_set', 'puzzle_subset']) - - - def backwards(self, orm): - # Removing unique constraint on 'PuzzleComplete', fields ['user', 'puzzle_id', 'puzzle_set', 'puzzle_subset'] - db.delete_unique('foldit_puzzlecomplete', ['user_id', 'puzzle_id', 'puzzle_set', 'puzzle_subset']) - - # Deleting model 'Score' - db.delete_table('foldit_score') - - # Deleting model 'PuzzleComplete' - db.delete_table('foldit_puzzlecomplete') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'foldit.puzzlecomplete': { - 'Meta': {'ordering': "['puzzle_id']", 'unique_together': "(('user', 'puzzle_id', 'puzzle_set', 'puzzle_subset'),)", 'object_name': 'PuzzleComplete'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'puzzle_id': ('django.db.models.fields.IntegerField', [], {}), - 'puzzle_set': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'puzzle_subset': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'unique_user_id': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'foldit_puzzles_complete'", 'to': "orm['auth.User']"}) - }, - 'foldit.score': { - 'Meta': {'object_name': 'Score'}, - 'best_score': ('django.db.models.fields.FloatField', [], {'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'current_score': ('django.db.models.fields.FloatField', [], {'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'puzzle_id': ('django.db.models.fields.IntegerField', [], {}), - 'score_version': ('django.db.models.fields.IntegerField', [], {}), - 'unique_user_id': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'foldit_scores'", 'to': "orm['auth.User']"}) - } - } - - complete_apps = ['foldit'] +from __future__ import unicode_literals + +from django.db import migrations, models +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='PuzzleComplete', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('unique_user_id', models.CharField(max_length=50, db_index=True)), + ('puzzle_id', models.IntegerField()), + ('puzzle_set', models.IntegerField(db_index=True)), + ('puzzle_subset', models.IntegerField(db_index=True)), + ('created', models.DateTimeField(auto_now_add=True)), + ('user', models.ForeignKey(related_name='foldit_puzzles_complete', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'ordering': ['puzzle_id'], + }, + ), + migrations.CreateModel( + name='Score', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('unique_user_id', models.CharField(max_length=50, db_index=True)), + ('puzzle_id', models.IntegerField()), + ('best_score', models.FloatField(db_index=True)), + ('current_score', models.FloatField(db_index=True)), + ('score_version', models.IntegerField()), + ('created', models.DateTimeField(auto_now_add=True)), + ('user', models.ForeignKey(related_name='foldit_scores', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.AlterUniqueTogether( + name='puzzlecomplete', + unique_together=set([('user', 'puzzle_id', 'puzzle_set', 'puzzle_subset')]), + ), + ] diff --git a/lms/djangoapps/instructor/tests/test_enrollment.py b/lms/djangoapps/instructor/tests/test_enrollment.py index 231eb533bd8a..1463d0b4ce63 100644 --- a/lms/djangoapps/instructor/tests/test_enrollment.py +++ b/lms/djangoapps/instructor/tests/test_enrollment.py @@ -18,7 +18,7 @@ from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory -from ccx.tests.factories import CcxFactory +from lms.djangoapps.ccx.tests.factories import CcxFactory from student.models import CourseEnrollment, CourseEnrollmentAllowed from student.roles import CourseCcxCoachRole # pylint: disable=import-error from student.tests.factories import ( # pylint: disable=import-error diff --git a/lms/djangoapps/instructor/tests/test_spoc_gradebook.py b/lms/djangoapps/instructor/tests/test_spoc_gradebook.py index aa9b09abfbb9..7f930ea7d283 100644 --- a/lms/djangoapps/instructor/tests/test_spoc_gradebook.py +++ b/lms/djangoapps/instructor/tests/test_spoc_gradebook.py @@ -140,7 +140,6 @@ def test_styles(self): self.assertIn("grade_D {color:DarkSlateGray;}", self.response.content) def test_assigned_grades(self): - print self.response.content # Users 9-10 have >= 90% on Homeworks [2] # Users 9-10 have >= 90% on the class [2] # One use at the top of the page [1] diff --git a/lms/djangoapps/instructor/tests/test_tools.py b/lms/djangoapps/instructor/tests/test_tools.py index 9ea90f67735b..371e7f76a7fc 100644 --- a/lms/djangoapps/instructor/tests/test_tools.py +++ b/lms/djangoapps/instructor/tests/test_tools.py @@ -242,7 +242,7 @@ def test_set_due_date_extension(self): def test_set_due_date_extension_num_queries(self): extended = datetime.datetime(2013, 12, 25, 0, 0, tzinfo=utc) - with self.assertNumQueries(4): + with self.assertNumQueries(5): tools.set_due_date_extension(self.course, self.week1, self.user, extended) self._clear_field_data_cache() diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index d626a45ed03a..1875c6ebe46b 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -17,14 +17,15 @@ from django.views.decorators.cache import cache_control from django.core.exceptions import ValidationError, PermissionDenied from django.core.mail.message import EmailMessage -from django.db import IntegrityError from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned +from django.db import IntegrityError, transaction from django.core.urlresolvers import reverse from django.core.validators import validate_email from django.utils.translation import ugettext as _ from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, HttpResponseNotFound from django.utils.html import strip_tags from django.shortcuts import redirect +from util.db import outer_atomic import string # pylint: disable=deprecated-module import random import unicodecsv @@ -440,11 +441,12 @@ def register_and_enroll_students(request, course_id): # pylint: disable=too-man password = generate_unique_password(generated_passwords) try: - enrollment_obj = create_and_enroll_user(email, username, name, country, password, course_id) - reason = 'Enrolling via csv upload' - ManualEnrollmentAudit.create_manual_enrollment_audit( - request.user, email, UNENROLLED_TO_ENROLLED, reason, enrollment_obj - ) + with transaction.atomic(): + enrollment_obj = create_and_enroll_user(email, username, name, country, password, course_id) + reason = 'Enrolling via csv upload' + ManualEnrollmentAudit.create_manual_enrollment_audit( + request.user, email, UNENROLLED_TO_ENROLLED, reason, enrollment_obj + ) except IntegrityError: row_errors.append({ 'username': username, 'email': email, 'response': _('Username {user} already exists.').format(user=username)}) @@ -890,6 +892,7 @@ def extract_user_info(user): return JsonResponse(response_payload) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @@ -1092,6 +1095,7 @@ def re_validate_invoice(obj_invoice): return JsonResponse({'message': message}) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @@ -1131,6 +1135,7 @@ def get_issued_certificates(request, course_id): # pylint: disable=invalid-name return JsonResponse(response_payload) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @@ -1209,6 +1214,7 @@ def get_students_features(request, course_id, csv=False): # pylint: disable=red return JsonResponse({"status": already_running_status}) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @@ -1240,6 +1246,7 @@ def get_students_who_may_enroll(request, course_id): return JsonResponse({"status": already_running_status}) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_POST @@ -1314,6 +1321,7 @@ def get_coupon_codes(request, course_id): # pylint: disable=unused-argument return instructor_analytics.csvs.create_csv_response('Coupons.csv', csv_columns, data_rows) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @@ -1337,6 +1345,7 @@ def get_enrollment_report(request, course_id): }) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @@ -1361,6 +1370,7 @@ def get_exec_summary_report(request, course_id): }) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @@ -1384,6 +1394,7 @@ def get_course_survey_results(request, course_id): }) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @@ -1453,7 +1464,8 @@ def save_registration_code(user, course_id, mode_slug, invoice=None, order=None, invoice_item=invoice_item ) try: - course_registration.save() + with transaction.atomic(): + course_registration.save() return course_registration except IntegrityError: return save_registration_code( @@ -1768,7 +1780,7 @@ def get_anon_ids(request, course_id): # pylint: disable=unused-argument def csv_response(filename, header, rows): """Returns a CSV http response for the given header and rows (excel/utf-8).""" - response = HttpResponse(mimetype='text/csv') + response = HttpResponse(content_type='text/csv') response['Content-Disposition'] = 'attachment; filename={0}'.format(unicode(filename).encode('utf-8')) writer = csv.writer(response, dialect='excel', quotechar='"', quoting=csv.QUOTE_ALL) # In practice, there should not be non-ascii data in this query, @@ -1817,6 +1829,7 @@ def get_student_progress_url(request, course_id): return JsonResponse(response_payload) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @@ -1898,6 +1911,7 @@ def reset_student_attempts(request, course_id): return JsonResponse(response_payload) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @@ -1963,6 +1977,7 @@ def reset_student_attempts_for_entrance_exam(request, course_id): # pylint: dis return JsonResponse(response_payload) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('instructor') @@ -2018,6 +2033,7 @@ def rescore_problem(request, course_id): return JsonResponse(response_payload) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('instructor') @@ -2224,6 +2240,7 @@ def list_financial_report_downloads(_request, course_id): return JsonResponse(response_payload) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @@ -2246,6 +2263,7 @@ def calculate_grades_csv(request, course_id): }) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @@ -2334,6 +2352,7 @@ def extract_user_info(user): return JsonResponse(response_payload) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @@ -2626,6 +2645,8 @@ def enable_certificate_generation(request, course_id=None): #---- Gradebook (shown to small courses only) ---- +# Grades can potentially be written - if so, let grading manage the transaction. +@transaction.non_atomic_requests @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') def spoc_gradebook(request, course_id): @@ -2689,6 +2710,7 @@ def mark_student_can_skip_entrance_exam(request, course_id): # pylint: disable= return JsonResponse(response_payload) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_global_staff @@ -2708,6 +2730,7 @@ def start_certificate_generation(request, course_id): return JsonResponse(response_payload) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_global_staff @@ -2725,13 +2748,15 @@ def create_certificate_exception(request, course_id, white_list_student=None): 'success': False, 'message': _('Invalid Json data') }, status=400) - try: - certificate_white_list, students = process_certificate_exceptions(certificate_white_list, course_key) - except ValueError as error: - return JsonResponse( - {'success': False, 'message': error.message, 'data': json.dumps(certificate_white_list)}, - status=400 - ) + + with outer_atomic(): + try: + certificate_white_list, students = process_certificate_exceptions(certificate_white_list, course_key) + except ValueError as error: + return JsonResponse( + {'success': False, 'message': error.message, 'data': json.dumps(certificate_white_list)}, + status=400 + ) if white_list_student == 'all': # Generate Certificates for all white listed students diff --git a/lms/djangoapps/instructor/views/legacy.py b/lms/djangoapps/instructor/views/legacy.py index ac9e07261cae..38245f7e2ba1 100644 --- a/lms/djangoapps/instructor/views/legacy.py +++ b/lms/djangoapps/instructor/views/legacy.py @@ -20,6 +20,7 @@ from django.conf import settings from django.contrib.auth.models import User +from django.db import transaction from django.http import HttpResponse from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.cache import cache_control @@ -77,6 +78,8 @@ def split_by_comma_and_whitespace(a_str): return re.split(r'[\s,]', a_str) +# Grades can potentially be written - if so, let grading manage the transaction. +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) def instructor_dashboard(request, course_id): @@ -129,7 +132,7 @@ def get_course_stats_table(): def return_csv(func, datatable, file_pointer=None): """Outputs a CSV file from the contents of a datatable.""" if file_pointer is None: - response = HttpResponse(mimetype='text/csv') + response = HttpResponse(content_type='text/csv') response['Content-Disposition'] = (u'attachment; filename={0}'.format(func)).encode('utf-8') else: response = file_pointer diff --git a/lms/djangoapps/instructor_analytics/csvs.py b/lms/djangoapps/instructor_analytics/csvs.py index eb4cf69e3081..e2c34041dff6 100644 --- a/lms/djangoapps/instructor_analytics/csvs.py +++ b/lms/djangoapps/instructor_analytics/csvs.py @@ -15,7 +15,7 @@ def create_csv_response(filename, header, datarows): header e.g. ['Name', 'Email'] datarows e.g. [['Jim', 'jim@edy.org'], ['Jake', 'jake@edy.org'], ...] """ - response = HttpResponse(mimetype='text/csv') + response = HttpResponse(content_type='text/csv') response['Content-Disposition'] = 'attachment; filename={0}'\ .format(filename) csvwriter = csv.writer( diff --git a/lms/djangoapps/instructor_task/api.py b/lms/djangoapps/instructor_task/api.py index 602a8ab64a12..3d3ac6eade47 100644 --- a/lms/djangoapps/instructor_task/api.py +++ b/lms/djangoapps/instructor_task/api.py @@ -95,14 +95,6 @@ def submit_rescore_problem_for_student(request, usage_key, student): # pylint: ItemNotFoundException is raised if the problem doesn't exist, or AlreadyRunningError if the problem is already being rescored for this student, or NotImplementedError if the problem doesn't support rescoring. - - This method makes sure the InstructorTask entry is committed. - When called from any view that is wrapped by TransactionMiddleware, - and thus in a "commit-on-success" transaction, an autocommit buried within here - will cause any pending transaction to be committed by a successful - save here. Any future database operations will take place in a - separate transaction. - """ # check arguments: let exceptions return up to the caller. check_arguments_for_rescoring(usage_key) @@ -125,13 +117,6 @@ def submit_rescore_problem_for_all_students(request, usage_key): # pylint: disa ItemNotFoundException is raised if the problem doesn't exist, or AlreadyRunningError if the problem is already being rescored, or NotImplementedError if the problem doesn't support rescoring. - - This method makes sure the InstructorTask entry is committed. - When called from any view that is wrapped by TransactionMiddleware, - and thus in a "commit-on-success" transaction, an autocommit buried within here - will cause any pending transaction to be committed by a successful - save here. Any future database operations will take place in a - separate transaction. """ # check arguments: let exceptions return up to the caller. check_arguments_for_rescoring(usage_key) @@ -157,13 +142,6 @@ def submit_rescore_entrance_exam_for_student(request, usage_key, student=None): usage_key, AlreadyRunningError is raised if the entrance exam is already being re-scored, or NotImplementedError if the problem doesn't support rescoring. - - This method makes sure the InstructorTask entry is committed. - When called from any view that is wrapped by TransactionMiddleware, - and thus in a "commit-on-success" transaction, an autocommit buried within here - will cause any pending transaction to be committed by a successful - save here. Any future database operations will take place in a - separate transaction. """ # check problems for rescoring: let exceptions return up to the caller. check_entrance_exam_problems_for_rescoring(usage_key) @@ -185,13 +163,6 @@ def submit_reset_problem_attempts_for_all_students(request, usage_key): # pylin ItemNotFoundException is raised if the problem doesn't exist, or AlreadyRunningError if the problem is already being reset. - - This method makes sure the InstructorTask entry is committed. - When called from any view that is wrapped by TransactionMiddleware, - and thus in a "commit-on-success" transaction, an autocommit buried within here - will cause any pending transaction to be committed by a successful - save here. Any future database operations will take place in a - separate transaction. """ # check arguments: make sure that the usage_key is defined # (since that's currently typed in). If the corresponding module descriptor doesn't exist, @@ -218,13 +189,6 @@ def submit_reset_problem_attempts_in_entrance_exam(request, usage_key, student): ItemNotFoundError is raised if entrance exam does not exists for given usage_key, AlreadyRunningError is raised if the entrance exam is already being reset. - - This method makes sure the InstructorTask entry is committed. - When called from any view that is wrapped by TransactionMiddleware, - and thus in a "commit-on-success" transaction, an autocommit buried within here - will cause any pending transaction to be committed by a successful - save here. Any future database operations will take place in a - separate transaction. """ # check arguments: make sure entrance exam(section) exists for given usage_key modulestore().get_item(usage_key) @@ -245,13 +209,6 @@ def submit_delete_problem_state_for_all_students(request, usage_key): # pylint: ItemNotFoundException is raised if the problem doesn't exist, or AlreadyRunningError if the particular problem's state is already being deleted. - - This method makes sure the InstructorTask entry is committed. - When called from any view that is wrapped by TransactionMiddleware, - and thus in a "commit-on-success" transaction, an autocommit buried within here - will cause any pending transaction to be committed by a successful - save here. Any future database operations will take place in a - separate transaction. """ # check arguments: make sure that the usage_key is defined # (since that's currently typed in). If the corresponding module descriptor doesn't exist, @@ -279,13 +236,6 @@ def submit_delete_entrance_exam_state_for_student(request, usage_key, student): ItemNotFoundError is raised if entrance exam does not exists for given usage_key, AlreadyRunningError is raised if the entrance exam is already being reset. - - This method makes sure the InstructorTask entry is committed. - When called from any view that is wrapped by TransactionMiddleware, - and thus in a "commit-on-success" transaction, an autocommit buried within here - will cause any pending transaction to be committed by a successful - save here. Any future database operations will take place in a - separate transaction. """ # check arguments: make sure entrance exam(section) exists for given usage_key modulestore().get_item(usage_key) @@ -313,13 +263,6 @@ def submit_bulk_course_email(request, course_key, email_id): AlreadyRunningError is raised if the same recipients are already being emailed with the same CourseEmail object. - - This method makes sure the InstructorTask entry is committed. - When called from any view that is wrapped by TransactionMiddleware, - and thus in a "commit-on-success" transaction, an autocommit buried within here - will cause any pending transaction to be committed by a successful - save here. Any future database operations will take place in a - separate transaction. """ # Assume that the course is defined, and that the user has already been verified to have # appropriate access to the course. But make sure that the email exists. diff --git a/lms/djangoapps/instructor_task/api_helper.py b/lms/djangoapps/instructor_task/api_helper.py index 441703c85195..c5bfbaa50db6 100644 --- a/lms/djangoapps/instructor_task/api_helper.py +++ b/lms/djangoapps/instructor_task/api_helper.py @@ -9,6 +9,7 @@ import logging from django.utils.translation import ugettext as _ +from util.db import outer_atomic from celery.result import AsyncResult from celery.states import READY_STATES, SUCCESS, FAILURE, REVOKED @@ -48,13 +49,6 @@ def _reserve_task(course_id, task_type, task_key, task_input, requester): Includes the creation of an arbitrary value for task_id, to be submitted with the task call to celery. - The InstructorTask.create method makes sure the InstructorTask entry is committed. - When called from any view that is wrapped by TransactionMiddleware, - and thus in a "commit-on-success" transaction, an autocommit buried within here - will cause any pending transaction to be committed by a successful - save here. Any future database operations will take place in a - separate transaction. - Note that there is a chance of a race condition here, when two users try to run the same task at almost exactly the same time. One user could be after the check and before the create when the second user @@ -327,20 +321,16 @@ def submit_task(request, task_type, task_class, course_key, task_input, task_key the `request` provided by the originating server request. Then the task is submitted to run asynchronously, using the specified `task_class` and using the task_id constructed for it. - `AlreadyRunningError` is raised if the task is already running. - - The _reserve_task method makes sure the InstructorTask entry is committed. - When called from any view that is wrapped by TransactionMiddleware, - and thus in a "commit-on-success" transaction, an autocommit buried within here - will cause any pending transaction to be committed by a successful - save here. Any future database operations will take place in a - separate transaction. + Cannot be inside an atomic block. + `AlreadyRunningError` is raised if the task is already running. """ - # check to see if task is already running, and reserve it otherwise: - instructor_task = _reserve_task(course_key, task_type, task_key, task_input, request.user) + with outer_atomic(): + # check to see if task is already running, and reserve it otherwise: + instructor_task = _reserve_task(course_key, task_type, task_key, task_input, request.user) + + # make sure all data has been committed before handing off task to celery. - # submit task: task_id = instructor_task.task_id task_args = [instructor_task.id, _get_xmodule_instance_args(request, task_id)] # pylint: disable=no-member task_class.apply_async(task_args, task_id=task_id) diff --git a/lms/djangoapps/instructor_task/migrations/0001_initial.py b/lms/djangoapps/instructor_task/migrations/0001_initial.py index add6f0b7f144..487f5a7408c0 100644 --- a/lms/djangoapps/instructor_task/migrations/0001_initial.py +++ b/lms/djangoapps/instructor_task/migrations/0001_initial.py @@ -1,86 +1,33 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'InstructorTask' - db.create_table('instructor_task_instructortask', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('task_type', self.gf('django.db.models.fields.CharField')(max_length=50, db_index=True)), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('task_key', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('task_input', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('task_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('task_state', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, db_index=True)), - ('task_output', self.gf('django.db.models.fields.CharField')(max_length=1024, null=True)), - ('requester', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True, blank=True)), - ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - )) - db.send_create_signal('instructor_task', ['InstructorTask']) - - - def backwards(self, orm): - # Deleting model 'InstructorTask' - db.delete_table('instructor_task_instructortask') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'instructor_task.instructortask': { - 'Meta': {'object_name': 'InstructorTask'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'requester': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'task_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'task_input': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'task_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'task_output': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'null': 'True'}), - 'task_state': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'db_index': 'True'}), - 'task_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['instructor_task'] +from __future__ import unicode_literals + +from django.db import migrations, models +from django.conf import settings +import xmodule_django.models + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='InstructorTask', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('task_type', models.CharField(max_length=50, db_index=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('task_key', models.CharField(max_length=255, db_index=True)), + ('task_input', models.CharField(max_length=255)), + ('task_id', models.CharField(max_length=255, db_index=True)), + ('task_state', models.CharField(max_length=50, null=True, db_index=True)), + ('task_output', models.CharField(max_length=1024, null=True)), + ('created', models.DateTimeField(auto_now_add=True, null=True)), + ('updated', models.DateTimeField(auto_now=True)), + ('subtasks', models.TextField(blank=True)), + ('requester', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/lms/djangoapps/instructor_task/migrations/0002_add_subtask_field.py b/lms/djangoapps/instructor_task/migrations/0002_add_subtask_field.py deleted file mode 100644 index 81e55c6e168a..000000000000 --- a/lms/djangoapps/instructor_task/migrations/0002_add_subtask_field.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'InstructorTask.subtasks' - db.add_column('instructor_task_instructortask', 'subtasks', - self.gf('django.db.models.fields.TextField')(default='', blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'InstructorTask.subtasks' - db.delete_column('instructor_task_instructortask', 'subtasks') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'instructor_task.instructortask': { - 'Meta': {'object_name': 'InstructorTask'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'requester': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'subtasks': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'task_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'task_input': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'task_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'task_output': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'null': 'True'}), - 'task_state': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'db_index': 'True'}), - 'task_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['instructor_task'] diff --git a/lms/djangoapps/instructor_task/models.py b/lms/djangoapps/instructor_task/models.py index 80450eb22e8f..ebc9af8f0c12 100644 --- a/lms/djangoapps/instructor_task/models.py +++ b/lms/djangoapps/instructor_task/models.py @@ -87,13 +87,6 @@ def __unicode__(self): def create(cls, course_id, task_type, task_key, task_input, requester): """ Create an instance of InstructorTask. - - The InstructorTask.save_now method makes sure the InstructorTask entry is committed. - When called from any view that is wrapped by TransactionMiddleware, - and thus in a "commit-on-success" transaction, an autocommit buried within here - will cause any pending transaction to be committed by a successful - save here. Any future database operations will take place in a - separate transaction. """ # create the task_id here, and pass it into celery: task_id = str(uuid4()) @@ -120,17 +113,10 @@ def create(cls, course_id, task_type, task_key, task_input, requester): return instructor_task - @transaction.autocommit + @transaction.atomic def save_now(self): """ Writes InstructorTask immediately, ensuring the transaction is committed. - - Autocommit annotation makes sure the database entry is committed. - When called from any view that is wrapped by TransactionMiddleware, - and thus in a "commit-on-success" transaction, this autocommit here - will cause any pending transaction to be committed by a successful - save here. Any future database operations will take place in a - separate transaction. """ self.save() diff --git a/lms/djangoapps/instructor_task/subtasks.py b/lms/djangoapps/instructor_task/subtasks.py index 2cafad3a77e7..3fb89f362129 100644 --- a/lms/djangoapps/instructor_task/subtasks.py +++ b/lms/djangoapps/instructor_task/subtasks.py @@ -15,6 +15,7 @@ from django.core.cache import cache from instructor_task.models import InstructorTask, PROGRESS, QUEUING +from util.db import outer_atomic TASK_LOG = logging.getLogger('edx.celery.task') @@ -317,7 +318,9 @@ def queue_subtasks_for_query( total_num_subtasks, total_num_items, ) - progress = initialize_subtask_info(entry, action_name, total_num_items, subtask_id_list) + # Make sure this is committed to database before handing off subtasks to celery. + with outer_atomic(): + progress = initialize_subtask_info(entry, action_name, total_num_items, subtask_id_list) # Construct a generator that will return the recipients to use for each subtask. # Pass in the desired fields to fetch for each recipient. @@ -494,7 +497,7 @@ def update_subtask_status(entry_id, current_task_id, new_subtask_status, retry_c _release_subtask_lock(current_task_id) -@transaction.commit_manually +@transaction.atomic def _update_subtask_status(entry_id, current_task_id, new_subtask_status): """ Update the status of the subtask in the parent InstructorTask object tracking its progress. @@ -582,9 +585,5 @@ def _update_subtask_status(entry_id, current_task_id, new_subtask_status): entry.task_output, current_task_id, entry_id) except Exception: TASK_LOG.exception("Unexpected error while updating InstructorTask.") - transaction.rollback() dog_stats_api.increment('instructor_task.subtask.update_exception') raise - else: - TASK_LOG.debug("about to commit....") - transaction.commit() diff --git a/lms/djangoapps/instructor_task/tasks_helper.py b/lms/djangoapps/instructor_task/tasks_helper.py index 3f095c6691ba..d94dd2811d9a 100644 --- a/lms/djangoapps/instructor_task/tasks_helper.py +++ b/lms/djangoapps/instructor_task/tasks_helper.py @@ -32,6 +32,7 @@ from survey.models import SurveyAnswer from track.views import task_track +from util.db import outer_atomic from util.file import course_filename_prefix_generator, UniversalNewlineIterator from xblock.runtime import KvsFieldData from xmodule.modulestore.django import modulestore @@ -63,8 +64,8 @@ from opaque_keys.edx.keys import UsageKey from openedx.core.djangoapps.course_groups.cohorts import add_user_to_cohort, is_course_cohorted from student.models import CourseEnrollment, CourseAccessRole -from teams.models import CourseTeamMembership -from verify_student.models import SoftwareSecurePhotoVerification +from lms.djangoapps.teams.models import CourseTeamMembership +from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification # define different loggers for use within tasks and on client side TASK_LOG = logging.getLogger('edx.celery.task') @@ -259,9 +260,10 @@ def run_main_task(entry_id, task_fcn, action_name): # Get the InstructorTask to be updated. If this fails then let the exception return to Celery. # There's no point in catching it here. - entry = InstructorTask.objects.get(pk=entry_id) - entry.task_state = PROGRESS - entry.save_now() + with outer_atomic(): + entry = InstructorTask.objects.get(pk=entry_id) + entry.task_state = PROGRESS + entry.save_now() # Get inputs to use in this task from the entry task_id = entry.task_id @@ -465,7 +467,7 @@ def make_track_function(): ) -@transaction.autocommit +@outer_atomic def rescore_problem_module_state(xmodule_instance_args, module_descriptor, student_module): ''' Takes an XModule descriptor and a corresponding StudentModule object, and @@ -554,7 +556,7 @@ def rescore_problem_module_state(xmodule_instance_args, module_descriptor, stude return UPDATE_STATUS_SUCCEEDED -@transaction.autocommit +@outer_atomic def reset_attempts_module_state(xmodule_instance_args, _module_descriptor, student_module): """ Resets problem attempts to zero for specified `student_module`. @@ -581,7 +583,7 @@ def reset_attempts_module_state(xmodule_instance_args, _module_descriptor, stude return update_status -@transaction.autocommit +@outer_atomic def delete_problem_module_state(xmodule_instance_args, _module_descriptor, student_module): """ Delete the StudentModule entry. @@ -1494,7 +1496,8 @@ def cohort_students_and_upload(_xmodule_instance_args, _entry_id, course_id, tas continue try: - add_user_to_cohort(cohorts_status[cohort_name]['cohort'], username_or_email) + with outer_atomic(): + add_user_to_cohort(cohorts_status[cohort_name]['cohort'], username_or_email) cohorts_status[cohort_name]['Students Added'] += 1 task_progress.succeeded += 1 except User.DoesNotExist: diff --git a/lms/djangoapps/instructor_task/tests/test_tasks_helper.py b/lms/djangoapps/instructor_task/tests/test_tasks_helper.py index 9cc34e4827a5..85ce730cdba6 100644 --- a/lms/djangoapps/instructor_task/tests/test_tasks_helper.py +++ b/lms/djangoapps/instructor_task/tests/test_tasks_helper.py @@ -29,7 +29,7 @@ CourseRegistrationCodeInvoiceItem, InvoiceTransaction, Coupon from student.tests.factories import UserFactory, CourseModeFactory from student.models import CourseEnrollment, CourseEnrollmentAllowed, ManualEnrollmentAudit, ALLOWEDTOENROLL_TO_ENROLLED -from verify_student.tests.factories import SoftwareSecurePhotoVerificationFactory +from lms.djangoapps.verify_student.tests.factories import SoftwareSecurePhotoVerificationFactory from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from xmodule.partitions.partitions import Group, UserPartition from instructor_task.models import ReportStore @@ -1614,7 +1614,7 @@ def test_certificate_generation_for_students(self): current_task.update_state = Mock() instructor_task = Mock() instructor_task.task_input = json.dumps({'students': None}) - with self.assertNumQueries(125): + with self.assertNumQueries(213): with patch('instructor_task.tasks_helper._get_current_task') as mock_current_task: mock_current_task.return_value = current_task with patch('capa.xqueue_interface.XQueueInterface.send_to_queue') as mock_queue: diff --git a/lms/djangoapps/licenses/migrations/0001_initial.py b/lms/djangoapps/licenses/migrations/0001_initial.py index 365046272d58..a7a26b69265d 100644 --- a/lms/djangoapps/licenses/migrations/0001_initial.py +++ b/lms/djangoapps/licenses/migrations/0001_initial.py @@ -1,118 +1,35 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseSoftware' - db.create_table('licenses_coursesoftware', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('full_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('url', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255)), - )) - db.send_create_signal('licenses', ['CourseSoftware']) - - # Adding model 'UserLicense' - db.create_table('licenses_userlicense', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('software', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['licenses.CourseSoftware'])), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)), - ('serial', self.gf('django.db.models.fields.CharField')(max_length=255)), - )) - db.send_create_signal('licenses', ['UserLicense']) - - - def backwards(self, orm): - # Deleting model 'CourseSoftware' - db.delete_table('licenses_coursesoftware') - - # Deleting model 'UserLicense' - db.delete_table('licenses_userlicense') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), - 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), - 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), - 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), - 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), - 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'licenses.coursesoftware': { - 'Meta': {'object_name': 'CourseSoftware'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'full_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'url': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'licenses.userlicense': { - 'Meta': {'object_name': 'UserLicense'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'serial': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'software': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['licenses.CourseSoftware']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}) - } - } - - complete_apps = ['licenses'] +from __future__ import unicode_literals + +from django.db import migrations, models +from django.conf import settings +import xmodule_django.models + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='CourseSoftware', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=255)), + ('full_name', models.CharField(max_length=255)), + ('url', models.CharField(max_length=255)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255)), + ], + ), + migrations.CreateModel( + name='UserLicense', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('serial', models.CharField(max_length=255)), + ('software', models.ForeignKey(to='licenses.CourseSoftware')), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True)), + ], + ), + ] diff --git a/lms/djangoapps/licenses/models.py b/lms/djangoapps/licenses/models.py index 6ec2c22d981c..675db4d143fc 100644 --- a/lms/djangoapps/licenses/models.py +++ b/lms/djangoapps/licenses/models.py @@ -68,7 +68,7 @@ def _create_license(user, software): try: # find one license that has not been assigned, locking the # table/rows with select_for_update to prevent race conditions - with transaction.commit_on_success(): + with transaction.atomic(): selected = UserLicense.objects.select_for_update() license = selected.filter(user__isnull=True, software=software)[0] license.user = user diff --git a/lms/djangoapps/licenses/views.py b/lms/djangoapps/licenses/views.py index 839c145df586..c30cebd915ae 100644 --- a/lms/djangoapps/licenses/views.py +++ b/lms/djangoapps/licenses/views.py @@ -87,4 +87,4 @@ def user_software_license(request): else: response = {'error': 'No serial number found'} - return HttpResponse(json.dumps(response), mimetype='application/json') + return HttpResponse(json.dumps(response), content_type='application/json') diff --git a/lms/djangoapps/lms_xblock/migrations/0001_initial.py b/lms/djangoapps/lms_xblock/migrations/0001_initial.py index f4cdb0c97d65..b0959b6a6a98 100644 --- a/lms/djangoapps/lms_xblock/migrations/0001_initial.py +++ b/lms/djangoapps/lms_xblock/migrations/0001_initial.py @@ -1,74 +1,30 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'XBlockAsidesConfig' - db.create_table('lms_xblock_xblockasidesconfig', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('disabled_blocks', self.gf('django.db.models.fields.TextField')(default='about course_info static_tab')), - )) - db.send_create_signal('lms_xblock', ['XBlockAsidesConfig']) - - - def backwards(self, orm): - # Deleting model 'XBlockAsidesConfig' - db.delete_table('lms_xblock_xblockasidesconfig') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'lms_xblock.xblockasidesconfig': { - 'Meta': {'object_name': 'XBlockAsidesConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'disabled_blocks': ('django.db.models.fields.TextField', [], {'default': "'about course_info static_tab'"}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['lms_xblock'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='XBlockAsidesConfig', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('disabled_blocks', models.TextField(default=b'about course_info static_tab', help_text=b'Space-separated list of XBlocks on which XBlockAsides should never render.')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + ] diff --git a/lms/djangoapps/lms_xblock/mixin.py b/lms/djangoapps/lms_xblock/mixin.py index fefd9a7e0194..ba07f8d081c6 100644 --- a/lms/djangoapps/lms_xblock/mixin.py +++ b/lms/djangoapps/lms_xblock/mixin.py @@ -1,7 +1,8 @@ """ Namespace that defines fields common to all blocks used in the LMS """ -from django.utils.translation import ugettext_noop as _ + +#from django.utils.translation import ugettext_noop as _ from lazy import lazy from xblock.fields import Boolean, Scope, String, XBlockMixin, Dict @@ -9,6 +10,10 @@ from xmodule.modulestore.inheritance import UserPartitionList from xmodule.partitions.partitions import NoSuchUserPartitionError, NoSuchUserPartitionGroupError +# Please do not remove, this is a workaround for Django 1.8. +# more information can be found here: https://openedx.atlassian.net/browse/PLAT-902 +_ = lambda text: text + class GroupAccessDict(Dict): """Special Dict class for serializing the group_access field""" diff --git a/lms/djangoapps/lms_xblock/models.py b/lms/djangoapps/lms_xblock/models.py index bffe8ebf2700..a67878be48cd 100644 --- a/lms/djangoapps/lms_xblock/models.py +++ b/lms/djangoapps/lms_xblock/models.py @@ -18,6 +18,9 @@ class XBlockAsidesConfig(ConfigurationModel): Configuration for XBlockAsides. """ + class Meta(ConfigurationModel.Meta): + app_label = "lms_xblock" + disabled_blocks = TextField( default="about course_info static_tab", help_text="Space-separated list of XBlocks on which XBlockAsides should never render." diff --git a/lms/djangoapps/lti_provider/__init__.py b/lms/djangoapps/lti_provider/__init__.py index c95c036a80d2..ccf384160db0 100644 --- a/lms/djangoapps/lti_provider/__init__.py +++ b/lms/djangoapps/lti_provider/__init__.py @@ -4,6 +4,3 @@ by IMS: http://www.imsglobal.org/toolsinteroperability2.cfm """ - -# Import the tasks module to ensure that signal handlers are registered. -import lms.djangoapps.lti_provider.tasks diff --git a/lms/djangoapps/lti_provider/migrations/0001_create_lti_consumer_model.py b/lms/djangoapps/lti_provider/migrations/0001_create_lti_consumer_model.py deleted file mode 100644 index c3d313afaa46..000000000000 --- a/lms/djangoapps/lti_provider/migrations/0001_create_lti_consumer_model.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -# pylint: disable=invalid-name, missing-docstring, unused-argument, unused-import, line-too-long -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'LtiConsumer' - db.create_table('lti_provider_lticonsumer', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('consumer_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('consumer_key', self.gf('django.db.models.fields.CharField')(unique=True, max_length=32, db_index=True)), - ('consumer_secret', self.gf('django.db.models.fields.CharField')(unique=True, max_length=32)), - )) - db.send_create_signal('lti_provider', ['LtiConsumer']) - - - def backwards(self, orm): - # Deleting model 'LtiConsumer' - db.delete_table('lti_provider_lticonsumer') - - - models = { - 'lti_provider.lticonsumer': { - 'Meta': {'object_name': 'LtiConsumer'}, - 'consumer_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'consumer_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'consumer_secret': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['lti_provider'] diff --git a/lms/djangoapps/lti_provider/migrations/0001_initial.py b/lms/djangoapps/lti_provider/migrations/0001_initial.py new file mode 100644 index 000000000000..575608c946b0 --- /dev/null +++ b/lms/djangoapps/lti_provider/migrations/0001_initial.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import provider.utils +from django.conf import settings +import xmodule_django.models + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='GradedAssignment', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_key', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('usage_key', xmodule_django.models.UsageKeyField(max_length=255, db_index=True)), + ('lis_result_sourcedid', models.CharField(max_length=255, db_index=True)), + ('version_number', models.IntegerField(default=0)), + ], + ), + migrations.CreateModel( + name='LtiConsumer', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('consumer_name', models.CharField(unique=True, max_length=255)), + ('consumer_key', models.CharField(default=provider.utils.short_token, unique=True, max_length=32, db_index=True)), + ('consumer_secret', models.CharField(default=provider.utils.long_token, unique=True, max_length=32)), + ('instance_guid', models.CharField(max_length=255, unique=True, null=True, blank=True)), + ], + ), + migrations.CreateModel( + name='LtiUser', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('lti_user_id', models.CharField(max_length=255)), + ('edx_user', models.OneToOneField(to=settings.AUTH_USER_MODEL)), + ('lti_consumer', models.ForeignKey(to='lti_provider.LtiConsumer')), + ], + ), + migrations.CreateModel( + name='OutcomeService', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('lis_outcome_service_url', models.CharField(unique=True, max_length=255)), + ('lti_consumer', models.ForeignKey(to='lti_provider.LtiConsumer')), + ], + ), + migrations.AddField( + model_name='gradedassignment', + name='outcome_service', + field=models.ForeignKey(to='lti_provider.OutcomeService'), + ), + migrations.AddField( + model_name='gradedassignment', + name='user', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL), + ), + migrations.AlterUniqueTogether( + name='ltiuser', + unique_together=set([('lti_consumer', 'lti_user_id')]), + ), + migrations.AlterUniqueTogether( + name='gradedassignment', + unique_together=set([('outcome_service', 'lis_result_sourcedid')]), + ), + ] diff --git a/lms/djangoapps/lti_provider/migrations/0002_create_lti_outcome_management.py b/lms/djangoapps/lti_provider/migrations/0002_create_lti_outcome_management.py deleted file mode 100644 index 7728d2dd6e52..000000000000 --- a/lms/djangoapps/lti_provider/migrations/0002_create_lti_outcome_management.py +++ /dev/null @@ -1,122 +0,0 @@ -# -*- coding: utf-8 -*- -# pylint: disable=invalid-name, missing-docstring, unused-argument, unused-import, line-too-long -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'OutcomeService' - db.create_table('lti_provider_outcomeservice', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('lis_outcome_service_url', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)), - ('lti_consumer', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['lti_provider.LtiConsumer'])), - )) - db.send_create_signal('lti_provider', ['OutcomeService']) - - # Adding model 'GradedAssignment' - db.create_table('lti_provider_gradedassignment', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('course_key', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('usage_key', self.gf('xmodule_django.models.UsageKeyField')(max_length=255, db_index=True)), - ('outcome_service', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['lti_provider.OutcomeService'])), - ('lis_result_sourcedid', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - )) - db.send_create_signal('lti_provider', ['GradedAssignment']) - - # Adding unique constraint on 'GradedAssignment', fields ['outcome_service', 'lis_result_sourcedid'] - db.create_unique('lti_provider_gradedassignment', ['outcome_service_id', 'lis_result_sourcedid']) - - # Adding field 'LtiConsumer.instance_guid' - db.add_column('lti_provider_lticonsumer', 'instance_guid', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True), - keep_default=False) - - # Adding unique constraint on 'LtiConsumer', fields ['consumer_name'] - db.create_unique('lti_provider_lticonsumer', ['consumer_name']) - - - def backwards(self, orm): - # Removing unique constraint on 'LtiConsumer', fields ['consumer_name'] - db.delete_unique('lti_provider_lticonsumer', ['consumer_name']) - - # Removing unique constraint on 'GradedAssignment', fields ['outcome_service', 'lis_result_sourcedid'] - db.delete_unique('lti_provider_gradedassignment', ['outcome_service_id', 'lis_result_sourcedid']) - - # Deleting model 'OutcomeService' - db.delete_table('lti_provider_outcomeservice') - - # Deleting model 'GradedAssignment' - db.delete_table('lti_provider_gradedassignment') - - # Deleting field 'LtiConsumer.instance_guid' - db.delete_column('lti_provider_lticonsumer', 'instance_guid') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'lti_provider.gradedassignment': { - 'Meta': {'unique_together': "(('outcome_service', 'lis_result_sourcedid'),)", 'object_name': 'GradedAssignment'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lis_result_sourcedid': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'outcome_service': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['lti_provider.OutcomeService']"}), - 'usage_key': ('xmodule_django.models.UsageKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'lti_provider.lticonsumer': { - 'Meta': {'object_name': 'LtiConsumer'}, - 'consumer_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'consumer_name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'consumer_secret': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_guid': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}) - }, - 'lti_provider.outcomeservice': { - 'Meta': {'object_name': 'OutcomeService'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lis_outcome_service_url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'lti_consumer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['lti_provider.LtiConsumer']"}) - } - } - - complete_apps = ['lti_provider'] diff --git a/lms/djangoapps/lti_provider/migrations/0003_create_lti_user_model.py b/lms/djangoapps/lti_provider/migrations/0003_create_lti_user_model.py deleted file mode 100644 index 22caf03f6f8a..000000000000 --- a/lms/djangoapps/lti_provider/migrations/0003_create_lti_user_model.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# pylint: disable=invalid-name, missing-docstring, unused-argument, unused-import, line-too-long -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'LtiUser' - db.create_table('lti_provider_ltiuser', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('lti_consumer', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['lti_provider.LtiConsumer'])), - ('lti_user_id', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('edx_user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], unique=True)), - )) - db.send_create_signal('lti_provider', ['LtiUser']) - - # Adding unique constraint on 'LtiUser', fields ['lti_consumer', 'lti_user_id'] - db.create_unique('lti_provider_ltiuser', ['lti_consumer_id', 'lti_user_id']) - - # Adding unique constraint on 'LtiConsumer', fields ['instance_guid'] - db.create_unique('lti_provider_lticonsumer', ['instance_guid']) - - - def backwards(self, orm): - # Removing unique constraint on 'LtiConsumer', fields ['instance_guid'] - db.delete_unique('lti_provider_lticonsumer', ['instance_guid']) - - # Removing unique constraint on 'LtiUser', fields ['lti_consumer', 'lti_user_id'] - db.delete_unique('lti_provider_ltiuser', ['lti_consumer_id', 'lti_user_id']) - - # Deleting model 'LtiUser' - db.delete_table('lti_provider_ltiuser') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'lti_provider.gradedassignment': { - 'Meta': {'unique_together': "(('outcome_service', 'lis_result_sourcedid'),)", 'object_name': 'GradedAssignment'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lis_result_sourcedid': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'outcome_service': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['lti_provider.OutcomeService']"}), - 'usage_key': ('xmodule_django.models.UsageKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'lti_provider.lticonsumer': { - 'Meta': {'object_name': 'LtiConsumer'}, - 'consumer_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'consumer_name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'consumer_secret': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_guid': ('django.db.models.fields.CharField', [], {'max_length': '255', 'unique': 'True', 'null': 'True'}) - }, - 'lti_provider.ltiuser': { - 'Meta': {'unique_together': "(('lti_consumer', 'lti_user_id'),)", 'object_name': 'LtiUser'}, - 'edx_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lti_consumer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['lti_provider.LtiConsumer']"}), - 'lti_user_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'lti_provider.outcomeservice': { - 'Meta': {'object_name': 'OutcomeService'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lis_outcome_service_url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'lti_consumer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['lti_provider.LtiConsumer']"}) - } - } - - complete_apps = ['lti_provider'] diff --git a/lms/djangoapps/lti_provider/migrations/0004_add_version_to_graded_assignment.py b/lms/djangoapps/lti_provider/migrations/0004_add_version_to_graded_assignment.py deleted file mode 100644 index ae232a7571b8..000000000000 --- a/lms/djangoapps/lti_provider/migrations/0004_add_version_to_graded_assignment.py +++ /dev/null @@ -1,93 +0,0 @@ -# -*- coding: utf-8 -*- -# pylint: disable=invalid-name, missing-docstring, unused-argument, unused-import, line-too-long -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'GradedAssignment.version_number' - db.add_column('lti_provider_gradedassignment', 'version_number', - self.gf('django.db.models.fields.IntegerField')(default=0), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'GradedAssignment.version_number' - db.delete_column('lti_provider_gradedassignment', 'version_number') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'lti_provider.gradedassignment': { - 'Meta': {'unique_together': "(('outcome_service', 'lis_result_sourcedid'),)", 'object_name': 'GradedAssignment'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lis_result_sourcedid': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'outcome_service': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['lti_provider.OutcomeService']"}), - 'usage_key': ('xmodule_django.models.UsageKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'version_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'lti_provider.lticonsumer': { - 'Meta': {'object_name': 'LtiConsumer'}, - 'consumer_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'consumer_name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'consumer_secret': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'instance_guid': ('django.db.models.fields.CharField', [], {'max_length': '255', 'unique': 'True', 'null': 'True'}) - }, - 'lti_provider.ltiuser': { - 'Meta': {'unique_together': "(('lti_consumer', 'lti_user_id'),)", 'object_name': 'LtiUser'}, - 'edx_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lti_consumer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['lti_provider.LtiConsumer']"}), - 'lti_user_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'lti_provider.outcomeservice': { - 'Meta': {'object_name': 'OutcomeService'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lis_outcome_service_url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'lti_consumer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['lti_provider.LtiConsumer']"}) - } - } - - complete_apps = ['lti_provider'] diff --git a/lms/djangoapps/lti_provider/models.py b/lms/djangoapps/lti_provider/models.py index 571b309e84a4..a42f686fb1e4 100644 --- a/lms/djangoapps/lti_provider/models.py +++ b/lms/djangoapps/lti_provider/models.py @@ -129,7 +129,7 @@ class LtiUser(models.Model): """ lti_consumer = models.ForeignKey(LtiConsumer) lti_user_id = models.CharField(max_length=255) - edx_user = models.ForeignKey(User, unique=True) + edx_user = models.OneToOneField(User) class Meta(object): unique_together = ('lti_consumer', 'lti_user_id') diff --git a/lms/djangoapps/lti_provider/startup.py b/lms/djangoapps/lti_provider/startup.py new file mode 100644 index 000000000000..ff27579134c8 --- /dev/null +++ b/lms/djangoapps/lti_provider/startup.py @@ -0,0 +1,4 @@ +"""Code run at server start up to initialize the lti_provider app.""" + +# Import the tasks module to ensure that signal handlers are registered. +import lms.djangoapps.lti_provider.tasks # pylint: disable=unused-import diff --git a/lms/djangoapps/lti_provider/tests/test_outcomes.py b/lms/djangoapps/lti_provider/tests/test_outcomes.py index e89e366d29a8..662e982d74c8 100644 --- a/lms/djangoapps/lti_provider/tests/test_outcomes.py +++ b/lms/djangoapps/lti_provider/tests/test_outcomes.py @@ -59,7 +59,7 @@ def get_valid_request_params(self): def test_graded_assignment_created(self): params = self.get_valid_request_params() - with self.assertNumQueries(4): + with self.assertNumQueries(8): outcomes.store_outcome_parameters(params, self.user, self.consumer) assignment = GradedAssignment.objects.get( lis_result_sourcedid=params['lis_result_sourcedid'] @@ -70,7 +70,7 @@ def test_graded_assignment_created(self): def test_outcome_service_created(self): params = self.get_valid_request_params() - with self.assertNumQueries(4): + with self.assertNumQueries(8): outcomes.store_outcome_parameters(params, self.user, self.consumer) outcome = OutcomeService.objects.get( lti_consumer=self.consumer @@ -79,7 +79,7 @@ def test_outcome_service_created(self): def test_graded_assignment_references_outcome_service(self): params = self.get_valid_request_params() - with self.assertNumQueries(4): + with self.assertNumQueries(8): outcomes.store_outcome_parameters(params, self.user, self.consumer) outcome = OutcomeService.objects.get( lti_consumer=self.consumer @@ -91,7 +91,7 @@ def test_graded_assignment_references_outcome_service(self): def test_no_duplicate_graded_assignments(self): params = self.get_valid_request_params() - with self.assertNumQueries(4): + with self.assertNumQueries(8): outcomes.store_outcome_parameters(params, self.user, self.consumer) with self.assertNumQueries(2): outcomes.store_outcome_parameters(params, self.user, self.consumer) @@ -102,7 +102,7 @@ def test_no_duplicate_graded_assignments(self): def test_no_duplicate_outcome_services(self): params = self.get_valid_request_params() - with self.assertNumQueries(4): + with self.assertNumQueries(8): outcomes.store_outcome_parameters(params, self.user, self.consumer) with self.assertNumQueries(2): outcomes.store_outcome_parameters(params, self.user, self.consumer) @@ -126,7 +126,7 @@ def test_no_db_update_for_bad_request(self): def test_db_record_created_without_consumer_id(self): params = self.get_valid_request_params() del params['tool_consumer_instance_guid'] - with self.assertNumQueries(4): + with self.assertNumQueries(8): outcomes.store_outcome_parameters(params, self.user, self.consumer) self.assertEqual(GradedAssignment.objects.count(), 1) self.assertEqual(OutcomeService.objects.count(), 1) diff --git a/lms/djangoapps/lti_provider/tests/test_views.py b/lms/djangoapps/lti_provider/tests/test_views.py index 6533f18a1aa0..5e8d8990465f 100644 --- a/lms/djangoapps/lti_provider/tests/test_views.py +++ b/lms/djangoapps/lti_provider/tests/test_views.py @@ -149,7 +149,7 @@ def test_lti_consumer_record_supplemented_with_guid(self, _render): SignatureValidator.verify = MagicMock(return_value=False) request = build_launch_request() request.POST.update(LTI_OPTIONAL_PARAMS) - with self.assertNumQueries(4): + with self.assertNumQueries(3): views.lti_launch(request, None, None) consumer = models.LtiConsumer.objects.get( consumer_key=LTI_DEFAULT_PARAMS['oauth_consumer_key'] diff --git a/lms/djangoapps/lti_provider/users.py b/lms/djangoapps/lti_provider/users.py index dadaf8d7ccec..41ec1c8eb920 100644 --- a/lms/djangoapps/lti_provider/users.py +++ b/lms/djangoapps/lti_provider/users.py @@ -11,7 +11,7 @@ from django.contrib.auth import authenticate, login from django.contrib.auth.models import User from django.core.exceptions import PermissionDenied -from django.db import IntegrityError +from django.db import IntegrityError, transaction from lti_provider.models import LtiUser from student.models import UserProfile @@ -53,16 +53,17 @@ def create_lti_user(lti_user_id, lti_consumer): try: edx_user_id = generate_random_edx_username() edx_email = "{}@{}".format(edx_user_id, settings.LTI_USER_EMAIL_DOMAIN) - edx_user = User.objects.create_user( - username=edx_user_id, - password=edx_password, - email=edx_email, - ) - # A profile is required if PREVENT_CONCURRENT_LOGINS flag is set. - # TODO: We could populate user information from the LTI launch here, - # but it's not necessary for our current uses. - edx_user_profile = UserProfile(user=edx_user) - edx_user_profile.save() + with transaction.atomic(): + edx_user = User.objects.create_user( + username=edx_user_id, + password=edx_password, + email=edx_email, + ) + # A profile is required if PREVENT_CONCURRENT_LOGINS flag is set. + # TODO: We could populate user information from the LTI launch here, + # but it's not necessary for our current uses. + edx_user_profile = UserProfile(user=edx_user) + edx_user_profile.save() created = True except IntegrityError: # The random edx_user_id wasn't unique. Since 'created' is still diff --git a/lms/djangoapps/mobile_api/migrations/0001_initial.py b/lms/djangoapps/mobile_api/migrations/0001_initial.py index 82a0ecc27e5c..e5bff1cbe074 100644 --- a/lms/djangoapps/mobile_api/migrations/0001_initial.py +++ b/lms/djangoapps/mobile_api/migrations/0001_initial.py @@ -1,78 +1,30 @@ # -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'MobileApiConfig' - db.create_table('mobile_api_mobileapiconfig', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('video_profiles', self.gf('django.db.models.fields.TextField')(blank=True)), - )) - db.send_create_signal('mobile_api', ['MobileApiConfig']) - - if not db.dry_run: - orm.MobileApiConfig.objects.create( - video_profiles="mobile_low,mobile_high,youtube", - ) - - def backwards(self, orm): - # Deleting model 'MobileApiConfig' - db.delete_table('mobile_api_mobileapiconfig') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'mobile_api.mobileapiconfig': { - 'Meta': {'object_name': 'MobileApiConfig'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'video_profiles': ('django.db.models.fields.TextField', [], {'blank': 'True'}) - } - } - - complete_apps = ['mobile_api'] +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='MobileApiConfig', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('video_profiles', models.TextField(help_text=b'A comma-separated list of names of profiles to include for videos returned from the mobile API.', blank=True)), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + ] diff --git a/lms/djangoapps/mobile_api/video_outlines/tests.py b/lms/djangoapps/mobile_api/video_outlines/tests.py index f25424155ef4..3e8f0a2f1445 100644 --- a/lms/djangoapps/mobile_api/video_outlines/tests.py +++ b/lms/djangoapps/mobile_api/video_outlines/tests.py @@ -2,6 +2,7 @@ """ Tests for video outline API """ + import ddt import itertools from uuid import uuid4 diff --git a/lms/djangoapps/notes/migrations/0001_initial.py b/lms/djangoapps/notes/migrations/0001_initial.py index 6b0a0712125c..3d59e8107589 100644 --- a/lms/djangoapps/notes/migrations/0001_initial.py +++ b/lms/djangoapps/notes/migrations/0001_initial.py @@ -1,90 +1,34 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Note' - db.create_table('notes_note', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('uri', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('text', self.gf('django.db.models.fields.TextField')(default='')), - ('quote', self.gf('django.db.models.fields.TextField')(default='')), - ('range_start', self.gf('django.db.models.fields.CharField')(max_length=2048)), - ('range_start_offset', self.gf('django.db.models.fields.IntegerField')()), - ('range_end', self.gf('django.db.models.fields.CharField')(max_length=2048)), - ('range_end_offset', self.gf('django.db.models.fields.IntegerField')()), - ('tags', self.gf('django.db.models.fields.TextField')(default='')), - ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True, db_index=True, blank=True)), - ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, db_index=True, blank=True)), - )) - db.send_create_signal('notes', ['Note']) - - - def backwards(self, orm): - # Deleting model 'Note' - db.delete_table('notes_note') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'notes.note': { - 'Meta': {'object_name': 'Note'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'quote': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'range_end': ('django.db.models.fields.CharField', [], {'max_length': '2048'}), - 'range_end_offset': ('django.db.models.fields.IntegerField', [], {}), - 'range_start': ('django.db.models.fields.CharField', [], {'max_length': '2048'}), - 'range_start_offset': ('django.db.models.fields.IntegerField', [], {}), - 'tags': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'text': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'uri': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['notes'] +from __future__ import unicode_literals + +from django.db import migrations, models +from django.conf import settings +import xmodule_django.models + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Note', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('uri', models.CharField(max_length=255, db_index=True)), + ('text', models.TextField(default=b'')), + ('quote', models.TextField(default=b'')), + ('range_start', models.CharField(max_length=2048)), + ('range_start_offset', models.IntegerField()), + ('range_end', models.CharField(max_length=2048)), + ('range_end_offset', models.IntegerField()), + ('tags', models.TextField(default=b'')), + ('created', models.DateTimeField(db_index=True, auto_now_add=True, null=True)), + ('updated', models.DateTimeField(auto_now=True, db_index=True)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/lms/djangoapps/notes/models.py b/lms/djangoapps/notes/models.py index 2517316b581d..23bd44e350a0 100644 --- a/lms/djangoapps/notes/models.py +++ b/lms/djangoapps/notes/models.py @@ -22,6 +22,9 @@ class Note(models.Model): created = models.DateTimeField(auto_now_add=True, null=True, db_index=True) updated = models.DateTimeField(auto_now=True, db_index=True) + class Meta: + app_label = 'notes' + def clean(self, json_body): """ Cleans the note object or raises a ValidationError. diff --git a/lms/djangoapps/open_ended_grading/staff_grading_service.py b/lms/djangoapps/open_ended_grading/staff_grading_service.py index 2a3ae6942ad2..80cecbf9f3a7 100644 --- a/lms/djangoapps/open_ended_grading/staff_grading_service.py +++ b/lms/djangoapps/open_ended_grading/staff_grading_service.py @@ -223,7 +223,7 @@ def _err_response(msg): Return a HttpResponse with a json dump with success=False, and the given error message. """ return HttpResponse(json.dumps({'success': False, 'error': msg}), - mimetype="application/json") + content_type="application/json") def _check_access(user, course_id): @@ -274,7 +274,7 @@ def get_next(request, course_id): location = course_key.make_usage_key_from_deprecated_string(p['location']) return HttpResponse(json.dumps(_get_next(course_key, grader_id, location)), - mimetype="application/json") + content_type="application/json") def get_problem_list(request, course_id): @@ -330,8 +330,7 @@ def get_problem_list(request, course_id): response['problem_list'] = valid_problem_list response = json.dumps(response) - return HttpResponse(response, - mimetype="application/json") + return HttpResponse(response, content_type="application/json") except GradingServiceError: #This is a dev_facing_error log.exception( @@ -432,7 +431,7 @@ def save_grade(request, course_id): # Ok, save_grade seemed to work. Get the next submission to grade. return HttpResponse(json.dumps(_get_next(course_id, grader_id, location)), - mimetype="application/json") + content_type="application/json") def check_feedback_length(data): diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 81e7195e8806..c17c00eebf43 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -373,7 +373,7 @@ def take_action_on_flags(request, course_id): 'success': False, 'error': STAFF_ERROR_MESSAGE + error_message } - return HttpResponse(json.dumps(response), mimetype="application/json") + return HttpResponse(json.dumps(response), content_type="application/json") p = request.POST submission_id = p['submission_id'] @@ -387,7 +387,7 @@ def take_action_on_flags(request, course_id): controller_qs = create_controller_query_service() try: response = controller_qs.take_action_on_flags(course_key, student_id, submission_id, action_type) - return HttpResponse(json.dumps(response), mimetype="application/json") + return HttpResponse(json.dumps(response), content_type="application/json") except GradingServiceError: log.exception( u"Error taking action on flagged peer grading submissions, " @@ -398,4 +398,4 @@ def take_action_on_flags(request, course_id): 'success': False, 'error': STAFF_ERROR_MESSAGE } - return HttpResponse(json.dumps(response), mimetype="application/json") + return HttpResponse(json.dumps(response), content_type="application/json") diff --git a/lms/djangoapps/psychometrics/migrations/0001_initial.py b/lms/djangoapps/psychometrics/migrations/0001_initial.py new file mode 100644 index 000000000000..8cd81936d888 --- /dev/null +++ b/lms/djangoapps/psychometrics/migrations/0001_initial.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('courseware', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='PsychometricData', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('done', models.BooleanField(default=False)), + ('attempts', models.IntegerField(default=0)), + ('checktimes', models.TextField(null=True, blank=True)), + ('studentmodule', models.OneToOneField(to='courseware.StudentModule')), + ], + ), + ] diff --git a/lms/djangoapps/psychometrics/migrations/__init__.py b/lms/djangoapps/psychometrics/migrations/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/lms/djangoapps/psychometrics/models.py b/lms/djangoapps/psychometrics/models.py index 4af5544c6cc1..e8070ca907d4 100644 --- a/lms/djangoapps/psychometrics/models.py +++ b/lms/djangoapps/psychometrics/models.py @@ -20,7 +20,10 @@ class PsychometricData(models.Model): checktimes is extracted from tracking logs, or added by capa module via psychometrics callback. """ - studentmodule = models.ForeignKey(StudentModule, db_index=True, unique=True) # contains student, module_state_key, course_id + class Meta(object): + app_label = "psychometrics" + + studentmodule = models.OneToOneField(StudentModule, db_index=True) # contains student, module_state_key, course_id done = models.BooleanField(default=False) attempts = models.IntegerField(default=0) # extracted from studentmodule.state diff --git a/lms/djangoapps/shoppingcart/admin.py b/lms/djangoapps/shoppingcart/admin.py index fae033a84989..9385eef3347f 100644 --- a/lms/djangoapps/shoppingcart/admin.py +++ b/lms/djangoapps/shoppingcart/admin.py @@ -24,8 +24,8 @@ def queryset(self, request): """ Returns a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view. """ # Default: qs = self.model._default_manager.get_active_coupons_query_set() - # Queryset with all the coupons including the soft-deletes: qs = self.model._default_manager.get_query_set() - query_string = self.model._default_manager.get_active_coupons_query_set() # pylint: disable=protected-access + # Queryset with all the coupons including the soft-deletes: qs = self.model._default_manager.get_queryset() + query_string = self.model._default_manager.get_active_coupons_queryset() # pylint: disable=protected-access return query_string def get_actions(self, request): diff --git a/lms/djangoapps/shoppingcart/management/commands/retire_order.py b/lms/djangoapps/shoppingcart/management/commands/retire_order.py index 40932e0591c1..6ab3a6397893 100644 --- a/lms/djangoapps/shoppingcart/management/commands/retire_order.py +++ b/lms/djangoapps/shoppingcart/management/commands/retire_order.py @@ -18,12 +18,13 @@ class Command(BaseCommand): Takes a file of orders to be retired, one order per line """ + def add_arguments(self, parser): + parser.add_argument('file_name') + def handle(self, *args, **options): - "Execute the command" - if len(args) != 1: - raise CommandError("retire_order requires one argument: ") + """Execute the command""" - with open(args[0]) as orders_file: + with open(options['file_name']) as orders_file: order_ids = [int(line.strip()) for line in orders_file.readlines()] orders = Order.objects.filter(id__in=order_ids) diff --git a/lms/djangoapps/shoppingcart/migrations/0001_initial.py b/lms/djangoapps/shoppingcart/migrations/0001_initial.py index 24ffeb1e5938..dd2b48db7d0f 100644 --- a/lms/djangoapps/shoppingcart/migrations/0001_initial.py +++ b/lms/djangoapps/shoppingcart/migrations/0001_initial.py @@ -1,166 +1,289 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +from __future__ import unicode_literals +from django.db import migrations, models +import django.utils.timezone +import django.db.models.deletion +from django.conf import settings +import model_utils.fields +import xmodule_django.models -class Migration(SchemaMigration): - def forwards(self, orm): - # Adding model 'Order' - db.create_table('shoppingcart_order', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('currency', self.gf('django.db.models.fields.CharField')(default='usd', max_length=8)), - ('status', self.gf('django.db.models.fields.CharField')(default='cart', max_length=32)), - ('purchase_time', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)), - ('bill_to_first', self.gf('django.db.models.fields.CharField')(max_length=64, blank=True)), - ('bill_to_last', self.gf('django.db.models.fields.CharField')(max_length=64, blank=True)), - ('bill_to_street1', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), - ('bill_to_street2', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), - ('bill_to_city', self.gf('django.db.models.fields.CharField')(max_length=64, blank=True)), - ('bill_to_state', self.gf('django.db.models.fields.CharField')(max_length=8, blank=True)), - ('bill_to_postalcode', self.gf('django.db.models.fields.CharField')(max_length=16, blank=True)), - ('bill_to_country', self.gf('django.db.models.fields.CharField')(max_length=64, blank=True)), - ('bill_to_ccnum', self.gf('django.db.models.fields.CharField')(max_length=8, blank=True)), - ('bill_to_cardtype', self.gf('django.db.models.fields.CharField')(max_length=32, blank=True)), - ('processor_reply_dump', self.gf('django.db.models.fields.TextField')(blank=True)), - )) - db.send_create_signal('shoppingcart', ['Order']) +class Migration(migrations.Migration): - # Adding model 'OrderItem' - db.create_table('shoppingcart_orderitem', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('order', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shoppingcart.Order'])), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('status', self.gf('django.db.models.fields.CharField')(default='cart', max_length=32)), - ('qty', self.gf('django.db.models.fields.IntegerField')(default=1)), - ('unit_cost', self.gf('django.db.models.fields.DecimalField')(default=0.0, max_digits=30, decimal_places=2)), - ('line_cost', self.gf('django.db.models.fields.DecimalField')(default=0.0, max_digits=30, decimal_places=2)), - ('line_desc', self.gf('django.db.models.fields.CharField')(default='Misc. Item', max_length=1024)), - ('currency', self.gf('django.db.models.fields.CharField')(default='usd', max_length=8)), - )) - db.send_create_signal('shoppingcart', ['OrderItem']) + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('student', '0001_initial'), + ] - # Adding model 'PaidCourseRegistration' - db.create_table('shoppingcart_paidcourseregistration', ( - ('orderitem_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['shoppingcart.OrderItem'], unique=True, primary_key=True)), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=128, db_index=True)), - )) - db.send_create_signal('shoppingcart', ['PaidCourseRegistration']) - - # Adding model 'CertificateItem' - db.create_table('shoppingcart_certificateitem', ( - ('orderitem_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['shoppingcart.OrderItem'], unique=True, primary_key=True)), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=128, db_index=True)), - ('course_enrollment', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['student.CourseEnrollment'])), - ('mode', self.gf('django.db.models.fields.SlugField')(max_length=50)), - )) - db.send_create_signal('shoppingcart', ['CertificateItem']) - - def backwards(self, orm): - # Deleting model 'Order' - db.delete_table('shoppingcart_order') - - # Deleting model 'OrderItem' - db.delete_table('shoppingcart_orderitem') - - # Deleting model 'PaidCourseRegistration' - db.delete_table('shoppingcart_paidcourseregistration') - - # Deleting model 'CertificateItem' - db.delete_table('shoppingcart_certificateitem') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] + operations = [ + migrations.CreateModel( + name='Coupon', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('code', models.CharField(max_length=32, db_index=True)), + ('description', models.CharField(max_length=255, null=True, blank=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255)), + ('percentage_discount', models.IntegerField(default=0)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('is_active', models.BooleanField(default=True)), + ('expiration_date', models.DateTimeField(null=True, blank=True)), + ('created_by', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='CouponRedemption', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('coupon', models.ForeignKey(to='shoppingcart.Coupon')), + ], + ), + migrations.CreateModel( + name='CourseRegCodeItemAnnotation', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(unique=True, max_length=128, db_index=True)), + ('annotation', models.TextField(null=True)), + ], + ), + migrations.CreateModel( + name='CourseRegistrationCode', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('code', models.CharField(unique=True, max_length=32, db_index=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('mode_slug', models.CharField(max_length=100, null=True)), + ('is_valid', models.BooleanField(default=True)), + ('created_by', models.ForeignKey(related_name='created_by_user', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='DonationConfiguration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Invoice', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('company_name', models.CharField(max_length=255, db_index=True)), + ('company_contact_name', models.CharField(max_length=255)), + ('company_contact_email', models.CharField(max_length=255)), + ('recipient_name', models.CharField(max_length=255)), + ('recipient_email', models.CharField(max_length=255)), + ('address_line_1', models.CharField(max_length=255)), + ('address_line_2', models.CharField(max_length=255, null=True, blank=True)), + ('address_line_3', models.CharField(max_length=255, null=True, blank=True)), + ('city', models.CharField(max_length=255, null=True)), + ('state', models.CharField(max_length=255, null=True)), + ('zip', models.CharField(max_length=15, null=True)), + ('country', models.CharField(max_length=64, null=True)), + ('total_amount', models.FloatField()), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('internal_reference', models.CharField(help_text='Internal reference code for this invoice.', max_length=255, null=True, blank=True)), + ('customer_reference_number', models.CharField(help_text="Customer's reference code for this invoice.", max_length=63, null=True, blank=True)), + ('is_valid', models.BooleanField(default=True)), + ], + ), + migrations.CreateModel( + name='InvoiceHistory', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('timestamp', models.DateTimeField(auto_now_add=True, db_index=True)), + ('snapshot', models.TextField(blank=True)), + ('invoice', models.ForeignKey(to='shoppingcart.Invoice')), + ], + options={ + 'get_latest_by': 'timestamp', + }, + ), + migrations.CreateModel( + name='InvoiceItem', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('qty', models.IntegerField(default=1, help_text='The number of items sold.')), + ('unit_price', models.DecimalField(default=0.0, help_text='The price per item sold, including discounts.', max_digits=30, decimal_places=2)), + ('currency', models.CharField(default=b'usd', help_text='Lower-case ISO currency codes', max_length=8)), + ], + ), + migrations.CreateModel( + name='InvoiceTransaction', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('amount', models.DecimalField(default=0.0, help_text='The amount of the transaction. Use positive amounts for payments and negative amounts for refunds.', max_digits=30, decimal_places=2)), + ('currency', models.CharField(default=b'usd', help_text='Lower-case ISO currency codes', max_length=8)), + ('comments', models.TextField(help_text='Optional: provide additional information for this transaction', null=True, blank=True)), + ('status', models.CharField(default=b'started', help_text="The status of the payment or refund. 'started' means that payment is expected, but money has not yet been transferred. 'completed' means that the payment or refund was received. 'cancelled' means that payment or refund was expected, but was cancelled before money was transferred. ", max_length=32, choices=[(b'started', b'started'), (b'completed', b'completed'), (b'cancelled', b'cancelled')])), + ('created_by', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ('invoice', models.ForeignKey(to='shoppingcart.Invoice')), + ('last_modified_by', models.ForeignKey(related_name='last_modified_by_user', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='Order', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('currency', models.CharField(default=b'usd', max_length=8)), + ('status', models.CharField(default=b'cart', max_length=32, choices=[(b'cart', b'cart'), (b'paying', b'paying'), (b'purchased', b'purchased'), (b'refunded', b'refunded'), (b'defunct-cart', b'defunct-cart'), (b'defunct-paying', b'defunct-paying')])), + ('purchase_time', models.DateTimeField(null=True, blank=True)), + ('refunded_time', models.DateTimeField(null=True, blank=True)), + ('bill_to_first', models.CharField(max_length=64, blank=True)), + ('bill_to_last', models.CharField(max_length=64, blank=True)), + ('bill_to_street1', models.CharField(max_length=128, blank=True)), + ('bill_to_street2', models.CharField(max_length=128, blank=True)), + ('bill_to_city', models.CharField(max_length=64, blank=True)), + ('bill_to_state', models.CharField(max_length=8, blank=True)), + ('bill_to_postalcode', models.CharField(max_length=16, blank=True)), + ('bill_to_country', models.CharField(max_length=64, blank=True)), + ('bill_to_ccnum', models.CharField(max_length=8, blank=True)), + ('bill_to_cardtype', models.CharField(max_length=32, blank=True)), + ('processor_reply_dump', models.TextField(blank=True)), + ('company_name', models.CharField(max_length=255, null=True, blank=True)), + ('company_contact_name', models.CharField(max_length=255, null=True, blank=True)), + ('company_contact_email', models.CharField(max_length=255, null=True, blank=True)), + ('recipient_name', models.CharField(max_length=255, null=True, blank=True)), + ('recipient_email', models.CharField(max_length=255, null=True, blank=True)), + ('customer_reference_number', models.CharField(max_length=63, null=True, blank=True)), + ('order_type', models.CharField(default=b'personal', max_length=32, choices=[(b'personal', b'personal'), (b'business', b'business')])), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='OrderItem', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('status', models.CharField(default=b'cart', max_length=32, db_index=True, choices=[(b'cart', b'cart'), (b'paying', b'paying'), (b'purchased', b'purchased'), (b'refunded', b'refunded'), (b'defunct-cart', b'defunct-cart'), (b'defunct-paying', b'defunct-paying')])), + ('qty', models.IntegerField(default=1)), + ('unit_cost', models.DecimalField(default=0.0, max_digits=30, decimal_places=2)), + ('list_price', models.DecimalField(null=True, max_digits=30, decimal_places=2)), + ('line_desc', models.CharField(default=b'Misc. Item', max_length=1024)), + ('currency', models.CharField(default=b'usd', max_length=8)), + ('fulfilled_time', models.DateTimeField(null=True, db_index=True)), + ('refund_requested_time', models.DateTimeField(null=True, db_index=True)), + ('service_fee', models.DecimalField(default=0.0, max_digits=30, decimal_places=2)), + ('report_comments', models.TextField(default=b'')), + ], + ), + migrations.CreateModel( + name='PaidCourseRegistrationAnnotation', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(unique=True, max_length=128, db_index=True)), + ('annotation', models.TextField(null=True)), + ], + ), + migrations.CreateModel( + name='RegistrationCodeRedemption', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('redeemed_at', models.DateTimeField(auto_now_add=True, null=True)), + ('course_enrollment', models.ForeignKey(to='student.CourseEnrollment', null=True)), + ('order', models.ForeignKey(to='shoppingcart.Order', null=True)), + ('redeemed_by', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ('registration_code', models.ForeignKey(to='shoppingcart.CourseRegistrationCode')), + ], + ), + migrations.CreateModel( + name='CertificateItem', + fields=[ + ('orderitem_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='shoppingcart.OrderItem')), + ('course_id', xmodule_django.models.CourseKeyField(max_length=128, db_index=True)), + ('mode', models.SlugField()), + ('course_enrollment', models.ForeignKey(to='student.CourseEnrollment')), + ], + bases=('shoppingcart.orderitem',), + ), + migrations.CreateModel( + name='CourseRegCodeItem', + fields=[ + ('orderitem_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='shoppingcart.OrderItem')), + ('course_id', xmodule_django.models.CourseKeyField(max_length=128, db_index=True)), + ('mode', models.SlugField(default=b'honor')), + ], + bases=('shoppingcart.orderitem',), + ), + migrations.CreateModel( + name='CourseRegistrationCodeInvoiceItem', + fields=[ + ('invoiceitem_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='shoppingcart.InvoiceItem')), + ('course_id', xmodule_django.models.CourseKeyField(max_length=128, db_index=True)), + ], + bases=('shoppingcart.invoiceitem',), + ), + migrations.CreateModel( + name='Donation', + fields=[ + ('orderitem_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='shoppingcart.OrderItem')), + ('donation_type', models.CharField(default=b'general', max_length=32, choices=[(b'general', b'A general donation'), (b'course', b'A donation to a particular course')])), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ], + bases=('shoppingcart.orderitem',), + ), + migrations.CreateModel( + name='PaidCourseRegistration', + fields=[ + ('orderitem_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='shoppingcart.OrderItem')), + ('course_id', xmodule_django.models.CourseKeyField(max_length=128, db_index=True)), + ('mode', models.SlugField(default=b'honor')), + ('course_enrollment', models.ForeignKey(to='student.CourseEnrollment', null=True)), + ], + bases=('shoppingcart.orderitem',), + ), + migrations.AddField( + model_name='orderitem', + name='order', + field=models.ForeignKey(to='shoppingcart.Order'), + ), + migrations.AddField( + model_name='orderitem', + name='user', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='invoiceitem', + name='invoice', + field=models.ForeignKey(to='shoppingcart.Invoice'), + ), + migrations.AddField( + model_name='courseregistrationcode', + name='invoice', + field=models.ForeignKey(to='shoppingcart.Invoice', null=True), + ), + migrations.AddField( + model_name='courseregistrationcode', + name='order', + field=models.ForeignKey(related_name='purchase_order', to='shoppingcart.Order', null=True), + ), + migrations.AddField( + model_name='couponredemption', + name='order', + field=models.ForeignKey(to='shoppingcart.Order'), + ), + migrations.AddField( + model_name='couponredemption', + name='user', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='courseregistrationcode', + name='invoice_item', + field=models.ForeignKey(to='shoppingcart.CourseRegistrationCodeInvoiceItem', null=True), + ), + ] diff --git a/lms/djangoapps/shoppingcart/migrations/0002_auto__add_field_paidcourseregistration_mode.py b/lms/djangoapps/shoppingcart/migrations/0002_auto__add_field_paidcourseregistration_mode.py deleted file mode 100644 index 97f46aee81cf..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0002_auto__add_field_paidcourseregistration_mode.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'PaidCourseRegistration.mode' - db.add_column('shoppingcart_paidcourseregistration', 'mode', - self.gf('django.db.models.fields.SlugField')(default='honor', max_length=50), - keep_default=False) - - def backwards(self, orm): - # Deleting field 'PaidCourseRegistration.mode' - db.delete_column('shoppingcart_paidcourseregistration', 'mode') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0003_auto__del_field_orderitem_line_cost.py b/lms/djangoapps/shoppingcart/migrations/0003_auto__del_field_orderitem_line_cost.py deleted file mode 100644 index 080a6f1af266..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0003_auto__del_field_orderitem_line_cost.py +++ /dev/null @@ -1,111 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'OrderItem.line_cost' - db.delete_column('shoppingcart_orderitem', 'line_cost') - - def backwards(self, orm): - # Adding field 'OrderItem.line_cost' - db.add_column('shoppingcart_orderitem', 'line_cost', - self.gf('django.db.models.fields.DecimalField')(default=0.0, max_digits=30, decimal_places=2), - keep_default=False) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0004_auto__add_field_orderitem_fulfilled_time.py b/lms/djangoapps/shoppingcart/migrations/0004_auto__add_field_orderitem_fulfilled_time.py deleted file mode 100644 index 4271a24840a0..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0004_auto__add_field_orderitem_fulfilled_time.py +++ /dev/null @@ -1,114 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'OrderItem.fulfilled_time' - db.add_column('shoppingcart_orderitem', 'fulfilled_time', - self.gf('django.db.models.fields.DateTimeField')(null=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'OrderItem.fulfilled_time' - db.delete_column('shoppingcart_orderitem', 'fulfilled_time') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0005_auto__add_paidcourseregistrationannotation__add_field_orderitem_report.py b/lms/djangoapps/shoppingcart/migrations/0005_auto__add_paidcourseregistrationannotation__add_field_orderitem_report.py deleted file mode 100644 index 1e92306140fd..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0005_auto__add_paidcourseregistrationannotation__add_field_orderitem_report.py +++ /dev/null @@ -1,132 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'PaidCourseRegistrationAnnotation' - db.create_table('shoppingcart_paidcourseregistrationannotation', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_id', self.gf('django.db.models.fields.CharField')(unique=True, max_length=128, db_index=True)), - ('annotation', self.gf('django.db.models.fields.TextField')(null=True)), - )) - db.send_create_signal('shoppingcart', ['PaidCourseRegistrationAnnotation']) - - # Adding field 'OrderItem.report_comments' - db.add_column('shoppingcart_orderitem', 'report_comments', - self.gf('django.db.models.fields.TextField')(default=''), - keep_default=False) - - - def backwards(self, orm): - # Deleting model 'PaidCourseRegistrationAnnotation' - db.delete_table('shoppingcart_paidcourseregistrationannotation') - - # Deleting field 'OrderItem.report_comments' - db.delete_column('shoppingcart_orderitem', 'report_comments') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0006_auto__add_field_order_refunded_time__add_field_orderitem_refund_reques.py b/lms/djangoapps/shoppingcart/migrations/0006_auto__add_field_order_refunded_time__add_field_orderitem_refund_reques.py deleted file mode 100644 index cd8ee5b198a1..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0006_auto__add_field_order_refunded_time__add_field_orderitem_refund_reques.py +++ /dev/null @@ -1,131 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Order.refunded_time' - db.add_column('shoppingcart_order', 'refunded_time', - self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True), - keep_default=False) - - # Adding field 'OrderItem.refund_requested_time' - db.add_column('shoppingcart_orderitem', 'refund_requested_time', - self.gf('django.db.models.fields.DateTimeField')(null=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Order.refunded_time' - db.delete_column('shoppingcart_order', 'refunded_time') - - # Deleting field 'OrderItem.refund_requested_time' - db.delete_column('shoppingcart_orderitem', 'refund_requested_time') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0007_auto__add_field_orderitem_service_fee.py b/lms/djangoapps/shoppingcart/migrations/0007_auto__add_field_orderitem_service_fee.py deleted file mode 100644 index bc086c05c205..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0007_auto__add_field_orderitem_service_fee.py +++ /dev/null @@ -1,142 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'OrderItem.service_fee' - db.add_column('shoppingcart_orderitem', 'service_fee', - self.gf('django.db.models.fields.DecimalField')(default=0.0, max_digits=30, decimal_places=2), - keep_default=False) - - # Adding index on 'OrderItem', fields ['status'] - db.create_index('shoppingcart_orderitem', ['status']) - - # Adding index on 'OrderItem', fields ['fulfilled_time'] - db.create_index('shoppingcart_orderitem', ['fulfilled_time']) - - # Adding index on 'OrderItem', fields ['refund_requested_time'] - db.create_index('shoppingcart_orderitem', ['refund_requested_time']) - - - def backwards(self, orm): - # Removing index on 'OrderItem', fields ['refund_requested_time'] - db.delete_index('shoppingcart_orderitem', ['refund_requested_time']) - - # Removing index on 'OrderItem', fields ['fulfilled_time'] - db.delete_index('shoppingcart_orderitem', ['fulfilled_time']) - - # Removing index on 'OrderItem', fields ['status'] - db.delete_index('shoppingcart_orderitem', ['status']) - - # Deleting field 'OrderItem.service_fee' - db.delete_column('shoppingcart_orderitem', 'service_fee') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0008_auto__add_coupons__add_couponredemption__chg_field_certificateitem_cou.py b/lms/djangoapps/shoppingcart/migrations/0008_auto__add_coupons__add_couponredemption__chg_field_certificateitem_cou.py deleted file mode 100644 index f64f20edd780..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0008_auto__add_coupons__add_couponredemption__chg_field_certificateitem_cou.py +++ /dev/null @@ -1,189 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Coupons' - db.create_table('shoppingcart_coupons', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('code', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)), - ('description', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)), - ('percentage_discount', self.gf('django.db.models.fields.IntegerField')(default=0)), - ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 6, 24, 0, 0))), - ('is_active', self.gf('django.db.models.fields.BooleanField')(default=True)), - )) - db.send_create_signal('shoppingcart', ['Coupons']) - - # Adding model 'CouponRedemption' - db.create_table('shoppingcart_couponredemption', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('order', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shoppingcart.Order'])), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('coupon', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shoppingcart.Coupons'])), - )) - db.send_create_signal('shoppingcart', ['CouponRedemption']) - - - # Changing field 'CertificateItem.course_id' - db.alter_column('shoppingcart_certificateitem', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=128)) - - # Changing field 'PaidCourseRegistrationAnnotation.course_id' - db.alter_column('shoppingcart_paidcourseregistrationannotation', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(unique=True, max_length=128)) - - # Changing field 'PaidCourseRegistration.course_id' - db.alter_column('shoppingcart_paidcourseregistration', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=128)) - # Adding field 'OrderItem.discount_price' - db.add_column('shoppingcart_orderitem', 'discount_price', - self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=30, decimal_places=2), - keep_default=False) - - - def backwards(self, orm): - # Deleting model 'Coupons' - db.delete_table('shoppingcart_coupons') - - # Deleting model 'CouponRedemption' - db.delete_table('shoppingcart_couponredemption') - - - # Changing field 'CertificateItem.course_id' - db.alter_column('shoppingcart_certificateitem', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=128)) - - # Changing field 'PaidCourseRegistrationAnnotation.course_id' - db.alter_column('shoppingcart_paidcourseregistrationannotation', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=128, unique=True)) - - # Changing field 'PaidCourseRegistration.course_id' - db.alter_column('shoppingcart_paidcourseregistration', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=128)) - # Deleting field 'OrderItem.discount_price' - db.delete_column('shoppingcart_orderitem', 'discount_price') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupons']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.coupons': { - 'Meta': {'object_name': 'Coupons'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 6, 24, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'discount_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0009_auto__del_coupons__add_courseregistrationcode__add_coupon__chg_field_c.py b/lms/djangoapps/shoppingcart/migrations/0009_auto__del_coupons__add_courseregistrationcode__add_coupon__chg_field_c.py deleted file mode 100644 index f17db052968d..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0009_auto__del_coupons__add_courseregistrationcode__add_coupon__chg_field_c.py +++ /dev/null @@ -1,216 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'Coupons' - db.delete_table('shoppingcart_coupons') - - # Adding model 'CourseRegistrationCode' - db.create_table('shoppingcart_courseregistrationcode', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('code', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('transaction_group_name', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=255, null=True, blank=True)), - ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='created_by_user', to=orm['auth.User'])), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 7, 1, 0, 0))), - ('redeemed_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='redeemed_by_user', null=True, to=orm['auth.User'])), - ('redeemed_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 7, 1, 0, 0), null=True)), - )) - db.send_create_signal('shoppingcart', ['CourseRegistrationCode']) - - # Adding model 'Coupon' - db.create_table('shoppingcart_coupon', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('code', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)), - ('description', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)), - ('percentage_discount', self.gf('django.db.models.fields.IntegerField')(default=0)), - ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 7, 1, 0, 0))), - ('is_active', self.gf('django.db.models.fields.BooleanField')(default=True)), - )) - db.send_create_signal('shoppingcart', ['Coupon']) - - - # Changing field 'CouponRedemption.coupon' - db.alter_column('shoppingcart_couponredemption', 'coupon_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shoppingcart.Coupon'])) - # Deleting field 'OrderItem.discount_price' - db.delete_column('shoppingcart_orderitem', 'discount_price') - - # Adding field 'OrderItem.list_price' - db.add_column('shoppingcart_orderitem', 'list_price', - self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=30, decimal_places=2), - keep_default=False) - - - def backwards(self, orm): - # Adding model 'Coupons' - db.create_table('shoppingcart_coupons', ( - ('code', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)), - ('percentage_discount', self.gf('django.db.models.fields.IntegerField')(default=0)), - ('description', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 6, 24, 0, 0))), - ('is_active', self.gf('django.db.models.fields.BooleanField')(default=True)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - )) - db.send_create_signal('shoppingcart', ['Coupons']) - - # Deleting model 'CourseRegistrationCode' - db.delete_table('shoppingcart_courseregistrationcode') - - # Deleting model 'Coupon' - db.delete_table('shoppingcart_coupon') - - - # Changing field 'CouponRedemption.coupon' - db.alter_column('shoppingcart_couponredemption', 'coupon_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shoppingcart.Coupons'])) - # Adding field 'OrderItem.discount_price' - db.add_column('shoppingcart_orderitem', 'discount_price', - self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=30, decimal_places=2), - keep_default=False) - - # Deleting field 'OrderItem.list_price' - db.delete_column('shoppingcart_orderitem', 'list_price') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 7, 1, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 7, 1, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 7, 1, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'redeemed_by_user'", 'null': 'True', 'to': "orm['auth.User']"}), - 'transaction_group_name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0010_auto__add_registrationcoderedemption__del_field_courseregistrationcode.py b/lms/djangoapps/shoppingcart/migrations/0010_auto__add_registrationcoderedemption__del_field_courseregistrationcode.py deleted file mode 100644 index fd740f9fffc1..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0010_auto__add_registrationcoderedemption__del_field_courseregistrationcode.py +++ /dev/null @@ -1,187 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'RegistrationCodeRedemption' - db.create_table('shoppingcart_registrationcoderedemption', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('order', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shoppingcart.Order'])), - ('registration_code', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shoppingcart.CourseRegistrationCode'])), - ('redeemed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('redeemed_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 7, 16, 0, 0), null=True)), - )) - db.send_create_signal('shoppingcart', ['RegistrationCodeRedemption']) - - # Deleting field 'CourseRegistrationCode.redeemed_by' - db.delete_column('shoppingcart_courseregistrationcode', 'redeemed_by_id') - - # Deleting field 'CourseRegistrationCode.redeemed_at' - db.delete_column('shoppingcart_courseregistrationcode', 'redeemed_at') - - # Adding unique constraint on 'CourseRegistrationCode', fields ['code'] - db.create_unique('shoppingcart_courseregistrationcode', ['code']) - - - def backwards(self, orm): - # Removing unique constraint on 'CourseRegistrationCode', fields ['code'] - db.delete_unique('shoppingcart_courseregistrationcode', ['code']) - - # Deleting model 'RegistrationCodeRedemption' - db.delete_table('shoppingcart_registrationcoderedemption') - - # Adding field 'CourseRegistrationCode.redeemed_by' - db.add_column('shoppingcart_courseregistrationcode', 'redeemed_by', - self.gf('django.db.models.fields.related.ForeignKey')(related_name='redeemed_by_user', null=True, to=orm['auth.User']), - keep_default=False) - - # Adding field 'CourseRegistrationCode.redeemed_at' - db.add_column('shoppingcart_courseregistrationcode', 'redeemed_at', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 7, 1, 0, 0), null=True), - keep_default=False) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 7, 16, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 7, 16, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'transaction_group_name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 7, 16, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0011_auto__add_invoice__add_field_courseregistrationcode_invoice.py b/lms/djangoapps/shoppingcart/migrations/0011_auto__add_invoice__add_field_courseregistrationcode_invoice.py deleted file mode 100644 index 75ecf4b32122..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0011_auto__add_invoice__add_field_courseregistrationcode_invoice.py +++ /dev/null @@ -1,186 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Invoice' - db.create_table('shoppingcart_invoice', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('total_amount', self.gf('django.db.models.fields.FloatField')()), - ('purchaser_name', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('purchaser_contact', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('purchaser_email', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('tax_id', self.gf('django.db.models.fields.CharField')(max_length=64, null=True)), - ('reference', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)), - )) - db.send_create_signal('shoppingcart', ['Invoice']) - - # Adding field 'CourseRegistrationCode.invoice' - db.add_column('shoppingcart_courseregistrationcode', 'invoice', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shoppingcart.Invoice'], null=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting model 'Invoice' - db.delete_table('shoppingcart_invoice') - - # Deleting field 'CourseRegistrationCode.invoice' - db.delete_column('shoppingcart_courseregistrationcode', 'invoice_id') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 6, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 6, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}), - 'transaction_group_name': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'purchaser_contact': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'purchaser_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'purchaser_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'tax_id': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 6, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0012_auto__del_field_courseregistrationcode_transaction_group_name__del_fie.py b/lms/djangoapps/shoppingcart/migrations/0012_auto__del_field_courseregistrationcode_transaction_group_name__del_fie.py deleted file mode 100644 index 0c5c72edd44e..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0012_auto__del_field_courseregistrationcode_transaction_group_name__del_fie.py +++ /dev/null @@ -1,252 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'CourseRegistrationCode.transaction_group_name' - db.delete_column('shoppingcart_courseregistrationcode', 'transaction_group_name') - - # Deleting field 'Invoice.purchaser_contact' - db.delete_column('shoppingcart_invoice', 'purchaser_contact') - - # Deleting field 'Invoice.purchaser_email' - db.delete_column('shoppingcart_invoice', 'purchaser_email') - - # Deleting field 'Invoice.reference' - db.delete_column('shoppingcart_invoice', 'reference') - - # Deleting field 'Invoice.purchaser_name' - db.delete_column('shoppingcart_invoice', 'purchaser_name') - - # Adding field 'Invoice.company_name' - db.add_column('shoppingcart_invoice', 'company_name', - self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True), - keep_default=False) - - # Adding field 'Invoice.course_id' - db.add_column('shoppingcart_invoice', 'course_id', - self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True), - keep_default=False) - - # Adding field 'Invoice.company_contact_name' - db.add_column('shoppingcart_invoice', 'company_contact_name', - self.gf('django.db.models.fields.CharField')(max_length=255), - keep_default=False) - - # Adding field 'Invoice.company_contact_email' - db.add_column('shoppingcart_invoice', 'company_contact_email', - self.gf('django.db.models.fields.CharField')(max_length=255), - keep_default=False) - - # Adding field 'Invoice.company_reference' - db.add_column('shoppingcart_invoice', 'company_reference', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True), - keep_default=False) - - # Adding field 'Invoice.internal_reference' - db.add_column('shoppingcart_invoice', 'internal_reference', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True), - keep_default=False) - - - def backwards(self, orm): - # Adding field 'CourseRegistrationCode.transaction_group_name' - db.add_column('shoppingcart_courseregistrationcode', 'transaction_group_name', - self.gf('django.db.models.fields.CharField')(blank=True, max_length=255, null=True, db_index=True), - keep_default=False) - - # Adding field 'Invoice.purchaser_contact' - db.add_column('shoppingcart_invoice', 'purchaser_contact', - self.gf('django.db.models.fields.CharField')(default='', max_length=255), - keep_default=False) - - # Adding field 'Invoice.purchaser_email' - db.add_column('shoppingcart_invoice', 'purchaser_email', - self.gf('django.db.models.fields.CharField')(default='', max_length=255), - keep_default=False) - - # Adding field 'Invoice.reference' - db.add_column('shoppingcart_invoice', 'reference', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True), - keep_default=False) - - # Adding field 'Invoice.purchaser_name' - db.add_column('shoppingcart_invoice', 'purchaser_name', - self.gf('django.db.models.fields.CharField')(default='', max_length=255, db_index=True), - keep_default=False) - - # Deleting field 'Invoice.company_name' - db.delete_column('shoppingcart_invoice', 'company_name') - - # Deleting field 'Invoice.course_id' - db.delete_column('shoppingcart_invoice', 'course_id') - - # Deleting field 'Invoice.company_contact_name' - db.delete_column('shoppingcart_invoice', 'company_contact_name') - - # Deleting field 'Invoice.company_contact_email' - db.delete_column('shoppingcart_invoice', 'company_contact_email') - - # Deleting field 'Invoice.company_reference' - db.delete_column('shoppingcart_invoice', 'company_reference') - - # Deleting field 'Invoice.internal_reference' - db.delete_column('shoppingcart_invoice', 'internal_reference') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 13, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 13, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'company_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'tax_id': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 13, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0013_auto__add_field_invoice_is_valid.py b/lms/djangoapps/shoppingcart/migrations/0013_auto__add_field_invoice_is_valid.py deleted file mode 100644 index a898be5e7515..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0013_auto__add_field_invoice_is_valid.py +++ /dev/null @@ -1,173 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Invoice.is_valid' - db.add_column('shoppingcart_invoice', 'is_valid', - self.gf('django.db.models.fields.BooleanField')(default=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Invoice.is_valid' - db.delete_column('shoppingcart_invoice', 'is_valid') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 20, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 20, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'company_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'tax_id': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 20, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0014_auto__del_field_invoice_tax_id__add_field_invoice_address_line_1__add_.py b/lms/djangoapps/shoppingcart/migrations/0014_auto__del_field_invoice_tax_id__add_field_invoice_address_line_1__add_.py deleted file mode 100644 index 13ee149ff365..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0014_auto__del_field_invoice_tax_id__add_field_invoice_address_line_1__add_.py +++ /dev/null @@ -1,244 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'Invoice.tax_id' - db.delete_column('shoppingcart_invoice', 'tax_id') - - # Adding field 'Invoice.address_line_1' - db.add_column('shoppingcart_invoice', 'address_line_1', - self.gf('django.db.models.fields.CharField')(default='', max_length=255), - keep_default=False) - - # Adding field 'Invoice.address_line_2' - db.add_column('shoppingcart_invoice', 'address_line_2', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True), - keep_default=False) - - # Adding field 'Invoice.address_line_3' - db.add_column('shoppingcart_invoice', 'address_line_3', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True), - keep_default=False) - - # Adding field 'Invoice.city' - db.add_column('shoppingcart_invoice', 'city', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True), - keep_default=False) - - # Adding field 'Invoice.state' - db.add_column('shoppingcart_invoice', 'state', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True), - keep_default=False) - - # Adding field 'Invoice.zip' - db.add_column('shoppingcart_invoice', 'zip', - self.gf('django.db.models.fields.CharField')(max_length=15, null=True), - keep_default=False) - - # Adding field 'Invoice.country' - db.add_column('shoppingcart_invoice', 'country', - self.gf('django.db.models.fields.CharField')(max_length=64, null=True), - keep_default=False) - - # Adding field 'Invoice.purchase_order_number' - db.add_column('shoppingcart_invoice', 'purchase_order_number', - self.gf('django.db.models.fields.CharField')(max_length=63, null=True), - keep_default=False) - - - def backwards(self, orm): - # Adding field 'Invoice.tax_id' - db.add_column('shoppingcart_invoice', 'tax_id', - self.gf('django.db.models.fields.CharField')(max_length=64, null=True), - keep_default=False) - - # Deleting field 'Invoice.address_line_1' - db.delete_column('shoppingcart_invoice', 'address_line_1') - - # Deleting field 'Invoice.address_line_2' - db.delete_column('shoppingcart_invoice', 'address_line_2') - - # Deleting field 'Invoice.address_line_3' - db.delete_column('shoppingcart_invoice', 'address_line_3') - - # Deleting field 'Invoice.city' - db.delete_column('shoppingcart_invoice', 'city') - - # Deleting field 'Invoice.state' - db.delete_column('shoppingcart_invoice', 'state') - - # Deleting field 'Invoice.zip' - db.delete_column('shoppingcart_invoice', 'zip') - - # Deleting field 'Invoice.country' - db.delete_column('shoppingcart_invoice', 'country') - - # Deleting field 'Invoice.purchase_order_number' - db.delete_column('shoppingcart_invoice', 'purchase_order_number') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 27, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 27, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'company_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'purchase_order_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 27, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0015_auto__del_field_invoice_purchase_order_number__del_field_invoice_compa.py b/lms/djangoapps/shoppingcart/migrations/0015_auto__del_field_invoice_purchase_order_number__del_field_invoice_compa.py deleted file mode 100644 index a934b1344b32..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0015_auto__del_field_invoice_purchase_order_number__del_field_invoice_compa.py +++ /dev/null @@ -1,229 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'Invoice.purchase_order_number' - db.delete_column('shoppingcart_invoice', 'purchase_order_number') - - # Deleting field 'Invoice.company_contact_name' - db.delete_column('shoppingcart_invoice', 'company_contact_name') - - # Deleting field 'Invoice.company_contact_email' - db.delete_column('shoppingcart_invoice', 'company_contact_email') - - # Adding field 'Invoice.company_email' - db.add_column('shoppingcart_invoice', 'company_email', - self.gf('django.db.models.fields.CharField')(default='', max_length=255), - keep_default=False) - - # Adding field 'Invoice.recipient_name' - db.add_column('shoppingcart_invoice', 'recipient_name', - self.gf('django.db.models.fields.CharField')(default='', max_length=255), - keep_default=False) - - # Adding field 'Invoice.recipient_email' - db.add_column('shoppingcart_invoice', 'recipient_email', - self.gf('django.db.models.fields.CharField')(default='', max_length=255), - keep_default=False) - - # Adding field 'Invoice.customer_reference_number' - db.add_column('shoppingcart_invoice', 'customer_reference_number', - self.gf('django.db.models.fields.CharField')(max_length=63, null=True), - keep_default=False) - - - def backwards(self, orm): - # Adding field 'Invoice.purchase_order_number' - db.add_column('shoppingcart_invoice', 'purchase_order_number', - self.gf('django.db.models.fields.CharField')(max_length=63, null=True), - keep_default=False) - - # Adding field 'Invoice.company_contact_name' - db.add_column('shoppingcart_invoice', 'company_contact_name', - self.gf('django.db.models.fields.CharField')(default='', max_length=255), - keep_default=False) - - # Adding field 'Invoice.company_contact_email' - db.add_column('shoppingcart_invoice', 'company_contact_email', - self.gf('django.db.models.fields.CharField')(default='', max_length=255), - keep_default=False) - - # Deleting field 'Invoice.company_email' - db.delete_column('shoppingcart_invoice', 'company_email') - - # Deleting field 'Invoice.recipient_name' - db.delete_column('shoppingcart_invoice', 'recipient_name') - - # Deleting field 'Invoice.recipient_email' - db.delete_column('shoppingcart_invoice', 'recipient_email') - - # Deleting field 'Invoice.customer_reference_number' - db.delete_column('shoppingcart_invoice', 'customer_reference_number') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 28, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 28, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'company_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 28, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0016_auto__del_field_invoice_company_email__del_field_invoice_company_refer.py b/lms/djangoapps/shoppingcart/migrations/0016_auto__del_field_invoice_company_email__del_field_invoice_company_refer.py deleted file mode 100644 index f5baab13b6cb..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0016_auto__del_field_invoice_company_email__del_field_invoice_company_refer.py +++ /dev/null @@ -1,205 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'Invoice.company_email' - db.delete_column('shoppingcart_invoice', 'company_email') - - # Deleting field 'Invoice.company_reference' - db.delete_column('shoppingcart_invoice', 'company_reference') - - # Adding field 'Invoice.company_contact_name' - db.add_column('shoppingcart_invoice', 'company_contact_name', - self.gf('django.db.models.fields.CharField')(default='', max_length=255), - keep_default=False) - - # Adding field 'Invoice.company_contact_email' - db.add_column('shoppingcart_invoice', 'company_contact_email', - self.gf('django.db.models.fields.CharField')(default='', max_length=255), - keep_default=False) - - - def backwards(self, orm): - # Adding field 'Invoice.company_email' - db.add_column('shoppingcart_invoice', 'company_email', - self.gf('django.db.models.fields.CharField')(default='', max_length=255), - keep_default=False) - - # Adding field 'Invoice.company_reference' - db.add_column('shoppingcart_invoice', 'company_reference', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True), - keep_default=False) - - # Deleting field 'Invoice.company_contact_name' - db.delete_column('shoppingcart_invoice', 'company_contact_name') - - # Deleting field 'Invoice.company_contact_email' - db.delete_column('shoppingcart_invoice', 'company_contact_email') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 29, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 29, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 8, 29, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0017_auto__add_field_courseregistrationcode_order__chg_field_registrationco.py b/lms/djangoapps/shoppingcart/migrations/0017_auto__add_field_courseregistrationcode_order__chg_field_registrationco.py deleted file mode 100644 index 5e6ae048cc7b..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0017_auto__add_field_courseregistrationcode_order__chg_field_registrationco.py +++ /dev/null @@ -1,188 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseRegistrationCode.order' - db.add_column('shoppingcart_courseregistrationcode', 'order', - self.gf('django.db.models.fields.related.ForeignKey')(related_name='purchase_order', null=True, to=orm['shoppingcart.Order']), - keep_default=False) - - - # Changing field 'RegistrationCodeRedemption.order' - db.alter_column('shoppingcart_registrationcoderedemption', 'order_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shoppingcart.Order'], null=True)) - - def backwards(self, orm): - # Deleting field 'CourseRegistrationCode.order' - db.delete_column('shoppingcart_courseregistrationcode', 'order_id') - - - # Changing field 'RegistrationCodeRedemption.order' - db.alter_column('shoppingcart_registrationcoderedemption', 'order_id', self.gf('django.db.models.fields.related.ForeignKey')(default='', to=orm['shoppingcart.Order'])) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 9, 3, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 9, 3, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'purchase_order'", 'null': 'True', 'to': "orm['shoppingcart.Order']"}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']", 'null': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 9, 3, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0018_auto__add_donation.py b/lms/djangoapps/shoppingcart/migrations/0018_auto__add_donation.py deleted file mode 100644 index 012e7e2d4cbb..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0018_auto__add_donation.py +++ /dev/null @@ -1,189 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Donation' - db.create_table('shoppingcart_donation', ( - ('orderitem_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['shoppingcart.OrderItem'], unique=True, primary_key=True)), - ('donation_type', self.gf('django.db.models.fields.CharField')(default='general', max_length=32)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - )) - db.send_create_signal('shoppingcart', ['Donation']) - - def backwards(self, orm): - # Deleting model 'Donation' - db.delete_table('shoppingcart_donation') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 10, 2, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 10, 2, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'purchase_order'", 'null': 'True', 'to': "orm['shoppingcart.Order']"}) - }, - 'shoppingcart.donation': { - 'Meta': {'object_name': 'Donation', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'donation_type': ('django.db.models.fields.CharField', [], {'default': "'general'", 'max_length': '32'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']", 'null': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 10, 2, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0019_auto__add_donationconfiguration.py b/lms/djangoapps/shoppingcart/migrations/0019_auto__add_donationconfiguration.py deleted file mode 100644 index d7364612bcc0..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0019_auto__add_donationconfiguration.py +++ /dev/null @@ -1,197 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'DonationConfiguration' - db.create_table('shoppingcart_donationconfiguration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('shoppingcart', ['DonationConfiguration']) - - def backwards(self, orm): - # Deleting model 'DonationConfiguration' - db.delete_table('shoppingcart_donationconfiguration') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 10, 3, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 10, 3, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'purchase_order'", 'null': 'True', 'to': "orm['shoppingcart.Order']"}) - }, - 'shoppingcart.donation': { - 'Meta': {'object_name': 'Donation', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'donation_type': ('django.db.models.fields.CharField', [], {'default': "'general'", 'max_length': '32'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donationconfiguration': { - 'Meta': {'object_name': 'DonationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']", 'null': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 10, 3, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0020_auto__add_courseregcodeitem__add_courseregcodeitemannotation__add_fiel.py b/lms/djangoapps/shoppingcart/migrations/0020_auto__add_courseregcodeitem__add_courseregcodeitemannotation__add_fiel.py deleted file mode 100644 index af49f01c0a09..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0020_auto__add_courseregcodeitem__add_courseregcodeitemannotation__add_fiel.py +++ /dev/null @@ -1,282 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseRegCodeItem' - db.create_table('shoppingcart_courseregcodeitem', ( - ('orderitem_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['shoppingcart.OrderItem'], unique=True, primary_key=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=128, db_index=True)), - ('mode', self.gf('django.db.models.fields.SlugField')(default='honor', max_length=50)), - )) - db.send_create_signal('shoppingcart', ['CourseRegCodeItem']) - - # Adding model 'CourseRegCodeItemAnnotation' - db.create_table('shoppingcart_courseregcodeitemannotation', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(unique=True, max_length=128, db_index=True)), - ('annotation', self.gf('django.db.models.fields.TextField')(null=True)), - )) - db.send_create_signal('shoppingcart', ['CourseRegCodeItemAnnotation']) - - # Adding field 'Order.company_name' - db.add_column('shoppingcart_order', 'company_name', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), - keep_default=False) - - # Adding field 'Order.company_contact_name' - db.add_column('shoppingcart_order', 'company_contact_name', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), - keep_default=False) - - # Adding field 'Order.company_contact_email' - db.add_column('shoppingcart_order', 'company_contact_email', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), - keep_default=False) - - # Adding field 'Order.recipient_name' - db.add_column('shoppingcart_order', 'recipient_name', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), - keep_default=False) - - # Adding field 'Order.recipient_email' - db.add_column('shoppingcart_order', 'recipient_email', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), - keep_default=False) - - # Adding field 'Order.customer_reference_number' - db.add_column('shoppingcart_order', 'customer_reference_number', - self.gf('django.db.models.fields.CharField')(max_length=63, null=True, blank=True), - keep_default=False) - - # Adding field 'Order.order_type' - db.add_column('shoppingcart_order', 'order_type', - self.gf('django.db.models.fields.CharField')(default='personal', max_length=32), - keep_default=False) - - def backwards(self, orm): - # Deleting model 'CourseRegCodeItem' - db.delete_table('shoppingcart_courseregcodeitem') - - # Deleting model 'CourseRegCodeItemAnnotation' - db.delete_table('shoppingcart_courseregcodeitemannotation') - - # Deleting field 'Order.company_name' - db.delete_column('shoppingcart_order', 'company_name') - - # Deleting field 'Order.company_contact_name' - db.delete_column('shoppingcart_order', 'company_contact_name') - - # Deleting field 'Order.company_contact_email' - db.delete_column('shoppingcart_order', 'company_contact_email') - - # Deleting field 'Order.recipient_name' - db.delete_column('shoppingcart_order', 'recipient_name') - - # Deleting field 'Order.recipient_email' - db.delete_column('shoppingcart_order', 'recipient_email') - - # Deleting field 'Order.customer_reference_number' - db.delete_column('shoppingcart_order', 'customer_reference_number') - - # Deleting field 'Order.order_type' - db.delete_column('shoppingcart_order', 'order_type') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 10, 16, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregcodeitem': { - 'Meta': {'object_name': 'CourseRegCodeItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.courseregcodeitemannotation': { - 'Meta': {'object_name': 'CourseRegCodeItemAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 10, 16, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'purchase_order'", 'null': 'True', 'to': "orm['shoppingcart.Order']"}) - }, - 'shoppingcart.donation': { - 'Meta': {'object_name': 'Donation', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'donation_type': ('django.db.models.fields.CharField', [], {'default': "'general'", 'max_length': '32'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donationconfiguration': { - 'Meta': {'object_name': 'DonationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order_type': ('django.db.models.fields.CharField', [], {'default': "'personal'", 'max_length': '32'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']", 'null': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 10, 16, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0021_auto__add_field_orderitem_created__add_field_orderitem_modified.py b/lms/djangoapps/shoppingcart/migrations/0021_auto__add_field_orderitem_created__add_field_orderitem_modified.py deleted file mode 100644 index 226d2475e886..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0021_auto__add_field_orderitem_created__add_field_orderitem_modified.py +++ /dev/null @@ -1,222 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'OrderItem.created' - db.add_column('shoppingcart_orderitem', 'created', - self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now), - keep_default=False) - - # Adding field 'OrderItem.modified' - db.add_column('shoppingcart_orderitem', 'modified', - self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now), - keep_default=False) - - def backwards(self, orm): - # Deleting field 'OrderItem.created' - db.delete_column('shoppingcart_orderitem', 'created') - - # Deleting field 'OrderItem.modified' - db.delete_column('shoppingcart_orderitem', 'modified') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 11, 6, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregcodeitem': { - 'Meta': {'object_name': 'CourseRegCodeItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.courseregcodeitemannotation': { - 'Meta': {'object_name': 'CourseRegCodeItemAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 11, 6, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'purchase_order'", 'null': 'True', 'to': "orm['shoppingcart.Order']"}) - }, - 'shoppingcart.donation': { - 'Meta': {'object_name': 'Donation', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'donation_type': ('django.db.models.fields.CharField', [], {'default': "'general'", 'max_length': '32'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donationconfiguration': { - 'Meta': {'object_name': 'DonationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order_type': ('django.db.models.fields.CharField', [], {'default': "'personal'", 'max_length': '32'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']", 'null': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 11, 6, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0022_auto__add_field_registrationcoderedemption_course_enrollment__add_fiel.py b/lms/djangoapps/shoppingcart/migrations/0022_auto__add_field_registrationcoderedemption_course_enrollment__add_fiel.py deleted file mode 100644 index 76116de7cb9e..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0022_auto__add_field_registrationcoderedemption_course_enrollment__add_fiel.py +++ /dev/null @@ -1,226 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'RegistrationCodeRedemption.course_enrollment' - db.add_column('shoppingcart_registrationcoderedemption', 'course_enrollment', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['student.CourseEnrollment'], null=True), - keep_default=False) - - # Adding field 'PaidCourseRegistration.course_enrollment' - db.add_column('shoppingcart_paidcourseregistration', 'course_enrollment', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['student.CourseEnrollment'], null=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'RegistrationCodeRedemption.course_enrollment' - db.delete_column('shoppingcart_registrationcoderedemption', 'course_enrollment_id') - - # Deleting field 'PaidCourseRegistration.course_enrollment' - db.delete_column('shoppingcart_paidcourseregistration', 'course_enrollment_id') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 12, 19, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregcodeitem': { - 'Meta': {'object_name': 'CourseRegCodeItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.courseregcodeitemannotation': { - 'Meta': {'object_name': 'CourseRegCodeItemAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 12, 19, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'purchase_order'", 'null': 'True', 'to': "orm['shoppingcart.Order']"}) - }, - 'shoppingcart.donation': { - 'Meta': {'object_name': 'Donation', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'donation_type': ('django.db.models.fields.CharField', [], {'default': "'general'", 'max_length': '32'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donationconfiguration': { - 'Meta': {'object_name': 'DonationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order_type': ('django.db.models.fields.CharField', [], {'default': "'personal'", 'max_length': '32'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']", 'null': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 12, 19, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] \ No newline at end of file diff --git a/lms/djangoapps/shoppingcart/migrations/0023_auto__add_field_coupon_expiration_date.py b/lms/djangoapps/shoppingcart/migrations/0023_auto__add_field_coupon_expiration_date.py deleted file mode 100644 index e109500dc320..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0023_auto__add_field_coupon_expiration_date.py +++ /dev/null @@ -1,219 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'Coupon.expiration_date' - db.add_column('shoppingcart_coupon', 'expiration_date', - self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Coupon.expiration_date' - db.delete_column('shoppingcart_coupon', 'expiration_date') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 1, 6, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'expiration_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregcodeitem': { - 'Meta': {'object_name': 'CourseRegCodeItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.courseregcodeitemannotation': { - 'Meta': {'object_name': 'CourseRegCodeItemAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 1, 6, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'purchase_order'", 'null': 'True', 'to': "orm['shoppingcart.Order']"}) - }, - 'shoppingcart.donation': { - 'Meta': {'object_name': 'Donation', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'donation_type': ('django.db.models.fields.CharField', [], {'default': "'general'", 'max_length': '32'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donationconfiguration': { - 'Meta': {'object_name': 'DonationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order_type': ('django.db.models.fields.CharField', [], {'default': "'personal'", 'max_length': '32'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']", 'null': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 1, 6, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] \ No newline at end of file diff --git a/lms/djangoapps/shoppingcart/migrations/0024_auto__add_field_courseregistrationcode_mode_slug.py b/lms/djangoapps/shoppingcart/migrations/0024_auto__add_field_courseregistrationcode_mode_slug.py deleted file mode 100644 index 105e441fb384..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0024_auto__add_field_courseregistrationcode_mode_slug.py +++ /dev/null @@ -1,218 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseRegistrationCode.mode_slug' - db.add_column('shoppingcart_courseregistrationcode', 'mode_slug', - self.gf('django.db.models.fields.CharField')(max_length=100, null=True), - keep_default=False) - - def backwards(self, orm): - # Deleting field 'CourseRegistrationCode.mode_slug' - db.delete_column('shoppingcart_courseregistrationcode', 'mode_slug') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 1, 12, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'expiration_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregcodeitem': { - 'Meta': {'object_name': 'CourseRegCodeItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.courseregcodeitemannotation': { - 'Meta': {'object_name': 'CourseRegCodeItemAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 1, 12, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'purchase_order'", 'null': 'True', 'to': "orm['shoppingcart.Order']"}) - }, - 'shoppingcart.donation': { - 'Meta': {'object_name': 'Donation', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'donation_type': ('django.db.models.fields.CharField', [], {'default': "'general'", 'max_length': '32'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donationconfiguration': { - 'Meta': {'object_name': 'DonationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order_type': ('django.db.models.fields.CharField', [], {'default': "'personal'", 'max_length': '32'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']", 'null': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 1, 12, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0025_update_invoice_models.py b/lms/djangoapps/shoppingcart/migrations/0025_update_invoice_models.py deleted file mode 100644 index 5dfcc3c02346..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0025_update_invoice_models.py +++ /dev/null @@ -1,310 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'InvoiceTransaction' - db.create_table('shoppingcart_invoicetransaction', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('invoice', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shoppingcart.Invoice'])), - ('amount', self.gf('django.db.models.fields.DecimalField')(default=0.0, max_digits=30, decimal_places=2)), - ('currency', self.gf('django.db.models.fields.CharField')(default='usd', max_length=8)), - ('comments', self.gf('django.db.models.fields.TextField')(null=True)), - ('status', self.gf('django.db.models.fields.CharField')(default='started', max_length=32)), - ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('last_modified_by', self.gf('django.db.models.fields.related.ForeignKey')(related_name='last_modified_by_user', to=orm['auth.User'])), - )) - db.send_create_signal('shoppingcart', ['InvoiceTransaction']) - - # Adding model 'InvoiceItem' - db.create_table('shoppingcart_invoiceitem', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('invoice', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shoppingcart.Invoice'])), - ('qty', self.gf('django.db.models.fields.IntegerField')(default=1)), - ('unit_price', self.gf('django.db.models.fields.DecimalField')(default=0.0, max_digits=30, decimal_places=2)), - ('currency', self.gf('django.db.models.fields.CharField')(default='usd', max_length=8)), - )) - db.send_create_signal('shoppingcart', ['InvoiceItem']) - - # Adding model 'CourseRegistrationCodeInvoiceItem' - db.create_table('shoppingcart_courseregistrationcodeinvoiceitem', ( - ('invoiceitem_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['shoppingcart.InvoiceItem'], unique=True, primary_key=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=128, db_index=True)), - )) - db.send_create_signal('shoppingcart', ['CourseRegistrationCodeInvoiceItem']) - - # Adding field 'CourseRegistrationCode.invoice_item' - db.add_column('shoppingcart_courseregistrationcode', 'invoice_item', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shoppingcart.CourseRegistrationCodeInvoiceItem'], null=True), - keep_default=True) - - # Adding field 'Invoice.created' - db.add_column('shoppingcart_invoice', 'created', - self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now), - keep_default=True) - - # Adding field 'Invoice.modified' - db.add_column('shoppingcart_invoice', 'modified', - self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now), - keep_default=True) - - - def backwards(self, orm): - # Deleting model 'InvoiceTransaction' - db.delete_table('shoppingcart_invoicetransaction') - - # Deleting model 'InvoiceItem' - db.delete_table('shoppingcart_invoiceitem') - - # Deleting model 'CourseRegistrationCodeInvoiceItem' - db.delete_table('shoppingcart_courseregistrationcodeinvoiceitem') - - # Deleting field 'CourseRegistrationCode.invoice_item' - db.delete_column('shoppingcart_courseregistrationcode', 'invoice_item_id') - - # Deleting field 'Invoice.created' - db.delete_column('shoppingcart_invoice', 'created') - - # Deleting field 'Invoice.modified' - db.delete_column('shoppingcart_invoice', 'modified') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 1, 27, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'expiration_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregcodeitem': { - 'Meta': {'object_name': 'CourseRegCodeItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.courseregcodeitemannotation': { - 'Meta': {'object_name': 'CourseRegCodeItemAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 1, 27, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}), - 'invoice_item': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCodeInvoiceItem']", 'null': 'True'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'purchase_order'", 'null': 'True', 'to': "orm['shoppingcart.Order']"}) - }, - 'shoppingcart.courseregistrationcodeinvoiceitem': { - 'Meta': {'object_name': 'CourseRegistrationCodeInvoiceItem', '_ormbases': ['shoppingcart.InvoiceItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'invoiceitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.InvoiceItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donation': { - 'Meta': {'object_name': 'Donation', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'donation_type': ('django.db.models.fields.CharField', [], {'default': "'general'", 'max_length': '32'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donationconfiguration': { - 'Meta': {'object_name': 'DonationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.invoiceitem': { - 'Meta': {'object_name': 'InvoiceItem'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'unit_price': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}) - }, - 'shoppingcart.invoicetransaction': { - 'Meta': {'object_name': 'InvoiceTransaction'}, - 'amount': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'comments': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']"}), - 'last_modified_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'last_modified_by_user'", 'to': "orm['auth.User']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'started'", 'max_length': '32'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order_type': ('django.db.models.fields.CharField', [], {'default': "'personal'", 'max_length': '32'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']", 'null': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 1, 27, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] \ No newline at end of file diff --git a/lms/djangoapps/shoppingcart/migrations/0026_migrate_invoices.py b/lms/djangoapps/shoppingcart/migrations/0026_migrate_invoices.py deleted file mode 100644 index 787c8907f178..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0026_migrate_invoices.py +++ /dev/null @@ -1,270 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models -from decimal import Decimal, ROUND_DOWN - -class Migration(DataMigration): - - def forwards(self, orm): - # Select all the invoices and number of registration codes(as qty) associated with every invoice - invoices = orm.Invoice.objects.extra( - select={ - 'qty': 'SELECT COUNT(*) FROM shoppingcart_courseregistrationcode ' - 'WHERE shoppingcart_courseregistrationcode.invoice_id = shoppingcart_invoice.id' - } - ).all() - for invoice in invoices: - invoice_item = self._create_invoice_item(invoice, orm) - orm.CourseRegistrationCode.objects.filter(invoice=invoice).update(invoice_item=invoice_item) - - def backwards(self, orm): - """ - We don't need the backward migration because the data is already there in old models and - schema rollback will automatically remove this new data. - """ - pass - - @staticmethod - def _create_invoice_item(invoice, orm): - unit_price = ((Decimal(invoice.total_amount))/invoice.qty).quantize(Decimal('.01'), rounding=ROUND_DOWN) - invoice_item = orm.CourseRegistrationCodeInvoiceItem.objects.create( - invoice=invoice, - qty=invoice.qty, - unit_price=unit_price, - course_id=invoice.course_id - ) - return invoice_item - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 1, 27, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'expiration_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregcodeitem': { - 'Meta': {'object_name': 'CourseRegCodeItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.courseregcodeitemannotation': { - 'Meta': {'object_name': 'CourseRegCodeItemAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 1, 27, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}), - 'invoice_item': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCodeInvoiceItem']", 'null': 'True'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'purchase_order'", 'null': 'True', 'to': "orm['shoppingcart.Order']"}) - }, - 'shoppingcart.courseregistrationcodeinvoiceitem': { - 'Meta': {'object_name': 'CourseRegistrationCodeInvoiceItem', '_ormbases': ['shoppingcart.InvoiceItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'invoiceitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.InvoiceItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donation': { - 'Meta': {'object_name': 'Donation', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'donation_type': ('django.db.models.fields.CharField', [], {'default': "'general'", 'max_length': '32'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donationconfiguration': { - 'Meta': {'object_name': 'DonationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.invoiceitem': { - 'Meta': {'object_name': 'InvoiceItem'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'unit_price': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}) - }, - 'shoppingcart.invoicetransaction': { - 'Meta': {'object_name': 'InvoiceTransaction'}, - 'amount': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'comments': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']"}), - 'last_modified_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'last_modified_by_user'", 'to': "orm['auth.User']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'started'", 'max_length': '32'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order_type': ('django.db.models.fields.CharField', [], {'default': "'personal'", 'max_length': '32'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']", 'null': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 1, 27, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] - symmetrical = True diff --git a/lms/djangoapps/shoppingcart/migrations/0027_add_invoice_history.py b/lms/djangoapps/shoppingcart/migrations/0027_add_invoice_history.py deleted file mode 100644 index 57e1e9822ce9..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0027_add_invoice_history.py +++ /dev/null @@ -1,262 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'InvoiceHistory' - db.create_table('shoppingcart_invoicehistory', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('timestamp', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)), - ('invoice', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shoppingcart.Invoice'])), - ('snapshot', self.gf('django.db.models.fields.TextField')(blank=True)), - )) - db.send_create_signal('shoppingcart', ['InvoiceHistory']) - - - def backwards(self, orm): - # Deleting model 'InvoiceHistory' - db.delete_table('shoppingcart_invoicehistory') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 2, 8, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'expiration_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregcodeitem': { - 'Meta': {'object_name': 'CourseRegCodeItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.courseregcodeitemannotation': { - 'Meta': {'object_name': 'CourseRegCodeItemAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 2, 8, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}), - 'invoice_item': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCodeInvoiceItem']", 'null': 'True'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'purchase_order'", 'null': 'True', 'to': "orm['shoppingcart.Order']"}) - }, - 'shoppingcart.courseregistrationcodeinvoiceitem': { - 'Meta': {'object_name': 'CourseRegistrationCodeInvoiceItem', '_ormbases': ['shoppingcart.InvoiceItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'invoiceitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.InvoiceItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donation': { - 'Meta': {'object_name': 'Donation', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'donation_type': ('django.db.models.fields.CharField', [], {'default': "'general'", 'max_length': '32'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donationconfiguration': { - 'Meta': {'object_name': 'DonationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.invoicehistory': { - 'Meta': {'object_name': 'InvoiceHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']"}), - 'snapshot': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}) - }, - 'shoppingcart.invoiceitem': { - 'Meta': {'object_name': 'InvoiceItem'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'unit_price': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}) - }, - 'shoppingcart.invoicetransaction': { - 'Meta': {'object_name': 'InvoiceTransaction'}, - 'amount': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'comments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']"}), - 'last_modified_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'last_modified_by_user'", 'to': "orm['auth.User']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'started'", 'max_length': '32'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order_type': ('django.db.models.fields.CharField', [], {'default': "'personal'", 'max_length': '32'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']", 'null': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 2, 8, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] diff --git a/lms/djangoapps/shoppingcart/migrations/0028_auto__add_field_courseregistrationcode_is_valid.py b/lms/djangoapps/shoppingcart/migrations/0028_auto__add_field_courseregistrationcode_is_valid.py deleted file mode 100644 index f82bff4a97b1..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0028_auto__add_field_courseregistrationcode_is_valid.py +++ /dev/null @@ -1,259 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseRegistrationCode.is_valid' - db.add_column('shoppingcart_courseregistrationcode', 'is_valid', - self.gf('django.db.models.fields.BooleanField')(default=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CourseRegistrationCode.is_valid' - db.delete_column('shoppingcart_courseregistrationcode', 'is_valid') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 5, 29, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'expiration_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregcodeitem': { - 'Meta': {'object_name': 'CourseRegCodeItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.courseregcodeitemannotation': { - 'Meta': {'object_name': 'CourseRegCodeItemAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 5, 29, 0, 0)'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}), - 'invoice_item': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCodeInvoiceItem']", 'null': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'purchase_order'", 'null': 'True', 'to': "orm['shoppingcart.Order']"}) - }, - 'shoppingcart.courseregistrationcodeinvoiceitem': { - 'Meta': {'object_name': 'CourseRegistrationCodeInvoiceItem', '_ormbases': ['shoppingcart.InvoiceItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'invoiceitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.InvoiceItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donation': { - 'Meta': {'object_name': 'Donation', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'donation_type': ('django.db.models.fields.CharField', [], {'default': "'general'", 'max_length': '32'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donationconfiguration': { - 'Meta': {'object_name': 'DonationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.invoicehistory': { - 'Meta': {'object_name': 'InvoiceHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']"}), - 'snapshot': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}) - }, - 'shoppingcart.invoiceitem': { - 'Meta': {'object_name': 'InvoiceItem'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'unit_price': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}) - }, - 'shoppingcart.invoicetransaction': { - 'Meta': {'object_name': 'InvoiceTransaction'}, - 'amount': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'comments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']"}), - 'last_modified_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'last_modified_by_user'", 'to': "orm['auth.User']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'started'", 'max_length': '32'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order_type': ('django.db.models.fields.CharField', [], {'default': "'personal'", 'max_length': '32'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']", 'null': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2015, 5, 29, 0, 0)', 'null': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] \ No newline at end of file diff --git a/lms/djangoapps/shoppingcart/migrations/0029_better_datetime_now_default.py b/lms/djangoapps/shoppingcart/migrations/0029_better_datetime_now_default.py deleted file mode 100644 index 765babb8a9e5..000000000000 --- a/lms/djangoapps/shoppingcart/migrations/0029_better_datetime_now_default.py +++ /dev/null @@ -1,269 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'CourseRegistrationCode.created_at' - db.alter_column('shoppingcart_courseregistrationcode', 'created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True)) - - # Changing field 'Coupon.created_at' - db.alter_column('shoppingcart_coupon', 'created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True)) - - # Changing field 'RegistrationCodeRedemption.redeemed_at' - db.alter_column('shoppingcart_registrationcoderedemption', 'redeemed_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True)) - - def backwards(self, orm): - - # Changing field 'CourseRegistrationCode.created_at' - db.alter_column('shoppingcart_courseregistrationcode', 'created_at', self.gf('django.db.models.fields.DateTimeField')()) - - # Changing field 'Coupon.created_at' - db.alter_column('shoppingcart_coupon', 'created_at', self.gf('django.db.models.fields.DateTimeField')()) - - # Changing field 'RegistrationCodeRedemption.redeemed_at' - db.alter_column('shoppingcart_registrationcoderedemption', 'redeemed_at', self.gf('django.db.models.fields.DateTimeField')(null=True)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'shoppingcart.certificateitem': { - 'Meta': {'object_name': 'CertificateItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.coupon': { - 'Meta': {'object_name': 'Coupon'}, - 'code': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'expiration_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'percentage_discount': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - }, - 'shoppingcart.couponredemption': { - 'Meta': {'object_name': 'CouponRedemption'}, - 'coupon': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Coupon']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.courseregcodeitem': { - 'Meta': {'object_name': 'CourseRegCodeItem', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.courseregcodeitemannotation': { - 'Meta': {'object_name': 'CourseRegCodeItemAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.courseregistrationcode': { - 'Meta': {'object_name': 'CourseRegistrationCode'}, - 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_by_user'", 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']", 'null': 'True'}), - 'invoice_item': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCodeInvoiceItem']", 'null': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'purchase_order'", 'null': 'True', 'to': "orm['shoppingcart.Order']"}) - }, - 'shoppingcart.courseregistrationcodeinvoiceitem': { - 'Meta': {'object_name': 'CourseRegistrationCodeInvoiceItem', '_ormbases': ['shoppingcart.InvoiceItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'invoiceitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.InvoiceItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donation': { - 'Meta': {'object_name': 'Donation', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'donation_type': ('django.db.models.fields.CharField', [], {'default': "'general'", 'max_length': '32'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.donationconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'DonationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.invoice': { - 'Meta': {'object_name': 'Invoice'}, - 'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'address_line_3': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'is_valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), - 'total_amount': ('django.db.models.fields.FloatField', [], {}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}) - }, - 'shoppingcart.invoicehistory': { - 'Meta': {'object_name': 'InvoiceHistory'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']"}), - 'snapshot': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}) - }, - 'shoppingcart.invoiceitem': { - 'Meta': {'object_name': 'InvoiceItem'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'unit_price': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}) - }, - 'shoppingcart.invoicetransaction': { - 'Meta': {'object_name': 'InvoiceTransaction'}, - 'amount': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'comments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Invoice']"}), - 'last_modified_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'last_modified_by_user'", 'to': "orm['auth.User']"}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'started'", 'max_length': '32'}) - }, - 'shoppingcart.order': { - 'Meta': {'object_name': 'Order'}, - 'bill_to_cardtype': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), - 'bill_to_ccnum': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_city': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_country': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_first': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_last': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}), - 'bill_to_postalcode': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'bill_to_state': ('django.db.models.fields.CharField', [], {'max_length': '8', 'blank': 'True'}), - 'bill_to_street1': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'bill_to_street2': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), - 'company_contact_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'customer_reference_number': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order_type': ('django.db.models.fields.CharField', [], {'default': "'personal'", 'max_length': '32'}), - 'processor_reply_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'purchase_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'recipient_email': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'recipient_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'refunded_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.orderitem': { - 'Meta': {'object_name': 'OrderItem'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'fulfilled_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'line_desc': ('django.db.models.fields.CharField', [], {'default': "'Misc. Item'", 'max_length': '1024'}), - 'list_price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '30', 'decimal_places': '2'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']"}), - 'qty': ('django.db.models.fields.IntegerField', [], {'default': '1'}), - 'refund_requested_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'report_comments': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'service_fee': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'cart'", 'max_length': '32', 'db_index': 'True'}), - 'unit_cost': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '30', 'decimal_places': '2'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'shoppingcart.paidcourseregistration': { - 'Meta': {'object_name': 'PaidCourseRegistration', '_ormbases': ['shoppingcart.OrderItem']}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '128', 'db_index': 'True'}), - 'mode': ('django.db.models.fields.SlugField', [], {'default': "'honor'", 'max_length': '50'}), - 'orderitem_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['shoppingcart.OrderItem']", 'unique': 'True', 'primary_key': 'True'}) - }, - 'shoppingcart.paidcourseregistrationannotation': { - 'Meta': {'object_name': 'PaidCourseRegistrationAnnotation'}, - 'annotation': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'shoppingcart.registrationcoderedemption': { - 'Meta': {'object_name': 'RegistrationCodeRedemption'}, - 'course_enrollment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['student.CourseEnrollment']", 'null': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.Order']", 'null': 'True'}), - 'redeemed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'redeemed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'registration_code': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shoppingcart.CourseRegistrationCode']"}) - }, - 'student.courseenrollment': { - 'Meta': {'ordering': "('user', 'course_id')", 'unique_together': "(('user', 'course_id'),)", 'object_name': 'CourseEnrollment'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'mode': ('django.db.models.fields.CharField', [], {'default': "'honor'", 'max_length': '100'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['shoppingcart'] \ No newline at end of file diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index ac3ca6c60f91..91f9596ff0d0 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -7,7 +7,7 @@ import json import analytics from io import BytesIO -from django.db.models import Q +from django.db.models import Q, F import pytz import logging import smtplib @@ -109,6 +109,9 @@ class Order(models.Model): as the shopping cart. FOR ANY USER, THERE SHOULD ONLY EVER BE ZERO OR ONE ORDER WITH STATUS='cart'. """ + class Meta(object): + app_label = "shoppingcart" + user = models.ForeignKey(User, db_index=True) currency = models.CharField(default="usd", max_length=8) # lower case ISO currency codes status = models.CharField(max_length=32, default='cart', choices=ORDER_STATUSES) @@ -230,7 +233,7 @@ def clear(self): """ self.orderitem_set.all().delete() # pylint: disable=no-member - @transaction.commit_on_success + @transaction.atomic def start_purchase(self): """ Start the purchase process. This will set the order status to "paying", @@ -632,6 +635,9 @@ class OrderItem(TimeStampedModel): Each implementation of OrderItem should provide its own purchased_callback as a method. """ + class Meta(object): + app_label = "shoppingcart" + objects = InheritanceManager() order = models.ForeignKey(Order, db_index=True) # this is denormalized, but convenient for SQL queries for reports, etc. user should always be = order.user @@ -669,7 +675,7 @@ def add_to_order(cls, order, *args, **kwargs): if order.currency != currency and order.orderitem_set.exists(): raise InvalidCartItem(_("Trying to add a different currency into the cart")) - @transaction.commit_on_success + @transaction.atomic def purchase_item(self): """ This is basically a wrapper around purchased_callback that handles @@ -803,6 +809,9 @@ class Invoice(TimeStampedModel): which is when a user wants to purchase Registration Codes, but will not do so via a Credit Card transaction. """ + class Meta(object): + app_label = "shoppingcart" + company_name = models.CharField(max_length=255, db_index=True) company_contact_name = models.CharField(max_length=255) company_contact_email = models.CharField(max_length=255) @@ -972,6 +981,9 @@ class InvoiceTransaction(TimeStampedModel): the refund. """ + class Meta(object): + app_label = "shoppingcart" + invoice = models.ForeignKey(Invoice) amount = models.DecimalField( default=0.0, decimal_places=2, max_digits=30, @@ -1021,7 +1033,10 @@ def get_total_amount_of_paid_course_invoices(cls, course_key): returns the total amount of the paid invoices. """ result = cls.objects.filter(amount__gt=0, invoice__course_id=course_key, status='completed').aggregate( - total=Sum('amount') + total=Sum( + 'amount', + output_field=models.DecimalField(decimal_places=2, max_digits=30) + ) ) total = result.get('total', 0) @@ -1056,6 +1071,9 @@ class InvoiceItem(TimeStampedModel): codes for the DemoX course. """ + class Meta(object): + app_label = "shoppingcart" + objects = InheritanceManager() invoice = models.ForeignKey(Invoice, db_index=True) qty = models.IntegerField( @@ -1096,6 +1114,9 @@ class CourseRegistrationCodeInvoiceItem(InvoiceItem): a course registration. """ + class Meta(object): + app_label = "shoppingcart" + course_id = CourseKeyField(max_length=128, db_index=True) def snapshot(self): @@ -1166,6 +1187,7 @@ def snapshot_receiver(sender, instance, **kwargs): # pylint: disable=unused-arg class Meta(object): get_latest_by = "timestamp" + app_label = "shoppingcart" # Hook up Django signals to record changes in the history table. @@ -1187,6 +1209,9 @@ class CourseRegistrationCode(models.Model): This table contains registration codes With registration code, a user can register for a course for free """ + class Meta(object): + app_label = "shoppingcart" + code = models.CharField(max_length=32, db_index=True, unique=True) course_id = CourseKeyField(max_length=255, db_index=True) created_by = models.ForeignKey(User, related_name='created_by_user') @@ -1222,6 +1247,9 @@ class RegistrationCodeRedemption(models.Model): """ This model contains the registration-code redemption info """ + class Meta(object): + app_label = "shoppingcart" + order = models.ForeignKey(Order, db_index=True, null=True) registration_code = models.ForeignKey(CourseRegistrationCode, db_index=True) redeemed_by = models.ForeignKey(User, db_index=True) @@ -1276,18 +1304,18 @@ def create_invoice_generated_registration_redemption(cls, course_reg_code, user) class SoftDeleteCouponManager(models.Manager): """ Use this manager to get objects that have a is_active=True """ - - def get_active_coupons_query_set(self): + # pylint: disable=super-on-old-class + def get_active_coupons_queryset(self): """ filter the is_active = True Coupons only """ - return super(SoftDeleteCouponManager, self).get_query_set().filter(is_active=True) + return super(SoftDeleteCouponManager, self).get_queryset().filter(is_active=True) - def get_query_set(self): + def get_queryset(self): """ get all the coupon objects """ - return super(SoftDeleteCouponManager, self).get_query_set() + return super(SoftDeleteCouponManager, self).get_queryset() class Coupon(models.Model): @@ -1295,6 +1323,9 @@ class Coupon(models.Model): This table contains coupon codes A user can get a discount offer on course if provide coupon code """ + class Meta(object): + app_label = "shoppingcart" + code = models.CharField(max_length=32, db_index=True) description = models.CharField(max_length=255, null=True, blank=True) course_id = CourseKeyField(max_length=255) @@ -1321,6 +1352,9 @@ class CouponRedemption(models.Model): """ This table contain coupon redemption info """ + class Meta(object): + app_label = "shoppingcart" + order = models.ForeignKey(Order, db_index=True) user = models.ForeignKey(User, db_index=True) coupon = models.ForeignKey(Coupon, db_index=True) @@ -1434,6 +1468,9 @@ class PaidCourseRegistration(OrderItem): """ This is an inventory item for paying for a course registration """ + class Meta(object): + app_label = "shoppingcart" + course_id = CourseKeyField(max_length=128, db_index=True) mode = models.SlugField(default=CourseMode.DEFAULT_MODE_SLUG) course_enrollment = models.ForeignKey(CourseEnrollment, null=True) @@ -1475,7 +1512,10 @@ def get_total_amount_of_purchased_item(cls, course_key, status='purchased'): """ total_cost = 0 result = cls.objects.filter(course_id=course_key, status=status).aggregate( - total=Sum('unit_cost', field='qty * unit_cost') + total=Sum( + F('qty') * F('unit_cost'), + output_field=models.DecimalField(decimal_places=2, max_digits=30) + ) ) if result['total'] is not None: @@ -1484,7 +1524,7 @@ def get_total_amount_of_purchased_item(cls, course_key, status='purchased'): return total_cost @classmethod - @transaction.commit_on_success + @transaction.atomic def add_to_order(cls, order, course_id, mode_slug=CourseMode.DEFAULT_MODE_SLUG, cost=None, currency=None): """ A standardized way to create these objects, with sensible defaults filled in. @@ -1615,6 +1655,9 @@ class CourseRegCodeItem(OrderItem): This is an inventory item for paying for generating course registration codes """ + class Meta(object): + app_label = "shoppingcart" + course_id = CourseKeyField(max_length=128, db_index=True) mode = models.SlugField(default=CourseMode.DEFAULT_MODE_SLUG) @@ -1649,7 +1692,10 @@ def get_total_amount_of_purchased_item(cls, course_key, status='purchased'): """ total_cost = 0 result = cls.objects.filter(course_id=course_key, status=status).aggregate( - total=Sum('unit_cost', field='qty * unit_cost') + total=Sum( + F('qty') * F('unit_cost'), + output_field=models.DecimalField(decimal_places=2, max_digits=30) + ) ) if result['total'] is not None: @@ -1658,7 +1704,7 @@ def get_total_amount_of_purchased_item(cls, course_key, status='purchased'): return total_cost @classmethod - @transaction.commit_on_success + @transaction.atomic def add_to_order(cls, order, course_id, qty, mode_slug=CourseMode.DEFAULT_MODE_SLUG, cost=None, currency=None): # pylint: disable=arguments-differ """ A standardized way to create these objects, with sensible defaults filled in. @@ -1775,6 +1821,9 @@ class CourseRegCodeItemAnnotation(models.Model): And unfortunately we didn't have the concept of a "SKU" or stock item where we could keep this association, so this is to retrofit it. """ + class Meta(object): + app_label = "shoppingcart" + course_id = CourseKeyField(unique=True, max_length=128, db_index=True) annotation = models.TextField(null=True) @@ -1790,6 +1839,9 @@ class PaidCourseRegistrationAnnotation(models.Model): And unfortunately we didn't have the concept of a "SKU" or stock item where we could keep this association, so this is to retrofit it. """ + class Meta(object): + app_label = "shoppingcart" + course_id = CourseKeyField(unique=True, max_length=128, db_index=True) annotation = models.TextField(null=True) @@ -1802,6 +1854,9 @@ class CertificateItem(OrderItem): """ This is an inventory item for purchasing certificates """ + class Meta(object): + app_label = "shoppingcart" + course_id = CourseKeyField(max_length=128, db_index=True) course_enrollment = models.ForeignKey(CourseEnrollment) mode = models.SlugField() @@ -1860,7 +1915,7 @@ def refund_cert_callback(sender, course_enrollment=None, skip_refund=False, **kw return target_cert @classmethod - @transaction.commit_on_success + @transaction.atomic def add_to_order(cls, order, course_id, cost, mode, currency='usd'): """ Add a CertificateItem to an order @@ -2010,7 +2065,8 @@ def analytics_data(self): class DonationConfiguration(ConfigurationModel): """Configure whether donations are enabled on the site.""" - pass + class Meta(ConfigurationModel.Meta): + app_label = "shoppingcart" class Donation(OrderItem): @@ -2020,6 +2076,9 @@ class Donation(OrderItem): Users can choose the donation amount. """ + class Meta(object): + app_label = "shoppingcart" + # Types of donations DONATION_TYPES = ( ("general", "A general donation"), @@ -2035,7 +2094,7 @@ class Donation(OrderItem): course_id = CourseKeyField(max_length=255, db_index=True) @classmethod - @transaction.commit_on_success + @transaction.atomic def add_to_order(cls, order, donation_amount, course_id=None, currency='usd'): """Add a donation to an order. diff --git a/lms/djangoapps/shoppingcart/tests/test_microsites.py b/lms/djangoapps/shoppingcart/tests/test_microsites.py index b3a4801021e0..b0dd3110c133 100644 --- a/lms/djangoapps/shoppingcart/tests/test_microsites.py +++ b/lms/djangoapps/shoppingcart/tests/test_microsites.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ Tests for Microsite Dashboard with Shopping Cart History """ @@ -134,11 +135,13 @@ def test_when_in_microsite_shows_orders_with_microsite_courses_only(self): receipt_url_cert_non_microsite = reverse('shoppingcart.views.show_receipt', kwargs={'ordernum': self.orderid_cert_non_microsite}) receipt_url_donation = reverse('shoppingcart.views.show_receipt', kwargs={'ordernum': self.orderid_donation}) - self.assertIn(receipt_url_microsite_course, response.content) - self.assertNotIn(receipt_url_microsite_course2, response.content) - self.assertNotIn(receipt_url_non_microsite, response.content) - self.assertNotIn(receipt_url_cert_non_microsite, response.content) - self.assertNotIn(receipt_url_donation, response.content) + # We need to decode because of these chars: © & ▸ + content = response.content.decode('utf-8') + self.assertIn(receipt_url_microsite_course, content) + self.assertNotIn(receipt_url_microsite_course2, content) + self.assertNotIn(receipt_url_non_microsite, content) + self.assertNotIn(receipt_url_cert_non_microsite, content) + self.assertNotIn(receipt_url_donation, content) @mock.patch("microsite_configuration.microsite.get_value", non_microsite) @mock.patch("microsite_configuration.microsite.get_all_orgs", fake_all_orgs) @@ -152,9 +155,11 @@ def test_when_not_in_microsite_shows_orders_with_non_microsite_courses_only(self receipt_url_donation = reverse('shoppingcart.views.show_receipt', kwargs={'ordernum': self.orderid_donation}) receipt_url_courseless_donation = reverse('shoppingcart.views.show_receipt', kwargs={'ordernum': self.orderid_courseless_donation}) - self.assertNotIn(receipt_url_microsite_course, response.content) - self.assertNotIn(receipt_url_microsite_course2, response.content) - self.assertIn(receipt_url_non_microsite, response.content) - self.assertIn(receipt_url_cert_non_microsite, response.content) - self.assertIn(receipt_url_donation, response.content) - self.assertIn(receipt_url_courseless_donation, response.content) + # We need to decode because of these chars: © & ▸ + content = response.content.decode('utf-8') + self.assertNotIn(receipt_url_microsite_course, content) + self.assertNotIn(receipt_url_microsite_course2, content) + self.assertIn(receipt_url_non_microsite, content) + self.assertIn(receipt_url_cert_non_microsite, content) + self.assertIn(receipt_url_donation, content) + self.assertIn(receipt_url_courseless_donation, content) diff --git a/lms/djangoapps/shoppingcart/tests/test_models.py b/lms/djangoapps/shoppingcart/tests/test_models.py index b2441a31cb73..b7da4f59ebbf 100644 --- a/lms/djangoapps/shoppingcart/tests/test_models.py +++ b/lms/djangoapps/shoppingcart/tests/test_models.py @@ -253,13 +253,13 @@ def test_purchase(self): { 'orderId': 1, 'currency': 'usd', - 'total': '40', + 'total': '40.00', 'products': [ { 'sku': u'CertificateItem.honor', 'name': unicode(self.course_key), 'category': unicode(self.course_key.org), - 'price': '40', + 'price': '40.00', 'id': 1, 'quantity': 1 } @@ -848,13 +848,13 @@ def _assert_refund_tracked(self): { 'orderId': 1, 'currency': 'usd', - 'total': '40', + 'total': '40.00', 'products': [ { 'sku': u'CertificateItem.verified', 'name': unicode(self.course_key), 'category': unicode(self.course_key.org), - 'price': '40', + 'price': '40.00', 'id': 1, 'quantity': 1 } diff --git a/lms/djangoapps/shoppingcart/tests/test_reports.py b/lms/djangoapps/shoppingcart/tests/test_reports.py index 388f701cb391..a2304ccefffb 100644 --- a/lms/djangoapps/shoppingcart/tests/test_reports.py +++ b/lms/djangoapps/shoppingcart/tests/test_reports.py @@ -84,7 +84,7 @@ def setUp(self): self.cart = Order.get_cart_for_user(self.second_refund_user) CertificateItem.add_to_order(self.cart, self.course_key, self.cost, 'verified') - self.cart.purchase(self.second_refund_user, self.course_key) + self.cart.purchase(self.second_refund_user.username, self.course_key) CourseEnrollment.unenroll(self.second_refund_user, self.course_key) self.test_time = datetime.datetime.now(pytz.UTC) @@ -101,8 +101,8 @@ def setUp(self): self.CORRECT_REFUND_REPORT_CSV = dedent(""" Order Number,Customer Name,Date of Original Transaction,Date of Refund,Amount of Refund,Service Fees (if any) - 3,King Bowsér,{time_str},{time_str},40,0 - 4,Súsan Smith,{time_str},{time_str},40,0 + 3,King Bowsér,{time_str},{time_str},40.00,0.00 + 4,Súsan Smith,{time_str},{time_str},40.00,0.00 """.format(time_str=str(self.test_time))) self.CORRECT_CERT_STATUS_CSV = dedent(""" @@ -201,8 +201,8 @@ def setUp(self): self.CORRECT_CSV = dedent(""" Purchase Time,Order ID,Status,Quantity,Unit Cost,Total Cost,Currency,Description,Comments - {time_str},1,purchased,1,40,40,usd,Registration for Course: Robot Super Course,Ba\xc3\xbc\xe5\x8c\x85 - {time_str},1,purchased,1,40,40,usd,verified cert for course Robot Super Course, + {time_str},1,purchased,1,40.00,40.00,usd,Registration for Course: Robot Super Course,Ba\xc3\xbc\xe5\x8c\x85 + {time_str},1,purchased,1,40.00,40.00,usd,verified cert for course Robot Super Course, """.format(time_str=str(self.now))) def test_purchased_items_btw_dates(self): diff --git a/lms/djangoapps/shoppingcart/tests/test_views.py b/lms/djangoapps/shoppingcart/tests/test_views.py index 76b0b04e7b5b..d914e65c2762 100644 --- a/lms/djangoapps/shoppingcart/tests/test_views.py +++ b/lms/djangoapps/shoppingcart/tests/test_views.py @@ -2035,8 +2035,6 @@ def test_report_csv_bad_date(self): self.assertIn("There was an error in your date input. It should be formatted as YYYY-MM-DD", response.content.decode('UTF-8')) - CORRECT_CSV_NO_DATE_ITEMIZED_PURCHASE = ",1,purchased,1,40,40,usd,Registration for Course: Robot Super Course," - def test_report_csv_itemized(self): report_type = 'itemized_purchase_report' start_date = '1970-01-01' @@ -2051,7 +2049,10 @@ def test_report_csv_itemized(self): self.assertEqual(response['Content-Type'], 'text/csv') report = initialize_report(report_type, start_date, end_date) self.assertIn(",".join(report.header()), response.content) - self.assertIn(self.CORRECT_CSV_NO_DATE_ITEMIZED_PURCHASE, response.content) + self.assertIn( + ",1,purchased,1,40.00,40.00,usd,Registration for Course: Robot Super Course,", + response.content + ) def test_report_csv_university_revenue_share(self): report_type = 'university_revenue_share' diff --git a/lms/djangoapps/shoppingcart/views.py b/lms/djangoapps/shoppingcart/views.py index 937969c9252c..4c87b4df44fd 100644 --- a/lms/djangoapps/shoppingcart/views.py +++ b/lms/djangoapps/shoppingcart/views.py @@ -989,7 +989,7 @@ def csv_report(request): report = initialize_report(report_type, start_date, end_date, start_letter, end_letter) items = report.rows() - response = HttpResponse(mimetype='text/csv') + response = HttpResponse(content_type='text/csv') filename = "purchases_report_{}.csv".format(datetime.datetime.now(pytz.UTC).strftime("%Y-%m-%d-%H-%M-%S")) response['Content-Disposition'] = 'attachment; filename="{}"'.format(filename) report.write_csv(response) diff --git a/lms/djangoapps/student_account/test/test_views.py b/lms/djangoapps/student_account/test/test_views.py index bc73f8d33867..f67b71b3ab50 100644 --- a/lms/djangoapps/student_account/test/test_views.py +++ b/lms/djangoapps/student_account/test/test_views.py @@ -15,7 +15,7 @@ from django.contrib.messages.middleware import MessageMiddleware from django.test import TestCase from django.test.utils import override_settings -from django.test.client import RequestFactory +from django.http import HttpRequest from openedx.core.djangoapps.user_api.accounts.api import activate_account, create_account from openedx.core.djangoapps.user_api.accounts import EMAIL_MAX_LENGTH @@ -434,7 +434,7 @@ def setUp(self): self.user = UserFactory.create(username=self.USERNAME, password=self.PASSWORD) self.client.login(username=self.USERNAME, password=self.PASSWORD) - self.request = RequestFactory() + self.request = HttpRequest() self.request.user = self.user # For these tests, two third party auth providers are enabled by default: diff --git a/lms/djangoapps/support/tests/test_refund.py b/lms/djangoapps/support/tests/test_refund.py index 4e7f4a6c8269..62df658eeb53 100644 --- a/lms/djangoapps/support/tests/test_refund.py +++ b/lms/djangoapps/support/tests/test_refund.py @@ -115,6 +115,6 @@ def test_do_refund(self): response = self.client.get(response.get('location')) # pylint: disable=maybe-no-member self.assertContains(response, "Unenrolled %s from" % self.student) - self.assertContains(response, "Refunded 1 for order id") + self.assertContains(response, "Refunded 1.00 for order id") self.assertFalse(CourseEnrollment.is_enrolled(self.student, self.course_id)) diff --git a/lms/djangoapps/survey/migrations/0001_initial.py b/lms/djangoapps/survey/migrations/0001_initial.py index c2cb7f23075e..895abfd5d05b 100644 --- a/lms/djangoapps/survey/migrations/0001_initial.py +++ b/lms/djangoapps/survey/migrations/0001_initial.py @@ -1,97 +1,55 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'SurveyForm' - db.create_table('survey_surveyform', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255, db_index=True)), - ('form', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('survey', ['SurveyForm']) - - # Adding model 'SurveyAnswer' - db.create_table('survey_surveyanswer', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('form', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['survey.SurveyForm'])), - ('field_name', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('field_value', self.gf('django.db.models.fields.CharField')(max_length=1024)), - )) - db.send_create_signal('survey', ['SurveyAnswer']) - - def backwards(self, orm): - # Deleting model 'SurveyForm' - db.delete_table('survey_surveyform') - - # Deleting model 'SurveyAnswer' - db.delete_table('survey_surveyanswer') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'survey.surveyanswer': { - 'Meta': {'object_name': 'SurveyAnswer'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'field_value': ('django.db.models.fields.CharField', [], {'max_length': '1024'}), - 'form': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['survey.SurveyForm']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'survey.surveyform': { - 'Meta': {'object_name': 'SurveyForm'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'form': ('django.db.models.fields.TextField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['survey'] +from __future__ import unicode_literals + +from django.db import migrations, models +import django.utils.timezone +from django.conf import settings +import model_utils.fields +import xmodule_django.models + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='SurveyAnswer', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('field_name', models.CharField(max_length=255, db_index=True)), + ('field_value', models.CharField(max_length=1024)), + ('course_key', xmodule_django.models.CourseKeyField(max_length=255, null=True, db_index=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='SurveyForm', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('name', models.CharField(unique=True, max_length=255, db_index=True)), + ('form', models.TextField()), + ], + options={ + 'abstract': False, + }, + ), + migrations.AddField( + model_name='surveyanswer', + name='form', + field=models.ForeignKey(to='survey.SurveyForm'), + ), + migrations.AddField( + model_name='surveyanswer', + name='user', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/lms/djangoapps/survey/migrations/0002_auto__add_field_surveyanswer_course_key.py b/lms/djangoapps/survey/migrations/0002_auto__add_field_surveyanswer_course_key.py deleted file mode 100644 index 28ad94775e44..000000000000 --- a/lms/djangoapps/survey/migrations/0002_auto__add_field_surveyanswer_course_key.py +++ /dev/null @@ -1,80 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'SurveyAnswer.course_key' - db.add_column('survey_surveyanswer', 'course_key', - self.gf('xmodule_django.models.CourseKeyField')(max_length=255, null=True, db_index=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'SurveyAnswer.course_key' - db.delete_column('survey_surveyanswer', 'course_key') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'survey.surveyanswer': { - 'Meta': {'object_name': 'SurveyAnswer'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'null': 'True', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'field_value': ('django.db.models.fields.CharField', [], {'max_length': '1024'}), - 'form': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['survey.SurveyForm']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'survey.surveyform': { - 'Meta': {'object_name': 'SurveyForm'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'form': ('django.db.models.fields.TextField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['survey'] \ No newline at end of file diff --git a/lms/djangoapps/teams/management/commands/reindex_course_team.py b/lms/djangoapps/teams/management/commands/reindex_course_team.py index 901789180f2a..8061ee466f41 100644 --- a/lms/djangoapps/teams/management/commands/reindex_course_team.py +++ b/lms/djangoapps/teams/management/commands/reindex_course_team.py @@ -5,7 +5,7 @@ from optparse import make_option from textwrap import dedent -from teams.models import CourseTeam +from lms.djangoapps.teams.models import CourseTeam class Command(BaseCommand): @@ -49,7 +49,7 @@ def handle(self, *args, **options): """ # This is ugly, but there is a really strange circular dependency that doesn't # happen anywhere else that I can't figure out how to avoid it :( - from teams.search_indexes import CourseTeamIndexer + from ...search_indexes import CourseTeamIndexer if len(args) == 0 and not options.get('all', False): raise CommandError(u"reindex_course_team requires one or more arguments: ") diff --git a/lms/djangoapps/teams/management/commands/tests/test_reindex_course_team.py b/lms/djangoapps/teams/management/commands/tests/test_reindex_course_team.py index 63b7593bcd34..49c5f9643050 100644 --- a/lms/djangoapps/teams/management/commands/tests/test_reindex_course_team.py +++ b/lms/djangoapps/teams/management/commands/tests/test_reindex_course_team.py @@ -5,10 +5,9 @@ from mock import patch from django.core.management import call_command, CommandError from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase -from common.test.utils import nostderr from opaque_keys.edx.keys import CourseKey -from teams.tests.factories import CourseTeamFactory -from teams.search_indexes import CourseTeamIndexer +from ....tests.factories import CourseTeamFactory +from ....search_indexes import CourseTeamIndexer from search.search_engine_base import SearchEngine COURSE_KEY1 = CourseKey.from_string('edx/history/1') @@ -32,23 +31,21 @@ def setUp(self): def test_given_no_arguments_raises_command_error(self): """ Test that raises CommandError for incorrect arguments. """ - with self.assertRaises(SystemExit), nostderr(): - with self.assertRaisesRegexp(CommandError, ".* requires one or more arguments .*"): - call_command('reindex_course_team') + with self.assertRaisesRegexp(CommandError, ".* requires one or more arguments.*"): + call_command('reindex_course_team') + @patch.dict('django.conf.settings.FEATURES', {'ENABLE_TEAMS': False}) def test_teams_search_flag_disabled_raises_command_error(self): """ Test that raises CommandError for disabled feature flag. """ - with mock.patch('django.conf.settings.FEATURES') as features: - features.return_value = {"ENABLE_TEAMS": False} - with self.assertRaises(SystemExit), nostderr(): - with self.assertRaisesRegexp(CommandError, ".* ENABLE_TEAMS must be enabled .*"): - call_command('reindex_course_team') + with self.assertRaisesRegexp(CommandError, ".*ENABLE_TEAMS must be enabled.*"): + call_command('reindex_course_team', self.team1.team_id) def test_given_invalid_team_id_raises_command_error(self): """ Test that raises CommandError for invalid team id. """ - with self.assertRaises(SystemExit), nostderr(): - with self.assertRaisesRegexp(CommandError, ".* Argument {0} is not a course_team id .*"): - call_command('reindex_course_team', u'team4') + team_id = u'team4' + error_str = 'Argument {0} is not a course_team team_id'.format(team_id) + with self.assertRaisesRegexp(CommandError, error_str): + call_command('reindex_course_team', team_id) @patch.object(CourseTeamIndexer, 'index') def test_single_team_id(self, mock_index): diff --git a/lms/djangoapps/teams/migrations/0001_initial.py b/lms/djangoapps/teams/migrations/0001_initial.py index 4e73904d2a6c..dc6011955b9f 100644 --- a/lms/djangoapps/teams/migrations/0001_initial.py +++ b/lms/djangoapps/teams/migrations/0001_initial.py @@ -1,110 +1,54 @@ # -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseTeam' - db.create_table('teams_courseteam', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('team_id', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('is_active', self.gf('django.db.models.fields.BooleanField')(default=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('topic_id', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=255, blank=True)), - ('date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('description', self.gf('django.db.models.fields.CharField')(max_length=300)), - ('country', self.gf('django_countries.fields.CountryField')(max_length=2, blank=True)), - ('language', self.gf('student.models.LanguageField')(max_length=16, blank=True)), - )) - db.send_create_signal('teams', ['CourseTeam']) - - # Adding model 'CourseTeamMembership' - db.create_table('teams_courseteammembership', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('team', self.gf('django.db.models.fields.related.ForeignKey')(related_name='membership', to=orm['teams.CourseTeam'])), - ('date_joined', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - )) - db.send_create_signal('teams', ['CourseTeamMembership']) - - # Adding unique constraint on 'CourseTeamMembership', fields ['user', 'team'] - db.create_unique('teams_courseteammembership', ['user_id', 'team_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'CourseTeamMembership', fields ['user', 'team'] - db.delete_unique('teams_courseteammembership', ['user_id', 'team_id']) - - # Deleting model 'CourseTeam' - db.delete_table('teams_courseteam') - - # Deleting model 'CourseTeamMembership' - db.delete_table('teams_courseteammembership') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'teams.courseteam': { - 'Meta': {'object_name': 'CourseTeam'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '300'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'language': ('student.models.LanguageField', [], {'max_length': '16', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'team_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'topic_id': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'db_index': 'True', 'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.CourseTeamMembership']", 'to': "orm['auth.User']"}) - }, - 'teams.courseteammembership': { - 'Meta': {'unique_together': "(('user', 'team'),)", 'object_name': 'CourseTeamMembership'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'membership'", 'to': "orm['teams.CourseTeam']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['teams'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import migrations, models +import django_countries.fields +from django.conf import settings +import student.models +import xmodule_django.models + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='CourseTeam', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('team_id', models.CharField(unique=True, max_length=255)), + ('discussion_topic_id', models.CharField(unique=True, max_length=255)), + ('name', models.CharField(max_length=255, db_index=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('topic_id', models.CharField(db_index=True, max_length=255, blank=True)), + ('date_created', models.DateTimeField(auto_now_add=True)), + ('description', models.CharField(max_length=300)), + ('country', django_countries.fields.CountryField(blank=True, max_length=2)), + ('language', student.models.LanguageField(blank=True, help_text='Optional language the team uses as ISO 639-1 code.', max_length=16, choices=[['aa', 'Afar'], ['ab', 'Abkhazian'], ['af', 'Afrikaans'], ['ak', 'Akan'], ['sq', 'Albanian'], ['am', 'Amharic'], ['ar', 'Arabic'], ['an', 'Aragonese'], ['hy', 'Armenian'], ['as', 'Assamese'], ['av', 'Avaric'], ['ae', 'Avestan'], ['ay', 'Aymara'], ['az', 'Azerbaijani'], ['ba', 'Bashkir'], ['bm', 'Bambara'], ['eu', 'Basque'], ['be', 'Belarusian'], ['bn', 'Bengali'], ['bh', 'Bihari languages'], ['bi', 'Bislama'], ['bs', 'Bosnian'], ['br', 'Breton'], ['bg', 'Bulgarian'], ['my', 'Burmese'], ['ca', 'Catalan'], ['ch', 'Chamorro'], ['ce', 'Chechen'], ['zh', 'Chinese'], ['zh_HANS', 'Simplified Chinese'], ['zh_HANT', 'Traditional Chinese'], ['cu', 'Church Slavic'], ['cv', 'Chuvash'], ['kw', 'Cornish'], ['co', 'Corsican'], ['cr', 'Cree'], ['cs', 'Czech'], ['da', 'Danish'], ['dv', 'Divehi'], ['nl', 'Dutch'], ['dz', 'Dzongkha'], ['en', 'English'], ['eo', 'Esperanto'], ['et', 'Estonian'], ['ee', 'Ewe'], ['fo', 'Faroese'], ['fj', 'Fijian'], ['fi', 'Finnish'], ['fr', 'French'], ['fy', 'Western Frisian'], ['ff', 'Fulah'], ['ka', 'Georgian'], ['de', 'German'], ['gd', 'Gaelic'], ['ga', 'Irish'], ['gl', 'Galician'], ['gv', 'Manx'], ['el', 'Greek'], ['gn', 'Guarani'], ['gu', 'Gujarati'], ['ht', 'Haitian'], ['ha', 'Hausa'], ['he', 'Hebrew'], ['hz', 'Herero'], ['hi', 'Hindi'], ['ho', 'Hiri Motu'], ['hr', 'Croatian'], ['hu', 'Hungarian'], ['ig', 'Igbo'], ['is', 'Icelandic'], ['io', 'Ido'], ['ii', 'Sichuan Yi'], ['iu', 'Inuktitut'], ['ie', 'Interlingue'], ['ia', 'Interlingua'], ['id', 'Indonesian'], ['ik', 'Inupiaq'], ['it', 'Italian'], ['jv', 'Javanese'], ['ja', 'Japanese'], ['kl', 'Kalaallisut'], ['kn', 'Kannada'], ['ks', 'Kashmiri'], ['kr', 'Kanuri'], ['kk', 'Kazakh'], ['km', 'Central Khmer'], ['ki', 'Kikuyu'], ['rw', 'Kinyarwanda'], ['ky', 'Kirghiz'], ['kv', 'Komi'], ['kg', 'Kongo'], ['ko', 'Korean'], ['kj', 'Kuanyama'], ['ku', 'Kurdish'], ['lo', 'Lao'], ['la', 'Latin'], ['lv', 'Latvian'], ['li', 'Limburgan'], ['ln', 'Lingala'], ['lt', 'Lithuanian'], ['lb', 'Luxembourgish'], ['lu', 'Luba-Katanga'], ['lg', 'Ganda'], ['mk', 'Macedonian'], ['mh', 'Marshallese'], ['ml', 'Malayalam'], ['mi', 'Maori'], ['mr', 'Marathi'], ['ms', 'Malay'], ['mg', 'Malagasy'], ['mt', 'Maltese'], ['mn', 'Mongolian'], ['na', 'Nauru'], ['nv', 'Navajo'], ['nr', 'Ndebele, South'], ['nd', 'Ndebele, North'], ['ng', 'Ndonga'], ['ne', 'Nepali'], ['nn', 'Norwegian Nynorsk'], ['nb', 'Bokm\xe5l, Norwegian'], ['no', 'Norwegian'], ['ny', 'Chichewa'], ['oc', 'Occitan'], ['oj', 'Ojibwa'], ['or', 'Oriya'], ['om', 'Oromo'], ['os', 'Ossetian'], ['pa', 'Panjabi'], ['fa', 'Persian'], ['pi', 'Pali'], ['pl', 'Polish'], ['pt', 'Portuguese'], ['ps', 'Pushto'], ['qu', 'Quechua'], ['rm', 'Romansh'], ['ro', 'Romanian'], ['rn', 'Rundi'], ['ru', 'Russian'], ['sg', 'Sango'], ['sa', 'Sanskrit'], ['si', 'Sinhala'], ['sk', 'Slovak'], ['sl', 'Slovenian'], ['se', 'Northern Sami'], ['sm', 'Samoan'], ['sn', 'Shona'], ['sd', 'Sindhi'], ['so', 'Somali'], ['st', 'Sotho, Southern'], ['es', 'Spanish'], ['sc', 'Sardinian'], ['sr', 'Serbian'], ['ss', 'Swati'], ['su', 'Sundanese'], ['sw', 'Swahili'], ['sv', 'Swedish'], ['ty', 'Tahitian'], ['ta', 'Tamil'], ['tt', 'Tatar'], ['te', 'Telugu'], ['tg', 'Tajik'], ['tl', 'Tagalog'], ['th', 'Thai'], ['bo', 'Tibetan'], ['ti', 'Tigrinya'], ['to', 'Tonga (Tonga Islands)'], ['tn', 'Tswana'], ['ts', 'Tsonga'], ['tk', 'Turkmen'], ['tr', 'Turkish'], ['tw', 'Twi'], ['ug', 'Uighur'], ['uk', 'Ukrainian'], ['ur', 'Urdu'], ['uz', 'Uzbek'], ['ve', 'Venda'], ['vi', 'Vietnamese'], ['vo', 'Volap\xfck'], ['cy', 'Welsh'], ['wa', 'Walloon'], ['wo', 'Wolof'], ['xh', 'Xhosa'], ['yi', 'Yiddish'], ['yo', 'Yoruba'], ['za', 'Zhuang'], ['zu', 'Zulu']])), + ('last_activity_at', models.DateTimeField(db_index=True)), + ('team_size', models.IntegerField(default=0, db_index=True)), + ], + ), + migrations.CreateModel( + name='CourseTeamMembership', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('date_joined', models.DateTimeField(auto_now_add=True)), + ('last_activity_at', models.DateTimeField()), + ('team', models.ForeignKey(related_name='membership', to='teams.CourseTeam')), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.AddField( + model_name='courseteam', + name='users', + field=models.ManyToManyField(related_name='teams', through='teams.CourseTeamMembership', to=settings.AUTH_USER_MODEL, db_index=True), + ), + migrations.AlterUniqueTogether( + name='courseteammembership', + unique_together=set([('user', 'team')]), + ), + ] diff --git a/lms/djangoapps/teams/migrations/0002_auto__add_field_courseteam_discussion_id.py b/lms/djangoapps/teams/migrations/0002_auto__add_field_courseteam_discussion_id.py deleted file mode 100644 index f21feaba4f3f..000000000000 --- a/lms/djangoapps/teams/migrations/0002_auto__add_field_courseteam_discussion_id.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseTeam.discussion_topic_id' - db.add_column('teams_courseteam', 'discussion_topic_id', - self.gf('django.db.models.fields.CharField')(default='', unique=True, max_length=255), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CourseTeam.discussion_topic_id' - db.delete_column('teams_courseteam', 'discussion_topic_id') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'teams.courseteam': { - 'Meta': {'object_name': 'CourseTeam'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '300'}), - 'discussion_topic_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'language': ('student.models.LanguageField', [], {'max_length': '16', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'team_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'topic_id': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'db_index': 'True', 'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.CourseTeamMembership']", 'to': "orm['auth.User']"}) - }, - 'teams.courseteammembership': { - 'Meta': {'unique_together': "(('user', 'team'),)", 'object_name': 'CourseTeamMembership'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'membership'", 'to': "orm['teams.CourseTeam']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['teams'] \ No newline at end of file diff --git a/lms/djangoapps/teams/migrations/0003_auto__add_index_courseteam_name.py b/lms/djangoapps/teams/migrations/0003_auto__add_index_courseteam_name.py deleted file mode 100644 index 9fe0ec43b0b1..000000000000 --- a/lms/djangoapps/teams/migrations/0003_auto__add_index_courseteam_name.py +++ /dev/null @@ -1,80 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding index on 'CourseTeam', fields ['name'] - db.create_index('teams_courseteam', ['name']) - - - def backwards(self, orm): - # Removing index on 'CourseTeam', fields ['name'] - db.delete_index('teams_courseteam', ['name']) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'teams.courseteam': { - 'Meta': {'object_name': 'CourseTeam'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '300'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'language': ('student.models.LanguageField', [], {'max_length': '16', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'team_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'topic_id': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'db_index': 'True', 'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.CourseTeamMembership']", 'to': "orm['auth.User']"}) - }, - 'teams.courseteammembership': { - 'Meta': {'unique_together': "(('user', 'team'),)", 'object_name': 'CourseTeamMembership'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'membership'", 'to': "orm['teams.CourseTeam']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['teams'] \ No newline at end of file diff --git a/lms/djangoapps/teams/migrations/0004_auto__add_field_courseteam_discussion_topic_id__add_field_courseteam_l.py b/lms/djangoapps/teams/migrations/0004_auto__add_field_courseteam_discussion_topic_id__add_field_courseteam_l.py deleted file mode 100644 index 024c06d6e614..000000000000 --- a/lms/djangoapps/teams/migrations/0004_auto__add_field_courseteam_discussion_topic_id__add_field_courseteam_l.py +++ /dev/null @@ -1,94 +0,0 @@ -# -*- coding: utf-8 -*- -import pytz -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseTeam.last_activity_at' - db.add_column('teams_courseteam', 'last_activity_at', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2015, 8, 17, 0, 0).replace(tzinfo=pytz.utc)), - keep_default=False) - - # Adding field 'CourseTeamMembership.last_activity_at' - db.add_column('teams_courseteammembership', 'last_activity_at', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2015, 8, 17, 0, 0).replace(tzinfo=pytz.utc)), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CourseTeam.last_activity_at' - db.delete_column('teams_courseteam', 'last_activity_at') - - # Deleting field 'CourseTeamMembership.last_activity_at' - db.delete_column('teams_courseteammembership', 'last_activity_at') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'teams.courseteam': { - 'Meta': {'object_name': 'CourseTeam'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '300'}), - 'discussion_topic_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'language': ('student.models.LanguageField', [], {'max_length': '16', 'blank': 'True'}), - 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'team_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'topic_id': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'db_index': 'True', 'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.CourseTeamMembership']", 'to': "orm['auth.User']"}) - }, - 'teams.courseteammembership': { - 'Meta': {'unique_together': "(('user', 'team'),)", 'object_name': 'CourseTeamMembership'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {}), - 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'membership'", 'to': "orm['teams.CourseTeam']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['teams'] diff --git a/lms/djangoapps/teams/migrations/0005_add_course_id_and_topic_id_composite_index.py b/lms/djangoapps/teams/migrations/0005_add_course_id_and_topic_id_composite_index.py deleted file mode 100644 index eedd170ccec7..000000000000 --- a/lms/djangoapps/teams/migrations/0005_add_course_id_and_topic_id_composite_index.py +++ /dev/null @@ -1,82 +0,0 @@ -# -*- coding: utf-8 -*- -import pytz -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Create a composite index of course_id and topic_id. - db.create_index('teams_courseteam', ['course_id', 'topic_id']) - - def backwards(self, orm): - # Delete the composite index of course_id and topic_id. - db.delete_index('teams_courseteam', ['course_id', 'topic_id']) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'teams.courseteam': { - 'Meta': {'object_name': 'CourseTeam'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '300'}), - 'discussion_topic_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'language': ('student.models.LanguageField', [], {'max_length': '16', 'blank': 'True'}), - 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'team_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'topic_id': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'db_index': 'True', 'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.CourseTeamMembership']", 'to': "orm['auth.User']"}) - }, - 'teams.courseteammembership': { - 'Meta': {'unique_together': "(('user', 'team'),)", 'object_name': 'CourseTeamMembership'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {}), - 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'membership'", 'to': "orm['teams.CourseTeam']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['teams'] diff --git a/lms/djangoapps/teams/migrations/0006_add_team_size.py b/lms/djangoapps/teams/migrations/0006_add_team_size.py deleted file mode 100644 index a89c03895cb6..000000000000 --- a/lms/djangoapps/teams/migrations/0006_add_team_size.py +++ /dev/null @@ -1,98 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -from teams.models import CourseTeamMembership - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseTeam.team_size' - db.add_column('teams_courseteam', 'team_size', - self.gf('django.db.models.fields.IntegerField')(default=0, db_index=True), - keep_default=False) - - # Adding index on 'CourseTeam', fields ['last_activity_at'] - db.create_index('teams_courseteam', ['last_activity_at']) - - if not db.dry_run: - for team in orm.CourseTeam.objects.all(): - team.team_size = CourseTeamMembership.objects.filter(team=team).count() - team.save() - - def backwards(self, orm): - # Removing index on 'CourseTeam', fields ['last_activity_at'] - db.delete_index('teams_courseteam', ['last_activity_at']) - - # Deleting field 'CourseTeam.team_size' - db.delete_column('teams_courseteam', 'team_size') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'teams.courseteam': { - 'Meta': {'object_name': 'CourseTeam'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '300'}), - 'discussion_topic_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'language': ('student.models.LanguageField', [], {'max_length': '16', 'blank': 'True'}), - 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'team_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'team_size': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}), - 'topic_id': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'db_index': 'True', 'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.CourseTeamMembership']", 'to': "orm['auth.User']"}) - }, - 'teams.courseteammembership': { - 'Meta': {'unique_together': "(('user', 'team'),)", 'object_name': 'CourseTeamMembership'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {}), - 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'membership'", 'to': "orm['teams.CourseTeam']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['teams'] diff --git a/lms/djangoapps/teams/migrations/0007_auto__del_field_courseteam_is_active.py b/lms/djangoapps/teams/migrations/0007_auto__del_field_courseteam_is_active.py deleted file mode 100644 index 1810468dbe9f..000000000000 --- a/lms/djangoapps/teams/migrations/0007_auto__del_field_courseteam_is_active.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'CourseTeam.is_active' - db.delete_column('teams_courseteam', 'is_active') - - - def backwards(self, orm): - # Adding field 'CourseTeam.is_active' - db.add_column('teams_courseteam', 'is_active', - self.gf('django.db.models.fields.BooleanField')(default=True), - keep_default=False) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'teams.courseteam': { - 'Meta': {'object_name': 'CourseTeam'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '300'}), - 'discussion_topic_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('student.models.LanguageField', [], {'max_length': '16', 'blank': 'True'}), - 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'team_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'team_size': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}), - 'topic_id': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'db_index': 'True', 'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.CourseTeamMembership']", 'to': "orm['auth.User']"}) - }, - 'teams.courseteammembership': { - 'Meta': {'unique_together': "(('user', 'team'),)", 'object_name': 'CourseTeamMembership'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {}), - 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'membership'", 'to': "orm['teams.CourseTeam']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['teams'] \ No newline at end of file diff --git a/lms/djangoapps/teams/models.py b/lms/djangoapps/teams/models.py index 33080188487c..832757a976e3 100644 --- a/lms/djangoapps/teams/models.py +++ b/lms/djangoapps/teams/models.py @@ -27,8 +27,8 @@ from util.model_utils import slugify from student.models import LanguageField, CourseEnrollment from .errors import AlreadyOnTeamInCourse, NotEnrolledInCourseForTeam, ImmutableMembershipFieldException -from teams.utils import emit_team_event -from teams import TEAM_DISCUSSION_CONTEXT +from lms.djangoapps.teams.utils import emit_team_event +from lms.djangoapps.teams import TEAM_DISCUSSION_CONTEXT @receiver(thread_voted) @@ -74,6 +74,9 @@ def handle_activity(user, post, original_author_id=None): class CourseTeam(models.Model): """This model represents team related info.""" + class Meta(object): + app_label = "teams" + team_id = models.CharField(max_length=255, unique=True) discussion_topic_id = models.CharField(max_length=255, unique=True) name = models.CharField(max_length=255, db_index=True) @@ -154,6 +157,7 @@ class CourseTeamMembership(models.Model): """This model represents the membership of a single user in a single team.""" class Meta(object): + app_label = "teams" unique_together = (('user', 'team'),) user = models.ForeignKey(User) @@ -173,10 +177,17 @@ def __setattr__(self, name, value): # to set the value. Otherwise, we're trying to overwrite # an immutable field. current_value = getattr(self, name, None) - if current_value is not None: - raise ImmutableMembershipFieldException( - "Field %r shouldn't change from %r to %r" % (name, current_value, value) - ) + if value == current_value: + # This is an attempt to set an immutable value to the same value + # to which it's already set. Don't complain - just ignore the attempt. + return + else: + # This is an attempt to set an immutable value to a different value. + # Allow it *only* if the current value is None. + if current_value is not None: + raise ImmutableMembershipFieldException( + "Field %r shouldn't change from %r to %r" % (name, current_value, value) + ) super(CourseTeamMembership, self).__setattr__(name, value) def save(self, *args, **kwargs): diff --git a/lms/djangoapps/teams/plugins.py b/lms/djangoapps/teams/plugins.py index 439b693a5b24..9a167da5cee9 100644 --- a/lms/djangoapps/teams/plugins.py +++ b/lms/djangoapps/teams/plugins.py @@ -3,7 +3,7 @@ """ from django.utils.translation import ugettext_noop from courseware.tabs import EnrolledTab -from teams import is_feature_enabled +from . import is_feature_enabled class TeamsTab(EnrolledTab): diff --git a/lms/djangoapps/teams/search_indexes.py b/lms/djangoapps/teams/search_indexes.py index 6dfc070e81ca..9fcba08d0ee6 100644 --- a/lms/djangoapps/teams/search_indexes.py +++ b/lms/djangoapps/teams/search_indexes.py @@ -13,7 +13,8 @@ from request_cache import get_request_or_stub from .errors import ElasticSearchConnectionError -from .serializers import CourseTeamSerializer, CourseTeam +from lms.djangoapps.teams.models import CourseTeam +from .serializers import CourseTeamSerializer def if_search_enabled(f): diff --git a/lms/djangoapps/teams/serializers.py b/lms/djangoapps/teams/serializers.py index 469ad09f61da..84447656400f 100644 --- a/lms/djangoapps/teams/serializers.py +++ b/lms/djangoapps/teams/serializers.py @@ -11,7 +11,7 @@ from openedx.core.lib.api.fields import ExpandableField from openedx.core.djangoapps.user_api.accounts.serializers import UserReadOnlySerializer -from .models import CourseTeam, CourseTeamMembership +from lms.djangoapps.teams.models import CourseTeam, CourseTeamMembership class CountryField(serializers.Field): diff --git a/lms/djangoapps/teams/tests/factories.py b/lms/djangoapps/teams/tests/factories.py index 5127e710649e..25375a76cb85 100644 --- a/lms/djangoapps/teams/tests/factories.py +++ b/lms/djangoapps/teams/tests/factories.py @@ -7,7 +7,7 @@ import factory from factory.django import DjangoModelFactory -from ..models import CourseTeam, CourseTeamMembership +from lms.djangoapps.teams.models import CourseTeam, CourseTeamMembership LAST_ACTIVITY_AT = datetime(2015, 8, 15, 0, 0, 0, tzinfo=pytz.utc) diff --git a/lms/djangoapps/teams/tests/test_models.py b/lms/djangoapps/teams/tests/test_models.py index 753665a4736c..1938852af20d 100644 --- a/lms/djangoapps/teams/tests/test_models.py +++ b/lms/djangoapps/teams/tests/test_models.py @@ -23,11 +23,12 @@ from opaque_keys.edx.keys import CourseKey from student.tests.factories import CourseEnrollmentFactory, UserFactory -from .factories import CourseTeamFactory, CourseTeamMembershipFactory -from teams.models import CourseTeam, CourseTeamMembership -from teams import TEAM_DISCUSSION_CONTEXT +from lms.djangoapps.teams.tests.factories import CourseTeamFactory, CourseTeamMembershipFactory +from lms.djangoapps.teams.models import CourseTeam, CourseTeamMembership +from lms.djangoapps.teams import TEAM_DISCUSSION_CONTEXT from util.testing import EventTestMixin + COURSE_KEY1 = CourseKey.from_string('edx/history/1') COURSE_KEY2 = CourseKey.from_string('edx/history/2') @@ -134,7 +135,7 @@ class TeamSignalsTest(EventTestMixin, SharedModuleStoreTestCase): def setUp(self): """Create a user with a team to test signals.""" - super(TeamSignalsTest, self).setUp('teams.utils.tracker') + super(TeamSignalsTest, self).setUp('lms.djangoapps.teams.utils.tracker') self.user = UserFactory.create(username="user") self.moderator = UserFactory.create(username="moderator") self.team = CourseTeamFactory(discussion_topic_id=self.DISCUSSION_TOPIC_ID) diff --git a/lms/djangoapps/teams/tests/test_views.py b/lms/djangoapps/teams/tests/test_views.py index 4cdab1a37ae4..ff36405aaa65 100644 --- a/lms/djangoapps/teams/tests/test_views.py +++ b/lms/djangoapps/teams/tests/test_views.py @@ -114,7 +114,7 @@ def test_query_counts(self): self.client.login(username=self.user.username, password=self.test_password) # Check the query count on the dashboard With no teams - with self.assertNumQueries(15): + with self.assertNumQueries(17): self.client.get(self.teams_url) # Create some teams @@ -129,7 +129,7 @@ def test_query_counts(self): team.add_user(self.user) # Check the query count on the dashboard again - with self.assertNumQueries(20): + with self.assertNumQueries(24): self.client.get(self.teams_url) def test_bad_course_id(self): @@ -466,7 +466,7 @@ class TestListTeamsAPI(EventTestMixin, TeamAPITestCase): """Test cases for the team listing API endpoint.""" def setUp(self): # pylint: disable=arguments-differ - super(TestListTeamsAPI, self).setUp('teams.utils.tracker') + super(TestListTeamsAPI, self).setUp('lms.djangoapps.teams.utils.tracker') @ddt.data( (None, 401), @@ -644,7 +644,7 @@ class TestCreateTeamAPI(EventTestMixin, TeamAPITestCase): """Test cases for the team creation endpoint.""" def setUp(self): # pylint: disable=arguments-differ - super(TestCreateTeamAPI, self).setUp('teams.utils.tracker') + super(TestCreateTeamAPI, self).setUp('lms.djangoapps.teams.utils.tracker') @ddt.data( (None, 401), @@ -855,7 +855,7 @@ class TestDeleteTeamAPI(EventTestMixin, TeamAPITestCase): """Test cases for the team delete endpoint.""" def setUp(self): # pylint: disable=arguments-differ - super(TestDeleteTeamAPI, self).setUp('teams.utils.tracker') + super(TestDeleteTeamAPI, self).setUp('lms.djangoapps.teams.utils.tracker') @ddt.data( (None, 401), @@ -905,7 +905,7 @@ class TestUpdateTeamAPI(EventTestMixin, TeamAPITestCase): """Test cases for the team update endpoint.""" def setUp(self): # pylint: disable=arguments-differ - super(TestUpdateTeamAPI, self).setUp('teams.utils.tracker') + super(TestUpdateTeamAPI, self).setUp('lms.djangoapps.teams.utils.tracker') @ddt.data( (None, 401), @@ -1234,7 +1234,7 @@ class TestCreateMembershipAPI(EventTestMixin, TeamAPITestCase): """Test cases for the membership creation endpoint.""" def setUp(self): # pylint: disable=arguments-differ - super(TestCreateMembershipAPI, self).setUp('teams.utils.tracker') + super(TestCreateMembershipAPI, self).setUp('lms.djangoapps.teams.utils.tracker') @ddt.data( (None, 401), @@ -1398,7 +1398,7 @@ class TestDeleteMembershipAPI(EventTestMixin, TeamAPITestCase): """Test cases for the membership deletion endpoint.""" def setUp(self): # pylint: disable=arguments-differ - super(TestDeleteMembershipAPI, self).setUp('teams.utils.tracker') + super(TestDeleteMembershipAPI, self).setUp('lms.djangoapps.teams.utils.tracker') @ddt.data( (None, 401), diff --git a/lms/djangoapps/teams/views.py b/lms/djangoapps/teams/views.py index b17300e56c4a..a937015773ad 100644 --- a/lms/djangoapps/teams/views.py +++ b/lms/djangoapps/teams/views.py @@ -36,9 +36,9 @@ from student.models import CourseEnrollment, CourseAccessRole from student.roles import CourseStaffRole from django_comment_client.utils import has_discussion_privileges -from teams import is_feature_enabled from util.model_utils import truncate_fields -from .models import CourseTeam, CourseTeamMembership +from . import is_feature_enabled +from lms.djangoapps.teams.models import CourseTeam, CourseTeamMembership from .serializers import ( CourseTeamSerializer, CourseTeamCreationSerializer, @@ -421,7 +421,6 @@ def get(self, request): username = request.query_params.get('username', None) if username is not None: result_filter.update({'membership__user__username': username}) - topic_id = request.query_params.get('topic_id', None) if topic_id is not None: if topic_id not in [topic['id'] for topic in course_module.teams_configuration['topics']]: diff --git a/lms/djangoapps/verify_student/admin.py b/lms/djangoapps/verify_student/admin.py index 278efdc177c1..0eb96445141e 100644 --- a/lms/djangoapps/verify_student/admin.py +++ b/lms/djangoapps/verify_student/admin.py @@ -5,7 +5,7 @@ from config_models.admin import ConfigurationModelAdmin from ratelimitbackend import admin -from verify_student.models import ( +from lms.djangoapps.verify_student.models import ( IcrvStatusEmailsConfiguration, SkippedReverification, SoftwareSecurePhotoVerification, diff --git a/lms/djangoapps/verify_student/management/commands/retry_failed_photo_verifications.py b/lms/djangoapps/verify_student/management/commands/retry_failed_photo_verifications.py index 6fdd1cc86f4d..2efdeadbde70 100644 --- a/lms/djangoapps/verify_student/management/commands/retry_failed_photo_verifications.py +++ b/lms/djangoapps/verify_student/management/commands/retry_failed_photo_verifications.py @@ -2,7 +2,7 @@ Django admin commands related to verify_student """ -from verify_student.models import SoftwareSecurePhotoVerification +from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification from django.core.management.base import BaseCommand diff --git a/lms/djangoapps/verify_student/management/commands/set_software_secure_status.py b/lms/djangoapps/verify_student/management/commands/set_software_secure_status.py index 9437b9da4052..0be17a842ddd 100644 --- a/lms/djangoapps/verify_student/management/commands/set_software_secure_status.py +++ b/lms/djangoapps/verify_student/management/commands/set_software_secure_status.py @@ -5,7 +5,7 @@ import sys from django.core.management.base import BaseCommand -from verify_student.models import ( +from lms.djangoapps.verify_student.models import ( SoftwareSecurePhotoVerification, VerificationCheckpoint, VerificationStatus ) @@ -19,7 +19,7 @@ class Command(BaseCommand): args = "<{approved, denied}, SoftwareSecurePhotoVerification id, [reason_for_denial]>" def handle(self, *args, **kwargs): # pylint: disable=unused-argument - from verify_student.views import _set_user_requirement_status + from lms.djangoapps.verify_student.views import _set_user_requirement_status status_to_set = args[0] receipt_id = args[1] diff --git a/lms/djangoapps/verify_student/management/commands/tests/test_verify_student.py b/lms/djangoapps/verify_student/management/commands/tests/test_verify_student.py index 37099efc2267..e8bf01d7662d 100644 --- a/lms/djangoapps/verify_student/management/commands/tests/test_verify_student.py +++ b/lms/djangoapps/verify_student/management/commands/tests/test_verify_student.py @@ -10,9 +10,9 @@ from django.conf import settings from student.tests.factories import UserFactory -from verify_student.models import SoftwareSecurePhotoVerification +from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification from django.core.management import call_command -from verify_student.tests.test_models import ( +from lms.djangoapps.verify_student.tests.test_models import ( MockKey, MockS3Connection, mock_software_secure_post, mock_software_secure_post_error, FAKE_SETTINGS, ) @@ -20,9 +20,9 @@ # Lots of patching to stub in our own settings, S3 substitutes, and HTTP posting @patch.dict(settings.VERIFY_STUDENT, FAKE_SETTINGS) -@patch('verify_student.models.S3Connection', new=MockS3Connection) -@patch('verify_student.models.Key', new=MockKey) -@patch('verify_student.models.requests.post', new=mock_software_secure_post) +@patch('lms.djangoapps.verify_student.models.S3Connection', new=MockS3Connection) +@patch('lms.djangoapps.verify_student.models.Key', new=MockKey) +@patch('lms.djangoapps.verify_student.models.requests.post', new=mock_software_secure_post) class TestVerifyStudentCommand(TestCase): """ Tests for django admin commands in the verify_student module @@ -48,9 +48,9 @@ def test_retry_failed_photo_verifications(self): """ # set up some fake data to use... self.create_and_submit("SuccessfulSally") - with patch('verify_student.models.requests.post', new=mock_software_secure_post_error): + with patch('lms.djangoapps.verify_student.models.requests.post', new=mock_software_secure_post_error): self.create_and_submit("RetryRoger") - with patch('verify_student.models.requests.post', new=mock_software_secure_post_error): + with patch('lms.djangoapps.verify_student.models.requests.post', new=mock_software_secure_post_error): self.create_and_submit("RetryRick") # check to make sure we had two successes and two failures; otherwise we've got problems elsewhere assert_equals(len(SoftwareSecurePhotoVerification.objects.filter(status="submitted")), 1) diff --git a/lms/djangoapps/verify_student/migrations/0001_initial.py b/lms/djangoapps/verify_student/migrations/0001_initial.py index 31068d9dd551..ebc698cd640c 100644 --- a/lms/djangoapps/verify_student/migrations/0001_initial.py +++ b/lms/djangoapps/verify_student/migrations/0001_initial.py @@ -1,96 +1,157 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +from __future__ import unicode_literals +from django.db import migrations, models +import lms.djangoapps.verify_student.models +import model_utils.fields +import xmodule_django.models +import django.db.models.deletion +import django.utils.timezone +from django.conf import settings -class Migration(SchemaMigration): - def forwards(self, orm): - # Adding model 'SoftwareSecurePhotoVerification' - db.create_table('verify_student_softwaresecurephotoverification', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('status', self.gf('model_utils.fields.StatusField')(default='created', max_length=100, no_check_for_status=True)), - ('status_changed', self.gf('model_utils.fields.MonitorField')(default=datetime.datetime.now, monitor=u'status')), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('name', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('face_image_url', self.gf('django.db.models.fields.URLField')(max_length=255, blank=True)), - ('photo_id_image_url', self.gf('django.db.models.fields.URLField')(max_length=255, blank=True)), - ('receipt_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)), - ('updated_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, db_index=True, blank=True)), - ('submitted_at', self.gf('django.db.models.fields.DateTimeField')(null=True, db_index=True)), - ('reviewing_user', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='photo_verifications_reviewed', null=True, to=orm['auth.User'])), - ('reviewing_service', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('error_msg', self.gf('django.db.models.fields.TextField')(blank=True)), - ('error_code', self.gf('django.db.models.fields.CharField')(max_length=50, blank=True)), - ('photo_id_key', self.gf('django.db.models.fields.TextField')(max_length=1024)), - )) - db.send_create_signal('verify_student', ['SoftwareSecurePhotoVerification']) +class Migration(migrations.Migration): + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] - def backwards(self, orm): - # Deleting model 'SoftwareSecurePhotoVerification' - db.delete_table('verify_student_softwaresecurephotoverification') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['verify_student'] + operations = [ + migrations.CreateModel( + name='HistoricalVerificationDeadline', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('course_key', xmodule_django.models.CourseKeyField(help_text='The course for which this deadline applies', max_length=255, db_index=True)), + ('deadline', models.DateTimeField(help_text='The datetime after which users are no longer allowed to submit photos for verification.')), + ('history_id', models.AutoField(serialize=False, primary_key=True)), + ('history_date', models.DateTimeField()), + ('history_type', models.CharField(max_length=1, choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')])), + ('history_user', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True)), + ], + options={ + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': 'history_date', + 'verbose_name': 'historical verification deadline', + }, + ), + migrations.CreateModel( + name='IcrvStatusEmailsConfiguration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + migrations.CreateModel( + name='InCourseReverificationConfiguration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + migrations.CreateModel( + name='SkippedReverification', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ], + ), + migrations.CreateModel( + name='SoftwareSecurePhotoVerification', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('status', model_utils.fields.StatusField(default=b'created', max_length=100, verbose_name='status', no_check_for_status=True, choices=[(b'created', b'created'), (b'ready', b'ready'), (b'submitted', b'submitted'), (b'must_retry', b'must_retry'), (b'approved', b'approved'), (b'denied', b'denied')])), + ('status_changed', model_utils.fields.MonitorField(default=django.utils.timezone.now, verbose_name='status changed', monitor='status')), + ('name', models.CharField(max_length=255, blank=True)), + ('face_image_url', models.URLField(max_length=255, blank=True)), + ('photo_id_image_url', models.URLField(max_length=255, blank=True)), + ('receipt_id', models.CharField(default=lms.djangoapps.verify_student.models.generateUUID, max_length=255, db_index=True)), + ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)), + ('updated_at', models.DateTimeField(auto_now=True, db_index=True)), + ('display', models.BooleanField(default=True, db_index=True)), + ('submitted_at', models.DateTimeField(null=True, db_index=True)), + ('reviewing_service', models.CharField(max_length=255, blank=True)), + ('error_msg', models.TextField(blank=True)), + ('error_code', models.CharField(max_length=50, blank=True)), + ('photo_id_key', models.TextField(max_length=1024)), + ('copy_id_photo_from', models.ForeignKey(blank=True, to='verify_student.SoftwareSecurePhotoVerification', null=True)), + ('reviewing_user', models.ForeignKey(related_name='photo_verifications_reviewed', default=None, to=settings.AUTH_USER_MODEL, null=True)), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + options={ + 'ordering': ['-created_at'], + 'abstract': False, + }, + ), + migrations.CreateModel( + name='VerificationCheckpoint', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('checkpoint_location', models.CharField(max_length=255)), + ('photo_verification', models.ManyToManyField(to='verify_student.SoftwareSecurePhotoVerification')), + ], + ), + migrations.CreateModel( + name='VerificationDeadline', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('course_key', xmodule_django.models.CourseKeyField(help_text='The course for which this deadline applies', unique=True, max_length=255, db_index=True)), + ('deadline', models.DateTimeField(help_text='The datetime after which users are no longer allowed to submit photos for verification.')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='VerificationStatus', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('status', models.CharField(db_index=True, max_length=32, choices=[(b'submitted', b'submitted'), (b'approved', b'approved'), (b'denied', b'denied'), (b'error', b'error')])), + ('timestamp', models.DateTimeField(auto_now_add=True)), + ('response', models.TextField(null=True, blank=True)), + ('error', models.TextField(null=True, blank=True)), + ('checkpoint', models.ForeignKey(related_name='checkpoint_status', to='verify_student.VerificationCheckpoint')), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ], + options={ + 'get_latest_by': 'timestamp', + 'verbose_name': 'Verification Status', + 'verbose_name_plural': 'Verification Statuses', + }, + ), + migrations.AddField( + model_name='skippedreverification', + name='checkpoint', + field=models.ForeignKey(related_name='skipped_checkpoint', to='verify_student.VerificationCheckpoint'), + ), + migrations.AddField( + model_name='skippedreverification', + name='user', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL), + ), + migrations.AlterUniqueTogether( + name='verificationcheckpoint', + unique_together=set([('course_id', 'checkpoint_location')]), + ), + migrations.AlterUniqueTogether( + name='skippedreverification', + unique_together=set([('user', 'course_id')]), + ), + ] diff --git a/lms/djangoapps/verify_student/migrations/0002_auto__add_field_softwaresecurephotoverification_window.py b/lms/djangoapps/verify_student/migrations/0002_auto__add_field_softwaresecurephotoverification_window.py deleted file mode 100644 index 38ced7fe98b7..000000000000 --- a/lms/djangoapps/verify_student/migrations/0002_auto__add_field_softwaresecurephotoverification_window.py +++ /dev/null @@ -1,88 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'SoftwareSecurePhotoVerification.window' - db.add_column('verify_student_softwaresecurephotoverification', 'window', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['reverification.MidcourseReverificationWindow'], null=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'SoftwareSecurePhotoVerification.window' - db.delete_column('verify_student_softwaresecurephotoverification', 'window_id') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'reverification.midcoursereverificationwindow': { - 'Meta': {'object_name': 'MidcourseReverificationWindow'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'end_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'window': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['reverification.MidcourseReverificationWindow']", 'null': 'True'}) - } - } - - complete_apps = ['verify_student'] diff --git a/lms/djangoapps/verify_student/migrations/0003_auto__add_field_softwaresecurephotoverification_display.py b/lms/djangoapps/verify_student/migrations/0003_auto__add_field_softwaresecurephotoverification_display.py deleted file mode 100644 index c91f7797a157..000000000000 --- a/lms/djangoapps/verify_student/migrations/0003_auto__add_field_softwaresecurephotoverification_display.py +++ /dev/null @@ -1,89 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'SoftwareSecurePhotoVerification.display' - db.add_column('verify_student_softwaresecurephotoverification', 'display', - self.gf('django.db.models.fields.BooleanField')(default=True, db_index=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'SoftwareSecurePhotoVerification.display' - db.delete_column('verify_student_softwaresecurephotoverification', 'display') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'reverification.midcoursereverificationwindow': { - 'Meta': {'object_name': 'MidcourseReverificationWindow'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'end_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'display': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'window': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['reverification.MidcourseReverificationWindow']", 'null': 'True'}) - } - } - - complete_apps = ['verify_student'] diff --git a/lms/djangoapps/verify_student/migrations/0004_auto__add_verificationcheckpoint__add_unique_verificationcheckpoint_co.py b/lms/djangoapps/verify_student/migrations/0004_auto__add_verificationcheckpoint__add_unique_verificationcheckpoint_co.py deleted file mode 100644 index 41a8ed740390..000000000000 --- a/lms/djangoapps/verify_student/migrations/0004_auto__add_verificationcheckpoint__add_unique_verificationcheckpoint_co.py +++ /dev/null @@ -1,142 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'VerificationCheckpoint' - db.create_table('verify_student_verificationcheckpoint', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('checkpoint_name', self.gf('django.db.models.fields.CharField')(max_length=32)), - )) - db.send_create_signal('verify_student', ['VerificationCheckpoint']) - - # Adding M2M table for field photo_verification on 'VerificationCheckpoint' - m2m_table_name = db.shorten_name('verify_student_verificationcheckpoint_photo_verification') - db.create_table(m2m_table_name, ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('verificationcheckpoint', models.ForeignKey(orm['verify_student.verificationcheckpoint'], null=False)), - ('softwaresecurephotoverification', models.ForeignKey(orm['verify_student.softwaresecurephotoverification'], null=False)) - )) - db.create_unique(m2m_table_name, ['verificationcheckpoint_id', 'softwaresecurephotoverification_id']) - - # Adding unique constraint on 'VerificationCheckpoint', fields ['course_id', 'checkpoint_name'] - db.create_unique('verify_student_verificationcheckpoint', ['course_id', 'checkpoint_name']) - - # Adding model 'VerificationStatus' - db.create_table('verify_student_verificationstatus', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('checkpoint', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['verify_student.VerificationCheckpoint'])), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('status', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)), - ('timestamp', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('response', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('error', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - )) - db.send_create_signal('verify_student', ['VerificationStatus']) - - - def backwards(self, orm): - # Removing unique constraint on 'VerificationCheckpoint', fields ['course_id', 'checkpoint_name'] - db.delete_unique('verify_student_verificationcheckpoint', ['course_id', 'checkpoint_name']) - - # Deleting model 'VerificationCheckpoint' - db.delete_table('verify_student_verificationcheckpoint') - - # Removing M2M table for field photo_verification on 'VerificationCheckpoint' - db.delete_table(db.shorten_name('verify_student_verificationcheckpoint_photo_verification')) - - # Deleting model 'VerificationStatus' - db.delete_table('verify_student_verificationstatus') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'reverification.midcoursereverificationwindow': { - 'Meta': {'object_name': 'MidcourseReverificationWindow'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'end_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'display': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'default': "'4f091843-1377-4d3b-af5d-3a4ae3d17943'", 'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'window': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['reverification.MidcourseReverificationWindow']", 'null': 'True'}) - }, - 'verify_student.verificationcheckpoint': { - 'Meta': {'unique_together': "(('course_id', 'checkpoint_name'),)", 'object_name': 'VerificationCheckpoint'}, - 'checkpoint_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'photo_verification': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['verify_student.SoftwareSecurePhotoVerification']", 'symmetrical': 'False'}) - }, - 'verify_student.verificationstatus': { - 'Meta': {'object_name': 'VerificationStatus'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['verify_student.VerificationCheckpoint']"}), - 'error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'response': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['verify_student'] diff --git a/lms/djangoapps/verify_student/migrations/0005_auto__add_incoursereverificationconfiguration.py b/lms/djangoapps/verify_student/migrations/0005_auto__add_incoursereverificationconfiguration.py deleted file mode 100644 index dc1a653a0fd4..000000000000 --- a/lms/djangoapps/verify_student/migrations/0005_auto__add_incoursereverificationconfiguration.py +++ /dev/null @@ -1,117 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'InCourseReverificationConfiguration' - db.create_table('verify_student_incoursereverificationconfiguration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('verify_student', ['InCourseReverificationConfiguration']) - - - def backwards(self, orm): - # Deleting model 'InCourseReverificationConfiguration' - db.delete_table('verify_student_incoursereverificationconfiguration') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'reverification.midcoursereverificationwindow': { - 'Meta': {'object_name': 'MidcourseReverificationWindow'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'end_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}) - }, - 'verify_student.incoursereverificationconfiguration': { - 'Meta': {'object_name': 'InCourseReverificationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'display': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'default': "'8a3c9d8a-b885-480e-8e1e-ca111326db42'", 'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'window': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['reverification.MidcourseReverificationWindow']", 'null': 'True'}) - }, - 'verify_student.verificationcheckpoint': { - 'Meta': {'unique_together': "(('course_id', 'checkpoint_name'),)", 'object_name': 'VerificationCheckpoint'}, - 'checkpoint_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'photo_verification': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['verify_student.SoftwareSecurePhotoVerification']", 'symmetrical': 'False'}) - }, - 'verify_student.verificationstatus': { - 'Meta': {'object_name': 'VerificationStatus'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['verify_student.VerificationCheckpoint']"}), - 'error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'response': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['verify_student'] diff --git a/lms/djangoapps/verify_student/migrations/0006_auto__add_skippedreverification__add_unique_skippedreverification_user.py b/lms/djangoapps/verify_student/migrations/0006_auto__add_skippedreverification__add_unique_skippedreverification_user.py deleted file mode 100644 index 46cb10c2364c..000000000000 --- a/lms/djangoapps/verify_student/migrations/0006_auto__add_skippedreverification__add_unique_skippedreverification_user.py +++ /dev/null @@ -1,132 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'SkippedReverification' - db.create_table('verify_student_skippedreverification', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('checkpoint', self.gf('django.db.models.fields.related.ForeignKey')(related_name='skipped_checkpoint', to=orm['verify_student.VerificationCheckpoint'])), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - )) - db.send_create_signal('verify_student', ['SkippedReverification']) - - # Adding unique constraint on 'SkippedReverification', fields ['user', 'course_id'] - db.create_unique('verify_student_skippedreverification', ['user_id', 'course_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'SkippedReverification', fields ['user', 'course_id'] - db.delete_unique('verify_student_skippedreverification', ['user_id', 'course_id']) - - # Deleting model 'SkippedReverification' - db.delete_table('verify_student_skippedreverification') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'reverification.midcoursereverificationwindow': { - 'Meta': {'object_name': 'MidcourseReverificationWindow'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'end_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}) - }, - 'verify_student.incoursereverificationconfiguration': { - 'Meta': {'object_name': 'InCourseReverificationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'verify_student.skippedreverification': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'SkippedReverification'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'skipped_checkpoint'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'display': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'default': "'aaa24e01-3318-4707-a3ed-74d0f1c1ed15'", 'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'window': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['reverification.MidcourseReverificationWindow']", 'null': 'True'}) - }, - 'verify_student.verificationcheckpoint': { - 'Meta': {'unique_together': "(('course_id', 'checkpoint_name'),)", 'object_name': 'VerificationCheckpoint'}, - 'checkpoint_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'photo_verification': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['verify_student.SoftwareSecurePhotoVerification']", 'symmetrical': 'False'}) - }, - 'verify_student.verificationstatus': { - 'Meta': {'object_name': 'VerificationStatus'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'checkpoint_status'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'response': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['verify_student'] \ No newline at end of file diff --git a/lms/djangoapps/verify_student/migrations/0007_auto__add_field_verificationstatus_location_id.py b/lms/djangoapps/verify_student/migrations/0007_auto__add_field_verificationstatus_location_id.py deleted file mode 100644 index e2a14fcaeb53..000000000000 --- a/lms/djangoapps/verify_student/migrations/0007_auto__add_field_verificationstatus_location_id.py +++ /dev/null @@ -1,122 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'VerificationStatus.location_id' - db.add_column('verify_student_verificationstatus', 'location_id', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'VerificationStatus.location_id' - db.delete_column('verify_student_verificationstatus', 'location_id') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'reverification.midcoursereverificationwindow': { - 'Meta': {'object_name': 'MidcourseReverificationWindow'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'end_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}) - }, - 'verify_student.incoursereverificationconfiguration': { - 'Meta': {'object_name': 'InCourseReverificationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'verify_student.skippedreverification': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'SkippedReverification'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'skipped_checkpoint'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'display': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'default': "'9997c000-3299-4097-a2cf-9ab35f9efdb5'", 'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'window': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['reverification.MidcourseReverificationWindow']", 'null': 'True'}) - }, - 'verify_student.verificationcheckpoint': { - 'Meta': {'unique_together': "(('course_id', 'checkpoint_name'),)", 'object_name': 'VerificationCheckpoint'}, - 'checkpoint_name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'photo_verification': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['verify_student.SoftwareSecurePhotoVerification']", 'symmetrical': 'False'}) - }, - 'verify_student.verificationstatus': { - 'Meta': {'object_name': 'VerificationStatus'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'checkpoint_status'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'location_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'response': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['verify_student'] \ No newline at end of file diff --git a/lms/djangoapps/verify_student/migrations/0008_auto__del_field_verificationcheckpoint_checkpoint_name__add_field_veri.py b/lms/djangoapps/verify_student/migrations/0008_auto__del_field_verificationcheckpoint_checkpoint_name__add_field_veri.py deleted file mode 100644 index 3ea1810b6625..000000000000 --- a/lms/djangoapps/verify_student/migrations/0008_auto__del_field_verificationcheckpoint_checkpoint_name__add_field_veri.py +++ /dev/null @@ -1,153 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Removing unique constraint on 'VerificationCheckpoint', fields ['course_id', 'checkpoint_name'] - db.delete_unique('verify_student_verificationcheckpoint', ['course_id', 'checkpoint_name']) - - # Deleting field 'VerificationCheckpoint.checkpoint_name' - db.delete_column('verify_student_verificationcheckpoint', 'checkpoint_name') - - # Adding field 'VerificationCheckpoint.checkpoint_location' - db.add_column('verify_student_verificationcheckpoint', 'checkpoint_location', - self.gf('django.db.models.fields.CharField')(default='', max_length=255), - keep_default=False) - - # Adding unique constraint on 'VerificationCheckpoint', fields ['course_id', 'checkpoint_location'] - db.create_unique('verify_student_verificationcheckpoint', ['course_id', 'checkpoint_location']) - - # Deleting field 'VerificationStatus.location_id' - db.delete_column('verify_student_verificationstatus', 'location_id') - - - def backwards(self, orm): - # Removing unique constraint on 'VerificationCheckpoint', fields ['course_id', 'checkpoint_location'] - db.delete_unique('verify_student_verificationcheckpoint', ['course_id', 'checkpoint_location']) - - - # User chose to not deal with backwards NULL issues for 'VerificationCheckpoint.checkpoint_name' - raise RuntimeError("Cannot reverse this migration. 'VerificationCheckpoint.checkpoint_name' and its values cannot be restored.") - - # The following code is provided here to aid in writing a correct migration # Adding field 'VerificationCheckpoint.checkpoint_name' - db.add_column('verify_student_verificationcheckpoint', 'checkpoint_name', - self.gf('django.db.models.fields.CharField')(max_length=32), - keep_default=False) - - # Deleting field 'VerificationCheckpoint.checkpoint_location' - db.delete_column('verify_student_verificationcheckpoint', 'checkpoint_location') - - # Adding unique constraint on 'VerificationCheckpoint', fields ['course_id', 'checkpoint_name'] - db.create_unique('verify_student_verificationcheckpoint', ['course_id', 'checkpoint_name']) - - # Adding field 'VerificationStatus.location_id' - db.add_column('verify_student_verificationstatus', 'location_id', - self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), - keep_default=False) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'reverification.midcoursereverificationwindow': { - 'Meta': {'object_name': 'MidcourseReverificationWindow'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'end_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}) - }, - 'verify_student.incoursereverificationconfiguration': { - 'Meta': {'object_name': 'InCourseReverificationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'verify_student.skippedreverification': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'SkippedReverification'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'skipped_checkpoint'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'display': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'default': "'4ae40fdd-c39a-4a23-a593-41beec90013b'", 'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'window': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['reverification.MidcourseReverificationWindow']", 'null': 'True'}) - }, - 'verify_student.verificationcheckpoint': { - 'Meta': {'unique_together': "(('course_id', 'checkpoint_location'),)", 'object_name': 'VerificationCheckpoint'}, - 'checkpoint_location': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'photo_verification': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['verify_student.SoftwareSecurePhotoVerification']", 'symmetrical': 'False'}) - }, - 'verify_student.verificationstatus': { - 'Meta': {'object_name': 'VerificationStatus'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'checkpoint_status'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'response': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['verify_student'] \ No newline at end of file diff --git a/lms/djangoapps/verify_student/migrations/0009_auto__change_softwaresecurephotoverification_window_id_default_none.py b/lms/djangoapps/verify_student/migrations/0009_auto__change_softwaresecurephotoverification_window_id_default_none.py deleted file mode 100644 index 9d5433196a37..000000000000 --- a/lms/djangoapps/verify_student/migrations/0009_auto__change_softwaresecurephotoverification_window_id_default_none.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration - - -class Migration(SchemaMigration): - - def forwards(self): - - # Changing field 'SoftwareSecurePhotoVerification.window'. Setting its default value to None - if db.backend_name == 'mysql': - db.execute('ALTER TABLE verify_student_softwaresecurephotoverification CHANGE `window_id` `window_id` int(11) DEFAULT NULL;') - - def backwards(self, orm): - - # Changing field 'SoftwareSecurePhotoVerification.window' - db.alter_column('verify_student_softwaresecurephotoverification', 'window_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['reverification.MidcourseReverificationWindow'])) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'reverification.midcoursereverificationwindow': { - 'Meta': {'object_name': 'MidcourseReverificationWindow'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'end_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'start_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}) - }, - 'verify_student.incoursereverificationconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'InCourseReverificationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'verify_student.skippedreverification': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'SkippedReverification'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'skipped_checkpoint'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'display': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'default': "'42ae367f-f6eb-456b-84c8-a3fd2baf4208'", 'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), - 'window': ('django.db.models.fields.related.ForeignKey', [], {'null': 'True', 'to': "orm['reverification.MidcourseReverificationWindow']"}) - }, - 'verify_student.verificationcheckpoint': { - 'Meta': {'unique_together': "(('course_id', 'checkpoint_location'),)", 'object_name': 'VerificationCheckpoint'}, - 'checkpoint_location': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'photo_verification': ('django.db.models.fields.related.ManyToManyField', [], {'null': 'True', 'to': "orm['verify_student.SoftwareSecurePhotoVerification']"}) - }, - 'verify_student.verificationstatus': { - 'Meta': {'object_name': 'VerificationStatus'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'checkpoint_status'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'response': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['verify_student'] - diff --git a/lms/djangoapps/verify_student/migrations/0010_auto__del_field_softwaresecurephotoverification_window.py b/lms/djangoapps/verify_student/migrations/0010_auto__del_field_softwaresecurephotoverification_window.py deleted file mode 100644 index 7bd2ed7f604a..000000000000 --- a/lms/djangoapps/verify_student/migrations/0010_auto__del_field_softwaresecurephotoverification_window.py +++ /dev/null @@ -1,117 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - - def forwards(self, orm): - # Deleting field 'SoftwareSecurePhotoVerification.window' - db.delete_column('verify_student_softwaresecurephotoverification', 'window_id') - - - def backwards(self, orm): - # Add field 'SoftwareSecurePhotoVerification.window'. Setting its default value to None - if db.backend_name == 'mysql': - db.execute('ALTER TABLE verify_student_softwaresecurephotoverification ADD `window_id` int(11) DEFAULT NULL;') - else: - db.add_column('verify_student_softwaresecurephotoverification', 'window', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['reverification.MidcourseReverificationWindow'], null=True), - keep_default=False) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'verify_student.incoursereverificationconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'InCourseReverificationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'verify_student.skippedreverification': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'SkippedReverification'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'skipped_checkpoint'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'display': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'default': "'c6b63663-5694-49b2-ae71-494b9afee0cf'", 'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.verificationcheckpoint': { - 'Meta': {'unique_together': "(('course_id', 'checkpoint_location'),)", 'object_name': 'VerificationCheckpoint'}, - 'checkpoint_location': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'photo_verification': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['verify_student.SoftwareSecurePhotoVerification']", 'symmetrical': 'False'}) - }, - 'verify_student.verificationstatus': { - 'Meta': {'object_name': 'VerificationStatus'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'checkpoint_status'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'response': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['verify_student'] diff --git a/lms/djangoapps/verify_student/migrations/0011_add_verification_deadline.py b/lms/djangoapps/verify_student/migrations/0011_add_verification_deadline.py deleted file mode 100644 index 2718a7df49e7..000000000000 --- a/lms/djangoapps/verify_student/migrations/0011_add_verification_deadline.py +++ /dev/null @@ -1,155 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'HistoricalVerificationDeadline' - db.create_table('verify_student_historicalverificationdeadline', ( - ('id', self.gf('django.db.models.fields.IntegerField')(db_index=True, blank=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('course_key', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('deadline', self.gf('django.db.models.fields.DateTimeField')()), - (u'history_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - (u'history_date', self.gf('django.db.models.fields.DateTimeField')()), - (u'history_user', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'+', null=True, on_delete=models.SET_NULL, to=orm['auth.User'])), - (u'history_type', self.gf('django.db.models.fields.CharField')(max_length=1)), - )) - db.send_create_signal('verify_student', ['HistoricalVerificationDeadline']) - - # Adding model 'VerificationDeadline' - db.create_table('verify_student_verificationdeadline', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('course_key', self.gf('xmodule_django.models.CourseKeyField')(unique=True, max_length=255, db_index=True)), - ('deadline', self.gf('django.db.models.fields.DateTimeField')()), - )) - db.send_create_signal('verify_student', ['VerificationDeadline']) - - - def backwards(self, orm): - # Deleting model 'HistoricalVerificationDeadline' - db.delete_table('verify_student_historicalverificationdeadline') - - # Deleting model 'VerificationDeadline' - db.delete_table('verify_student_verificationdeadline') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'verify_student.historicalverificationdeadline': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalVerificationDeadline'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'verify_student.incoursereverificationconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'InCourseReverificationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'verify_student.skippedreverification': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'SkippedReverification'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'skipped_checkpoint'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'display': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'default': "'9b14470c-4219-4c69-9a38-d8ff14b60b09'", 'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.verificationcheckpoint': { - 'Meta': {'unique_together': "(('course_id', 'checkpoint_location'),)", 'object_name': 'VerificationCheckpoint'}, - 'checkpoint_location': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'photo_verification': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['verify_student.SoftwareSecurePhotoVerification']", 'symmetrical': 'False'}) - }, - 'verify_student.verificationdeadline': { - 'Meta': {'object_name': 'VerificationDeadline'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'verify_student.verificationstatus': { - 'Meta': {'object_name': 'VerificationStatus'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'checkpoint_status'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'response': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['verify_student'] \ No newline at end of file diff --git a/lms/djangoapps/verify_student/migrations/0012_populate_verification_deadlines.py b/lms/djangoapps/verify_student/migrations/0012_populate_verification_deadlines.py deleted file mode 100644 index eaafcee52a77..000000000000 --- a/lms/djangoapps/verify_student/migrations/0012_populate_verification_deadlines.py +++ /dev/null @@ -1,180 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - - -class Migration(DataMigration): - - def forwards(self, orm): - """ - This migration populates the "verification deadline" model with - the "expiration datetime" from the course modes table for verified - courses. - - In the past, the course modes expiration (really an upgrade deadline) - and the verification deadline were always set to the same value. - With this change, the verification deadline will now be tracked in a separate - model owned by the verify_student app. - """ - - # Retrieve all verified course modes (whether they have expired or not) - # Unfortunately, we don't have access to constants from the application here, - # so we hard-code the names of the course modes that require verification. - verified_modes = orm['course_modes.CourseMode'].objects.filter( - mode_slug__in=["verified", "professional"], - expiration_datetime__isnull=False, - ) - - for mode in verified_modes: - orm.VerificationDeadline.objects.create( - course_key=mode.course_id, - deadline=mode.expiration_datetime, - ) - - def backwards(self, orm): - """ - Backwards migration deletes all verification deadlines. - """ - orm.VerificationDeadline.objects.all().delete() - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'course_modes.coursemode': { - 'Meta': {'unique_together': "(('course_id', 'mode_slug', 'currency'),)", 'object_name': 'CourseMode'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'expiration_date': ('django.db.models.fields.DateField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'expiration_datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'min_price': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'mode_display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'sku': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'suggested_prices': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}) - }, - 'course_modes.coursemodesarchive': { - 'Meta': {'object_name': 'CourseModesArchive'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'currency': ('django.db.models.fields.CharField', [], {'default': "'usd'", 'max_length': '8'}), - 'expiration_date': ('django.db.models.fields.DateField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'expiration_datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'min_price': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'mode_display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'mode_slug': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'suggested_prices': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}) - }, - 'verify_student.historicalverificationdeadline': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalVerificationDeadline'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'verify_student.incoursereverificationconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'InCourseReverificationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'verify_student.skippedreverification': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'SkippedReverification'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'skipped_checkpoint'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'display': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'default': "'6644e0c2-da9b-49a4-9d0c-c19c596c911e'", 'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.verificationcheckpoint': { - 'Meta': {'unique_together': "(('course_id', 'checkpoint_location'),)", 'object_name': 'VerificationCheckpoint'}, - 'checkpoint_location': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'photo_verification': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['verify_student.SoftwareSecurePhotoVerification']", 'symmetrical': 'False'}) - }, - 'verify_student.verificationdeadline': { - 'Meta': {'object_name': 'VerificationDeadline'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'verify_student.verificationstatus': { - 'Meta': {'object_name': 'VerificationStatus'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'checkpoint_status'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'response': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['course_modes', 'verify_student'] - symmetrical = True diff --git a/lms/djangoapps/verify_student/migrations/0013_auto__add_field_softwaresecurephotoverification_copy_id_photo_from.py b/lms/djangoapps/verify_student/migrations/0013_auto__add_field_softwaresecurephotoverification_copy_id_photo_from.py deleted file mode 100644 index a81a2a9edfe3..000000000000 --- a/lms/djangoapps/verify_student/migrations/0013_auto__add_field_softwaresecurephotoverification_copy_id_photo_from.py +++ /dev/null @@ -1,134 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'SoftwareSecurePhotoVerification.copy_id_photo_from' - db.add_column('verify_student_softwaresecurephotoverification', 'copy_id_photo_from', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['verify_student.SoftwareSecurePhotoVerification'], null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'SoftwareSecurePhotoVerification.copy_id_photo_from' - db.delete_column('verify_student_softwaresecurephotoverification', 'copy_id_photo_from_id') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'verify_student.historicalverificationdeadline': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalVerificationDeadline'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'verify_student.incoursereverificationconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'InCourseReverificationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'verify_student.skippedreverification': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'SkippedReverification'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'skipped_checkpoint'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'copy_id_photo_from': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['verify_student.SoftwareSecurePhotoVerification']", 'null': 'True', 'blank': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'display': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'default': "'28d8227e-6c75-418a-b1ae-46b6b8e7557f'", 'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.verificationcheckpoint': { - 'Meta': {'unique_together': "(('course_id', 'checkpoint_location'),)", 'object_name': 'VerificationCheckpoint'}, - 'checkpoint_location': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'photo_verification': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['verify_student.SoftwareSecurePhotoVerification']", 'symmetrical': 'False'}) - }, - 'verify_student.verificationdeadline': { - 'Meta': {'object_name': 'VerificationDeadline'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'verify_student.verificationstatus': { - 'Meta': {'object_name': 'VerificationStatus'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'checkpoint_status'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'response': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['verify_student'] \ No newline at end of file diff --git a/lms/djangoapps/verify_student/migrations/0014_set_copy_id_photo_from.py b/lms/djangoapps/verify_student/migrations/0014_set_copy_id_photo_from.py deleted file mode 100644 index 5955559f5a09..000000000000 --- a/lms/djangoapps/verify_student/migrations/0014_set_copy_id_photo_from.py +++ /dev/null @@ -1,148 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - - -class Migration(DataMigration): - - def forwards(self, orm): - """Add values for self referencing column 'copy_id_photo_from' in - table 'SoftwareSecurePhotoVerification'. - - Set the 'copy_id_photo_from' column value to initial verification which - has the photo ID key. - """ - verifications_without_photo_id = orm.SoftwareSecurePhotoVerification.objects.filter( - photo_id_key='' - ) - for verification in verifications_without_photo_id: - # Get the initial verification of the user with the 'photo_id_key' - to_copy = orm.SoftwareSecurePhotoVerification.objects.filter( - user=verification.user, - status__in=["submitted", "approved"] - ).exclude(photo_id_key='') - to_copy = to_copy.latest('created_at') if to_copy.exists() else None - - if to_copy: - verification.copy_id_photo_from = to_copy - verification.save() - - def backwards(self, orm): - "Write your backwards methods here." - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'verify_student.historicalverificationdeadline': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalVerificationDeadline'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'verify_student.incoursereverificationconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'InCourseReverificationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'verify_student.skippedreverification': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'SkippedReverification'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'skipped_checkpoint'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'copy_id_photo_from': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['verify_student.SoftwareSecurePhotoVerification']", 'null': 'True', 'blank': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'display': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'default': "'8b8c982c-9872-4f8f-a249-01369acf5110'", 'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.verificationcheckpoint': { - 'Meta': {'unique_together': "(('course_id', 'checkpoint_location'),)", 'object_name': 'VerificationCheckpoint'}, - 'checkpoint_location': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'photo_verification': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['verify_student.SoftwareSecurePhotoVerification']", 'symmetrical': 'False'}) - }, - 'verify_student.verificationdeadline': { - 'Meta': {'object_name': 'VerificationDeadline'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'verify_student.verificationstatus': { - 'Meta': {'object_name': 'VerificationStatus'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'checkpoint_status'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'response': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['verify_student'] - symmetrical = True diff --git a/lms/djangoapps/verify_student/migrations/0015_auto__add_icrvstatusemailsconfiguration.py b/lms/djangoapps/verify_student/migrations/0015_auto__add_icrvstatusemailsconfiguration.py deleted file mode 100644 index a56841c86460..000000000000 --- a/lms/djangoapps/verify_student/migrations/0015_auto__add_icrvstatusemailsconfiguration.py +++ /dev/null @@ -1,145 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'IcrvStatusEmailsConfiguration' - db.create_table('verify_student_icrvstatusemailsconfiguration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('verify_student', ['IcrvStatusEmailsConfiguration']) - - - def backwards(self, orm): - # Deleting model 'IcrvStatusEmailsConfiguration' - db.delete_table('verify_student_icrvstatusemailsconfiguration') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'verify_student.historicalverificationdeadline': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalVerificationDeadline'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'verify_student.icrvstatusemailsconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'IcrvStatusEmailsConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'verify_student.incoursereverificationconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'InCourseReverificationConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'verify_student.skippedreverification': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'SkippedReverification'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'skipped_checkpoint'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.softwaresecurephotoverification': { - 'Meta': {'ordering': "['-created_at']", 'object_name': 'SoftwareSecurePhotoVerification'}, - 'copy_id_photo_from': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['verify_student.SoftwareSecurePhotoVerification']", 'null': 'True', 'blank': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'display': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}), - 'error_code': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'error_msg': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'face_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_image_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}), - 'photo_id_key': ('django.db.models.fields.TextField', [], {'max_length': '1024'}), - 'receipt_id': ('django.db.models.fields.CharField', [], {'default': "'1dacd5f0-d7f0-452f-b2ed-6e2756547305'", 'max_length': '255', 'db_index': 'True'}), - 'reviewing_service': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'reviewing_user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'photo_verifications_reviewed'", 'null': 'True', 'to': "orm['auth.User']"}), - 'status': ('model_utils.fields.StatusField', [], {'default': "'created'", 'max_length': '100', u'no_check_for_status': 'True'}), - 'status_changed': ('model_utils.fields.MonitorField', [], {'default': 'datetime.datetime.now', u'monitor': "u'status'"}), - 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'verify_student.verificationcheckpoint': { - 'Meta': {'unique_together': "(('course_id', 'checkpoint_location'),)", 'object_name': 'VerificationCheckpoint'}, - 'checkpoint_location': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'photo_verification': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['verify_student.SoftwareSecurePhotoVerification']", 'symmetrical': 'False'}) - }, - 'verify_student.verificationdeadline': { - 'Meta': {'object_name': 'VerificationDeadline'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}) - }, - 'verify_student.verificationstatus': { - 'Meta': {'object_name': 'VerificationStatus'}, - 'checkpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'checkpoint_status'", 'to': "orm['verify_student.VerificationCheckpoint']"}), - 'error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'response': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['verify_student'] diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index e3da4537fd3a..24a03c50e9c7 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -36,7 +36,7 @@ from course_modes.models import CourseMode from model_utils.models import StatusModel, TimeStampedModel from model_utils import Choices -from verify_student.ssencrypt import ( +from lms.djangoapps.verify_student.ssencrypt import ( random_aes_key, encrypt_and_encode, generate_signed_message, rsa_encrypt ) @@ -150,7 +150,7 @@ class PhotoVerification(StatusModel): # user IDs or something too easily guessable. receipt_id = models.CharField( db_index=True, - default=lambda: generateUUID(), + default=generateUUID, max_length=255, ) @@ -189,6 +189,7 @@ class PhotoVerification(StatusModel): error_code = models.CharField(blank=True, max_length=50) class Meta(object): + app_label = "verify_student" abstract = True ordering = ['-created_at'] @@ -937,6 +938,8 @@ class VerificationDeadline(TimeStampedModel): then that course does not have a deadline. This means that users can submit photos at any time. """ + class Meta(object): + app_label = "verify_student" course_key = CourseKeyField( max_length=255, @@ -1047,6 +1050,7 @@ class VerificationCheckpoint(models.Model): photo_verification = models.ManyToManyField(SoftwareSecurePhotoVerification) class Meta(object): + app_label = "verify_student" unique_together = ('course_id', 'checkpoint_location') def __unicode__(self): @@ -1112,21 +1116,15 @@ def get_or_create_verification_checkpoint(cls, course_id, checkpoint_location): course_id (CourseKey): CourseKey checkpoint_location (str): Verification checkpoint location + Raises: + IntegrityError if create fails due to concurrent create. + Returns: VerificationCheckpoint object if exists otherwise None """ - try: + with transaction.atomic(): checkpoint, __ = cls.objects.get_or_create(course_id=course_id, checkpoint_location=checkpoint_location) return checkpoint - except IntegrityError: - log.info( - u"An integrity error occurred while getting-or-creating the verification checkpoint " - "for course %s at location %s. This can occur if two processes try to get-or-create " - "the checkpoint at the same time and the database is set to REPEATABLE READ. " - "We will try committing the transaction and retrying." - ) - transaction.commit() - return cls.objects.get(course_id=course_id, checkpoint_location=checkpoint_location) class VerificationStatus(models.Model): @@ -1156,6 +1154,7 @@ class VerificationStatus(models.Model): error = models.TextField(null=True, blank=True) class Meta(object): + app_label = "verify_student" get_latest_by = "timestamp" verbose_name = "Verification Status" verbose_name_plural = "Verification Statuses" @@ -1333,9 +1332,11 @@ class SkippedReverification(models.Model): created_at = models.DateTimeField(auto_now_add=True) class Meta(object): + app_label = "verify_student" unique_together = (('user', 'course_id'),) @classmethod + @transaction.atomic def add_skipped_reverification_attempt(cls, checkpoint, user_id, course_id): """Create skipped reverification object. diff --git a/lms/djangoapps/verify_student/services.py b/lms/djangoapps/verify_student/services.py index 0269d8ed3c37..8caf7d5057f9 100644 --- a/lms/djangoapps/verify_student/services.py +++ b/lms/djangoapps/verify_student/services.py @@ -11,7 +11,7 @@ from opaque_keys.edx.keys import CourseKey from student.models import User, CourseEnrollment -from verify_student.models import VerificationCheckpoint, VerificationStatus, SkippedReverification +from lms.djangoapps.verify_student.models import VerificationCheckpoint, VerificationStatus, SkippedReverification log = logging.getLogger(__name__) diff --git a/lms/djangoapps/verify_student/tests/factories.py b/lms/djangoapps/verify_student/tests/factories.py index eb7c96de88c0..9abe2be50574 100644 --- a/lms/djangoapps/verify_student/tests/factories.py +++ b/lms/djangoapps/verify_student/tests/factories.py @@ -3,7 +3,7 @@ """ from factory.django import DjangoModelFactory -from verify_student.models import SoftwareSecurePhotoVerification +from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification class SoftwareSecurePhotoVerificationFactory(DjangoModelFactory): diff --git a/lms/djangoapps/verify_student/tests/fake_software_secure.py b/lms/djangoapps/verify_student/tests/fake_software_secure.py index a3de08b7b1ee..fab26690d254 100644 --- a/lms/djangoapps/verify_student/tests/fake_software_secure.py +++ b/lms/djangoapps/verify_student/tests/fake_software_secure.py @@ -9,7 +9,7 @@ from django.views.generic.base import View from edxmako.shortcuts import render_to_response -from verify_student.models import SoftwareSecurePhotoVerification +from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification class SoftwareSecureFakeView(View): diff --git a/lms/djangoapps/verify_student/tests/test_fake_software_secure.py b/lms/djangoapps/verify_student/tests/test_fake_software_secure.py index 3855ec31c643..8bb513d09356 100644 --- a/lms/djangoapps/verify_student/tests/test_fake_software_secure.py +++ b/lms/djangoapps/verify_student/tests/test_fake_software_secure.py @@ -7,7 +7,7 @@ from mock import patch from student.tests.factories import UserFactory from util.testing import UrlResetMixin -from verify_student.models import SoftwareSecurePhotoVerification +from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification class SoftwareSecureFakeViewTest(UrlResetMixin, TestCase): diff --git a/lms/djangoapps/verify_student/tests/test_models.py b/lms/djangoapps/verify_student/tests/test_models.py index f55d0256ccf0..7517e553d564 100644 --- a/lms/djangoapps/verify_student/tests/test_models.py +++ b/lms/djangoapps/verify_student/tests/test_models.py @@ -7,7 +7,7 @@ import pytz from django.conf import settings -from django.db.utils import IntegrityError +from django.db import IntegrityError from django.test import TestCase from mock import patch from nose.tools import assert_is_none, assert_equals, assert_raises, assert_true, assert_false # pylint: disable=no-name-in-module @@ -18,7 +18,7 @@ from opaque_keys.edx.keys import CourseKey -from verify_student.models import ( +from lms.djangoapps.verify_student.models import ( SoftwareSecurePhotoVerification, VerificationException, VerificationCheckpoint, VerificationStatus, SkippedReverification, @@ -128,9 +128,9 @@ def mock_software_secure_post_unavailable(url, headers=None, data=None, **kwargs # Lots of patching to stub in our own settings, S3 substitutes, and HTTP posting @patch.dict(settings.VERIFY_STUDENT, FAKE_SETTINGS) -@patch('verify_student.models.S3Connection', new=MockS3Connection) -@patch('verify_student.models.Key', new=MockKey) -@patch('verify_student.models.requests.post', new=mock_software_secure_post) +@patch('lms.djangoapps.verify_student.models.S3Connection', new=MockS3Connection) +@patch('lms.djangoapps.verify_student.models.Key', new=MockKey) +@patch('lms.djangoapps.verify_student.models.requests.post', new=mock_software_secure_post) @ddt.ddt class TestPhotoVerification(ModuleStoreTestCase): @@ -228,12 +228,12 @@ def test_submissions(self): assert_equals(attempt.status, "submitted") # We post, but Software Secure doesn't like what we send for some reason - with patch('verify_student.models.requests.post', new=mock_software_secure_post_error): + with patch('lms.djangoapps.verify_student.models.requests.post', new=mock_software_secure_post_error): attempt = self.create_and_submit() assert_equals(attempt.status, "must_retry") # We try to post, but run into an error (in this case a newtork connection error) - with patch('verify_student.models.requests.post', new=mock_software_secure_post_unavailable): + with patch('lms.djangoapps.verify_student.models.requests.post', new=mock_software_secure_post_unavailable): attempt = self.create_and_submit() assert_equals(attempt.status, "must_retry") @@ -482,7 +482,9 @@ def test_verification_status_for_user(self, enrollment_mode, status, output): user = UserFactory.create() course = CourseFactory.create() - with patch('verify_student.models.SoftwareSecurePhotoVerification.user_is_verified') as mock_verification: + with patch( + 'lms.djangoapps.verify_student.models.SoftwareSecurePhotoVerification.user_is_verified' + ) as mock_verification: mock_verification.return_value = status @@ -571,19 +573,18 @@ def test_get_or_create_integrity_error(self): checkpoint_location=self.checkpoint_midterm, ) - # Simulate that the get-or-create operation raises an IntegrityError + # Simulate that the get-or-create operation raises an IntegrityError. # This can happen when two processes both try to get-or-create at the same time # when the database is set to REPEATABLE READ. + # To avoid IntegrityError situations when calling this method, set the view to + # use a READ COMMITTED transaction instead. with patch.object(VerificationCheckpoint.objects, "get_or_create") as mock_get_or_create: mock_get_or_create.side_effect = IntegrityError - checkpoint = VerificationCheckpoint.get_or_create_verification_checkpoint( - self.course.id, - self.checkpoint_midterm - ) - - # The checkpoint should be retrieved without error - self.assertEqual(checkpoint.course_id, self.course.id) - self.assertEqual(checkpoint.checkpoint_location, self.checkpoint_midterm) + with self.assertRaises(IntegrityError): + _ = VerificationCheckpoint.get_or_create_verification_checkpoint( + self.course.id, + self.checkpoint_midterm + ) def test_unique_together_constraint(self): """ diff --git a/lms/djangoapps/verify_student/tests/test_services.py b/lms/djangoapps/verify_student/tests/test_services.py index 5c5a8b9dc121..c2f8f9e42f59 100644 --- a/lms/djangoapps/verify_student/tests/test_services.py +++ b/lms/djangoapps/verify_student/tests/test_services.py @@ -10,8 +10,8 @@ from course_modes.tests.factories import CourseModeFactory from student.models import CourseEnrollment from student.tests.factories import UserFactory -from verify_student.models import VerificationCheckpoint, VerificationStatus, SkippedReverification -from verify_student.services import ReverificationService +from lms.djangoapps.verify_student.models import VerificationCheckpoint, VerificationStatus, SkippedReverification +from lms.djangoapps.verify_student.services import ReverificationService from openedx.core.djangoapps.credit.api import get_credit_requirement_status, set_credit_requirements from openedx.core.djangoapps.credit.models import CreditCourse diff --git a/lms/djangoapps/verify_student/tests/test_ssencrypt.py b/lms/djangoapps/verify_student/tests/test_ssencrypt.py index 073ee4a2dc58..7a3b83ba5dc0 100644 --- a/lms/djangoapps/verify_student/tests/test_ssencrypt.py +++ b/lms/djangoapps/verify_student/tests/test_ssencrypt.py @@ -1,7 +1,7 @@ import base64 from nose.tools import assert_equals -from verify_student.ssencrypt import ( +from lms.djangoapps.verify_student.ssencrypt import ( aes_decrypt, aes_encrypt, encrypt_and_encode, decode_and_decrypt, rsa_decrypt, rsa_encrypt ) diff --git a/lms/djangoapps/verify_student/tests/test_views.py b/lms/djangoapps/verify_student/tests/test_views.py index 82127df3ce41..7d508414d332 100644 --- a/lms/djangoapps/verify_student/tests/test_views.py +++ b/lms/djangoapps/verify_student/tests/test_views.py @@ -42,11 +42,11 @@ from student.models import CourseEnrollment from util.date_utils import get_default_time_display from util.testing import UrlResetMixin -from verify_student.views import ( +from lms.djangoapps.verify_student.views import ( checkout_with_ecommerce_service, render_to_response, PayAndVerifyView, _compose_message_reverification_email ) -from verify_student.models import ( +from lms.djangoapps.verify_student.models import ( VerificationDeadline, SoftwareSecurePhotoVerification, VerificationCheckpoint, VerificationStatus, IcrvStatusEmailsConfiguration, @@ -1092,7 +1092,7 @@ def test_old_clients(self, patched_create_order): self.assertEqual(data, {'foo': 'bar'}) -@patch('verify_student.views.checkout_with_shoppingcart', return_value=TEST_PAYMENT_DATA) +@patch('lms.djangoapps.verify_student.views.checkout_with_shoppingcart', return_value=TEST_PAYMENT_DATA) class TestCreateOrderShoppingCart(CheckoutTestMixin, ModuleStoreTestCase): """ Test view behavior when the shoppingcart is used. """ @@ -1106,7 +1106,7 @@ def _get_checkout_args(self, patched_create_order): @override_settings(ECOMMERCE_API_URL=TEST_API_URL, ECOMMERCE_API_SIGNING_KEY=TEST_API_SIGNING_KEY) -@patch('verify_student.views.checkout_with_ecommerce_service', return_value=TEST_PAYMENT_DATA) +@patch('lms.djangoapps.verify_student.views.checkout_with_ecommerce_service', return_value=TEST_PAYMENT_DATA) class TestCreateOrderEcommerceService(CheckoutTestMixin, ModuleStoreTestCase): """ Test view behavior when the ecommerce service is used. """ @@ -1142,7 +1142,7 @@ def test_create_basket(self): content_type="application/json", ) - with mock.patch('verify_student.views.audit_log') as mock_audit_log: + with mock.patch('lms.djangoapps.verify_student.views.audit_log') as mock_audit_log: # Call the function actual_payment_data = checkout_with_ecommerce_service( user, @@ -1551,7 +1551,10 @@ def test_invalid_dict(self): self.assertIn('JSON should be dict', response.content) self.assertEqual(response.status_code, 400) - @mock.patch('verify_student.ssencrypt.has_valid_signature', mock.Mock(side_effect=mocked_has_valid_signature)) + @mock.patch( + 'lms.djangoapps.verify_student.ssencrypt.has_valid_signature', + mock.Mock(side_effect=mocked_has_valid_signature) + ) def test_invalid_access_key(self): """ Test for invalid access key. @@ -1573,7 +1576,10 @@ def test_invalid_access_key(self): self.assertIn('Access key invalid', response.content) self.assertEqual(response.status_code, 400) - @mock.patch('verify_student.ssencrypt.has_valid_signature', mock.Mock(side_effect=mocked_has_valid_signature)) + @mock.patch( + 'lms.djangoapps.verify_student.ssencrypt.has_valid_signature', + mock.Mock(side_effect=mocked_has_valid_signature) + ) def test_wrong_edx_id(self): """ Test for wrong id of Software secure verification attempt. @@ -1595,7 +1601,10 @@ def test_wrong_edx_id(self): self.assertIn('edX ID Invalid-Id not found', response.content) self.assertEqual(response.status_code, 400) - @mock.patch('verify_student.ssencrypt.has_valid_signature', mock.Mock(side_effect=mocked_has_valid_signature)) + @mock.patch( + 'lms.djangoapps.verify_student.ssencrypt.has_valid_signature', + mock.Mock(side_effect=mocked_has_valid_signature) + ) def test_pass_result(self): """ Test for verification passed. @@ -1617,7 +1626,10 @@ def test_pass_result(self): self.assertEqual(attempt.status, u'approved') self.assertEquals(response.content, 'OK!') - @mock.patch('verify_student.ssencrypt.has_valid_signature', mock.Mock(side_effect=mocked_has_valid_signature)) + @mock.patch( + 'lms.djangoapps.verify_student.ssencrypt.has_valid_signature', + mock.Mock(side_effect=mocked_has_valid_signature) + ) def test_fail_result(self): """ Test for failed verification. @@ -1642,7 +1654,10 @@ def test_fail_result(self): self.assertEqual(attempt.error_msg, u'"Invalid photo"') self.assertEquals(response.content, 'OK!') - @mock.patch('verify_student.ssencrypt.has_valid_signature', mock.Mock(side_effect=mocked_has_valid_signature)) + @mock.patch( + 'lms.djangoapps.verify_student.ssencrypt.has_valid_signature', + mock.Mock(side_effect=mocked_has_valid_signature) + ) def test_system_fail_result(self): """ Test for software secure result system failure. @@ -1665,7 +1680,10 @@ def test_system_fail_result(self): self.assertEqual(attempt.error_msg, u'"Memory overflow"') self.assertEquals(response.content, 'OK!') - @mock.patch('verify_student.ssencrypt.has_valid_signature', mock.Mock(side_effect=mocked_has_valid_signature)) + @mock.patch( + 'lms.djangoapps.verify_student.ssencrypt.has_valid_signature', + mock.Mock(side_effect=mocked_has_valid_signature) + ) def test_unknown_result(self): """ test for unknown software secure result @@ -1686,7 +1704,10 @@ def test_unknown_result(self): ) self.assertIn('Result Unknown not understood', response.content) - @mock.patch('verify_student.ssencrypt.has_valid_signature', mock.Mock(side_effect=mocked_has_valid_signature)) + @mock.patch( + 'lms.djangoapps.verify_student.ssencrypt.has_valid_signature', + mock.Mock(side_effect=mocked_has_valid_signature) + ) def test_in_course_reverify_disabled(self): """ Test for verification passed. @@ -1712,7 +1733,10 @@ def test_in_course_reverify_disabled(self): user_status = VerificationStatus.objects.filter(user=self.user).count() self.assertEqual(user_status, 0) - @mock.patch('verify_student.ssencrypt.has_valid_signature', mock.Mock(side_effect=mocked_has_valid_signature)) + @mock.patch( + 'lms.djangoapps.verify_student.ssencrypt.has_valid_signature', + mock.Mock(side_effect=mocked_has_valid_signature) + ) def test_pass_in_course_reverify_result(self): """ Test for verification passed. @@ -1773,8 +1797,11 @@ def test_icrv_status_email_with_disable_config(self): self.assertEquals(response.content, 'OK!') self.assertEqual(len(mail.outbox), 0) - @mock.patch('verify_student.views._send_email') - @mock.patch('verify_student.ssencrypt.has_valid_signature', mock.Mock(side_effect=mocked_has_valid_signature)) + @mock.patch('lms.djangoapps.verify_student.views._send_email') + @mock.patch( + 'lms.djangoapps.verify_student.ssencrypt.has_valid_signature', + mock.Mock(side_effect=mocked_has_valid_signature) + ) def test_reverification_on_callback(self, mock_send_email): """ Test software secure callback flow for re-verification. @@ -1958,7 +1985,7 @@ def setUp(self): CourseEnrollment.enroll(self.user, self.course_key, mode="verified") # mocking and patching for bi events - analytics_patcher = patch('verify_student.views.analytics') + analytics_patcher = patch('lms.djangoapps.verify_student.views.analytics') self.mock_tracker = analytics_patcher.start() self.addCleanup(analytics_patcher.stop) diff --git a/lms/djangoapps/verify_student/urls.py b/lms/djangoapps/verify_student/urls.py index a4244986b75c..ec28a5fd85d8 100644 --- a/lms/djangoapps/verify_student/urls.py +++ b/lms/djangoapps/verify_student/urls.py @@ -3,7 +3,7 @@ from django.conf import settings from django.conf.urls import patterns, url -from verify_student import views +from lms.djangoapps.verify_student import views urlpatterns = patterns( @@ -111,7 +111,7 @@ # Fake response page for incourse reverification ( software secure ) if settings.FEATURES.get('ENABLE_SOFTWARE_SECURE_FAKE'): - from verify_student.tests.fake_software_secure import SoftwareSecureFakeView + from lms.djangoapps.verify_student.tests.fake_software_secure import SoftwareSecureFakeView urlpatterns += patterns( 'verify_student.tests.fake_software_secure', url(r'^software-secure-fake-response', SoftwareSecureFakeView.as_view()), diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index 271094436529..f344ffc19907 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -14,6 +14,7 @@ from django.contrib.auth.decorators import login_required from django.core.mail import send_mail from django.core.urlresolvers import reverse +from django.db import transaction from django.http import HttpResponse, HttpResponseBadRequest, Http404 from django.contrib.auth.models import User from django.shortcuts import redirect @@ -46,17 +47,18 @@ from shoppingcart.processors import ( get_signed_purchase_params, get_purchase_endpoint ) -from verify_student.ssencrypt import has_valid_signature -from verify_student.models import ( +from lms.djangoapps.verify_student.ssencrypt import has_valid_signature +from lms.djangoapps.verify_student.models import ( VerificationDeadline, SoftwareSecurePhotoVerification, VerificationCheckpoint, VerificationStatus, IcrvStatusEmailsConfiguration, ) -from verify_student.image import decode_image_data, InvalidImageData +from lms.djangoapps.verify_student.image import decode_image_data, InvalidImageData from util.json_request import JsonResponse from util.date_utils import get_default_time_display +from util.db import outer_atomic from xmodule.modulestore.django import modulestore from django.contrib.staticfiles.storage import staticfiles_storage @@ -820,7 +822,12 @@ class SubmitPhotosView(View): End-point for submitting photos for verification. """ + @method_decorator(transaction.non_atomic_requests) + def dispatch(self, *args, **kwargs): # pylint: disable=missing-docstring + return super(SubmitPhotosView, self).dispatch(*args, **kwargs) + @method_decorator(login_required) + @method_decorator(outer_atomic(read_committed=True)) def post(self, request): """ Submit photos for verification. diff --git a/lms/envs/acceptance.py b/lms/envs/acceptance.py index 87bbbf3b0c77..c598cb3bffa2 100644 --- a/lms/envs/acceptance.py +++ b/lms/envs/acceptance.py @@ -71,6 +71,7 @@ def seed(): 'OPTIONS': { 'timeout': 30, }, + 'ATOMIC_REQUESTS': True, } } diff --git a/lms/envs/aws.py b/lms/envs/aws.py index cdb61f972a54..823fbbb0c945 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -44,7 +44,7 @@ ################################ ALWAYS THE SAME ############################## DEBUG = False -TEMPLATE_DEBUG = False +DEFAULT_TEMPLATE_ENGINE['OPTIONS']['debug'] = False EMAIL_BACKEND = 'django_ses.SESBackend' SESSION_ENGINE = 'django.contrib.sessions.backends.cache' @@ -74,11 +74,6 @@ # Each worker should only fetch one message at a time CELERYD_PREFETCH_MULTIPLIER = 1 -# Skip djcelery migrations, since we don't use the database as the broker -SOUTH_MIGRATION_MODULES = { - 'djcelery': 'ignore', -} - # Rename the exchange and queues for each variant QUEUE_VARIANT = CONFIG_PREFIX.lower() @@ -170,8 +165,19 @@ EDXMKTG_LOGGED_IN_COOKIE_NAME = ENV_TOKENS.get('EDXMKTG_LOGGED_IN_COOKIE_NAME', EDXMKTG_LOGGED_IN_COOKIE_NAME) EDXMKTG_USER_INFO_COOKIE_NAME = ENV_TOKENS.get('EDXMKTG_USER_INFO_COOKIE_NAME', EDXMKTG_USER_INFO_COOKIE_NAME) +ENV_FEATURES = ENV_TOKENS.get('FEATURES', ENV_TOKENS.get('MITX_FEATURES', {})) +for feature, value in ENV_FEATURES.items(): + FEATURES[feature] = value + CMS_BASE = ENV_TOKENS.get('CMS_BASE', 'studio.edx.org') +ALLOWED_HOSTS = [ + # TODO: bbeggs remove this before prod, temp fix to get load testing running + "*", + ENV_TOKENS.get('LMS_BASE'), + FEATURES['PREVIEW_LMS_BASE'], +] + # allow for environments to specify what cookie name our login subsystem should use # this is to fix a bug regarding simultaneous logins between edx.org and edge.edx.org which can # happen with some browsers (e.g. Firefox) @@ -431,6 +437,10 @@ # function in util/query.py, which is useful for very large database reads DATABASES = AUTH_TOKENS['DATABASES'] +# Enable automatic transaction management on all databases +for database_name in DATABASES: + DATABASES[database_name]['ATOMIC_REQUESTS'] = True + XQUEUE_INTERFACE = AUTH_TOKENS['XQUEUE_INTERFACE'] # Get the MODULESTORE from auth.json, but if it doesn't exist, @@ -665,9 +675,9 @@ ##### Custom Courses for EdX ##### if FEATURES.get('CUSTOM_COURSES_EDX'): - INSTALLED_APPS += ('ccx',) + INSTALLED_APPS += ('lms.djangoapps.ccx',) FIELD_OVERRIDE_PROVIDERS += ( - 'ccx.overrides.CustomCoursesForEdxOverrideProvider', + 'lms.djangoapps.ccx.overrides.CustomCoursesForEdxOverrideProvider', ) ##### Individual Due Date Extensions ##### diff --git a/lms/envs/common.py b/lms/envs/common.py index 6072e7087eb4..0c8f58b4a491 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -479,9 +479,9 @@ 'oauth2_handler.UserInfoHandler' ) -################################## EDX WEB ##################################### -# This is where we stick our compiled template files. Most of the app uses Mako -# templates +################################## TEMPLATE CONFIGURATION ##################################### +# Mako templating +# TODO: Move the Mako templating into a different engine in TEMPLATES below. import tempfile MAKO_MODULE_DIR = os.path.join(tempfile.gettempdir(), 'mako_lms') MAKO_TEMPLATES = {} @@ -490,42 +490,64 @@ COMMON_ROOT / 'lib' / 'capa' / 'capa' / 'templates', COMMON_ROOT / 'djangoapps' / 'pipeline_mako' / 'templates'] -# This is where Django Template lookup is defined. There are a few of these -# still left lying around. -TEMPLATE_DIRS = [ - PROJECT_ROOT / "templates", - COMMON_ROOT / 'templates', - COMMON_ROOT / 'lib' / 'capa' / 'capa' / 'templates', - COMMON_ROOT / 'djangoapps' / 'pipeline_mako' / 'templates', - COMMON_ROOT / 'static', # required to statically include common Underscore templates +# Django templating +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + # Don't look for template source files inside installed applications. + 'APP_DIRS': False, + # Instead, look for template source files in these dirs. + 'DIRS': [ + PROJECT_ROOT / "templates", + COMMON_ROOT / 'templates', + COMMON_ROOT / 'lib' / 'capa' / 'capa' / 'templates', + COMMON_ROOT / 'djangoapps' / 'pipeline_mako' / 'templates', + COMMON_ROOT / 'static', # required to statically include common Underscore templates + ], + # Options specific to this backend. + 'OPTIONS': { + 'loaders': [ + 'edxmako.makoloader.MakoFilesystemLoader', + 'edxmako.makoloader.MakoAppDirectoriesLoader', + + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', + + ], + 'context_processors': [ + 'django.template.context_processors.request', + 'django.template.context_processors.static', + 'django.contrib.messages.context_processors.messages', + 'django.template.context_processors.i18n', + 'django.contrib.auth.context_processors.auth', # this is required for admin + 'django.template.context_processors.csrf', + + # Added for django-wiki + 'django.template.context_processors.media', + 'django.template.context_processors.tz', + 'django.contrib.messages.context_processors.messages', + 'sekizai.context_processors.sekizai', + + # Hack to get required link URLs to password reset templates + 'edxmako.shortcuts.marketing_link_context_processor', + + # Allows the open edX footer to be leveraged in Django Templates. + 'edxmako.shortcuts.open_source_footer_context_processor', + + # Shoppingcart processor (detects if request.user has a cart) + 'shoppingcart.context_processor.user_has_cart_context_processor', + + # Allows the open edX footer to be leveraged in Django Templates. + 'edxmako.shortcuts.microsite_footer_context_processor', + ], + # Change 'debug' in your environment settings files - not here. + 'debug': False + } + } ] +DEFAULT_TEMPLATE_ENGINE = TEMPLATES[0] -TEMPLATE_CONTEXT_PROCESSORS = ( - 'django.core.context_processors.request', - 'django.core.context_processors.static', - 'django.contrib.messages.context_processors.messages', - 'django.core.context_processors.i18n', - 'django.contrib.auth.context_processors.auth', # this is required for admin - 'django.core.context_processors.csrf', - - # Added for django-wiki - 'django.core.context_processors.media', - 'django.core.context_processors.tz', - 'django.contrib.messages.context_processors.messages', - 'sekizai.context_processors.sekizai', - - # Hack to get required link URLs to password reset templates - 'edxmako.shortcuts.marketing_link_context_processor', - - # Allows the open edX footer to be leveraged in Django Templates. - 'edxmako.shortcuts.open_source_footer_context_processor', - - # Shoppingcart processor (detects if request.user has a cart) - 'shoppingcart.context_processor.user_has_cart_context_processor', - - # Allows the open edX footer to be leveraged in Django Templates. - 'edxmako.shortcuts.microsite_footer_context_processor', -) +############################################################################################### # use the ratelimit backend to prevent brute force attacks AUTHENTICATION_BACKENDS = ( @@ -777,12 +799,12 @@ COURSES_WITH_UNSAFE_CODE = [] ############################### DJANGO BUILT-INS ############################### -# Change DEBUG/TEMPLATE_DEBUG in your environment settings files, not here +# Change DEBUG in your environment settings files, not here DEBUG = False -TEMPLATE_DEBUG = False USE_TZ = True SESSION_COOKIE_SECURE = False SESSION_SAVE_EVERY_REQUEST = False +SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer' # CMS base CMS_BASE = 'localhost:8001' @@ -1101,16 +1123,6 @@ ################################# Middleware ################################### -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'edxmako.makoloader.MakoFilesystemLoader', - 'edxmako.makoloader.MakoAppDirectoriesLoader', - - # 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', - -) - MIDDLEWARE_CLASSES = ( 'request_cache.middleware.RequestCache', 'microsite_configuration.middleware.MicrositeMiddleware', @@ -1154,11 +1166,8 @@ # Detects user-requested locale from 'accept-language' header in http request. # Must be after DarkLangMiddleware. - # TODO: Re-import the Django version once we upgrade to Django 1.8 [PLAT-671] - # 'django.middleware.locale.LocaleMiddleware', - 'django_locale.middleware.LocaleMiddleware', + 'django.middleware.locale.LocaleMiddleware', - 'django.middleware.transaction.TransactionMiddleware', # 'debug_toolbar.middleware.DebugToolbarMiddleware', 'django_comment_client.utils.ViewNameMiddleware', @@ -1802,8 +1811,8 @@ 'django.contrib.messages', 'django.contrib.sessions', 'django.contrib.sites', + 'django.contrib.staticfiles', 'djcelery', - 'south', # Common views 'openedx.core.djangoapps.common_views', @@ -1823,7 +1832,6 @@ # For asset pipelining 'edxmako', 'pipeline', - 'django.contrib.staticfiles', 'static_replace', # Theming @@ -1836,7 +1844,7 @@ 'static_template_view', 'staticbook', 'track', - 'eventtracking.django', + 'eventtracking.django.apps.EventTrackingConfig', 'util', 'certificates', 'dashboard', @@ -1861,6 +1869,8 @@ 'provider.oauth2', 'oauth2_provider', + 'third_party_auth', + # We don't use this directly (since we use OAuth2), but we need to install it anyway. # When a user is deleted, Django queries all tables with a FK to the auth_user table, # and since django-rest-framework-oauth imports this, it will try to access tables @@ -1921,7 +1931,7 @@ 'enrollment', # Student Identity Verification - 'verify_student', + 'lms.djangoapps.verify_student', # Dark-launching languages 'dark_lang', @@ -1948,6 +1958,7 @@ # edX Mobile API 'mobile_api', + 'social.apps.django_app.default', # Surveys 'survey', @@ -1975,7 +1986,7 @@ 'openedx.core.djangoapps.credit', # Course teams - 'teams', + 'lms.djangoapps.teams', 'xblock_django', @@ -1984,8 +1995,15 @@ # Self-paced course configuration 'openedx.core.djangoapps.self_paced', + + 'sorl.thumbnail', ) +# Migrations which are not in the standard module "migrations" +MIGRATION_MODULES = { + 'social.apps.django_app.default': 'social.apps.django_app.default.south_migrations' +} + ######################### CSRF ######################################### # Forwards-compatibility with Django 1.7 @@ -2222,10 +2240,6 @@ PASSWORD_DICTIONARY_EDIT_DISTANCE_THRESHOLD = None PASSWORD_DICTIONARY = [] -##################### LinkedIn ##################### -INSTALLED_APPS += ('django_openid_auth',) - - ############################ ORA 2 ############################################ # By default, don't use a file prefix @@ -2653,6 +2667,9 @@ # to throttling. CREDIT_TASK_MAX_RETRIES = 5 +# Dummy secret key for dev/test +SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd' + # Secret keys shared with credit providers. # Used to digitally sign credit requests (us --> provider) # and validate responses (provider --> us). diff --git a/lms/envs/dev.py b/lms/envs/dev.py index f8b00de05ee6..951cfd38d342 100644 --- a/lms/envs/dev.py +++ b/lms/envs/dev.py @@ -59,6 +59,7 @@ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ENV_ROOT / "db" / "edx.db", + 'ATOMIC_REQUESTS': True, } } @@ -206,9 +207,6 @@ FEATURES['AUTH_USE_OPENID_PROVIDER'] = True FEATURES['BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH'] = True -INSTALLED_APPS += ('external_auth',) -INSTALLED_APPS += ('django_openid_auth',) - OPENID_CREATE_USERS = False OPENID_UPDATE_DETAILS_FROM_SREG = True OPENID_SSO_SERVER_URL = 'https://www.google.com/accounts/o8/id' # TODO: accept more endpoints diff --git a/lms/envs/dev_with_worker.py b/lms/envs/dev_with_worker.py index fe151c291ad7..68eb1c9355f8 100644 --- a/lms/envs/dev_with_worker.py +++ b/lms/envs/dev_with_worker.py @@ -29,11 +29,5 @@ # Disable transaction management because we are using a worker. Views # that request a task and wait for the result will deadlock otherwise. - -MIDDLEWARE_CLASSES = tuple( - c for c in MIDDLEWARE_CLASSES - if c != 'django.middleware.transaction.TransactionMiddleware') - -# Note: other alternatives for disabling transactions don't work in 1.4 -# https://code.djangoproject.com/ticket/2304 -# https://code.djangoproject.com/ticket/16039 +for database_name in DATABASES: + DATABASES[database_name]['ATOMIC_REQUESTS'] = False diff --git a/lms/envs/devplus.py b/lms/envs/devplus.py index 708e65fdc576..86800d884791 100644 --- a/lms/envs/devplus.py +++ b/lms/envs/devplus.py @@ -30,6 +30,7 @@ 'PASSWORD': '', 'HOST': '127.0.0.1', 'PORT': '3306', + 'ATOMIC_REQUESTS': True, } } diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index 5bdac8bac25e..897768757b56 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -12,7 +12,7 @@ DEBUG = True USE_I18N = True -TEMPLATE_DEBUG = True +DEFAULT_TEMPLATE_ENGINE['OPTIONS']['debug'] = True SITE_NAME = 'localhost:8000' PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', 'Devstack') # By default don't use a worker, execute tasks as if they were local functions @@ -162,7 +162,7 @@ def should_show_debug_toolbar(_): ########################## Course Discovery ####################### -from django.utils.translation import ugettext as _ +_ = lambda s: s LANGUAGE_MAP = {'terms': {lang: display for lang, display in ALL_LANGUAGES}, 'name': _('Language')} COURSE_DISCOVERY_MEANINGS = { 'org': { diff --git a/lms/envs/load_test.py b/lms/envs/load_test.py index d050b8b32fd4..3ebe44182c47 100644 --- a/lms/envs/load_test.py +++ b/lms/envs/load_test.py @@ -13,5 +13,7 @@ 'django.core.context_processors.csrf', 'django.middleware.csrf.CsrfViewMiddleware' ] -TEMPLATE_CONTEXT_PROCESSORS = filter(EXCLUDE_CSRF, TEMPLATE_CONTEXT_PROCESSORS) +DEFAULT_TEMPLATE_ENGINE['OPTIONS']['context_processors'] = filter( + EXCLUDE_CSRF, DEFAULT_TEMPLATE_ENGINE['OPTIONS']['context_processors'] +) MIDDLEWARE_CLASSES = filter(EXCLUDE_CSRF, MIDDLEWARE_CLASSES) diff --git a/lms/envs/static.py b/lms/envs/static.py index 674807e1842f..f0da488e75b2 100644 --- a/lms/envs/static.py +++ b/lms/envs/static.py @@ -26,6 +26,7 @@ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ENV_ROOT / "db" / "edx.db", + 'ATOMIC_REQUESTS': True, } } diff --git a/lms/envs/test.py b/lms/envs/test.py index 91fe133dd912..e58a311fff8a 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -26,6 +26,11 @@ from openedx.core.lib.tempdir import mkdtemp_clean +# This patch disabes the commit_on_success decorator during tests +# in TestCase subclasses. +from util.testing import patch_testcase +patch_testcase() + # Silence noisy logs to make troubleshooting easier when tests fail. import logging LOG_OVERRIDES = [ @@ -180,11 +185,16 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': TEST_ROOT / 'db' / 'edx.db' + 'NAME': TEST_ROOT / 'db' / 'edx.db', + 'ATOMIC_REQUESTS': True, }, } +# This hack disables migrations during tests. We want to create tables directly from the models for speed. +# See https://groups.google.com/d/msg/django-developers/PWPj3etj3-U/kCl6pMsQYYoJ. +MIGRATION_MODULES = {app: "app.migrations_not_used_in_tests" for app in INSTALLED_APPS} + CACHES = { # This is the cache used for most things. # In staging/prod envs, the sessions also live here. @@ -499,8 +509,8 @@ # Enable teams feature for tests. FEATURES['ENABLE_TEAMS'] = True -# Add milestones to Installed apps for testing -INSTALLED_APPS += ('milestones', 'openedx.core.djangoapps.call_stack_manager') +# Add apps to Installed apps for testing +INSTALLED_APPS += ('openedx.core.djangoapps.call_stack_manager',) # Enable courseware search for tests FEATURES['ENABLE_COURSEWARE_SEARCH'] = True @@ -516,7 +526,7 @@ FACEBOOK_API_VERSION = "v2.2" ######### custom courses ######### -INSTALLED_APPS += ('ccx',) +INSTALLED_APPS += ('lms.djangoapps.ccx',) FEATURES['CUSTOM_COURSES_EDX'] = True # Set dummy values for profile image settings. diff --git a/lms/envs/test_static_optimized.py b/lms/envs/test_static_optimized.py index 58dd303064ac..19eaa2814ed3 100644 --- a/lms/envs/test_static_optimized.py +++ b/lms/envs/test_static_optimized.py @@ -17,6 +17,7 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', + 'ATOMIC_REQUESTS': True, }, } diff --git a/lms/envs/test_with_mysql.py b/lms/envs/test_with_mysql.py new file mode 100644 index 000000000000..36d3d04ec841 --- /dev/null +++ b/lms/envs/test_with_mysql.py @@ -0,0 +1,15 @@ +""" +Used when testing with MySQL. +""" +from .test import * # pylint: disable=wildcard-import +from .aws import * # pylint: disable=wildcard-import + +# Dummy secret key for dev +SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd' + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + + 'lms.djangoapps.verify_student', +) diff --git a/lms/envs/yaml_config.py b/lms/envs/yaml_config.py index 37284af0510f..fbb01afd8647 100644 --- a/lms/envs/yaml_config.py +++ b/lms/envs/yaml_config.py @@ -121,11 +121,6 @@ def construct_yaml_str(self, node): # Each worker should only fetch one message at a time CELERYD_PREFETCH_MULTIPLIER = 1 -# Skip djcelery migrations, since we don't use the database as the broker -SOUTH_MIGRATION_MODULES = { - 'djcelery': 'ignore', -} - # Rename the exchange and queues for each variant QUEUE_VARIANT = CONFIG_PREFIX.lower() @@ -303,9 +298,9 @@ def construct_yaml_str(self, node): ##### Custom Courses for EdX ##### if FEATURES.get('CUSTOM_COURSES_EDX'): - INSTALLED_APPS += ('ccx',) + INSTALLED_APPS += ('lms.djangoapps.ccx',) FIELD_OVERRIDE_PROVIDERS += ( - 'ccx.overrides.CustomCoursesForEdxOverrideProvider', + 'lms.djangoapps.ccx.overrides.CustomCoursesForEdxOverrideProvider', ) ##### Individual Due Date Extensions ##### diff --git a/lms/startup.py b/lms/startup.py index 92ea5e01902f..15a36615bb0a 100644 --- a/lms/startup.py +++ b/lms/startup.py @@ -4,6 +4,7 @@ # pylint: disable=unused-argument +import django from django.conf import settings # Force settings to run so that the python path is modified @@ -12,8 +13,8 @@ from openedx.core.lib.django_startup import autostartup import edxmako import logging -from monkey_patch import django_utils_translation import analytics +from monkey_patch import third_party_auth import xmodule.x_module @@ -26,7 +27,13 @@ def run(): """ Executed during django startup """ - django_utils_translation.patch() + third_party_auth.patch() + + # To override the settings before executing the autostartup() for python-social-auth + if settings.FEATURES.get('ENABLE_THIRD_PARTY_AUTH', False): + enable_third_party_auth() + + django.setup() autostartup() @@ -38,9 +45,6 @@ def run(): if settings.FEATURES.get('USE_MICROSITES', False): enable_microsites() - if settings.FEATURES.get('ENABLE_THIRD_PARTY_AUTH', False): - enable_third_party_auth() - # Initialize Segment analytics module by setting the write_key. if settings.LMS_SEGMENT_KEY: analytics.write_key = settings.LMS_SEGMENT_KEY @@ -101,7 +105,7 @@ def enable_stanford_theme(): theme_root = settings.ENV_ROOT / "themes" / settings.THEME_NAME # Include the theme's templates in the template search paths - settings.TEMPLATE_DIRS.insert(0, theme_root / 'templates') + settings.DEFAULT_TEMPLATE_ENGINE['DIRS'].insert(0, theme_root / 'templates') edxmako.paths.add_lookup('main', theme_root / 'templates', prepend=True) # Namespace the theme's static files to 'themes/' to @@ -149,7 +153,7 @@ def enable_microsites(): # if we have any valid microsites defined, let's wire in the Mako and STATIC_FILES search paths if microsite_config_dict: - settings.TEMPLATE_DIRS.append(microsites_root) + settings.DEFAULT_TEMPLATE_ENGINE['DIRS'].append(microsites_root) edxmako.paths.add_lookup('main', microsites_root) settings.STATICFILES_DIRS.insert(0, microsites_root) diff --git a/lms/templates/navigation.html b/lms/templates/navigation.html index 1fb2af233a04..fcc3ae043173 100644 --- a/lms/templates/navigation.html +++ b/lms/templates/navigation.html @@ -7,7 +7,7 @@ from microsite_configuration import microsite from microsite_configuration.templatetags.microsite import platform_name -from ccx.overrides import get_current_ccx +from lms.djangoapps.ccx.overrides import get_current_ccx # App that handles subdomain specific branding import branding diff --git a/lms/templates/verify_student/missed_deadline.html b/lms/templates/verify_student/missed_deadline.html index 26192f2fd5e5..05be90691152 100644 --- a/lms/templates/verify_student/missed_deadline.html +++ b/lms/templates/verify_student/missed_deadline.html @@ -1,6 +1,6 @@ <%! from django.utils.translation import ugettext as _ -from verify_student.views import PayAndVerifyView +from lms.djangoapps.verify_student.views import PayAndVerifyView %> <%namespace name='static' file='../static_content.html'/> diff --git a/lms/templates/verify_student/pay_and_verify.html b/lms/templates/verify_student/pay_and_verify.html index 6c629296cff7..d439909323ff 100644 --- a/lms/templates/verify_student/pay_and_verify.html +++ b/lms/templates/verify_student/pay_and_verify.html @@ -1,7 +1,7 @@ <%! import json from django.utils.translation import ugettext as _ -from verify_student.views import PayAndVerifyView +from lms.djangoapps.verify_student.views import PayAndVerifyView %> <%namespace name='static' file='../static_content.html'/> diff --git a/lms/urls.py b/lms/urls.py index d360848c7332..84f48ee65f5c 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -4,6 +4,7 @@ from django.conf import settings from django.conf.urls import patterns, include, url +from django.views.generic.base import RedirectView from ratelimitbackend import admin from django.conf.urls.static import static @@ -50,17 +51,17 @@ url(r'^password_reset/$', 'student.views.password_reset', name='password_reset'), ## Obsolete Django views for password resets ## TODO: Replace with Mako-ized views - url(r'^password_change/$', django.contrib.auth.views.password_change, - name='auth_password_change'), - url(r'^password_change_done/$', django.contrib.auth.views.password_change_done, - name='auth_password_change_done'), + url(r'^password_change/$', 'django.contrib.auth.views.password_change', + name='password_change'), + url(r'^password_change_done/$', 'django.contrib.auth.views.password_change_done', + name='password_change_done'), url(r'^password_reset_confirm/(?P[0-9A-Za-z]+)-(?P.+)/$', 'student.views.password_reset_confirm_wrapper', - name='auth_password_reset_confirm'), - url(r'^password_reset_complete/$', django.contrib.auth.views.password_reset_complete, - name='auth_password_reset_complete'), - url(r'^password_reset_done/$', django.contrib.auth.views.password_reset_done, - name='auth_password_reset_done'), + name='password_reset_confirm'), + url(r'^password_reset_complete/$', 'django.contrib.auth.views.password_reset_complete', + name='password_reset_complete'), + url(r'^password_reset_done/$', 'django.contrib.auth.views.password_reset_done', + name='password_reset_done'), url(r'^heartbeat$', include('heartbeat.urls')), @@ -162,10 +163,9 @@ # Favicon favicon_path = microsite.get_value('favicon_path', settings.FAVICON_PATH) -urlpatterns += (( +urlpatterns += (url( r'^favicon\.ico$', - 'django.views.generic.simple.redirect_to', - {'url': settings.STATIC_URL + favicon_path} + RedirectView.as_view(url=settings.STATIC_URL + favicon_path, permanent=True) ),) # Semi-static views only used by edX, not by themes @@ -496,8 +496,9 @@ if settings.FEATURES["ENABLE_TEAMS"]: # Teams endpoints urlpatterns += ( - url(r'^api/team/', include('teams.api_urls')), - url(r'^courses/{}/teams'.format(settings.COURSE_ID_PATTERN), include('teams.urls'), name="teams_endpoints"), + url(r'^api/team/', include('lms.djangoapps.teams.api_urls')), + url(r'^courses/{}/teams'.format(settings.COURSE_ID_PATTERN), + include('lms.djangoapps.teams.urls'), name="teams_endpoints"), ) # allow course staff to change to student view of courseware diff --git a/openedx/core/djangoapps/call_stack_manager/core.py b/openedx/core/djangoapps/call_stack_manager/core.py index 968ea1e44052..099c8311ac95 100644 --- a/openedx/core/djangoapps/call_stack_manager/core.py +++ b/openedx/core/djangoapps/call_stack_manager/core.py @@ -136,12 +136,12 @@ def delete(self, *args, **kwargs): return super(CallStackMixin, self).delete(*args, **kwargs) -class CallStackManager(Manager): +class CallStackManager(Manager): # pylint: disable=super-on-old-class """ Manager class which overrides the default Manager class for getting call stacks """ - def get_query_set(self): + def get_queryset(self): """ Override the default queryset API method """ capture_call_stack(self.model) - return super(CallStackManager, self).get_query_set() + return super(CallStackManager, self).get_queryset() def donottrack(*entities_not_to_be_tracked): diff --git a/openedx/core/djangoapps/common_views/xblock.py b/openedx/core/djangoapps/common_views/xblock.py index e800bf24322e..85b45f25c634 100644 --- a/openedx/core/djangoapps/common_views/xblock.py +++ b/openedx/core/djangoapps/common_views/xblock.py @@ -37,4 +37,4 @@ def xblock_resource(request, block_type, uri): # pylint: disable=unused-argumen raise Http404 mimetype, _ = mimetypes.guess_type(uri) - return HttpResponse(content, mimetype=mimetype) + return HttpResponse(content, content_type=mimetype) diff --git a/openedx/core/djangoapps/content/course_overviews/__init__.py b/openedx/core/djangoapps/content/course_overviews/__init__.py index c5bcc278aadf..a0d7bf38ac93 100644 --- a/openedx/core/djangoapps/content/course_overviews/__init__.py +++ b/openedx/core/djangoapps/content/course_overviews/__init__.py @@ -22,7 +22,3 @@ a user enrollment dashboard, a course metadata API, or a course marketing page. """ - -# importing signals is necessary to activate signal handler, which invalidates -# the CourseOverview cache every time a course is published -import openedx.core.djangoapps.content.course_overviews.signals # pylint: disable=unused-import diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0001_initial.py b/openedx/core/djangoapps/content/course_overviews/migrations/0001_initial.py index 7c69d3cd9211..aa310bcc9aa4 100644 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0001_initial.py +++ b/openedx/core/djangoapps/content/course_overviews/migrations/0001_initial.py @@ -1,70 +1,60 @@ # -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseOverview' - db.create_table('course_overviews_courseoverview', ( - ('id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, primary_key=True, db_index=True)), - ('_location', self.gf('xmodule_django.models.UsageKeyField')(max_length=255)), - ('display_name', self.gf('django.db.models.fields.TextField')(null=True)), - ('display_number_with_default', self.gf('django.db.models.fields.TextField')()), - ('display_org_with_default', self.gf('django.db.models.fields.TextField')()), - ('start', self.gf('django.db.models.fields.DateTimeField')(null=True)), - ('end', self.gf('django.db.models.fields.DateTimeField')(null=True)), - ('advertised_start', self.gf('django.db.models.fields.TextField')(null=True)), - ('course_image_url', self.gf('django.db.models.fields.TextField')()), - ('facebook_url', self.gf('django.db.models.fields.TextField')(null=True)), - ('social_sharing_url', self.gf('django.db.models.fields.TextField')(null=True)), - ('end_of_course_survey_url', self.gf('django.db.models.fields.TextField')(null=True)), - ('certificates_display_behavior', self.gf('django.db.models.fields.TextField')(null=True)), - ('certificates_show_before_end', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('has_any_active_web_certificate', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('cert_name_short', self.gf('django.db.models.fields.TextField')()), - ('cert_name_long', self.gf('django.db.models.fields.TextField')()), - ('lowest_passing_grade', self.gf('django.db.models.fields.DecimalField')(max_digits=5, decimal_places=2)), - ('mobile_available', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('visible_to_staff_only', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('_pre_requisite_courses_json', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('course_overviews', ['CourseOverview']) - - - def backwards(self, orm): - # Deleting model 'CourseOverview' - db.delete_table('course_overviews_courseoverview') - - - models = { - 'course_overviews.courseoverview': { - 'Meta': {'object_name': 'CourseOverview'}, - '_location': ('xmodule_django.models.UsageKeyField', [], {'max_length': '255'}), - '_pre_requisite_courses_json': ('django.db.models.fields.TextField', [], {}), - 'advertised_start': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'cert_name_long': ('django.db.models.fields.TextField', [], {}), - 'cert_name_short': ('django.db.models.fields.TextField', [], {}), - 'certificates_display_behavior': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'certificates_show_before_end': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_image_url': ('django.db.models.fields.TextField', [], {}), - 'display_name': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'display_number_with_default': ('django.db.models.fields.TextField', [], {}), - 'display_org_with_default': ('django.db.models.fields.TextField', [], {}), - 'end': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'end_of_course_survey_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'facebook_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'has_any_active_web_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'primary_key': 'True', 'db_index': 'True'}), - 'lowest_passing_grade': ('django.db.models.fields.DecimalField', [], {'max_digits': '5', 'decimal_places': '2'}), - 'mobile_available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'social_sharing_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'start': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'visible_to_staff_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['course_overviews'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import migrations, models +import django.utils.timezone +import model_utils.fields +import xmodule_django.models + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='CourseOverview', + fields=[ + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('version', models.IntegerField()), + ('id', xmodule_django.models.CourseKeyField(max_length=255, serialize=False, primary_key=True, db_index=True)), + ('_location', xmodule_django.models.UsageKeyField(max_length=255)), + ('display_name', models.TextField(null=True)), + ('display_number_with_default', models.TextField()), + ('display_org_with_default', models.TextField()), + ('start', models.DateTimeField(null=True)), + ('end', models.DateTimeField(null=True)), + ('advertised_start', models.TextField(null=True)), + ('course_image_url', models.TextField()), + ('facebook_url', models.TextField(null=True)), + ('social_sharing_url', models.TextField(null=True)), + ('end_of_course_survey_url', models.TextField(null=True)), + ('certificates_display_behavior', models.TextField(null=True)), + ('certificates_show_before_end', models.BooleanField(default=False)), + ('cert_html_view_enabled', models.BooleanField(default=False)), + ('has_any_active_web_certificate', models.BooleanField(default=False)), + ('cert_name_short', models.TextField()), + ('cert_name_long', models.TextField()), + ('lowest_passing_grade', models.DecimalField(null=True, max_digits=5, decimal_places=2)), + ('days_early_for_beta', models.FloatField(null=True)), + ('mobile_available', models.BooleanField(default=False)), + ('visible_to_staff_only', models.BooleanField(default=False)), + ('_pre_requisite_courses_json', models.TextField()), + ('enrollment_start', models.DateTimeField(null=True)), + ('enrollment_end', models.DateTimeField(null=True)), + ('enrollment_domain', models.TextField(null=True)), + ('invitation_only', models.BooleanField(default=False)), + ('max_student_enrollments_allowed', models.IntegerField(null=True)), + ], + ), + migrations.CreateModel( + name='CourseOverviewTab', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('tab_id', models.CharField(max_length=50)), + ('course_overview', models.ForeignKey(related_name='tabs', to='course_overviews.CourseOverview')), + ], + ), + ] diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0002_add_days_early_for_beta.py b/openedx/core/djangoapps/content/course_overviews/migrations/0002_add_days_early_for_beta.py deleted file mode 100644 index 341315b38ef5..000000000000 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0002_add_days_early_for_beta.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseOverview.days_early_for_beta' - - # The default value for the days_early_for_beta column is null. However, - # for courses already in the table that have a non-null value for - # days_early_for_beta, this would be invalid. So, we must clear the - # table before adding the new column. - - db.clear_table('course_overviews_courseoverview') - db.add_column('course_overviews_courseoverview', 'days_early_for_beta', - self.gf('django.db.models.fields.FloatField')(null=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CourseOverview.days_early_for_beta' - db.delete_column('course_overviews_courseoverview', 'days_early_for_beta') - - - models = { - 'course_overviews.courseoverview': { - 'Meta': {'object_name': 'CourseOverview'}, - '_location': ('xmodule_django.models.UsageKeyField', [], {'max_length': '255'}), - '_pre_requisite_courses_json': ('django.db.models.fields.TextField', [], {}), - 'advertised_start': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'cert_name_long': ('django.db.models.fields.TextField', [], {}), - 'cert_name_short': ('django.db.models.fields.TextField', [], {}), - 'certificates_display_behavior': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'certificates_show_before_end': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_image_url': ('django.db.models.fields.TextField', [], {}), - 'days_early_for_beta': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'display_name': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'display_number_with_default': ('django.db.models.fields.TextField', [], {}), - 'display_org_with_default': ('django.db.models.fields.TextField', [], {}), - 'end': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'end_of_course_survey_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'facebook_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'has_any_active_web_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'primary_key': 'True', 'db_index': 'True'}), - 'lowest_passing_grade': ('django.db.models.fields.DecimalField', [], {'max_digits': '5', 'decimal_places': '2'}), - 'mobile_available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'social_sharing_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'start': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'visible_to_staff_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['course_overviews'] \ No newline at end of file diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0003_add_cert_html_view_enabled.py b/openedx/core/djangoapps/content/course_overviews/migrations/0003_add_cert_html_view_enabled.py deleted file mode 100644 index 3e1523678605..000000000000 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0003_add_cert_html_view_enabled.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseOverview.cert_html_view_enabled' - - # The default value for the cert_html_view_eanbled column is False. - # However, for courses in the table for which cert_html_view_enabled - # should be True, this would be invalid. So, we must clear the - # table before adding the new column. - - db.clear_table('course_overviews_courseoverview') - db.add_column('course_overviews_courseoverview', 'cert_html_view_enabled', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CourseOverview.cert_html_view_enabled' - db.delete_column('course_overviews_courseoverview', 'cert_html_view_enabled') - - - models = { - 'course_overviews.courseoverview': { - 'Meta': {'object_name': 'CourseOverview'}, - '_location': ('xmodule_django.models.UsageKeyField', [], {'max_length': '255'}), - '_pre_requisite_courses_json': ('django.db.models.fields.TextField', [], {}), - 'advertised_start': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'cert_html_view_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cert_name_long': ('django.db.models.fields.TextField', [], {}), - 'cert_name_short': ('django.db.models.fields.TextField', [], {}), - 'certificates_display_behavior': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'certificates_show_before_end': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_image_url': ('django.db.models.fields.TextField', [], {}), - 'days_early_for_beta': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'display_name': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'display_number_with_default': ('django.db.models.fields.TextField', [], {}), - 'display_org_with_default': ('django.db.models.fields.TextField', [], {}), - 'end': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'end_of_course_survey_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'facebook_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'has_any_active_web_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'primary_key': 'True', 'db_index': 'True'}), - 'lowest_passing_grade': ('django.db.models.fields.DecimalField', [], {'max_digits': '5', 'decimal_places': '2'}), - 'mobile_available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'social_sharing_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'start': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'visible_to_staff_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['course_overviews'] \ No newline at end of file diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0004_default_lowest_passing_grade_to_None.py b/openedx/core/djangoapps/content/course_overviews/migrations/0004_default_lowest_passing_grade_to_None.py deleted file mode 100644 index 0876dbe7470e..000000000000 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0004_default_lowest_passing_grade_to_None.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'CourseOverview.lowest_passing_grade' - db.alter_column('course_overviews_courseoverview', 'lowest_passing_grade', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=5, decimal_places=2)) - - def backwards(self, orm): - - # Changing field 'CourseOverview.lowest_passing_grade' - db.alter_column('course_overviews_courseoverview', 'lowest_passing_grade', self.gf('django.db.models.fields.DecimalField')(default=0.5, max_digits=5, decimal_places=2)) - - models = { - 'course_overviews.courseoverview': { - 'Meta': {'object_name': 'CourseOverview'}, - '_location': ('xmodule_django.models.UsageKeyField', [], {'max_length': '255'}), - '_pre_requisite_courses_json': ('django.db.models.fields.TextField', [], {}), - 'advertised_start': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'cert_html_view_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cert_name_long': ('django.db.models.fields.TextField', [], {}), - 'cert_name_short': ('django.db.models.fields.TextField', [], {}), - 'certificates_display_behavior': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'certificates_show_before_end': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_image_url': ('django.db.models.fields.TextField', [], {}), - 'days_early_for_beta': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'display_name': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'display_number_with_default': ('django.db.models.fields.TextField', [], {}), - 'display_org_with_default': ('django.db.models.fields.TextField', [], {}), - 'end': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'end_of_course_survey_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'facebook_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'has_any_active_web_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'primary_key': 'True', 'db_index': 'True'}), - 'lowest_passing_grade': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '5', 'decimal_places': '2'}), - 'mobile_available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'social_sharing_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'start': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'visible_to_staff_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['course_overviews'] \ No newline at end of file diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0005_add_enrollment_fields.py b/openedx/core/djangoapps/content/course_overviews/migrations/0005_add_enrollment_fields.py deleted file mode 100644 index 25c94e240acf..000000000000 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0005_add_enrollment_fields.py +++ /dev/null @@ -1,94 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # The default values for these new columns may not match the actual - # values of courses already present in the table. To ensure that the - # cached values are correct, we must clear the table before adding any - # new columns. - db.clear_table('course_overviews_courseoverview') - - # Adding field 'CourseOverview.enrollment_start' - db.add_column('course_overviews_courseoverview', 'enrollment_start', - self.gf('django.db.models.fields.DateTimeField')(null=True), - keep_default=False) - - # Adding field 'CourseOverview.enrollment_end' - db.add_column('course_overviews_courseoverview', 'enrollment_end', - self.gf('django.db.models.fields.DateTimeField')(null=True), - keep_default=False) - - # Adding field 'CourseOverview.enrollment_domain' - db.add_column('course_overviews_courseoverview', 'enrollment_domain', - self.gf('django.db.models.fields.TextField')(null=True), - keep_default=False) - - # Adding field 'CourseOverview.invitation_only' - db.add_column('course_overviews_courseoverview', 'invitation_only', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - # Adding field 'CourseOverview.max_student_enrollments_allowed' - db.add_column('course_overviews_courseoverview', 'max_student_enrollments_allowed', - self.gf('django.db.models.fields.IntegerField')(null=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CourseOverview.enrollment_start' - db.delete_column('course_overviews_courseoverview', 'enrollment_start') - - # Deleting field 'CourseOverview.enrollment_end' - db.delete_column('course_overviews_courseoverview', 'enrollment_end') - - # Deleting field 'CourseOverview.enrollment_domain' - db.delete_column('course_overviews_courseoverview', 'enrollment_domain') - - # Deleting field 'CourseOverview.invitation_only' - db.delete_column('course_overviews_courseoverview', 'invitation_only') - - # Deleting field 'CourseOverview.max_student_enrollments_allowed' - db.delete_column('course_overviews_courseoverview', 'max_student_enrollments_allowed') - - - models = { - 'course_overviews.courseoverview': { - 'Meta': {'object_name': 'CourseOverview'}, - '_location': ('xmodule_django.models.UsageKeyField', [], {'max_length': '255'}), - '_pre_requisite_courses_json': ('django.db.models.fields.TextField', [], {}), - 'advertised_start': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'cert_html_view_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cert_name_long': ('django.db.models.fields.TextField', [], {}), - 'cert_name_short': ('django.db.models.fields.TextField', [], {}), - 'certificates_display_behavior': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'certificates_show_before_end': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_image_url': ('django.db.models.fields.TextField', [], {}), - 'days_early_for_beta': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'display_name': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'display_number_with_default': ('django.db.models.fields.TextField', [], {}), - 'display_org_with_default': ('django.db.models.fields.TextField', [], {}), - 'end': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'end_of_course_survey_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'enrollment_domain': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'enrollment_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'enrollment_start': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'facebook_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'has_any_active_web_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'primary_key': 'True', 'db_index': 'True'}), - 'invitation_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'lowest_passing_grade': ('django.db.models.fields.DecimalField', [], {'max_digits': '5', 'decimal_places': '2', 'null': 'True'}), - 'max_student_enrollments_allowed': ('django.db.models.fields.IntegerField', [], {'null': 'True'}), - 'mobile_available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'social_sharing_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'start': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'visible_to_staff_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['course_overviews'] \ No newline at end of file diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0006_add_version_and_timestamp.py b/openedx/core/djangoapps/content/course_overviews/migrations/0006_add_version_and_timestamp.py deleted file mode 100644 index 0cf8b3171675..000000000000 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0006_add_version_and_timestamp.py +++ /dev/null @@ -1,75 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseOverview.created' - db.add_column('course_overviews_courseoverview', 'created', - self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now), - keep_default=False) - - # Adding field 'CourseOverview.modified' - db.add_column('course_overviews_courseoverview', 'modified', - self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now), - keep_default=False) - - # Adding field 'CourseOverview.version' - db.add_column('course_overviews_courseoverview', 'version', - self.gf('django.db.models.fields.IntegerField')(default=0), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CourseOverview.created' - db.delete_column('course_overviews_courseoverview', 'created') - - # Deleting field 'CourseOverview.modified' - db.delete_column('course_overviews_courseoverview', 'modified') - - # Deleting field 'CourseOverview.version' - db.delete_column('course_overviews_courseoverview', 'version') - - - models = { - 'course_overviews.courseoverview': { - 'Meta': {'object_name': 'CourseOverview'}, - '_location': ('xmodule_django.models.UsageKeyField', [], {'max_length': '255'}), - '_pre_requisite_courses_json': ('django.db.models.fields.TextField', [], {}), - 'advertised_start': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'cert_html_view_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cert_name_long': ('django.db.models.fields.TextField', [], {}), - 'cert_name_short': ('django.db.models.fields.TextField', [], {}), - 'certificates_display_behavior': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'certificates_show_before_end': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_image_url': ('django.db.models.fields.TextField', [], {}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'days_early_for_beta': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'display_name': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'display_number_with_default': ('django.db.models.fields.TextField', [], {}), - 'display_org_with_default': ('django.db.models.fields.TextField', [], {}), - 'end': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'end_of_course_survey_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'enrollment_domain': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'enrollment_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'enrollment_start': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'facebook_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'has_any_active_web_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'primary_key': 'True', 'db_index': 'True'}), - 'invitation_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'lowest_passing_grade': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '5', 'decimal_places': '2'}), - 'max_student_enrollments_allowed': ('django.db.models.fields.IntegerField', [], {'null': 'True'}), - 'mobile_available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'social_sharing_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'start': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'version': ('django.db.models.fields.IntegerField', [], {}), - 'visible_to_staff_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - } - } - - complete_apps = ['course_overviews'] \ No newline at end of file diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0007_auto__add_courseoverviewtab.py b/openedx/core/djangoapps/content/course_overviews/migrations/0007_auto__add_courseoverviewtab.py deleted file mode 100644 index 70f4ca08c022..000000000000 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0007_auto__add_courseoverviewtab.py +++ /dev/null @@ -1,68 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseOverviewTab' - db.create_table('course_overviews_courseoverviewtab', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('tab_id', self.gf('django.db.models.fields.CharField')(max_length=50)), - ('course_overview', self.gf('django.db.models.fields.related.ForeignKey')(related_name='tabs', to=orm['course_overviews.CourseOverview'])), - )) - db.send_create_signal('course_overviews', ['CourseOverviewTab']) - - - def backwards(self, orm): - # Deleting model 'CourseOverviewTab' - db.delete_table('course_overviews_courseoverviewtab') - - - models = { - 'course_overviews.courseoverview': { - 'Meta': {'object_name': 'CourseOverview'}, - '_location': ('xmodule_django.models.UsageKeyField', [], {'max_length': '255'}), - '_pre_requisite_courses_json': ('django.db.models.fields.TextField', [], {}), - 'advertised_start': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'cert_html_view_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cert_name_long': ('django.db.models.fields.TextField', [], {}), - 'cert_name_short': ('django.db.models.fields.TextField', [], {}), - 'certificates_display_behavior': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'certificates_show_before_end': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_image_url': ('django.db.models.fields.TextField', [], {}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'days_early_for_beta': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'display_name': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'display_number_with_default': ('django.db.models.fields.TextField', [], {}), - 'display_org_with_default': ('django.db.models.fields.TextField', [], {}), - 'end': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'end_of_course_survey_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'enrollment_domain': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'enrollment_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'enrollment_start': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'facebook_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'has_any_active_web_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'primary_key': 'True', 'db_index': 'True'}), - 'invitation_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'lowest_passing_grade': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '5', 'decimal_places': '2'}), - 'max_student_enrollments_allowed': ('django.db.models.fields.IntegerField', [], {'null': 'True'}), - 'mobile_available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'social_sharing_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'start': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'version': ('django.db.models.fields.IntegerField', [], {}), - 'visible_to_staff_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'course_overviews.courseoverviewtab': { - 'Meta': {'object_name': 'CourseOverviewTab'}, - 'course_overview': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tabs'", 'to': "orm['course_overviews.CourseOverview']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'tab_id': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - } - } - - complete_apps = ['course_overviews'] \ No newline at end of file diff --git a/openedx/core/djangoapps/content/course_overviews/migrations/0008_drop_course_tabs_fk_constraint.py b/openedx/core/djangoapps/content/course_overviews/migrations/0008_drop_course_tabs_fk_constraint.py deleted file mode 100644 index 2adbc9ad6769..000000000000 --- a/openedx/core/djangoapps/content/course_overviews/migrations/0008_drop_course_tabs_fk_constraint.py +++ /dev/null @@ -1,63 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Foreign keys aren't enforced by default on our version of SQLite3, and - # trying to delete them will throw an error. See: - # http://south.aeracode.org/ticket/775 - if db.backend_name != 'sqlite3': - db.delete_foreign_key('course_overviews_courseoverviewtab', 'course_overview_id') - - def backwards(self, orm): - pass - - models = { - 'course_overviews.courseoverview': { - 'Meta': {'object_name': 'CourseOverview'}, - '_location': ('xmodule_django.models.UsageKeyField', [], {'max_length': '255'}), - '_pre_requisite_courses_json': ('django.db.models.fields.TextField', [], {}), - 'advertised_start': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'cert_html_view_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'cert_name_long': ('django.db.models.fields.TextField', [], {}), - 'cert_name_short': ('django.db.models.fields.TextField', [], {}), - 'certificates_display_behavior': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'certificates_show_before_end': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'course_image_url': ('django.db.models.fields.TextField', [], {}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'days_early_for_beta': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'display_name': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'display_number_with_default': ('django.db.models.fields.TextField', [], {}), - 'display_org_with_default': ('django.db.models.fields.TextField', [], {}), - 'end': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'end_of_course_survey_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'enrollment_domain': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'enrollment_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'enrollment_start': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'facebook_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'has_any_active_web_certificate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'primary_key': 'True', 'db_index': 'True'}), - 'invitation_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'lowest_passing_grade': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '5', 'decimal_places': '2'}), - 'max_student_enrollments_allowed': ('django.db.models.fields.IntegerField', [], {'null': 'True'}), - 'mobile_available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'social_sharing_url': ('django.db.models.fields.TextField', [], {'null': 'True'}), - 'start': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'version': ('django.db.models.fields.IntegerField', [], {}), - 'visible_to_staff_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'course_overviews.courseoverviewtab': { - 'Meta': {'object_name': 'CourseOverviewTab'}, - 'course_overview': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tabs'", 'to': "orm['course_overviews.CourseOverview']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'tab_id': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - } - } - - complete_apps = ['course_overviews'] \ No newline at end of file diff --git a/openedx/core/djangoapps/content/course_overviews/models.py b/openedx/core/djangoapps/content/course_overviews/models.py index b411be43cc25..aba5d15f9a94 100644 --- a/openedx/core/djangoapps/content/course_overviews/models.py +++ b/openedx/core/djangoapps/content/course_overviews/models.py @@ -2,7 +2,7 @@ Declaration of CourseOverview model """ import json -from django.db import models +from django.db import models, transaction from django.db.models.fields import BooleanField, DateTimeField, DecimalField, TextField, FloatField, IntegerField from django.db.utils import IntegrityError @@ -31,6 +31,9 @@ class CourseOverview(TimeStampedModel): a course as part of a user dashboard or enrollment API. """ + class Meta(object): + app_label = 'course_overviews' + # IMPORTANT: Bump this whenever you modify this model and/or add a migration. VERSION = 2 @@ -57,9 +60,9 @@ class CourseOverview(TimeStampedModel): # Certification data certificates_display_behavior = TextField(null=True) - certificates_show_before_end = BooleanField() - cert_html_view_enabled = BooleanField() - has_any_active_web_certificate = BooleanField() + certificates_show_before_end = BooleanField(default=False) + cert_html_view_enabled = BooleanField(default=False) + has_any_active_web_certificate = BooleanField(default=False) cert_name_short = TextField() cert_name_long = TextField() @@ -68,8 +71,8 @@ class CourseOverview(TimeStampedModel): # Access parameters days_early_for_beta = FloatField(null=True) - mobile_available = BooleanField() - visible_to_staff_only = BooleanField() + mobile_available = BooleanField(default=False) + visible_to_staff_only = BooleanField(default=False) _pre_requisite_courses_json = TextField() # JSON representation of list of CourseKey strings # Enrollment details @@ -110,7 +113,7 @@ def _create_from_course(cls, course): start = course.start end = course.end if isinstance(course.id, CCXLocator): - from ccx.utils import get_ccx_from_ccx_locator # pylint: disable=import-error + from lms.djangoapps.ccx.utils import get_ccx_from_ccx_locator ccx = get_ccx_from_ccx_locator(course.id) display_name = ccx.display_name start = ccx.start @@ -177,11 +180,12 @@ def load_from_module_store(cls, course_id): if isinstance(course, CourseDescriptor): course_overview = cls._create_from_course(course) try: - course_overview.save() - CourseOverviewTab.objects.bulk_create([ - CourseOverviewTab(tab_id=tab.tab_id, course_overview=course_overview) - for tab in course.tabs - ]) + with transaction.atomic(): + course_overview.save() + CourseOverviewTab.objects.bulk_create([ + CourseOverviewTab(tab_id=tab.tab_id, course_overview=course_overview) + for tab in course.tabs + ]) except IntegrityError: # There is a rare race condition that will occur if # CourseOverview.get_from_id is called while a diff --git a/openedx/core/djangoapps/content/course_overviews/startup.py b/openedx/core/djangoapps/content/course_overviews/startup.py new file mode 100644 index 000000000000..8ec2e7100493 --- /dev/null +++ b/openedx/core/djangoapps/content/course_overviews/startup.py @@ -0,0 +1,5 @@ +"""Code run at server start up to initialize the course_overviews app.""" + +# Importing signals is necessary to activate signal handler, which invalidates +# the CourseOverview cache every time a course is published. +import openedx.core.djangoapps.content.course_overviews.signals # pylint: disable=unused-import diff --git a/openedx/core/djangoapps/content/course_overviews/tests.py b/openedx/core/djangoapps/content/course_overviews/tests.py index 6f4b88529e7a..77297f57363a 100644 --- a/openedx/core/djangoapps/content/course_overviews/tests.py +++ b/openedx/core/djangoapps/content/course_overviews/tests.py @@ -367,13 +367,31 @@ def test_course_overview_saving_race_condition(self): with mock.patch( 'openedx.core.djangoapps.content.course_overviews.models.CourseOverview._get_pk_val' ) as mock_get_pk_val: - mock_get_pk_val.return_value = None - - # verify the CourseOverview is loaded successfully both times, - # including after an IntegrityError exception the 2nd time - for _ in range(2): - self.assertIsInstance(CourseOverview.get_from_id(course.id), CourseOverview) + # This method was not present in django 1.4. Django 1.8 calls this method if + # _get_pk_val returns None. This method will return empty str if there is no + # default value present. So mock it to avoid returning the empty str as primary key + # value. Due to empty str, model.save will do an update instead of insert which is + # incorrect and get exception in + # common.djangoapps.xmodule_django.models.OpaqueKeyField.get_prep_value + with mock.patch('django.db.models.Field.get_pk_value_on_save') as mock_get_pk_value_on_save: + + mock_get_pk_value_on_save.return_value = None + + # The CourseOverviewTab entries can't get properly created when the CourseOverview used as a + # foreign key has a None 'id' - the bulk_create raises an IntegrityError. Mock out the + # CourseOverviewTab creation, as those record creations aren't what is being tested in this test. + # This mocking makes the first get_from_id() succeed with no IntegrityError - the 2nd one raises + # an IntegrityError for the reason listed above. + with mock.patch( + 'openedx.core.djangoapps.content.course_overviews.models.CourseOverviewTab.objects.bulk_create' + ) as mock_bulk_create: + mock_bulk_create.return_value = None + + # Verify the CourseOverview is loaded successfully both times, + # including after an IntegrityError exception the 2nd time. + for _ in range(2): + self.assertIsInstance(CourseOverview.get_from_id(course.id), CourseOverview) def test_course_overview_version_update(self): """ diff --git a/openedx/core/djangoapps/content/course_structures/api/v0/tests_api.py b/openedx/core/djangoapps/content/course_structures/api/v0/tests_api.py index b9cd6d04a13d..927c3698c113 100644 --- a/openedx/core/djangoapps/content/course_structures/api/v0/tests_api.py +++ b/openedx/core/djangoapps/content/course_structures/api/v0/tests_api.py @@ -99,7 +99,7 @@ def test_course_structure_with_no_block_types(self): """ Verify that course_structure returns info for entire course. """ - with mock.patch(self.MOCK_CACHE, cache.get_cache(backend='default')): + with mock.patch(self.MOCK_CACHE, cache.caches['default']): with self.assertNumQueries(3): structure = course_structure(self.course.id) @@ -110,7 +110,7 @@ def test_course_structure_with_no_block_types(self): self.assertDictEqual(structure, expected) - with mock.patch(self.MOCK_CACHE, cache.get_cache(backend='default')): + with mock.patch(self.MOCK_CACHE, cache.caches['default']): with self.assertNumQueries(2): course_structure(self.course.id) @@ -120,7 +120,7 @@ def test_course_structure_with_block_types(self): """ block_types = ['html', 'video'] - with mock.patch(self.MOCK_CACHE, cache.get_cache(backend='default')): + with mock.patch(self.MOCK_CACHE, cache.caches['default']): with self.assertNumQueries(3): structure = course_structure(self.course.id, block_types=block_types) @@ -131,7 +131,7 @@ def test_course_structure_with_block_types(self): self.assertDictEqual(structure, expected) - with mock.patch(self.MOCK_CACHE, cache.get_cache(backend='default')): + with mock.patch(self.MOCK_CACHE, cache.caches['default']): with self.assertNumQueries(2): course_structure(self.course.id, block_types=block_types) diff --git a/openedx/core/djangoapps/content/course_structures/migrations/0001_initial.py b/openedx/core/djangoapps/content/course_structures/migrations/0001_initial.py index bafdf7fa047d..2ebaf4035ce2 100644 --- a/openedx/core/djangoapps/content/course_structures/migrations/0001_initial.py +++ b/openedx/core/djangoapps/content/course_structures/migrations/0001_initial.py @@ -1,38 +1,28 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseStructure' - db.create_table('course_structures_coursestructure', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(unique=True, max_length=255, db_index=True)), - ('structure_json', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - )) - db.send_create_signal('course_structures', ['CourseStructure']) - - - def backwards(self, orm): - # Deleting model 'CourseStructure' - db.delete_table('course_structures_coursestructure') - - - models = { - 'course_structures.coursestructure': { - 'Meta': {'object_name': 'CourseStructure'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'structure_json': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['course_structures'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import migrations, models +import django.utils.timezone +import model_utils.fields +import util.models +import xmodule_django.models + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='CourseStructure', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('course_id', xmodule_django.models.CourseKeyField(unique=True, max_length=255, verbose_name=b'Course ID', db_index=True)), + ('structure_json', util.models.CompressedTextField(null=True, verbose_name=b'Structure JSON', blank=True)), + ('discussion_id_map_json', util.models.CompressedTextField(null=True, verbose_name=b'Discussion ID Map JSON', blank=True)), + ], + ), + ] diff --git a/openedx/core/djangoapps/content/course_structures/migrations/0002_auto__add_field_coursestructure_discussion_id_map_json.py b/openedx/core/djangoapps/content/course_structures/migrations/0002_auto__add_field_coursestructure_discussion_id_map_json.py deleted file mode 100644 index 5d8cb4bb41bd..000000000000 --- a/openedx/core/djangoapps/content/course_structures/migrations/0002_auto__add_field_coursestructure_discussion_id_map_json.py +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CourseStructure.discussion_id_map_json' - db.add_column('course_structures_coursestructure', 'discussion_id_map_json', - self.gf('django.db.models.fields.TextField')(null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CourseStructure.discussion_id_map_json' - db.delete_column('course_structures_coursestructure', 'discussion_id_map_json') - - - models = { - 'course_structures.coursestructure': { - 'Meta': {'object_name': 'CourseStructure'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'discussion_id_map_json': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'structure_json': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['course_structures'] \ No newline at end of file diff --git a/openedx/core/djangoapps/content/course_structures/models.py b/openedx/core/djangoapps/content/course_structures/models.py index 40a974583715..9d5931185319 100644 --- a/openedx/core/djangoapps/content/course_structures/models.py +++ b/openedx/core/djangoapps/content/course_structures/models.py @@ -18,6 +18,10 @@ class CourseStructure(TimeStampedModel): """ The CourseStructure model is an aggregated representation of the course content tree """ + + class Meta(object): + app_label = 'course_structures' + course_id = CourseKeyField(max_length=255, db_index=True, unique=True, verbose_name='Course ID') # Right now the only thing we do with the structure doc is store it and diff --git a/openedx/core/djangoapps/course_groups/management/commands/post_cohort_membership_fix.py b/openedx/core/djangoapps/course_groups/management/commands/post_cohort_membership_fix.py index d6134214722e..22886a8a40e0 100644 --- a/openedx/core/djangoapps/course_groups/management/commands/post_cohort_membership_fix.py +++ b/openedx/core/djangoapps/course_groups/management/commands/post_cohort_membership_fix.py @@ -24,10 +24,7 @@ def handle(self, *args, **options): with the database already migrated to post-CohortMembership state, we will use the pre-CohortMembership table CourseUserGroup as the canonical source of truth. This way, changes made in the window are persisted. """ - commit = False - if len(args) == 1: - commit = args[0] == 'commit' - + commit = 'commit' in options memberships_to_delete = 0 memberships_to_add = 0 diff --git a/openedx/core/djangoapps/course_groups/management/commands/tests/test_post_cohort_membership_fix.py b/openedx/core/djangoapps/course_groups/management/commands/tests/test_post_cohort_membership_fix.py index 300901bd0087..893d0e777c4b 100644 --- a/openedx/core/djangoapps/course_groups/management/commands/tests/test_post_cohort_membership_fix.py +++ b/openedx/core/djangoapps/course_groups/management/commands/tests/test_post_cohort_membership_fix.py @@ -71,7 +71,7 @@ def test_post_cohortmembership_fix(self): self.assertEqual(user2_cohorts, ['Course1AutoGroup2']) # CourseUserGroup and CohortMembership disagree # run the post-CohortMembership command, and commit it - call_command('post_cohort_membership_fix', 'commit') + call_command('post_cohort_membership_fix', commit='commit') # verify that both databases agree about the (corrected) state of the memberships self.assertEqual(self.user1.course_groups.count(), 1) diff --git a/openedx/core/djangoapps/course_groups/migrations/0001_initial.py b/openedx/core/djangoapps/course_groups/migrations/0001_initial.py index ca68d6628f14..d1c75181a124 100644 --- a/openedx/core/djangoapps/course_groups/migrations/0001_initial.py +++ b/openedx/core/djangoapps/course_groups/migrations/0001_initial.py @@ -1,105 +1,84 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models, connection +from __future__ import unicode_literals +from django.db import migrations, models +from django.conf import settings +import xmodule_django.models -class Migration(SchemaMigration): - def forwards(self, orm): - # Adding model 'CourseUserGroup' +class Migration(migrations.Migration): - def table_exists(name): - return name in connection.introspection.table_names() + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] - def index_exists(table_name, column_name): - return column_name in connection.introspection.get_indexes(connection.cursor(), table_name) - - # Since this djangoapp has been converted to south migrations after-the-fact, - # these tables/indexes should already exist when migrating an existing installation. - if not ( - table_exists('course_groups_courseusergroup') and - index_exists('course_groups_courseusergroup', 'name') and - index_exists('course_groups_courseusergroup', 'course_id') and - table_exists('course_groups_courseusergroup_users') and - index_exists('course_groups_courseusergroup_users', 'courseusergroup_id') and - index_exists('course_groups_courseusergroup_users', 'user_id') - ): - db.create_table('course_groups_courseusergroup', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255, db_index=True)), - ('group_type', self.gf('django.db.models.fields.CharField')(max_length=20)), - )) - db.send_create_signal('course_groups', ['CourseUserGroup']) - - # Adding unique constraint on 'CourseUserGroup', fields ['name', 'course_id'] - db.create_unique('course_groups_courseusergroup', ['name', 'course_id']) - - # Adding M2M table for field users on 'CourseUserGroup' - db.create_table('course_groups_courseusergroup_users', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('courseusergroup', models.ForeignKey(orm['course_groups.courseusergroup'], null=False)), - ('user', models.ForeignKey(orm['auth.user'], null=False)) - )) - db.create_unique('course_groups_courseusergroup_users', ['courseusergroup_id', 'user_id']) - - def backwards(self, orm): - # Removing unique constraint on 'CourseUserGroup', fields ['name', 'course_id'] - db.delete_unique('course_groups_courseusergroup', ['name', 'course_id']) - - # Deleting model 'CourseUserGroup' - db.delete_table('course_groups_courseusergroup') - - # Removing M2M table for field users on 'CourseUserGroup' - db.delete_table('course_groups_courseusergroup_users') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'course_groups.courseusergroup': { - 'Meta': {'unique_together': "(('name', 'course_id'),)", 'object_name': 'CourseUserGroup'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'group_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'db_index': 'True', 'related_name': "'course_groups'", 'symmetrical': 'False', 'to': "orm['auth.User']"}) - } - } - - complete_apps = ['course_groups'] + operations = [ + migrations.CreateModel( + name='CohortMembership', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255)), + ], + ), + migrations.CreateModel( + name='CourseCohort', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('assignment_type', models.CharField(default=b'manual', max_length=20, choices=[(b'random', b'Random'), (b'manual', b'Manual')])), + ], + ), + migrations.CreateModel( + name='CourseCohortsSettings', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('is_cohorted', models.BooleanField(default=False)), + ('course_id', xmodule_django.models.CourseKeyField(help_text=b'Which course are these settings associated with?', unique=True, max_length=255, db_index=True)), + ('_cohorted_discussions', models.TextField(null=True, db_column=b'cohorted_discussions', blank=True)), + ('always_cohort_inline_discussions', models.BooleanField(default=True)), + ], + ), + migrations.CreateModel( + name='CourseUserGroup', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(help_text=b'What is the name of this group? Must be unique within a course.', max_length=255)), + ('course_id', xmodule_django.models.CourseKeyField(help_text=b'Which course is this group associated with?', max_length=255, db_index=True)), + ('group_type', models.CharField(max_length=20, choices=[(b'cohort', b'Cohort')])), + ('users', models.ManyToManyField(help_text=b'Who is in this group?', related_name='course_groups', to=settings.AUTH_USER_MODEL, db_index=True)), + ], + ), + migrations.CreateModel( + name='CourseUserGroupPartitionGroup', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('partition_id', models.IntegerField(help_text=b'contains the id of a cohorted partition in this course')), + ('group_id', models.IntegerField(help_text=b'contains the id of a specific group within the cohorted partition')), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ('course_user_group', models.OneToOneField(to='course_groups.CourseUserGroup')), + ], + ), + migrations.AddField( + model_name='coursecohort', + name='course_user_group', + field=models.OneToOneField(related_name='cohort', to='course_groups.CourseUserGroup'), + ), + migrations.AddField( + model_name='cohortmembership', + name='course_user_group', + field=models.ForeignKey(to='course_groups.CourseUserGroup'), + ), + migrations.AddField( + model_name='cohortmembership', + name='user', + field=models.ForeignKey(to=settings.AUTH_USER_MODEL), + ), + migrations.AlterUniqueTogether( + name='courseusergroup', + unique_together=set([('name', 'course_id')]), + ), + migrations.AlterUniqueTogether( + name='cohortmembership', + unique_together=set([('user', 'course_id')]), + ), + ] diff --git a/openedx/core/djangoapps/course_groups/migrations/0002_add_model_CourseUserGroupPartitionGroup.py b/openedx/core/djangoapps/course_groups/migrations/0002_add_model_CourseUserGroupPartitionGroup.py deleted file mode 100644 index 735dbde78ba7..000000000000 --- a/openedx/core/djangoapps/course_groups/migrations/0002_add_model_CourseUserGroupPartitionGroup.py +++ /dev/null @@ -1,82 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseUserGroupPartitionGroup' - db.create_table('course_groups_courseusergrouppartitiongroup', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_user_group', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['course_groups.CourseUserGroup'], unique=True)), - ('partition_id', self.gf('django.db.models.fields.IntegerField')()), - ('group_id', self.gf('django.db.models.fields.IntegerField')()), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('updated_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - )) - db.send_create_signal('course_groups', ['CourseUserGroupPartitionGroup']) - - def backwards(self, orm): - # Deleting model 'CourseUserGroupPartitionGroup' - db.delete_table('course_groups_courseusergrouppartitiongroup') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'course_groups.courseusergroup': { - 'Meta': {'unique_together': "(('name', 'course_id'),)", 'object_name': 'CourseUserGroup'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'group_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'db_index': 'True', 'related_name': "'course_groups'", 'symmetrical': 'False', 'to': "orm['auth.User']"}) - }, - 'course_groups.courseusergrouppartitiongroup': { - 'Meta': {'object_name': 'CourseUserGroupPartitionGroup'}, - 'course_user_group': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['course_groups.CourseUserGroup']", 'unique': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'group_id': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'partition_id': ('django.db.models.fields.IntegerField', [], {}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['course_groups'] diff --git a/openedx/core/djangoapps/course_groups/migrations/0003_auto__add_coursecohort__add_coursecohortssettings.py b/openedx/core/djangoapps/course_groups/migrations/0003_auto__add_coursecohort__add_coursecohortssettings.py deleted file mode 100644 index 765f338d9fa1..000000000000 --- a/openedx/core/djangoapps/course_groups/migrations/0003_auto__add_coursecohort__add_coursecohortssettings.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CourseCohort' - db.create_table('course_groups_coursecohort', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_user_group', self.gf('django.db.models.fields.related.OneToOneField')(related_name='cohort', unique=True, to=orm['course_groups.CourseUserGroup'])), - ('assignment_type', self.gf('django.db.models.fields.CharField')(default='manual', max_length=20)), - )) - db.send_create_signal('course_groups', ['CourseCohort']) - - # Adding model 'CourseCohortsSettings' - db.create_table('course_groups_coursecohortssettings', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('is_cohorted', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(unique=True, max_length=255, db_index=True)), - ('cohorted_discussions', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('always_cohort_inline_discussions', self.gf('django.db.models.fields.BooleanField')(default=True)), - )) - db.send_create_signal('course_groups', ['CourseCohortsSettings']) - - - def backwards(self, orm): - # Deleting model 'CourseCohort' - db.delete_table('course_groups_coursecohort') - - # Deleting model 'CourseCohortsSettings' - db.delete_table('course_groups_coursecohortssettings') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'course_groups.coursecohort': { - 'Meta': {'object_name': 'CourseCohort'}, - 'assignment_type': ('django.db.models.fields.CharField', [], {'default': "'manual'", 'max_length': '20'}), - 'course_user_group': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'cohort'", 'unique': 'True', 'to': "orm['course_groups.CourseUserGroup']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'course_groups.coursecohortssettings': { - 'Meta': {'object_name': 'CourseCohortsSettings'}, - 'always_cohort_inline_discussions': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'cohorted_discussions': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_cohorted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'course_groups.courseusergroup': { - 'Meta': {'unique_together': "(('name', 'course_id'),)", 'object_name': 'CourseUserGroup'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'group_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'db_index': 'True', 'related_name': "'course_groups'", 'symmetrical': 'False', 'to': "orm['auth.User']"}) - }, - 'course_groups.courseusergrouppartitiongroup': { - 'Meta': {'object_name': 'CourseUserGroupPartitionGroup'}, - 'course_user_group': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['course_groups.CourseUserGroup']", 'unique': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'group_id': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'partition_id': ('django.db.models.fields.IntegerField', [], {}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['course_groups'] \ No newline at end of file diff --git a/openedx/core/djangoapps/course_groups/migrations/0004_auto__del_field_coursecohortssettings_cohorted_discussions__add_field_.py b/openedx/core/djangoapps/course_groups/migrations/0004_auto__del_field_coursecohortssettings_cohorted_discussions__add_field_.py deleted file mode 100644 index 3863c0943c06..000000000000 --- a/openedx/core/djangoapps/course_groups/migrations/0004_auto__del_field_coursecohortssettings_cohorted_discussions__add_field_.py +++ /dev/null @@ -1,91 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Changed 'CourseCohortsSettings.cohorted_discussions' to 'CourseCohortsSettings._cohorted_discussions' without - # changing db column name - pass - - def backwards(self, orm): - # Changed 'CourseCohortsSettings.cohorted_discussions' to 'CourseCohortsSettings._cohorted_discussions' without - # changing db column name - pass - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'course_groups.coursecohort': { - 'Meta': {'object_name': 'CourseCohort'}, - 'assignment_type': ('django.db.models.fields.CharField', [], {'default': "'manual'", 'max_length': '20'}), - 'course_user_group': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'cohort'", 'unique': 'True', 'to': "orm['course_groups.CourseUserGroup']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'course_groups.coursecohortssettings': { - 'Meta': {'object_name': 'CourseCohortsSettings'}, - '_cohorted_discussions': ('django.db.models.fields.TextField', [], {'null': 'True', 'db_column': "'cohorted_discussions'", 'blank': 'True'}), - 'always_cohort_inline_discussions': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_cohorted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'course_groups.courseusergroup': { - 'Meta': {'unique_together': "(('name', 'course_id'),)", 'object_name': 'CourseUserGroup'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'group_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'db_index': 'True', 'related_name': "'course_groups'", 'symmetrical': 'False', 'to': "orm['auth.User']"}) - }, - 'course_groups.courseusergrouppartitiongroup': { - 'Meta': {'object_name': 'CourseUserGroupPartitionGroup'}, - 'course_user_group': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['course_groups.CourseUserGroup']", 'unique': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'group_id': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'partition_id': ('django.db.models.fields.IntegerField', [], {}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['course_groups'] \ No newline at end of file diff --git a/openedx/core/djangoapps/course_groups/migrations/0005_cohort_membership.py b/openedx/core/djangoapps/course_groups/migrations/0005_cohort_membership.py deleted file mode 100644 index 8993f26e5975..000000000000 --- a/openedx/core/djangoapps/course_groups/migrations/0005_cohort_membership.py +++ /dev/null @@ -1,109 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CohortMembership' - db.create_table('course_groups_cohortmembership', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_user_group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['course_groups.CourseUserGroup'])), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)), - )) - db.send_create_signal('course_groups', ['CohortMembership']) - - # Adding unique constraint on 'CohortMembership', fields ['user', 'course_id'] - db.create_unique('course_groups_cohortmembership', ['user_id', 'course_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'CohortMembership', fields ['user', 'course_id'] - db.delete_unique('course_groups_cohortmembership', ['user_id', 'course_id']) - - # Deleting model 'CohortMembership' - db.delete_table('course_groups_cohortmembership') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'course_groups.cohortmembership': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CohortMembership'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'course_user_group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['course_groups.CourseUserGroup']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'course_groups.coursecohort': { - 'Meta': {'object_name': 'CourseCohort'}, - 'assignment_type': ('django.db.models.fields.CharField', [], {'default': "'manual'", 'max_length': '20'}), - 'course_user_group': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'cohort'", 'unique': 'True', 'to': "orm['course_groups.CourseUserGroup']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'course_groups.coursecohortssettings': { - 'Meta': {'object_name': 'CourseCohortsSettings'}, - '_cohorted_discussions': ('django.db.models.fields.TextField', [], {'null': 'True', 'db_column': "'cohorted_discussions'", 'blank': 'True'}), - 'always_cohort_inline_discussions': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_cohorted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'course_groups.courseusergroup': { - 'Meta': {'unique_together': "(('name', 'course_id'),)", 'object_name': 'CourseUserGroup'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'group_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'db_index': 'True', 'related_name': "'course_groups'", 'symmetrical': 'False', 'to': "orm['auth.User']"}) - }, - 'course_groups.courseusergrouppartitiongroup': { - 'Meta': {'object_name': 'CourseUserGroupPartitionGroup'}, - 'course_user_group': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['course_groups.CourseUserGroup']", 'unique': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'group_id': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'partition_id': ('django.db.models.fields.IntegerField', [], {}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['course_groups'] diff --git a/openedx/core/djangoapps/course_groups/migrations/0006_cohort_membership_data_migrate.py b/openedx/core/djangoapps/course_groups/migrations/0006_cohort_membership_data_migrate.py deleted file mode 100644 index 523d7007b04d..000000000000 --- a/openedx/core/djangoapps/course_groups/migrations/0006_cohort_membership_data_migrate.py +++ /dev/null @@ -1,138 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models, IntegrityError, transaction - - -class Migration(DataMigration): - - def forwards(self, orm): - # Matches CourseUserGroup.COHORT - cohort_type = 'cohort' - - for cohort_group in orm.CourseUserGroup.objects.all(): - for user in cohort_group.users.all(): - current_course_groups = orm.CourseUserGroup.objects.filter( - course_id=cohort_group.course_id, - users__id=user.id, - group_type=cohort_type - ) - current_user_groups = user.course_groups.filter( - course_id=cohort_group.course_id, - group_type=cohort_type - ) - - unioned_set = set(current_course_groups).union(set(current_user_groups)) - - # Per product guidance, fix problem users by arbitrarily choosing a single membership to retain - arbitrary_cohort_to_keep = unioned_set.pop() - - try: - membership = orm.CohortMembership( - course_user_group=arbitrary_cohort_to_keep, - user=user, - course_id=arbitrary_cohort_to_keep.course_id - ) - membership.save() - except IntegrityError: - # It's possible a user already has a conflicting entry in the db. Treat that as correct. - unioned_set.add(arbitrary_cohort_to_keep) - try: - valid_membership = orm.CohortMembership.objects.get( - course_id = cohort_group.course_id, - user__id=user.id - ) - actual_cohort_to_keep = orm.CourseUserGroup.objects.get( - id=valid_membership.course_user_group.id - ) - unioned_set.remove(actual_cohort_to_keep) - except KeyError: - actual_cohort_to_keep.users.add(user) - - for cohort_itr in unioned_set: - cohort_itr.users.remove(user) - user.course_groups.remove(cohort_itr) - - def backwards(self, orm): - # A backwards migration just means dropping the table, which 0005 handles in its backwards() method - pass - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'course_groups.cohortmembership': { - 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'CohortMembership'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255'}), - 'course_user_group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['course_groups.CourseUserGroup']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'course_groups.coursecohort': { - 'Meta': {'object_name': 'CourseCohort'}, - 'assignment_type': ('django.db.models.fields.CharField', [], {'default': "'manual'", 'max_length': '20'}), - 'course_user_group': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'cohort'", 'unique': 'True', 'to': "orm['course_groups.CourseUserGroup']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'course_groups.coursecohortssettings': { - 'Meta': {'object_name': 'CourseCohortsSettings'}, - '_cohorted_discussions': ('django.db.models.fields.TextField', [], {'null': 'True', 'db_column': "'cohorted_discussions'", 'blank': 'True'}), - 'always_cohort_inline_discussions': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_cohorted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - 'course_groups.courseusergroup': { - 'Meta': {'unique_together': "(('name', 'course_id'),)", 'object_name': 'CourseUserGroup'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'group_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'users': ('django.db.models.fields.related.ManyToManyField', [], {'db_index': 'True', 'related_name': "'course_groups'", 'symmetrical': 'False', 'to': "orm['auth.User']"}) - }, - 'course_groups.courseusergrouppartitiongroup': { - 'Meta': {'object_name': 'CourseUserGroupPartitionGroup'}, - 'course_user_group': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['course_groups.CourseUserGroup']", 'unique': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'group_id': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'partition_id': ('django.db.models.fields.IntegerField', [], {}), - 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['course_groups'] diff --git a/openedx/core/djangoapps/course_groups/models.py b/openedx/core/djangoapps/course_groups/models.py index f2571278235f..7001fcd28446 100644 --- a/openedx/core/djangoapps/course_groups/models.py +++ b/openedx/core/djangoapps/course_groups/models.py @@ -73,15 +73,6 @@ class CohortMembership(models.Model): class Meta(object): unique_together = (('user', 'course_id'), ) - # The sole purpose of overriding this method is to get the django 1.6 behavior of allowing 'validate_unique' - # For django 1.8 upgrade, just remove this method and allow the base method to be called instead. - # Reference: https://docs.djangoproject.com/en/1.6/ref/models/instances/, under "Validating Objects" - def full_clean(self, **kwargs): - self.clean_fields() - self.clean() - if 'validate_unique' not in kwargs or kwargs['validate_unique'] is True: - self.validate_unique() - def clean_fields(self, *args, **kwargs): if self.course_id is None: self.course_id = self.course_user_group.course_id @@ -106,24 +97,20 @@ def save(self, *args, **kwargs): max_retries = 2 success = False for __ in range(max_retries): - # The following 2 "transaction" lines force a fresh read, they can be removed once we're on django 1.8 - # http://stackoverflow.com/questions/3346124/how-do-i-force-django-to-ignore-any-caches-and-reload-data - with transaction.commit_manually(): - transaction.commit() - with transaction.commit_on_success(): + with transaction.atomic(): try: - saved_membership, created = CohortMembership.objects.select_for_update().get_or_create( - user__id=self.user.id, # pylint: disable=E1101 - course_id=self.course_id, - defaults={ - 'course_user_group': self.course_user_group, - 'user': self.user - } - ) + with transaction.atomic(): + saved_membership, created = CohortMembership.objects.select_for_update().get_or_create( + user__id=self.user.id, # pylint: disable=E1101 + course_id=self.course_id, + defaults={ + 'course_user_group': self.course_user_group, + 'user': self.user + } + ) except IntegrityError: # This can happen if simultaneous requests try to create a membership - transaction.rollback() continue if not created: @@ -140,8 +127,7 @@ def save(self, *args, **kwargs): saved_membership.course_user_group = self.course_user_group self.course_user_group.users.add(self.user) # pylint: disable=E1101 - #note: in django 1.8, we can call save with updated_fields=['course_user_group'] - super(CohortMembership, saved_membership).save() + super(CohortMembership, saved_membership).save(update_fields=['course_user_group']) success = True break diff --git a/openedx/core/djangoapps/course_groups/tests/test_views.py b/openedx/core/djangoapps/course_groups/tests/test_views.py index ec93ea6b6f3c..eb2271484af6 100644 --- a/openedx/core/djangoapps/course_groups/tests/test_views.py +++ b/openedx/core/djangoapps/course_groups/tests/test_views.py @@ -14,9 +14,6 @@ from django.http import Http404 from django.test.client import RequestFactory -# monkey-patch for PATCH request method. -import openedx.core.lib.django_test_client_utils # pylint: disable=unused-import - from student.models import CourseEnrollment from student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase diff --git a/openedx/core/djangoapps/credit/api/provider.py b/openedx/core/djangoapps/credit/api/provider.py index 8e2bf81d2143..ef2acc36c5ff 100644 --- a/openedx/core/djangoapps/credit/api/provider.py +++ b/openedx/core/djangoapps/credit/api/provider.py @@ -108,7 +108,7 @@ def get_credit_provider_info(request, provider_id): # pylint: disable=unused-ar return JsonResponse(credit_provider_data) -@transaction.commit_on_success +@transaction.atomic def create_credit_request(course_key, provider_id, username): """ Initiate a request for credit from a credit provider. diff --git a/openedx/core/djangoapps/credit/email_utils.py b/openedx/core/djangoapps/credit/email_utils.py index 54c6c8f8f69a..3375abb48ffc 100644 --- a/openedx/core/djangoapps/credit/email_utils.py +++ b/openedx/core/djangoapps/credit/email_utils.py @@ -14,13 +14,12 @@ from django.contrib.auth.models import User from django.contrib.staticfiles import finders from django.core.cache import cache -from django.core.mail import EmailMessage +from django.core.mail import EmailMessage, SafeMIMEText from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart -from email.mime.text import MIMEText from eventtracking import tracker from edxmako.shortcuts import render_to_string @@ -89,7 +88,7 @@ def send_credit_notifications(username, course_key): # add alternative plain text message email_body_plain = render_to_string('credit_notifications/credit_eligibility_email.txt', context) - msg_alternative.attach(MIMEText(email_body_plain, _subtype='plain', _charset='utf-8')) + msg_alternative.attach(SafeMIMEText(email_body_plain, _subtype='plain', _charset='utf-8')) # add alternative html message email_body_content = cache.get('credit.email.css-email-body') @@ -109,7 +108,7 @@ def send_credit_notifications(username, course_key): email_body_content = '' email_body = Template(email_body_content).render([context]) - msg_alternative.attach(MIMEText(email_body, _subtype='html', _charset='utf-8')) + msg_alternative.attach(SafeMIMEText(email_body, _subtype='html', _charset='utf-8')) # attach logo image if logo_image: diff --git a/openedx/core/djangoapps/credit/migrations/0001_initial.py b/openedx/core/djangoapps/credit/migrations/0001_initial.py index ce708422a8e1..0ea46d557a6d 100644 --- a/openedx/core/djangoapps/credit/migrations/0001_initial.py +++ b/openedx/core/djangoapps/credit/migrations/0001_initial.py @@ -1,140 +1,173 @@ # -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CreditCourse' - db.create_table('credit_creditcourse', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('course_key', self.gf('xmodule_django.models.CourseKeyField')(unique=True, max_length=255, db_index=True)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('credit', ['CreditCourse']) - - # Adding model 'CreditProvider' - db.create_table('credit_creditprovider', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('provider_id', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255, db_index=True)), - ('display_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - )) - db.send_create_signal('credit', ['CreditProvider']) - - # Adding model 'CreditRequirement' - db.create_table('credit_creditrequirement', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('course', self.gf('django.db.models.fields.related.ForeignKey')(related_name='credit_requirements', to=orm['credit.CreditCourse'])), - ('namespace', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('configuration', self.gf('jsonfield.fields.JSONField')()), - ('active', self.gf('django.db.models.fields.BooleanField')(default=True)), - )) - db.send_create_signal('credit', ['CreditRequirement']) - - # Adding unique constraint on 'CreditRequirement', fields ['namespace', 'name', 'course'] - db.create_unique('credit_creditrequirement', ['namespace', 'name', 'course_id']) - - # Adding model 'CreditRequirementStatus' - db.create_table('credit_creditrequirementstatus', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('username', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('requirement', self.gf('django.db.models.fields.related.ForeignKey')(related_name='statuses', to=orm['credit.CreditRequirement'])), - ('status', self.gf('django.db.models.fields.CharField')(max_length=32)), - )) - db.send_create_signal('credit', ['CreditRequirementStatus']) - - # Adding model 'CreditEligibility' - db.create_table('credit_crediteligibility', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('username', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('course', self.gf('django.db.models.fields.related.ForeignKey')(related_name='eligibilities', to=orm['credit.CreditCourse'])), - ('provider', self.gf('django.db.models.fields.related.ForeignKey')(related_name='eligibilities', to=orm['credit.CreditProvider'])), - )) - db.send_create_signal('credit', ['CreditEligibility']) - - # Adding unique constraint on 'CreditEligibility', fields ['username', 'course'] - db.create_unique('credit_crediteligibility', ['username', 'course_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'CreditEligibility', fields ['username', 'course'] - db.delete_unique('credit_crediteligibility', ['username', 'course_id']) - - # Removing unique constraint on 'CreditRequirement', fields ['namespace', 'name', 'course'] - db.delete_unique('credit_creditrequirement', ['namespace', 'name', 'course_id']) - - # Deleting model 'CreditCourse' - db.delete_table('credit_creditcourse') - - # Deleting model 'CreditProvider' - db.delete_table('credit_creditprovider') - - # Deleting model 'CreditRequirement' - db.delete_table('credit_creditrequirement') - - # Deleting model 'CreditRequirementStatus' - db.delete_table('credit_creditrequirementstatus') - - # Deleting model 'CreditEligibility' - db.delete_table('credit_crediteligibility') - - - models = { - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditProvider']"}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'configuration': ('jsonfield.fields.JSONField', [], {}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] +from __future__ import unicode_literals + +from django.db import migrations, models +import openedx.core.djangoapps.credit.models +import model_utils.fields +import xmodule_django.models +import jsonfield.fields +import django.db.models.deletion +import django.utils.timezone +from django.conf import settings +import django.core.validators + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='CreditCourse', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('course_key', xmodule_django.models.CourseKeyField(unique=True, max_length=255, db_index=True)), + ('enabled', models.BooleanField(default=False)), + ], + ), + migrations.CreateModel( + name='CreditEligibility', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('username', models.CharField(max_length=255, db_index=True)), + ('deadline', models.DateTimeField(default=openedx.core.djangoapps.credit.models.default_deadline_for_credit_eligibility, help_text='Deadline for purchasing and requesting credit.')), + ('course', models.ForeignKey(related_name='eligibilities', to='credit.CreditCourse')), + ], + options={ + 'verbose_name_plural': 'Credit eligibilities', + }, + ), + migrations.CreateModel( + name='CreditProvider', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('provider_id', models.CharField(help_text='Unique identifier for this credit provider. Only alphanumeric characters and hyphens (-) are allowed. The identifier is case-sensitive.', unique=True, max_length=255, validators=[django.core.validators.RegexValidator(regex=b'^[a-z,A-Z,0-9,\\-]+$', message=b'Only alphanumeric characters and hyphens (-) are allowed', code=b'invalid_provider_id')])), + ('active', models.BooleanField(default=True, help_text='Whether the credit provider is currently enabled.')), + ('display_name', models.CharField(help_text='Name of the credit provider displayed to users', max_length=255)), + ('enable_integration', models.BooleanField(default=False, help_text='When true, automatically notify the credit provider when a user requests credit. In order for this to work, a shared secret key MUST be configured for the credit provider in secure auth settings.')), + ('provider_url', models.URLField(default=b'', help_text='URL of the credit provider. If automatic integration is enabled, this will the the end-point that we POST to to notify the provider of a credit request. Otherwise, the user will be shown a link to this URL, so the user can request credit from the provider directly.')), + ('provider_status_url', models.URLField(default=b'', help_text='URL from the credit provider where the user can check the status of his or her request for credit. This is displayed to students *after* they have requested credit.')), + ('provider_description', models.TextField(default=b'', help_text='Description for the credit provider displayed to users.')), + ('fulfillment_instructions', models.TextField(help_text='Plain text or html content for displaying further steps on receipt page *after* paying for the credit to get credit for a credit course against a credit provider.', null=True, blank=True)), + ('eligibility_email_message', models.TextField(default=b'', help_text='Plain text or html content for displaying custom message inside credit eligibility email content which is sent when user has met all credit eligibility requirements.')), + ('receipt_email_message', models.TextField(default=b'', help_text='Plain text or html content for displaying custom message inside credit receipt email content which is sent *after* paying to get credit for a credit course.')), + ('thumbnail_url', models.URLField(default=b'', help_text='Thumbnail image url of the credit provider.', max_length=255)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='CreditRequest', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('uuid', models.CharField(unique=True, max_length=32, db_index=True)), + ('username', models.CharField(max_length=255, db_index=True)), + ('parameters', jsonfield.fields.JSONField()), + ('status', models.CharField(default=b'pending', max_length=255, choices=[(b'pending', b'Pending'), (b'approved', b'Approved'), (b'rejected', b'Rejected')])), + ('course', models.ForeignKey(related_name='credit_requests', to='credit.CreditCourse')), + ('provider', models.ForeignKey(related_name='credit_requests', to='credit.CreditProvider')), + ], + options={ + 'get_latest_by': 'created', + }, + ), + migrations.CreateModel( + name='CreditRequirement', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('namespace', models.CharField(max_length=255)), + ('name', models.CharField(max_length=255)), + ('display_name', models.CharField(default=b'', max_length=255)), + ('order', models.PositiveIntegerField(default=0)), + ('criteria', jsonfield.fields.JSONField()), + ('active', models.BooleanField(default=True)), + ('course', models.ForeignKey(related_name='credit_requirements', to='credit.CreditCourse')), + ], + options={ + 'ordering': ['order'], + }, + ), + migrations.CreateModel( + name='CreditRequirementStatus', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('username', models.CharField(max_length=255, db_index=True)), + ('status', models.CharField(max_length=32, choices=[(b'satisfied', b'satisfied'), (b'failed', b'failed'), (b'declined', b'declined')])), + ('reason', jsonfield.fields.JSONField(default={})), + ('requirement', models.ForeignKey(related_name='statuses', to='credit.CreditRequirement')), + ], + ), + migrations.CreateModel( + name='HistoricalCreditRequest', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('uuid', models.CharField(max_length=32, db_index=True)), + ('username', models.CharField(max_length=255, db_index=True)), + ('parameters', jsonfield.fields.JSONField()), + ('status', models.CharField(default=b'pending', max_length=255, choices=[(b'pending', b'Pending'), (b'approved', b'Approved'), (b'rejected', b'Rejected')])), + ('history_id', models.AutoField(serialize=False, primary_key=True)), + ('history_date', models.DateTimeField()), + ('history_type', models.CharField(max_length=1, choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')])), + ('course', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='credit.CreditCourse', null=True)), + ('history_user', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True)), + ('provider', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='credit.CreditProvider', null=True)), + ], + options={ + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': 'history_date', + 'verbose_name': 'historical credit request', + }, + ), + migrations.CreateModel( + name='HistoricalCreditRequirementStatus', + fields=[ + ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('username', models.CharField(max_length=255, db_index=True)), + ('status', models.CharField(max_length=32, choices=[(b'satisfied', b'satisfied'), (b'failed', b'failed'), (b'declined', b'declined')])), + ('reason', jsonfield.fields.JSONField(default={})), + ('history_id', models.AutoField(serialize=False, primary_key=True)), + ('history_date', models.DateTimeField()), + ('history_type', models.CharField(max_length=1, choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')])), + ('history_user', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True)), + ('requirement', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.DO_NOTHING, db_constraint=False, blank=True, to='credit.CreditRequirement', null=True)), + ], + options={ + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': 'history_date', + 'verbose_name': 'historical credit requirement status', + }, + ), + migrations.AlterUniqueTogether( + name='creditrequirementstatus', + unique_together=set([('username', 'requirement')]), + ), + migrations.AlterUniqueTogether( + name='creditrequirement', + unique_together=set([('namespace', 'name', 'course')]), + ), + migrations.AlterUniqueTogether( + name='creditrequest', + unique_together=set([('username', 'course', 'provider')]), + ), + migrations.AlterUniqueTogether( + name='crediteligibility', + unique_together=set([('username', 'course')]), + ), + ] diff --git a/openedx/core/djangoapps/credit/migrations/0002_rename_credit_requirement_criteria_field.py b/openedx/core/djangoapps/credit/migrations/0002_rename_credit_requirement_criteria_field.py deleted file mode 100644 index 6efd53ae8ac7..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0002_rename_credit_requirement_criteria_field.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'CreditRequirement.configuration' - db.delete_column('credit_creditrequirement', 'configuration') - - # Adding field 'CreditRequirement.criteria' - db.add_column('credit_creditrequirement', 'criteria', - self.gf('jsonfield.fields.JSONField')(default=''), - keep_default=False) - - - def backwards(self, orm): - # Adding field 'CreditRequirement.configuration' - db.add_column('credit_creditrequirement', 'configuration', - self.gf('jsonfield.fields.JSONField')(default=''), - keep_default=False) - - # Deleting field 'CreditRequirement.criteria' - db.delete_column('credit_creditrequirement', 'criteria') - - - models = { - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditProvider']"}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] \ No newline at end of file diff --git a/openedx/core/djangoapps/credit/migrations/0003_add_creditrequirementstatus_reason.py b/openedx/core/djangoapps/credit/migrations/0003_add_creditrequirementstatus_reason.py deleted file mode 100644 index 6a3c03ec6517..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0003_add_creditrequirementstatus_reason.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CreditRequirementStatus.reason' - db.add_column('credit_creditrequirementstatus', 'reason', - self.gf('jsonfield.fields.JSONField')(default={}), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CreditRequirementStatus.reason' - db.delete_column('credit_creditrequirementstatus', 'reason') - - - models = { - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditProvider']"}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] diff --git a/openedx/core/djangoapps/credit/migrations/0004_auto__add_field_creditrequirement_display_name.py b/openedx/core/djangoapps/credit/migrations/0004_auto__add_field_creditrequirement_display_name.py deleted file mode 100644 index 7c49053dbe9a..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0004_auto__add_field_creditrequirement_display_name.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CreditRequirement.display_name' - db.add_column('credit_creditrequirement', 'display_name', - self.gf('django.db.models.fields.CharField')(default='', max_length=255), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CreditRequirement.display_name' - db.delete_column('credit_creditrequirement', 'display_name') - - - models = { - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditProvider']"}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] \ No newline at end of file diff --git a/openedx/core/djangoapps/credit/migrations/0005_auto__add_field_creditprovider_provider_url__add_field_creditprovider_.py b/openedx/core/djangoapps/credit/migrations/0005_auto__add_field_creditprovider_provider_url__add_field_creditprovider_.py deleted file mode 100644 index 75eda2517319..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0005_auto__add_field_creditprovider_provider_url__add_field_creditprovider_.py +++ /dev/null @@ -1,89 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CreditProvider.provider_url' - db.add_column('credit_creditprovider', 'provider_url', - self.gf('django.db.models.fields.URLField')(default='', unique=True, max_length=255), - keep_default=False) - - # Adding field 'CreditProvider.eligibility_duration' - db.add_column('credit_creditprovider', 'eligibility_duration', - self.gf('django.db.models.fields.PositiveIntegerField')(default=0), - keep_default=False) - - # Adding field 'CreditProvider.active' - db.add_column('credit_creditprovider', 'active', - self.gf('django.db.models.fields.BooleanField')(default=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CreditProvider.provider_url' - db.delete_column('credit_creditprovider', 'provider_url') - - # Deleting field 'CreditProvider.eligibility_duration' - db.delete_column('credit_creditprovider', 'eligibility_duration') - - # Deleting field 'CreditProvider.active' - db.delete_column('credit_creditprovider', 'active') - - - models = { - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditProvider']"}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'eligibility_duration': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'provider_url': ('django.db.models.fields.URLField', [], {'unique': 'True', 'max_length': '255'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] \ No newline at end of file diff --git a/openedx/core/djangoapps/credit/migrations/0006_auto__add_creditrequest__add_unique_creditrequest_username_course_prov.py b/openedx/core/djangoapps/credit/migrations/0006_auto__add_creditrequest__add_unique_creditrequest_username_course_prov.py deleted file mode 100644 index 723aa9fedc0c..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0006_auto__add_creditrequest__add_unique_creditrequest_username_course_prov.py +++ /dev/null @@ -1,190 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'CreditRequest' - db.create_table('credit_creditrequest', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('uuid', self.gf('django.db.models.fields.CharField')(unique=True, max_length=32, db_index=True)), - ('username', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('course', self.gf('django.db.models.fields.related.ForeignKey')(related_name='credit_requests', to=orm['credit.CreditCourse'])), - ('provider', self.gf('django.db.models.fields.related.ForeignKey')(related_name='credit_requests', to=orm['credit.CreditProvider'])), - ('timestamp', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('parameters', self.gf('jsonfield.fields.JSONField')()), - ('status', self.gf('django.db.models.fields.CharField')(default='pending', max_length=255)), - )) - db.send_create_signal('credit', ['CreditRequest']) - - # Adding unique constraint on 'CreditRequest', fields ['username', 'course', 'provider'] - db.create_unique('credit_creditrequest', ['username', 'course_id', 'provider_id']) - - # Adding model 'HistoricalCreditRequest' - db.create_table('credit_historicalcreditrequest', ( - ('id', self.gf('django.db.models.fields.IntegerField')(db_index=True, blank=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('uuid', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)), - ('username', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('timestamp', self.gf('django.db.models.fields.DateTimeField')(blank=True)), - ('parameters', self.gf('jsonfield.fields.JSONField')()), - ('status', self.gf('django.db.models.fields.CharField')(default='pending', max_length=255)), - ('course', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name=u'+', null=True, on_delete=models.DO_NOTHING, to=orm['credit.CreditCourse'])), - ('provider', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name=u'+', null=True, on_delete=models.DO_NOTHING, to=orm['credit.CreditProvider'])), - (u'history_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - (u'history_date', self.gf('django.db.models.fields.DateTimeField')()), - (u'history_user', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'+', null=True, on_delete=models.SET_NULL, to=orm['auth.User'])), - (u'history_type', self.gf('django.db.models.fields.CharField')(max_length=1)), - )) - db.send_create_signal('credit', ['HistoricalCreditRequest']) - - # Adding M2M table for field providers on 'CreditCourse' - m2m_table_name = db.shorten_name('credit_creditcourse_providers') - db.create_table(m2m_table_name, ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('creditcourse', models.ForeignKey(orm['credit.creditcourse'], null=False)), - ('creditprovider', models.ForeignKey(orm['credit.creditprovider'], null=False)) - )) - db.create_unique(m2m_table_name, ['creditcourse_id', 'creditprovider_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'CreditRequest', fields ['username', 'course', 'provider'] - db.delete_unique('credit_creditrequest', ['username', 'course_id', 'provider_id']) - - # Deleting model 'CreditRequest' - db.delete_table('credit_creditrequest') - - # Deleting model 'HistoricalCreditRequest' - db.delete_table('credit_historicalcreditrequest') - - # Removing M2M table for field providers on 'CreditCourse' - db.delete_table(db.shorten_name('credit_creditcourse_providers')) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'providers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['credit.CreditProvider']", 'symmetrical': 'False'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditProvider']"}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'eligibility_duration': ('django.db.models.fields.PositiveIntegerField', [], {'default': '31556970'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'provider_url': ('django.db.models.fields.URLField', [], {'default': "''", 'unique': 'True', 'max_length': '255'}) - }, - 'credit.creditrequest': { - 'Meta': {'unique_together': "(('username', 'course', 'provider'),)", 'object_name': 'CreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'display_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequest': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] diff --git a/openedx/core/djangoapps/credit/migrations/0007_auto__add_field_creditprovider_enable_integration__chg_field_creditpro.py b/openedx/core/djangoapps/credit/migrations/0007_auto__add_field_creditprovider_enable_integration__chg_field_creditpro.py deleted file mode 100644 index 7e6ef2e773a8..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0007_auto__add_field_creditprovider_enable_integration__chg_field_creditpro.py +++ /dev/null @@ -1,153 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Removing unique constraint on 'CreditProvider', fields ['provider_url'] - db.delete_unique('credit_creditprovider', ['provider_url']) - - # Adding field 'CreditProvider.enable_integration' - db.add_column('credit_creditprovider', 'enable_integration', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - - # Changing field 'CreditProvider.provider_url' - db.alter_column('credit_creditprovider', 'provider_url', self.gf('django.db.models.fields.URLField')(max_length=200)) - - def backwards(self, orm): - # Deleting field 'CreditProvider.enable_integration' - db.delete_column('credit_creditprovider', 'enable_integration') - - - # Changing field 'CreditProvider.provider_url' - db.alter_column('credit_creditprovider', 'provider_url', self.gf('django.db.models.fields.URLField')(max_length=255, unique=True)) - # Adding unique constraint on 'CreditProvider', fields ['provider_url'] - db.create_unique('credit_creditprovider', ['provider_url']) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'providers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['credit.CreditProvider']", 'symmetrical': 'False'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditProvider']"}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'eligibility_duration': ('django.db.models.fields.PositiveIntegerField', [], {'default': '31556970'}), - 'enable_integration': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'provider_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}) - }, - 'credit.creditrequest': { - 'Meta': {'unique_together': "(('username', 'course', 'provider'),)", 'object_name': 'CreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'display_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequest': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] diff --git a/openedx/core/djangoapps/credit/migrations/0008_delete_credit_provider_timestamp.py b/openedx/core/djangoapps/credit/migrations/0008_delete_credit_provider_timestamp.py deleted file mode 100644 index 6fa6b685019f..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0008_delete_credit_provider_timestamp.py +++ /dev/null @@ -1,145 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'CreditRequest.timestamp' - db.delete_column('credit_creditrequest', 'timestamp') - - # Deleting field 'HistoricalCreditRequest.timestamp' - db.delete_column('credit_historicalcreditrequest', 'timestamp') - - def backwards(self, orm): - # Adding field 'CreditRequest.timestamp' - db.add_column('credit_creditrequest', 'timestamp', - self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, default=datetime.datetime.utcnow(), blank=True), - keep_default=False) - - # Adding field 'HistoricalCreditRequest.timestamp' - db.add_column('credit_historicalcreditrequest', 'timestamp', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.utcnow(), blank=True), - keep_default=False) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'providers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['credit.CreditProvider']", 'symmetrical': 'False'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditProvider']"}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'eligibility_duration': ('django.db.models.fields.PositiveIntegerField', [], {'default': '31556970'}), - 'enable_integration': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'provider_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}) - }, - 'credit.creditrequest': { - 'Meta': {'unique_together': "(('username', 'course', 'provider'),)", 'object_name': 'CreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'display_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequest': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] diff --git a/openedx/core/djangoapps/credit/migrations/0009_auto__del_field_crediteligibility_provider.py b/openedx/core/djangoapps/credit/migrations/0009_auto__del_field_crediteligibility_provider.py deleted file mode 100644 index 73cd9be397f6..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0009_auto__del_field_crediteligibility_provider.py +++ /dev/null @@ -1,138 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'CreditEligibility.provider' - db.delete_column('credit_crediteligibility', 'provider_id') - - - def backwards(self, orm): - # Adding field 'CreditEligibility.provider' - db.add_column('credit_crediteligibility', 'provider', - self.gf('django.db.models.fields.related.ForeignKey')(default=1, related_name='eligibilities', to=orm['credit.CreditProvider']), - keep_default=False) - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'providers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['credit.CreditProvider']", 'symmetrical': 'False'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'eligibility_duration': ('django.db.models.fields.PositiveIntegerField', [], {'default': '31556970'}), - 'enable_integration': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'provider_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}) - }, - 'credit.creditrequest': { - 'Meta': {'unique_together': "(('username', 'course', 'provider'),)", 'object_name': 'CreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'display_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequest': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] \ No newline at end of file diff --git a/openedx/core/djangoapps/credit/migrations/0010_add_creditrequirementstatus_history.py b/openedx/core/djangoapps/credit/migrations/0010_add_creditrequirementstatus_history.py deleted file mode 100644 index 777e86782db3..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0010_add_creditrequirementstatus_history.py +++ /dev/null @@ -1,169 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'HistoricalCreditRequirementStatus' - db.create_table('credit_historicalcreditrequirementstatus', ( - ('id', self.gf('django.db.models.fields.IntegerField')(db_index=True, blank=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('username', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('status', self.gf('django.db.models.fields.CharField')(max_length=32)), - ('reason', self.gf('jsonfield.fields.JSONField')(default={})), - ('requirement', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name=u'+', null=True, on_delete=models.DO_NOTHING, to=orm['credit.CreditRequirement'])), - (u'history_id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - (u'history_date', self.gf('django.db.models.fields.DateTimeField')()), - (u'history_user', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'+', null=True, on_delete=models.SET_NULL, to=orm['auth.User'])), - (u'history_type', self.gf('django.db.models.fields.CharField')(max_length=1)), - )) - db.send_create_signal('credit', ['HistoricalCreditRequirementStatus']) - - # Adding unique constraint on 'CreditRequirementStatus', fields ['username', 'requirement'] - db.create_unique('credit_creditrequirementstatus', ['username', 'requirement_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'CreditRequirementStatus', fields ['username', 'requirement'] - db.delete_unique('credit_creditrequirementstatus', ['username', 'requirement_id']) - - # Deleting model 'HistoricalCreditRequirementStatus' - db.delete_table('credit_historicalcreditrequirementstatus') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'providers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['credit.CreditProvider']", 'symmetrical': 'False'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'eligibility_duration': ('django.db.models.fields.PositiveIntegerField', [], {'default': '31556970'}), - 'enable_integration': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'provider_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}) - }, - 'credit.creditrequest': { - 'Meta': {'unique_together': "(('username', 'course', 'provider'),)", 'object_name': 'CreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'display_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'unique_together': "(('username', 'requirement'),)", 'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequest': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequirementstatus': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] \ No newline at end of file diff --git a/openedx/core/djangoapps/credit/migrations/0011_auto__add_field_creditrequirement_order.py b/openedx/core/djangoapps/credit/migrations/0011_auto__add_field_creditrequirement_order.py deleted file mode 100644 index 84350b92bf89..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0011_auto__add_field_creditrequirement_order.py +++ /dev/null @@ -1,153 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CreditRequirement.order' - db.add_column('credit_creditrequirement', 'order', - self.gf('django.db.models.fields.PositiveIntegerField')(default=0), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CreditRequirement.order' - db.delete_column('credit_creditrequirement', 'order') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'providers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['credit.CreditProvider']", 'symmetrical': 'False'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'eligibility_duration': ('django.db.models.fields.PositiveIntegerField', [], {'default': '31556970'}), - 'enable_integration': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'provider_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}) - }, - 'credit.creditrequest': { - 'Meta': {'unique_together': "(('username', 'course', 'provider'),)", 'object_name': 'CreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'display_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'unique_together': "(('username', 'requirement'),)", 'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequest': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequirementstatus': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] \ No newline at end of file diff --git a/openedx/core/djangoapps/credit/migrations/0012_remove_m2m_course_and_provider.py b/openedx/core/djangoapps/credit/migrations/0012_remove_m2m_course_and_provider.py deleted file mode 100644 index ef2599c17b45..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0012_remove_m2m_course_and_provider.py +++ /dev/null @@ -1,172 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'CreditProvider.eligibility_duration' - db.delete_column('credit_creditprovider', 'eligibility_duration') - - # Removing M2M table for field providers on 'CreditCourse' - db.delete_table(db.shorten_name('credit_creditcourse_providers')) - - # Adding field 'CreditEligibility.deadline' - db.add_column('credit_crediteligibility', 'deadline', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2016, 6, 26, 0, 0)), - keep_default=False) - - - def backwards(self, orm): - # Adding field 'CreditProvider.eligibility_duration' - db.add_column('credit_creditprovider', 'eligibility_duration', - self.gf('django.db.models.fields.PositiveIntegerField')(default=31556970), - keep_default=False) - - # Adding M2M table for field providers on 'CreditCourse' - m2m_table_name = db.shorten_name('credit_creditcourse_providers') - db.create_table(m2m_table_name, ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('creditcourse', models.ForeignKey(orm['credit.creditcourse'], null=False)), - ('creditprovider', models.ForeignKey(orm['credit.creditprovider'], null=False)) - )) - db.create_unique(m2m_table_name, ['creditcourse_id', 'creditprovider_id']) - - # Deleting field 'CreditEligibility.deadline' - db.delete_column('credit_crediteligibility', 'deadline') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2016, 6, 26, 0, 0)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'enable_integration': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'provider_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}) - }, - 'credit.creditrequest': { - 'Meta': {'unique_together': "(('username', 'course', 'provider'),)", 'object_name': 'CreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'display_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'unique_together': "(('username', 'requirement'),)", 'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequest': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequirementstatus': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] diff --git a/openedx/core/djangoapps/credit/migrations/0013_add_provider_status_url.py b/openedx/core/djangoapps/credit/migrations/0013_add_provider_status_url.py deleted file mode 100644 index a0142f6c507e..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0013_add_provider_status_url.py +++ /dev/null @@ -1,153 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CreditProvider.provider_status_url' - db.add_column('credit_creditprovider', 'provider_status_url', - self.gf('django.db.models.fields.URLField')(default='', max_length=200), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CreditProvider.provider_status_url' - db.delete_column('credit_creditprovider', 'provider_status_url') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2016, 6, 26, 0, 0)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'enable_integration': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'provider_status_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}), - 'provider_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}) - }, - 'credit.creditrequest': { - 'Meta': {'unique_together': "(('username', 'course', 'provider'),)", 'object_name': 'CreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'display_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'unique_together': "(('username', 'requirement'),)", 'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequest': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequirementstatus': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] diff --git a/openedx/core/djangoapps/credit/migrations/0014_auto__add_field_creditprovider_fulfillment_instructions.py b/openedx/core/djangoapps/credit/migrations/0014_auto__add_field_creditprovider_fulfillment_instructions.py deleted file mode 100644 index b818845cb470..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0014_auto__add_field_creditprovider_fulfillment_instructions.py +++ /dev/null @@ -1,154 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CreditProvider.fulfillment_instructions' - db.add_column('credit_creditprovider', 'fulfillment_instructions', - self.gf('django.db.models.fields.TextField')(null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CreditProvider.fulfillment_instructions' - db.delete_column('credit_creditprovider', 'fulfillment_instructions') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2016, 7, 6, 0, 0)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'enable_integration': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'fulfillment_instructions': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'provider_status_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}), - 'provider_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}) - }, - 'credit.creditrequest': { - 'Meta': {'unique_together': "(('username', 'course', 'provider'),)", 'object_name': 'CreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'display_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'unique_together': "(('username', 'requirement'),)", 'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequest': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequirementstatus': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] \ No newline at end of file diff --git a/openedx/core/djangoapps/credit/migrations/0015_auto__add_field_creditprovider_provider_description.py b/openedx/core/djangoapps/credit/migrations/0015_auto__add_field_creditprovider_provider_description.py deleted file mode 100644 index 2c29cdad9639..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0015_auto__add_field_creditprovider_provider_description.py +++ /dev/null @@ -1,155 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CreditProvider.provider_description' - db.add_column('credit_creditprovider', 'provider_description', - self.gf('django.db.models.fields.TextField')(default=''), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CreditProvider.provider_description' - db.delete_column('credit_creditprovider', 'provider_description') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2016, 7, 8, 0, 0)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'enable_integration': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'fulfillment_instructions': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_description': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'provider_status_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}), - 'provider_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}) - }, - 'credit.creditrequest': { - 'Meta': {'unique_together': "(('username', 'course', 'provider'),)", 'object_name': 'CreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'display_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'unique_together': "(('username', 'requirement'),)", 'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequest': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequirementstatus': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] \ No newline at end of file diff --git a/openedx/core/djangoapps/credit/migrations/0016_auto__add_field_creditprovider_eligibility_email_message__add_field_cr.py b/openedx/core/djangoapps/credit/migrations/0016_auto__add_field_creditprovider_eligibility_email_message__add_field_cr.py deleted file mode 100644 index 64417e839815..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0016_auto__add_field_creditprovider_eligibility_email_message__add_field_cr.py +++ /dev/null @@ -1,165 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CreditProvider.eligibility_email_message' - db.add_column('credit_creditprovider', 'eligibility_email_message', - self.gf('django.db.models.fields.TextField')(default=''), - keep_default=False) - - # Adding field 'CreditProvider.receipt_email_message' - db.add_column('credit_creditprovider', 'receipt_email_message', - self.gf('django.db.models.fields.TextField')(default=''), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CreditProvider.eligibility_email_message' - db.delete_column('credit_creditprovider', 'eligibility_email_message') - - # Deleting field 'CreditProvider.receipt_email_message' - db.delete_column('credit_creditprovider', 'receipt_email_message') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2016, 7, 9, 0, 0)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'eligibility_email_message': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'enable_integration': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'fulfillment_instructions': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_description': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'provider_status_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}), - 'provider_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}), - 'receipt_email_message': ('django.db.models.fields.TextField', [], {'default': "''"}) - }, - 'credit.creditrequest': { - 'Meta': {'unique_together': "(('username', 'course', 'provider'),)", 'object_name': 'CreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'display_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'unique_together': "(('username', 'requirement'),)", 'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequest': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequirementstatus': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] \ No newline at end of file diff --git a/openedx/core/djangoapps/credit/migrations/0017_auto__add_field_creditprovider_thumbnail_url.py b/openedx/core/djangoapps/credit/migrations/0017_auto__add_field_creditprovider_thumbnail_url.py deleted file mode 100644 index ddc88ead357f..000000000000 --- a/openedx/core/djangoapps/credit/migrations/0017_auto__add_field_creditprovider_thumbnail_url.py +++ /dev/null @@ -1,158 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'CreditProvider.thumbnail_url' - db.add_column('credit_creditprovider', 'thumbnail_url', - self.gf('django.db.models.fields.URLField')(default='', max_length=255), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'CreditProvider.thumbnail_url' - db.delete_column('credit_creditprovider', 'thumbnail_url') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'credit.creditcourse': { - 'Meta': {'object_name': 'CreditCourse'}, - 'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'credit.crediteligibility': { - 'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'deadline': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2016, 7, 26, 0, 0)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.creditprovider': { - 'Meta': {'object_name': 'CreditProvider'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'eligibility_email_message': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'enable_integration': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'fulfillment_instructions': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'provider_description': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'provider_status_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}), - 'provider_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200'}), - 'receipt_email_message': ('django.db.models.fields.TextField', [], {'default': "''"}), - 'thumbnail_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '255'}) - }, - 'credit.creditrequest': { - 'Meta': {'unique_together': "(('username', 'course', 'provider'),)", 'object_name': 'CreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requests'", 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}) - }, - 'credit.creditrequirement': { - 'Meta': {'ordering': "['order']", 'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'criteria': ('jsonfield.fields.JSONField', [], {}), - 'display_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) - }, - 'credit.creditrequirementstatus': { - 'Meta': {'unique_together': "(('username', 'requirement'),)", 'object_name': 'CreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequest': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequest'}, - 'course': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditCourse']"}), - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'parameters': ('jsonfield.fields.JSONField', [], {}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditProvider']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '255'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}) - }, - 'credit.historicalcreditrequirementstatus': { - 'Meta': {'ordering': "(u'-history_date', u'-history_id')", 'object_name': 'HistoricalCreditRequirementStatus'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - u'history_date': ('django.db.models.fields.DateTimeField', [], {}), - u'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - u'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), - u'history_user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'reason': ('jsonfield.fields.JSONField', [], {'default': '{}'}), - 'requirement': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.DO_NOTHING', 'to': "orm['credit.CreditRequirement']"}), - 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) - } - } - - complete_apps = ['credit'] diff --git a/openedx/core/djangoapps/credit/models.py b/openedx/core/djangoapps/credit/models.py index 378d8c20a226..af843b201c1e 100644 --- a/openedx/core/djangoapps/credit/models.py +++ b/openedx/core/djangoapps/credit/models.py @@ -443,7 +443,7 @@ def get_statuses(cls, requirements, username): return cls.objects.filter(requirement__in=requirements, username=username) @classmethod - @transaction.commit_on_success + @transaction.atomic def add_or_update_requirement_status(cls, username, requirement, status="satisfied", reason=None): """ Add credit requirement status for given username. @@ -466,7 +466,7 @@ def add_or_update_requirement_status(cls, username, requirement, status="satisfi requirement_status.save() @classmethod - @transaction.commit_on_success + @transaction.atomic def remove_requirement_status(cls, username, requirement): """ Remove credit requirement status for given username. @@ -490,6 +490,13 @@ def remove_requirement_status(cls, username, requirement): return +def default_deadline_for_credit_eligibility(): # pylint: disable=invalid-name + """ The default deadline to use when creating a new CreditEligibility model. """ + return datetime.datetime.now(pytz.UTC) + datetime.timedelta( + days=getattr(settings, "CREDIT_ELIGIBILITY_EXPIRATION_DAYS", 365) + ) + + class CreditEligibility(TimeStampedModel): """ A record of a user's eligibility for credit from a specific credit @@ -504,11 +511,7 @@ class CreditEligibility(TimeStampedModel): # We save the deadline as a database field just in case # we need to override the deadline for particular students. deadline = models.DateTimeField( - default=lambda: ( - datetime.datetime.now(pytz.UTC) + datetime.timedelta( - days=getattr(settings, "CREDIT_ELIGIBILITY_EXPIRATION_DAYS", 365) - ) - ), + default=default_deadline_for_credit_eligibility, help_text=ugettext_lazy("Deadline for purchasing and requesting credit.") ) diff --git a/openedx/core/djangoapps/credit/tests/test_api.py b/openedx/core/djangoapps/credit/tests/test_api.py index 3bd4da982334..5328bd03f669 100644 --- a/openedx/core/djangoapps/credit/tests/test_api.py +++ b/openedx/core/djangoapps/credit/tests/test_api.py @@ -427,7 +427,7 @@ def test_satisfy_all_requirements(self): user = UserFactory.create(username=self.USER_INFO['username'], password=self.USER_INFO['password']) # Satisfy one of the requirements, but not the other - with self.assertNumQueries(7): + with self.assertNumQueries(11): api.set_credit_requirement_status( user.username, self.course_key, @@ -439,7 +439,7 @@ def test_satisfy_all_requirements(self): self.assertFalse(api.is_user_eligible_for_credit("bob", self.course_key)) # Satisfy the other requirement - with self.assertNumQueries(11): + with self.assertNumQueries(15): api.set_credit_requirement_status( "bob", self.course_key, @@ -479,7 +479,7 @@ def test_satisfy_all_requirements(self): # Delete the eligibility entries and satisfy the user's eligibility # requirement again to trigger eligibility notification CreditEligibility.objects.all().delete() - with self.assertNumQueries(12): + with self.assertNumQueries(13): api.set_credit_requirement_status( "bob", self.course_key, @@ -726,15 +726,16 @@ def test_query_counts(self): # - 2 queries: Get-or-create the credit request. # - 1 query: Retrieve user account and profile information from the user API. # - 1 query: Look up the user's final grade from the credit requirements table. - # - 2 queries: Update the request. + # - 1 query: Update the request. # - 2 queries: Update the history table for the request. - with self.assertNumQueries(10): + # - 4 Django savepoints + with self.assertNumQueries(13): request = api.create_credit_request(self.course_key, self.PROVIDER_ID, self.USER_INFO['username']) - # - 3 queries: Retrieve and update the request + # - 2 queries: Retrieve and update the request # - 1 query: Update the history table for the request. uuid = request["parameters"]["request_uuid"] - with self.assertNumQueries(4): + with self.assertNumQueries(3): api.update_credit_request_status(uuid, self.PROVIDER_ID, "approved") with self.assertNumQueries(1): @@ -771,11 +772,11 @@ def test_cannot_make_credit_request_after_response(self, status): api.create_credit_request(self.course_key, self.PROVIDER_ID, self.USER_INFO['username']) @ddt.data("pending", "failed") - def test_user_is_not_eligible(self, status): + def test_user_is_not_eligible(self, requirement_status): # Simulate a user who is not eligible for credit CreditEligibility.objects.all().delete() status = CreditRequirementStatus.objects.get(username=self.USER_INFO['username']) - status.status = status + status.status = requirement_status status.reason = {} status.save() @@ -810,7 +811,6 @@ def test_create_request_null_country(self): # coerces None values to empty strings. query = "UPDATE auth_userprofile SET country = NULL WHERE id = %s" connection.cursor().execute(query, [str(self.user.profile.id)]) - transaction.commit_unless_managed() # Request should include an empty country field request = api.create_credit_request(self.course_key, self.PROVIDER_ID, self.USER_INFO["username"]) diff --git a/openedx/core/djangoapps/programs/migrations/0001_initial.py b/openedx/core/djangoapps/programs/migrations/0001_initial.py index 5bc39e72749b..95554d04db4b 100644 --- a/openedx/core/djangoapps/programs/migrations/0001_initial.py +++ b/openedx/core/djangoapps/programs/migrations/0001_initial.py @@ -1,80 +1,33 @@ # -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'ProgramsApiConfig' - db.create_table('programs_programsapiconfig', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('internal_service_url', self.gf('django.db.models.fields.URLField')(max_length=200)), - ('public_service_url', self.gf('django.db.models.fields.URLField')(max_length=200)), - ('api_version_number', self.gf('django.db.models.fields.IntegerField')()), - ('enable_student_dashboard', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('programs', ['ProgramsApiConfig']) - - - def backwards(self, orm): - # Deleting model 'ProgramsApiConfig' - db.delete_table('programs_programsapiconfig') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'programs.programsapiconfig': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'ProgramsApiConfig'}, - 'api_version_number': ('django.db.models.fields.IntegerField', [], {}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enable_student_dashboard': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_service_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'public_service_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}) - } - } - - complete_apps = ['programs'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='ProgramsApiConfig', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('internal_service_url', models.URLField(verbose_name='Internal Service URL')), + ('public_service_url', models.URLField(verbose_name='Public Service URL')), + ('api_version_number', models.IntegerField(verbose_name='API Version')), + ('enable_student_dashboard', models.NullBooleanField(verbose_name='Enable Student Dashboard Displays')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + ] diff --git a/openedx/core/djangoapps/programs/models.py b/openedx/core/djangoapps/programs/models.py index 846b2277179e..2b459cba66b3 100644 --- a/openedx/core/djangoapps/programs/models.py +++ b/openedx/core/djangoapps/programs/models.py @@ -4,7 +4,7 @@ from urlparse import urljoin -from django.db.models import BooleanField, IntegerField, URLField +from django.db.models import NullBooleanField, IntegerField, URLField from django.utils.translation import ugettext_lazy as _ from config_models.models import ConfigurationModel @@ -19,7 +19,7 @@ class ProgramsApiConfig(ConfigurationModel): internal_service_url = URLField(verbose_name=_("Internal Service URL")) public_service_url = URLField(verbose_name=_("Public Service URL")) api_version_number = IntegerField(verbose_name=_("API Version")) - enable_student_dashboard = BooleanField(verbose_name=_("Enable Student Dashboard Displays")) + enable_student_dashboard = NullBooleanField(verbose_name=_("Enable Student Dashboard Displays")) @property def internal_api_url(self): diff --git a/openedx/core/djangoapps/self_paced/migrations/0001_initial.py b/openedx/core/djangoapps/self_paced/migrations/0001_initial.py index f683ec111586..e95596b041c4 100644 --- a/openedx/core/djangoapps/self_paced/migrations/0001_initial.py +++ b/openedx/core/djangoapps/self_paced/migrations/0001_initial.py @@ -1,72 +1,30 @@ # -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'SelfPacedConfiguration' - db.create_table('self_paced_selfpacedconfiguration', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('change_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('changed_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, on_delete=models.PROTECT)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('self_paced', ['SelfPacedConfiguration']) - - - def backwards(self, orm): - # Deleting model 'SelfPacedConfiguration' - db.delete_table('self_paced_selfpacedconfiguration') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'self_paced.selfpacedconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'SelfPacedConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['self_paced'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='SelfPacedConfiguration', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), + ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), + ('enable_course_home_improvements', models.BooleanField(default=False, verbose_name='Enable course home page improvements.')), + ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), + ], + options={ + 'ordering': ('-change_date',), + 'abstract': False, + }, + ), + ] diff --git a/openedx/core/djangoapps/self_paced/migrations/0002_auto__add_field_selfpacedconfiguration_enable_course_home_improvements.py b/openedx/core/djangoapps/self_paced/migrations/0002_auto__add_field_selfpacedconfiguration_enable_course_home_improvements.py deleted file mode 100644 index 6de0a78e703b..000000000000 --- a/openedx/core/djangoapps/self_paced/migrations/0002_auto__add_field_selfpacedconfiguration_enable_course_home_improvements.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'SelfPacedConfiguration.enable_course_home_improvements' - db.add_column('self_paced_selfpacedconfiguration', 'enable_course_home_improvements', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'SelfPacedConfiguration.enable_course_home_improvements' - db.delete_column('self_paced_selfpacedconfiguration', 'enable_course_home_improvements') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'self_paced.selfpacedconfiguration': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'SelfPacedConfiguration'}, - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enable_course_home_improvements': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['self_paced'] \ No newline at end of file diff --git a/openedx/core/djangoapps/theming/core.py b/openedx/core/djangoapps/theming/core.py index 4d114dc3ef99..45b8e33c1a16 100644 --- a/openedx/core/djangoapps/theming/core.py +++ b/openedx/core/djangoapps/theming/core.py @@ -31,7 +31,7 @@ def comprehensive_theme_changes(theme_dir): templates_dir = theme_dir / "lms" / "templates" if templates_dir.isdir(): - changes['settings']['TEMPLATE_DIRS'] = [templates_dir] + settings.TEMPLATE_DIRS + changes['settings']['TEMPLATE_DIRS'] = [templates_dir] + settings.DEFAULT_TEMPLATE_ENGINE['DIRS'] changes['mako_paths'].append(templates_dir) staticfiles_dir = theme_dir / "lms" / "static" diff --git a/openedx/core/djangoapps/user_api/accounts/api.py b/openedx/core/djangoapps/user_api/accounts/api.py index d38726d9466d..fd9f6b8b5ee4 100644 --- a/openedx/core/djangoapps/user_api/accounts/api.py +++ b/openedx/core/djangoapps/user_api/accounts/api.py @@ -250,7 +250,7 @@ def _get_user_and_profile(username): @intercept_errors(UserAPIInternalError, ignore_errors=[UserAPIRequestError]) -@transaction.commit_on_success +@transaction.atomic def create_account(username, password, email): """Create a new user account. diff --git a/openedx/core/djangoapps/user_api/accounts/serializers.py b/openedx/core/djangoapps/user_api/accounts/serializers.py index 024fcd3ad6da..995401a6d56c 100644 --- a/openedx/core/djangoapps/user_api/accounts/serializers.py +++ b/openedx/core/djangoapps/user_api/accounts/serializers.py @@ -70,7 +70,11 @@ def to_representation(self, user): reverse('accounts_api', kwargs={'username': user.username}) ), "email": user.email, - "date_joined": user.date_joined, + # For backwards compatibility: Tables created after the upgrade to Django 1.8 will save microseconds. + # However, mobile apps are not expecting microsecond in the serialized value. If we set it to zero the + # DRF JSONEncoder will not include it in the serialized value. + # https://docs.djangoproject.com/en/1.8/ref/databases/#fractional-seconds-support-for-time-and-datetime-fields + "date_joined": user.date_joined.replace(microsecond=0), "is_active": user.is_active, "bio": AccountLegacyProfileSerializer.convert_empty_to_None(profile.bio), "country": AccountLegacyProfileSerializer.convert_empty_to_None(profile.country.code), diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_api.py b/openedx/core/djangoapps/user_api/accounts/tests/test_api.py index 7c6bc230fe52..db96c6f5c120 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_api.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_api.py @@ -313,7 +313,6 @@ class AccountCreationActivationAndPasswordChangeTest(TestCase): '@domain.com', 'test@no_extension', u'fŕáńḱ@example.com', - u'frank@éxáḿṕĺé.ćőḿ', # Long email -- subtract the length of the @domain # except for one character (so we exceed the max length limit) diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_views.py b/openedx/core/djangoapps/user_api/accounts/tests/test_views.py index 5bc49ced6bdd..3d8acc63ff9b 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_views.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_views.py @@ -2,8 +2,9 @@ """ Test cases to cover Accounts-related behaviors of the User API application """ -import datetime +from collections import OrderedDict from copy import deepcopy +import datetime import ddt import hashlib import json @@ -239,7 +240,7 @@ def test_get_account_different_user_visible(self): """ self.different_client.login(username=self.different_user.username, password=self.test_password) self.create_mock_profile(self.user) - with self.assertNumQueries(9): + with self.assertNumQueries(11): response = self.send_get(self.different_client) self._verify_full_shareable_account_response(response) @@ -254,7 +255,7 @@ def test_get_account_different_user_private(self): """ self.different_client.login(username=self.different_user.username, password=self.test_password) self.create_mock_profile(self.user) - with self.assertNumQueries(9): + with self.assertNumQueries(11): response = self.send_get(self.different_client) self._verify_private_account_response(response) @@ -305,7 +306,7 @@ def verify_get_own_information(): """ Internal helper to perform the actual assertions """ - with self.assertNumQueries(8): + with self.assertNumQueries(10): response = self.send_get(self.client) data = response.data self.assertEqual(16, len(data)) @@ -344,7 +345,7 @@ def test_get_account_empty_string(self): legacy_profile.save() self.client.login(username=self.user.username, password=self.test_password) - with self.assertNumQueries(8): + with self.assertNumQueries(10): response = self.send_get(self.client) for empty_field in ("level_of_education", "gender", "country", "bio"): self.assertIsNone(response.data[empty_field]) @@ -383,14 +384,14 @@ def test_patch_account_unknown_user(self, api_client, user): ("level_of_education", "none", u"ȻħȺɍłɇs", u'"ȻħȺɍłɇs" is not a valid choice.'), ("country", "GB", "XY", u'"XY" is not a valid choice.'), ("year_of_birth", 2009, "not_an_int", u"A valid integer is required."), - ("name", "bob", "z" * 256, u"Ensure this field has no more than 255 characters."), - ("name", u"ȻħȺɍłɇs", "z ", u"The name field must be at least 2 characters long."), + ("name", "bob", "z" * 256, u"Ensure this value has at most 255 characters (it has 256)."), + ("name", u"ȻħȺɍłɇs", "z ", "The name field must be at least 2 characters long."), ("goals", "Smell the roses"), ("mailing_address", "Sesame Street"), # Note that we store the raw data, so it is up to client to escape the HTML. ( "bio", u"Lacrosse-playing superhero 壓是進界推日不復女", - "z" * 3001, u"Ensure this field has no more than 3000 characters." + "z" * 3001, u"Ensure this value has at most 3000 characters (it has 3001)." ), ("account_privacy", ALL_USERS_VISIBILITY), ("account_privacy", PRIVATE_VISIBILITY), @@ -596,11 +597,14 @@ def test_patch_language_proficiencies(self): @ddt.data( (u"not_a_list", {u'non_field_errors': [u'Expected a list of items but got type "unicode".']}), ([u"not_a_JSON_object"], [{u'non_field_errors': [u'Invalid data. Expected a dictionary, but got unicode.']}]), - ([{}], [{"code": [u"This field is required."]}]), - ([{u"code": u"invalid_language_code"}], [{'code': [u'"invalid_language_code" is not a valid choice.']}]), + ([{}], [OrderedDict([('code', [u'This field is required.'])])]), + ( + [{u"code": u"invalid_language_code"}], + [OrderedDict([('code', [u'"invalid_language_code" is not a valid choice.'])])] + ), ( [{u"code": u"kw"}, {u"code": u"el"}, {u"code": u"kw"}], - [u'The language_proficiencies field must consist of unique languages'] + ['The language_proficiencies field must consist of unique languages'] ), ) @ddt.unpack diff --git a/openedx/core/djangoapps/user_api/accounts/views.py b/openedx/core/djangoapps/user_api/accounts/views.py index 1d6250ea5d45..01044db32c59 100644 --- a/openedx/core/djangoapps/user_api/accounts/views.py +++ b/openedx/core/djangoapps/user_api/accounts/views.py @@ -162,7 +162,7 @@ def patch(self, request, username): else an error response with status code 415 will be returned. """ try: - with transaction.commit_on_success(): + with transaction.atomic(): update_account_settings(request.user, request.data, username=username) account_settings = get_account_settings(request, username) except UserNotAuthorized: diff --git a/openedx/core/djangoapps/user_api/migrations/0001_initial.py b/openedx/core/djangoapps/user_api/migrations/0001_initial.py index 3a5e3c0ab5a9..2945733921fe 100644 --- a/openedx/core/djangoapps/user_api/migrations/0001_initial.py +++ b/openedx/core/djangoapps/user_api/migrations/0001_initial.py @@ -1,78 +1,62 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'UserPreference' - db.create_table('user_api_userpreference', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['auth.User'])), - ('key', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('value', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('user_api', ['UserPreference']) - - # Adding unique constraint on 'UserPreference', fields ['user', 'key'] - db.create_unique('user_api_userpreference', ['user_id', 'key']) - - - def backwards(self, orm): - # Removing unique constraint on 'UserPreference', fields ['user', 'key'] - db.delete_unique('user_api_userpreference', ['user_id', 'key']) - - # Deleting model 'UserPreference' - db.delete_table('user_api_userpreference') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'user_api.userpreference': { - 'Meta': {'unique_together': "(('user', 'key'),)", 'object_name': 'UserPreference'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['user_api'] +from __future__ import unicode_literals + +from django.db import migrations, models +import django.utils.timezone +from django.conf import settings +import model_utils.fields +import django.core.validators +import xmodule_django.models + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='UserCourseTag', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('key', models.CharField(max_length=255, db_index=True)), + ('course_id', xmodule_django.models.CourseKeyField(max_length=255, db_index=True)), + ('value', models.TextField()), + ('user', models.ForeignKey(related_name='+', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='UserOrgTag', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), + ('key', models.CharField(max_length=255, db_index=True)), + ('org', models.CharField(max_length=255, db_index=True)), + ('value', models.TextField()), + ('user', models.ForeignKey(related_name='+', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='UserPreference', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('key', models.CharField(db_index=True, max_length=255, validators=[django.core.validators.RegexValidator(b'[-_a-zA-Z0-9]+')])), + ('value', models.TextField()), + ('user', models.ForeignKey(related_name='preferences', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.AlterUniqueTogether( + name='userpreference', + unique_together=set([('user', 'key')]), + ), + migrations.AlterUniqueTogether( + name='userorgtag', + unique_together=set([('user', 'org', 'key')]), + ), + migrations.AlterUniqueTogether( + name='usercoursetag', + unique_together=set([('user', 'course_id', 'key')]), + ), + ] diff --git a/openedx/core/djangoapps/user_api/migrations/0002_auto__add_usercoursetags__add_unique_usercoursetags_user_course_id_key.py b/openedx/core/djangoapps/user_api/migrations/0002_auto__add_usercoursetags__add_unique_usercoursetags_user_course_id_key.py deleted file mode 100644 index 639fb83e9c05..000000000000 --- a/openedx/core/djangoapps/user_api/migrations/0002_auto__add_usercoursetags__add_unique_usercoursetags_user_course_id_key.py +++ /dev/null @@ -1,87 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'UserCourseTags' - db.create_table('user_api_usercoursetags', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['auth.User'])), - ('key', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('value', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('user_api', ['UserCourseTags']) - - # Adding unique constraint on 'UserCourseTags', fields ['user', 'course_id', 'key'] - db.create_unique('user_api_usercoursetags', ['user_id', 'course_id', 'key']) - - - def backwards(self, orm): - # Removing unique constraint on 'UserCourseTags', fields ['user', 'course_id', 'key'] - db.delete_unique('user_api_usercoursetags', ['user_id', 'course_id', 'key']) - - # Deleting model 'UserCourseTags' - db.delete_table('user_api_usercoursetags') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'user_api.usercoursetags': { - 'Meta': {'unique_together': "(('user', 'course_id', 'key'),)", 'object_name': 'UserCourseTags'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {}) - }, - 'user_api.userpreference': { - 'Meta': {'unique_together': "(('user', 'key'),)", 'object_name': 'UserPreference'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['user_api'] diff --git a/openedx/core/djangoapps/user_api/migrations/0003_rename_usercoursetags.py b/openedx/core/djangoapps/user_api/migrations/0003_rename_usercoursetags.py deleted file mode 100644 index 9c9afc30447b..000000000000 --- a/openedx/core/djangoapps/user_api/migrations/0003_rename_usercoursetags.py +++ /dev/null @@ -1,72 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.rename_table('user_api_usercoursetags', 'user_api_usercoursetag') - - - def backwards(self, orm): - db.rename_table('user_api_usercoursetag', 'user_api_usercoursetags') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'user_api.usercoursetag': { - 'Meta': {'unique_together': "(('user', 'course_id', 'key'),)", 'object_name': 'UserCourseTag'}, - 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {}) - }, - 'user_api.userpreference': { - 'Meta': {'unique_together': "(('user', 'key'),)", 'object_name': 'UserPreference'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['user_api'] diff --git a/openedx/core/djangoapps/user_api/migrations/0004_auto__add_userorgtag__add_unique_userorgtag_user_org_key__chg_field_us.py b/openedx/core/djangoapps/user_api/migrations/0004_auto__add_userorgtag__add_unique_userorgtag_user_org_key__chg_field_us.py deleted file mode 100644 index 8ea25eb60f6c..000000000000 --- a/openedx/core/djangoapps/user_api/migrations/0004_auto__add_userorgtag__add_unique_userorgtag_user_org_key__chg_field_us.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'UserOrgTag' - db.create_table('user_api_userorgtag', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), - ('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['auth.User'])), - ('key', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('org', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('value', self.gf('django.db.models.fields.TextField')()), - )) - db.send_create_signal('user_api', ['UserOrgTag']) - - # Adding unique constraint on 'UserOrgTag', fields ['user', 'org', 'key'] - db.create_unique('user_api_userorgtag', ['user_id', 'org', 'key']) - - # Create a composite index of user_id, org, and key. - db.create_index('user_api_userorgtag', ['user_id', 'org', 'key']) - - # Changing field 'UserCourseTag.course_id' - db.alter_column('user_api_usercoursetag', 'course_id', self.gf('xmodule_django.models.CourseKeyField')(max_length=255)) - - def backwards(self, orm): - - # Delete the composite index of user_id, org, and key. - db.delete_index('user_api_userorgtag', ['user_id', 'org', 'key']) - - # Removing unique constraint on 'UserOrgTag', fields ['user', 'org', 'key'] - db.delete_unique('user_api_userorgtag', ['user_id', 'org', 'key']) - - # Deleting model 'UserOrgTag' - db.delete_table('user_api_userorgtag') - - # Changing field 'UserCourseTag.course_id' - db.alter_column('user_api_usercoursetag', 'course_id', self.gf('django.db.models.fields.CharField')(max_length=255)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'user_api.usercoursetag': { - 'Meta': {'unique_together': "(('user', 'course_id', 'key'),)", 'object_name': 'UserCourseTag'}, - 'course_id': ('xmodule_django.models.CourseKeyField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {}) - }, - 'user_api.userorgtag': { - 'Meta': {'unique_together': "(('user', 'org', 'key'),)", 'object_name': 'UserOrgTag'}, - 'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), - 'org': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {}) - }, - 'user_api.userpreference': { - 'Meta': {'unique_together': "(('user', 'key'),)", 'object_name': 'UserPreference'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'preferences'", 'to': "orm['auth.User']"}), - 'value': ('django.db.models.fields.TextField', [], {}) - } - } - - complete_apps = ['user_api'] diff --git a/openedx/core/djangoapps/user_api/preferences/tests/test_api.py b/openedx/core/djangoapps/user_api/preferences/tests/test_api.py index f8bc76e9ab7a..2bdc1680bd29 100644 --- a/openedx/core/djangoapps/user_api/preferences/tests/test_api.py +++ b/openedx/core/djangoapps/user_api/preferences/tests/test_api.py @@ -436,7 +436,7 @@ def get_expected_validation_developer_message(preference_key, preference_value): preference_key=preference_key, preference_value=preference_value, error={ - "key": [u"Ensure this field has no more than 255 characters."] + "key": [u"Ensure this value has at most 255 characters (it has 256)."] } ) diff --git a/openedx/core/djangoapps/user_api/preferences/views.py b/openedx/core/djangoapps/user_api/preferences/views.py index 7a4649e36c61..7594f5345cc5 100644 --- a/openedx/core/djangoapps/user_api/preferences/views.py +++ b/openedx/core/djangoapps/user_api/preferences/views.py @@ -117,7 +117,7 @@ def patch(self, request, username): status=status.HTTP_400_BAD_REQUEST ) try: - with transaction.commit_on_success(): + with transaction.atomic(): update_user_preferences(request.user, request.data, user=username) except UserNotAuthorized: return Response(status=status.HTTP_403_FORBIDDEN) diff --git a/openedx/core/lib/django_test_client_utils.py b/openedx/core/lib/django_test_client_utils.py index e48c502550e7..d6c2b8e5dbcf 100644 --- a/openedx/core/lib/django_test_client_utils.py +++ b/openedx/core/lib/django_test_client_utils.py @@ -1,59 +1,10 @@ """ -This file includes the monkey-patch for requests' PATCH method, as we are using -older version of django that does not contains the PATCH method in its test client. +This file includes util methods. """ # pylint: disable=protected-access -from __future__ import unicode_literals - -from urlparse import urlparse - -from django.test.client import RequestFactory, Client, FakePayload - - -BOUNDARY = 'BoUnDaRyStRiNg' -MULTIPART_CONTENT = 'multipart/form-data; boundary=%s' % BOUNDARY - - -def request_factory_patch(self, path, data=None, content_type=MULTIPART_CONTENT, **extra): - """ - Construct a PATCH request. - """ - # pylint: disable=invalid-name - - patch_data = self._encode_data(data or {}, content_type) - - parsed = urlparse(path) - r = { - 'CONTENT_LENGTH': len(patch_data), - 'CONTENT_TYPE': content_type, - 'PATH_INFO': self._get_path(parsed), - 'QUERY_STRING': parsed[4], - 'REQUEST_METHOD': 'PATCH', - 'wsgi.input': FakePayload(patch_data), - } - r.update(extra) - return self.request(**r) - - -def client_patch(self, path, data=None, content_type=MULTIPART_CONTENT, follow=False, **extra): - """ - Send a resource to the server using PATCH. - """ - response = super(Client, self).patch(path, data=data or {}, content_type=content_type, **extra) - if follow: - response = self._handle_redirects(response, **extra) - return response - - -if not hasattr(RequestFactory, 'patch'): - setattr(RequestFactory, 'patch', request_factory_patch) - -if not hasattr(Client, 'patch'): - setattr(Client, 'patch', client_patch) - def get_absolute_url(path): """ Generate an absolute URL for a resource on the test server. """ - return u'http://testserver/{}'.format(path.lstrip('/')) + return u'http://testserver/{}'.format(path.lstrip(u'/')) diff --git a/pavelib/assets.py b/pavelib/assets.py index cabd6e515e7c..eac7756b31fb 100644 --- a/pavelib/assets.py +++ b/pavelib/assets.py @@ -110,8 +110,8 @@ def register(self, observer): def on_modified(self, event): print('\tCHANGED:', event.src_path) try: - compile_sass() - except Exception: # pylint: disable=broad-except + compile_sass() # pylint: disable=no-value-for-parameter + except Exception: # pylint: disable=broad-except traceback.print_exc() diff --git a/pavelib/docs.py b/pavelib/docs.py index 1e8957ad7be9..0b10b61286db 100644 --- a/pavelib/docs.py +++ b/pavelib/docs.py @@ -4,7 +4,8 @@ """ from __future__ import print_function import sys -from paver.easy import * + +from paver.easy import cmdopts, needs, sh, task DOC_PATHS = { diff --git a/pavelib/js_test.py b/pavelib/js_test.py index d381374009d4..fb1a8933e6f8 100644 --- a/pavelib/js_test.py +++ b/pavelib/js_test.py @@ -61,7 +61,7 @@ def test_js_run(options): """ Run the JavaScript tests and print results to the console """ - setattr(options, 'mode', 'run') + options.mode = 'run' test_js(options) @@ -74,5 +74,5 @@ def test_js_dev(options): """ Run the JavaScript tests in your default browsers """ - setattr(options, 'mode', 'dev') + options.mode = 'dev' test_js(options) diff --git a/pavelib/paver_tests/test_servers.py b/pavelib/paver_tests/test_servers.py index 95c1c0ef69b3..9d75e57ce275 100644 --- a/pavelib/paver_tests/test_servers.py +++ b/pavelib/paver_tests/test_servers.py @@ -158,7 +158,7 @@ def test_update_db(self, options): """ settings = options.get("settings", "devstack") call_task("pavelib.servers.update_db", options=options) - db_command = "python manage.py {server} --settings={settings} syncdb --migrate --traceback --pythonpath=." + db_command = "python manage.py {server} --settings={settings} migrate --traceback --pythonpath=." self.assertEquals( self.task_messages, [ diff --git a/pavelib/prereqs.py b/pavelib/prereqs.py index 180749196103..c262c0ab455f 100644 --- a/pavelib/prereqs.py +++ b/pavelib/prereqs.py @@ -2,14 +2,17 @@ Install Python, Ruby, and Node prerequisites. """ -import os -import hashlib from distutils import sysconfig -from paver.easy import * +import hashlib +import os + +from paver.easy import sh, task + from .utils.envs import Env +import sys -PREREQS_MD5_DIR = os.getenv('PREREQ_CACHE_DIR', Env.REPO_ROOT / '.prereqs_cache') +PREREQS_STATE_DIR = os.getenv('PREREQ_CACHE_DIR', Env.REPO_ROOT / '.prereqs_cache') NPM_REGISTRY = "http://registry.npmjs.org/" NO_PREREQ_MESSAGE = "NO_PREREQ_INSTALL is set, not installing prereqs" @@ -86,7 +89,7 @@ def prereq_cache(cache_name, paths, install_func): """ # Retrieve the old hash cache_filename = cache_name.replace(" ", "_") - cache_file_path = os.path.join(PREREQS_MD5_DIR, "{}.sha1".format(cache_filename)) + cache_file_path = os.path.join(PREREQS_STATE_DIR, "{}.sha1".format(cache_filename)) old_hash = None if os.path.isfile(cache_file_path): with open(cache_file_path) as cache_file: @@ -103,9 +106,9 @@ def prereq_cache(cache_name, paths, install_func): # If the code executed within the context fails (throws an exception), # then this step won't get executed. try: - os.makedirs(PREREQS_MD5_DIR) + os.makedirs(PREREQS_STATE_DIR) except OSError: - if not os.path.isdir(PREREQS_MD5_DIR): + if not os.path.isdir(PREREQS_STATE_DIR): raise with open(cache_file_path, "w") as cache_file: @@ -166,16 +169,85 @@ def install_node_prereqs(): prereq_cache("Node prereqs", ["package.json"], node_prereqs_installation) +@task +def uninstall_python_packages(): + """ + Uninstall Python packages that need explicit uninstallation. + + Some Python packages that we no longer want need to be explicitly + uninstalled, notably, South. Some other packages were once installed in + ways that were resistant to being upgraded, like edxval. Also uninstall + them. + + """ + # So that we don't constantly uninstall things, use a version number of the + # uninstallation needs. Check it, and skip this if we're up to date. + expected_version = 1 + state_file_path = os.path.join(PREREQS_STATE_DIR, "python_uninstall_version.txt") + if os.path.isfile(state_file_path): + with open(state_file_path) as state_file: + version = int(state_file.read()) + if version == expected_version: + return + + # Run pip to find the packages we need to get rid of. Believe it or not, + # edx-val is installed in a way that it is present twice, so we have a loop + # to really really get rid of it. + for _ in range(3): + uninstalled = False + frozen = sh("pip freeze", capture=True).splitlines() + + # Uninstall South + if any(line.startswith("South") for line in frozen): + sh("pip uninstall -y South") + uninstalled = True + + # Uninstall edx-val + if any("edxval" in line for line in frozen): + sh("pip uninstall -y edxval") + uninstalled = True + + if not uninstalled: + break + else: + # We tried three times and didn't manage to get rid of the pests. + print "Couldn't uninstall unwanted Python packages!" + return + + # Write our version. + with open(state_file_path, "w") as state_file: + state_file.write(str(expected_version)) + + @task def install_python_prereqs(): """ - Installs Python prerequisites + Installs Python prerequisites. """ if no_prereq_install(): print NO_PREREQ_MESSAGE return - prereq_cache("Python prereqs", PYTHON_REQ_FILES + [sysconfig.get_python_lib()], python_prereqs_installation) + # Include all of the requirements files in the fingerprint. + files_to_fingerprint = list(PYTHON_REQ_FILES) + + # Also fingerprint the directories where packages get installed: + # ("/edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages") + files_to_fingerprint.append(sysconfig.get_python_lib()) + + # In a virtualenv, "-e installs" get put in a src directory. + src_dir = os.path.join(sys.prefix, "src") + if os.path.isdir(src_dir): + files_to_fingerprint.append(src_dir) + + # Also fingerprint this source file, so that if the logic for installations + # changes, we will redo the installation. + this_file = __file__ + if this_file.endswith(".pyc"): + this_file = this_file[:-1] # use the .py file instead of the .pyc + files_to_fingerprint.append(this_file) + + prereq_cache("Python prereqs", files_to_fingerprint, python_prereqs_installation) @task @@ -189,4 +261,5 @@ def install_prereqs(): install_ruby_prereqs() install_node_prereqs() + uninstall_python_packages() install_python_prereqs() diff --git a/pavelib/servers.py b/pavelib/servers.py index 3fd3c335b095..f76fdf906abb 100644 --- a/pavelib/servers.py +++ b/pavelib/servers.py @@ -3,7 +3,9 @@ """ from __future__ import print_function import argparse -from paver.easy import * +import sys + +from paver.easy import call_task, cmdopts, consume_args, needs, sh, task from .assets import collect_assets from .utils.cmd import django_cmd @@ -233,14 +235,16 @@ def run_all_servers(options): @needs('pavelib.prereqs.install_prereqs') @cmdopts([ ("settings=", "s", "Django settings"), + ("fake-initial", None, "Fake the initial migrations"), ]) -def update_db(): +def update_db(options): """ Runs syncdb and then migrate. """ settings = getattr(options, 'settings', DEFAULT_SETTINGS) + fake = "--fake-initial" if getattr(options, 'fake_initial', False) else "" for system in ('lms', 'cms'): - sh(django_cmd(system, settings, 'syncdb', '--migrate', '--traceback', '--pythonpath=.')) + sh(django_cmd(system, settings, 'migrate', fake, '--traceback', '--pythonpath=.')) @task diff --git a/pavelib/utils/cmd.py b/pavelib/utils/cmd.py index 07f9befc4789..9bad153f4614 100644 --- a/pavelib/utils/cmd.py +++ b/pavelib/utils/cmd.py @@ -7,7 +7,7 @@ def cmd(*args): """ Concatenate the arguments into a space-separated shell command. """ - return " ".join([str(arg) for arg in args]) + return " ".join(str(arg) for arg in args if arg) def django_cmd(sys, settings, *args): diff --git a/pavelib/utils/test/suites/acceptance_suite.py b/pavelib/utils/test/suites/acceptance_suite.py index b9b6447444cb..631dab98ce7a 100644 --- a/pavelib/utils/test/suites/acceptance_suite.py +++ b/pavelib/utils/test/suites/acceptance_suite.py @@ -130,8 +130,6 @@ def _setup_acceptance_db(self): sh("./manage.py cms --settings acceptance migrate --traceback --noinput") else: # If no cached database exists, syncdb before migrating, then create the cache - sh("./manage.py lms --settings acceptance syncdb --traceback --noinput") - sh("./manage.py cms --settings acceptance syncdb --traceback --noinput") sh("./manage.py lms --settings acceptance migrate --traceback --noinput") sh("./manage.py cms --settings acceptance migrate --traceback --noinput") diff --git a/pavelib/utils/test/suites/bokchoy_suite.py b/pavelib/utils/test/suites/bokchoy_suite.py index 7e87b15c33f5..832226a2a202 100644 --- a/pavelib/utils/test/suites/bokchoy_suite.py +++ b/pavelib/utils/test/suites/bokchoy_suite.py @@ -65,7 +65,7 @@ def __enter__(self): self.log_dir.makedirs_p() self.har_dir.makedirs_p() self.report_dir.makedirs_p() - test_utils.clean_reports_dir() + test_utils.clean_reports_dir() # pylint: disable=no-value-for-parameter if not (self.fasttest or self.skip_clean): test_utils.clean_test_files() diff --git a/pavelib/utils/test/suites/nose_suite.py b/pavelib/utils/test/suites/nose_suite.py index 7531ebf48f03..ae739ba12cf2 100644 --- a/pavelib/utils/test/suites/nose_suite.py +++ b/pavelib/utils/test/suites/nose_suite.py @@ -120,7 +120,7 @@ def __enter__(self): def cmd(self): cmd = ( './manage.py {system} test --verbosity={verbosity} ' - '{test_id} {test_opts} --traceback --settings=test {extra} ' + '{test_id} {test_opts} --settings=test {extra} ' '--with-xunit --xunit-file={xunit_report}'.format( system=self.root, verbosity=self.verbosity, diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 5916c173dd24..6e2576d0c439 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -13,23 +13,25 @@ celery==3.1.18 cssselect==0.9.1 dealer==2.0.4 defusedxml==0.4.1 -django-babel-underscore==0.3.0 +django-babel-underscore==0.4.2 django-celery==3.1.16 django-countries==3.3 -django-extensions==1.5.5 +django-extensions==1.5.9 django-filter==0.11.0 django-ipware==1.1.0 django-mako==0.1.5pre django-model-utils==2.3.1 django-mptt==0.7.4 -django-openid-auth==0.4 +django-oauth-plus==2.2.8 django-sekizai==0.8.2 django-ses==0.7.0 django-simple-history==1.6.3 -django-storages==1.1.5 +django-storages-redux==1.3 django-method-override==0.1.0 -djangorestframework>=3.1,<3.2 -django==1.4.22 +# We need a fix to DRF 3.2.x, for now use it from our own cherry-picked repo +#djangorestframework>=3.1,<3.2 +git+https://github.com/edx/django-rest-framework.git@3c72cb5ee5baebc4328947371195eae2077197b0#egg=djangorestframework==3.2.3 +django==1.8.5 edx-rest-api-client==1.2.1 elasticsearch==0.4.5 facebook-sdk==0.4.0 @@ -63,7 +65,11 @@ pyparsing==2.0.1 python-memcached==1.48 python-openid==2.2.5 python-dateutil==2.1 + +# This module gets monkey-patched in third_party_auth.py to fix a Django 1.8 incompatibility. +# When this dependency gets upgraded, the monkey patch should be removed, if possible. python-social-auth==0.2.12 + pytz==2015.2 pysrt==0.4.7 PyYAML==3.10 @@ -74,7 +80,6 @@ Shapely==1.2.16 singledispatch==3.4.0.2 sorl-thumbnail==12.3 sortedcontainers==0.9.2 -South==1.0.1 stevedore==0.14.1 sure==1.2.3 sympy==0.7.1 diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 4e96d22cb6f0..c44e9112aa4c 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -9,16 +9,17 @@ # Third-party: -e git+https://github.com/cyberdelia/django-pipeline.git@1.5.3#egg=django-pipeline --e git+https://github.com/edx/django-wiki.git@cd0b2b31997afccde519fe5b3365e61a9edb143f#egg=django-wiki --e git+https://github.com/edx/django-oauth2-provider.git@0.2.7-fork-edx-5#egg=django-oauth2-provider --e git+https://github.com/edx/django-rest-framework-oauth.git@f0b503fda8c254a38f97fef802ded4f5fe367f7a#egg=djangorestframework-oauth --e git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=mongodb_proxy +git+https://github.com/edx/django-wiki.git@ned/dj18#egg=django-wiki==0.0.4 +-e git+https://github.com/edx/django-oauth2-provider.git@will/django-1.8-upgrade#egg=django-oauth2-provider==0.2.7-fork-edx-6 +git+https://github.com/edx/django-openid-auth.git@django1.8-upgrade#egg=django-openid-auth==0.8 +-e git+https://github.com/edx/django-rest-framework-oauth.git@f0b503fda8c254a38f97fef802ded4f5fe367f7a#egg=djangorestframework-oauth==1.0.1 +git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=MongoDBProxy==0.1.0 git+https://github.com/edx/nltk.git@2.0.6#egg=nltk==2.0.6 -e git+https://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev -e git+https://github.com/eventbrite/zendesk.git@d53fe0e81b623f084e91776bcf6369f8b7b63879#egg=zendesk -e git+https://github.com/appliedsec/pygeoip.git@95e69341cebf5a6a9fbf7c4f5439d458898bdc3b#egg=pygeoip -e git+https://github.com/jazkarta/edx-jsme.git@c5bfa5d361d6685d8c643838fc0055c25f8b7999#egg=edx-jsme --e git+https://github.com/pmitros/django-pyfs.git@d175715e0fe3367ec0f1ee429c242d603f6e8b10#egg=djpyfs +git+https://github.com/edx/django-pyfs.git@ned/update-django-18#egg=django-pyfs==1.0.3 git+https://github.com/mitocw/django-cas.git@60a5b8e5a62e63e0d5d224a87f0b489201a0c695#egg=django-cas -e git+https://github.com/dgrtwo/ParsePy.git@7949b9f754d1445eff8e8f20d0e967b9a6420639#egg=parse_rest # Master pyfs has a bug working with VPC auth. This is a fix. We should switch @@ -31,38 +32,36 @@ git+https://github.com/hmarr/django-debug-toolbar-mongo.git@b0686a76f1ce3532088c -e git+https://github.com/jazkarta/ccx-keys.git@e6b03704b1bb97c1d2f31301ecb4e3a687c536ea#egg=ccx-keys git+https://github.com/edx/rfc6266.git@v0.0.5-edx#egg=rfc6266==0.0.5-edx # Used for testing --e git+https://github.com/gabrielfalcao/lettuce.git@b18b8fb711eb7a178c58574716032ad8de525912#egg=lettuce=1.8-support +git+https://github.com/edx/lettuce.git@django1.8/upgrade#egg=lettuce==0.2.20.002 # nose fork needed for multiprocess support git+https://github.com/edx/nose.git@99c2aff0ff51bf228bfa5482e97e612c97a23245#egg=nose==1.3.7.1 # Our libraries: --e git+https://github.com/edx/XBlock.git@a20c70f2e3df1cb716b9c7a25fecf57020543b7f#egg=XBlock +-e git+https://github.com/edx/XBlock.git@django1.8-upgrade#egg=XBlock -e git+https://github.com/edx/codejail.git@6b17c33a89bef0ac510926b1d7fea2748b73aadd#egg=codejail -e git+https://github.com/edx/js-test-tool.git@v0.1.6#egg=js_test_tool --e git+https://github.com/edx/event-tracking.git@0.2.0#egg=event-tracking --e git+https://github.com/edx-solutions/django-splash.git@7579d052afcf474ece1239153cffe1c89935bc4f#egg=django-splash +-e git+https://github.com/edx/event-tracking.git@django1.8-upgrade#egg=event-tracking==0.2.1 +-e git+https://github.com/edx/django-splash.git@v0.2#egg=django-splash==0.2 -e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock --e git+https://github.com/edx/edx-ora2.git@release-2015-09-22T15.43#egg=edx-ora2 --e git+https://github.com/edx/edx-submissions.git@0.1.0#egg=edx-submissions +-e git+https://github.com/edx/edx-ora2.git@ned/django-upgrade-1.8#egg=ora2==0.2.1 +-e git+https://github.com/edx/edx-submissions.git@muzaffar/upgrage-django-1.8#egg=edx-submissions==0.1.1 -e git+https://github.com/edx/opaque-keys.git@27dc382ea587483b1e3889a3d19cbd90b9023a06#egg=opaque-keys git+https://github.com/edx/ease.git@release-2015-07-14#egg=ease==0.1.3 git+https://github.com/edx/i18n-tools.git@v0.1.3#egg=i18n-tools==v0.1.3 -git+https://github.com/edx/edx-oauth2-provider.git@0.5.7#egg=edx-oauth2-provider==0.5.7 --e git+https://github.com/edx/edx-val.git@0.0.6#egg=edx-val +git+https://github.com/edx/edx-oauth2-provider.git@django1.8-upgrade#egg=edx-oauth2-provider==0.5.8 +git+https://github.com/edx/edx-val.git@ammar/upgrade-django-1.8#egg=edxval==0.0.8 -e git+https://github.com/pmitros/RecommenderXBlock.git@518234bc354edbfc2651b9e534ddb54f96080779#egg=recommender-xblock -e git+https://github.com/pmitros/RateXBlock.git@367e19c0f6eac8a5f002fd0f1559555f8e74bfff#egg=rate-xblock --e git+https://github.com/edx/edx-search.git@release-2015-09-11a#egg=edx-search -git+https://github.com/edx/edx-milestones.git@release-2015-10-20#egg=edx-milestones==0.1.3 +-e git+https://github.com/edx/edx-search.git@ammar/upgrade-django-1.8#egg=edx-search==0.1.1 +-e git+https://github.com/edx/edx-milestones.git@django1.8-upgrade#egg=edx-milestones==0.1.5 git+https://github.com/edx/edx-lint.git@v0.3.2#egg=edx_lint==0.3.2 -e git+https://github.com/edx/xblock-utils.git@213a97a50276d6a2504d8133650b2930ead357a0#egg=xblock-utils -e git+https://github.com/edx-solutions/xblock-google-drive.git@138e6fa0bf3a2013e904a085b9fed77dab7f3f21#egg=xblock-google-drive -git+https://github.com/edx/edx-reverification-block.git@0.0.4#egg=edx-reverification-block==0.0.4 +-e git+https://github.com/edx/edx-reverification-block.git@ned/upgrade-django-1.8#egg=edx-reverification-block==0.0.5 -e git+https://github.com/edx/edx-user-state-client.git@30c0ad4b9f57f8d48d6943eb585ec8a9205f4469#egg=edx-user-state-client -git+https://github.com/edx/edx-organizations.git@release-2015-09-22#egg=edx-organizations==0.1.6 - -git+https://github.com/edx/edx-proctoring.git@0.10.16#egg=edx-proctoring==0.10.16 - +git+https://github.com/edx/edx-organizations.git@ned/django-18#egg=edx-organizations==0.1.7 +git+https://github.com/edx/edx-proctoring.git@django1.8-upgrade#egg=edx-proctoring==0.11.2 # Third Party XBlocks -e git+https://github.com/mitodl/edx-sga@172a90fd2738f8142c10478356b2d9ed3e55334a#egg=edx-sga diff --git a/scripts/reset-test-db.sh b/scripts/reset-test-db.sh index 102e7f367c5b..6fef34aeba78 100755 --- a/scripts/reset-test-db.sh +++ b/scripts/reset-test-db.sh @@ -48,13 +48,11 @@ else rm -rf $DB_CACHE_DIR && mkdir -p $DB_CACHE_DIR # Re-run migrations on the test database - ./manage.py lms --settings bok_choy syncdb --traceback --noinput - ./manage.py cms --settings bok_choy syncdb --traceback --noinput ./manage.py lms --settings bok_choy migrate --traceback --noinput ./manage.py cms --settings bok_choy migrate --traceback --noinput # Dump the schema and data to the cache - ./manage.py lms --settings bok_choy dumpdata > $DB_CACHE_DIR/bok_choy_data.json - mysqldump -u root --no-data --skip-comments --skip-dump-date edxtest > $DB_CACHE_DIR/bok_choy_schema.sql + # ./manage.py lms --settings bok_choy dumpdata > $DB_CACHE_DIR/bok_choy_data.json + # mysqldump -u root --no-data --skip-comments --skip-dump-date edxtest > $DB_CACHE_DIR/bok_choy_schema.sql fi From 607f3bf43a6d5bba3c87c938f9676f35badf754c Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 10 Nov 2015 15:42:39 -0500 Subject: [PATCH 03/87] Use a branch instead of an unpushed tag for django-splash --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index c44e9112aa4c..77c79bb66b44 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -42,7 +42,7 @@ git+https://github.com/edx/nose.git@99c2aff0ff51bf228bfa5482e97e612c97a23245#egg -e git+https://github.com/edx/codejail.git@6b17c33a89bef0ac510926b1d7fea2748b73aadd#egg=codejail -e git+https://github.com/edx/js-test-tool.git@v0.1.6#egg=js_test_tool -e git+https://github.com/edx/event-tracking.git@django1.8-upgrade#egg=event-tracking==0.2.1 --e git+https://github.com/edx/django-splash.git@v0.2#egg=django-splash==0.2 +-e git+https://github.com/edx/django-splash.git@ammar/upgrade-to-django1.8#egg=django-splash==0.2 -e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock -e git+https://github.com/edx/edx-ora2.git@ned/django-upgrade-1.8#egg=ora2==0.2.1 -e git+https://github.com/edx/edx-submissions.git@muzaffar/upgrage-django-1.8#egg=edx-submissions==0.1.1 From 680271d4669a309977e5fcfe89f92ea35ebc8d6f Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 10 Nov 2015 21:04:25 -0500 Subject: [PATCH 04/87] Correct the darklang migration, since many darklang configs can exist. --- .../dark_lang/migrations/0002_data__enable_on_install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py b/common/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py index 88939c60a77b..459b3d6c49c7 100644 --- a/common/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py +++ b/common/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py @@ -14,7 +14,8 @@ def create_dark_lang_config(apps, schema_editor): dark_lang_model = apps.get_model("dark_lang", "DarkLangConfig") db_alias = schema_editor.connection.alias - dark_lang_model.objects.using(db_alias).get_or_create(enabled=True) + if not dark_lang_model.objects.using(db_alias).exists(): + dark_lang_model.objects.using(db_alias).create(enabled=True) def remove_dark_lang_config(apps, schema_editor): """Write your backwards methods here.""" From 835eccaf67399e2fb90fe80f235e1685c9014148 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 10 Nov 2015 23:01:38 -0500 Subject: [PATCH 05/87] Use corrected migrations from edx-submissions --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 77c79bb66b44..5e5fdee5d2c6 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -45,7 +45,7 @@ git+https://github.com/edx/nose.git@99c2aff0ff51bf228bfa5482e97e612c97a23245#egg -e git+https://github.com/edx/django-splash.git@ammar/upgrade-to-django1.8#egg=django-splash==0.2 -e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock -e git+https://github.com/edx/edx-ora2.git@ned/django-upgrade-1.8#egg=ora2==0.2.1 --e git+https://github.com/edx/edx-submissions.git@muzaffar/upgrage-django-1.8#egg=edx-submissions==0.1.1 +-e git+https://github.com/edx/edx-submissions.git@django-upgrade/1.8#egg=edx-submissions==0.1.2 -e git+https://github.com/edx/opaque-keys.git@27dc382ea587483b1e3889a3d19cbd90b9023a06#egg=opaque-keys git+https://github.com/edx/ease.git@release-2015-07-14#egg=ease==0.1.3 git+https://github.com/edx/i18n-tools.git@v0.1.3#egg=i18n-tools==v0.1.3 From f55f9af891d4d40bd402eee2b12326a03eed2205 Mon Sep 17 00:00:00 2001 From: muhammad-ammar Date: Wed, 11 Nov 2015 13:58:07 +0500 Subject: [PATCH 06/87] Fix RemovedInDjango19Warning --- common/djangoapps/third_party_auth/models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/djangoapps/third_party_auth/models.py b/common/djangoapps/third_party_auth/models.py index 4384319faa6e..267d9648e323 100644 --- a/common/djangoapps/third_party_auth/models.py +++ b/common/djangoapps/third_party_auth/models.py @@ -582,9 +582,6 @@ class ProviderApiPermissions(models.Model): It gives permission for a OAuth2 client to access the information under certain IdPs. """ - class Meta(object): - app_label = "third_party_auth" - client = models.ForeignKey(Client) provider_id = models.CharField( max_length=255, @@ -594,5 +591,6 @@ class Meta(object): ) class Meta(object): # pylint: disable=missing-docstring + app_label = "third_party_auth" verbose_name = "Provider API Permission" verbose_name_plural = verbose_name + 's' From a6ec8cd2a4303646cc91320c8cc579e8c03d0455 Mon Sep 17 00:00:00 2001 From: muhammad-ammar Date: Wed, 11 Nov 2015 14:20:01 +0500 Subject: [PATCH 07/87] add django-storages into uninstall list --- pavelib/prereqs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pavelib/prereqs.py b/pavelib/prereqs.py index c262c0ab455f..28a9ae420564 100644 --- a/pavelib/prereqs.py +++ b/pavelib/prereqs.py @@ -207,6 +207,11 @@ def uninstall_python_packages(): sh("pip uninstall -y edxval") uninstalled = True + # Uninstall django-storages + if any("django-storages" in line for line in frozen): + sh("pip uninstall -y django-storages") + uninstalled = True + if not uninstalled: break else: From fb9526b9cd2cb83faedf8d9d29390f3fbe2bf66f Mon Sep 17 00:00:00 2001 From: Usman Khalid <2200617@gmail.com> Date: Wed, 11 Nov 2015 18:39:55 +0500 Subject: [PATCH 08/87] Update expected_version. --- pavelib/prereqs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pavelib/prereqs.py b/pavelib/prereqs.py index 28a9ae420564..13d8055d8bea 100644 --- a/pavelib/prereqs.py +++ b/pavelib/prereqs.py @@ -182,7 +182,7 @@ def uninstall_python_packages(): """ # So that we don't constantly uninstall things, use a version number of the # uninstallation needs. Check it, and skip this if we're up to date. - expected_version = 1 + expected_version = 2 state_file_path = os.path.join(PREREQS_STATE_DIR, "python_uninstall_version.txt") if os.path.isfile(state_file_path): with open(state_file_path) as state_file: From e7fcc743c0fa2c5b61b982bad845b48e1ff8c899 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 11 Nov 2015 08:44:59 -0500 Subject: [PATCH 09/87] More-correct data migrations We need to be sure the migrations will work even in the presence of data from the future. get_or_create is a problem, because if the data already exists, there could be more than one record, even if this migration only creates one. --- .../migrations/0002_data__enable_on_install.py | 7 ++++--- .../migrations/0002_data__default_rate_limit_config.py | 7 +++++-- .../migrations/0003_data__default_modes.py | 10 ++++++---- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/common/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py b/common/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py index 459b3d6c49c7..061168cf20ac 100644 --- a/common/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py +++ b/common/djangoapps/dark_lang/migrations/0002_data__enable_on_install.py @@ -11,11 +11,12 @@ def create_dark_lang_config(apps, schema_editor): Enable DarkLang by default when it is installed, to prevent accidental release of testing languages. """ - dark_lang_model = apps.get_model("dark_lang", "DarkLangConfig") + DarkLangConfig = apps.get_model("dark_lang", "DarkLangConfig") db_alias = schema_editor.connection.alias - if not dark_lang_model.objects.using(db_alias).exists(): - dark_lang_model.objects.using(db_alias).create(enabled=True) + objects = DarkLangConfig.objects.using(db_alias) + if not objects.exists(): + objects.create(enabled=True) def remove_dark_lang_config(apps, schema_editor): """Write your backwards methods here.""" diff --git a/common/djangoapps/util/migrations/0002_data__default_rate_limit_config.py b/common/djangoapps/util/migrations/0002_data__default_rate_limit_config.py index f43878182939..f2e99c590953 100644 --- a/common/djangoapps/util/migrations/0002_data__default_rate_limit_config.py +++ b/common/djangoapps/util/migrations/0002_data__default_rate_limit_config.py @@ -8,9 +8,12 @@ def forwards(apps, schema_editor): """Ensure that rate limiting is enabled by default. """ - rate_limit_configuration_model = apps.get_model("util", "RateLimitConfiguration") + RateLimitConfiguration = apps.get_model("util", "RateLimitConfiguration") db_alias = schema_editor.connection.alias - rate_limit_configuration_model.objects.using(db_alias).get_or_create(enabled=True) + objects = RateLimitConfiguration.objects.using(db_alias) + if not objects.exists(): + objects.create(enabled=True) + class Migration(migrations.Migration): diff --git a/lms/djangoapps/certificates/migrations/0003_data__default_modes.py b/lms/djangoapps/certificates/migrations/0003_data__default_modes.py index a5db2aa3bd92..0fab96af09a0 100644 --- a/lms/djangoapps/certificates/migrations/0003_data__default_modes.py +++ b/lms/djangoapps/certificates/migrations/0003_data__default_modes.py @@ -9,11 +9,13 @@ def forwards(apps, schema_editor): """Add default modes""" - badge_image_configuration_model = apps.get_model("certificates", "BadgeImageConfiguration") + BadgeImageConfiguration = apps.get_model("certificates", "BadgeImageConfiguration") + db_alias = schema_editor.connection.alias - for mode in ['honor', 'verified', 'professional']: - conf, created = badge_image_configuration_model.objects.get_or_create(mode=mode) - if created: + objects = BadgeImageConfiguration.objects.using(db_alias) + if not objects.exists(): + for mode in ['honor', 'verified', 'professional']: + conf = objects.create(mode=mode) file_name = '{0}{1}'.format(mode, '.png') conf.icon.save( 'badges/{}'.format(file_name), From 0eea9ad48bd35e7a624aaa9723f948d796d9c704 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 12 Nov 2015 15:23:27 -0500 Subject: [PATCH 10/87] Disable wiki notifications This is an expedient fix to a problem with migrations during the Django 1.8 upgrade. --- lms/envs/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lms/envs/common.py b/lms/envs/common.py index 0c8f58b4a491..1ba8f866327e 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1887,7 +1887,10 @@ 'sekizai', #'wiki.plugins.attachments', 'wiki.plugins.links', - 'wiki.plugins.notifications', + # Notifications were enabled, but only 11 people used it in three years. It + # got tangled up during the Django 1.8 migration, so we are disabling it. + # See TNL-3783 for details. + #'wiki.plugins.notifications', 'course_wiki.plugins.markdownedx', # Foldit integration From d3f9e1a7b26bbd6eab025603db4a36558a71322b Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 12 Nov 2015 15:53:25 -0500 Subject: [PATCH 11/87] Fix the uninstall of django-storages --- pavelib/prereqs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pavelib/prereqs.py b/pavelib/prereqs.py index 13d8055d8bea..eb04404e3136 100644 --- a/pavelib/prereqs.py +++ b/pavelib/prereqs.py @@ -208,7 +208,7 @@ def uninstall_python_packages(): uninstalled = True # Uninstall django-storages - if any("django-storages" in line for line in frozen): + if any("django-storages==" in line for line in frozen): sh("pip uninstall -y django-storages") uninstalled = True From bfb69e560dfed22e843cc228dabc0f0780afef0a Mon Sep 17 00:00:00 2001 From: Muhammad Ammar Date: Fri, 13 Nov 2015 20:06:59 +0500 Subject: [PATCH 12/87] fix DRF format query param issue TNL-3787 --- lms/envs/common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lms/envs/common.py b/lms/envs/common.py index 1ba8f866327e..9e8b1ef9f757 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -2018,6 +2018,7 @@ REST_FRAMEWORK = { 'DEFAULT_PAGINATION_CLASS': 'openedx.core.lib.api.paginators.DefaultPagination', 'PAGE_SIZE': 10, + 'URL_FORMAT_OVERRIDE': None, } From c5fac6ce68157cc4b94210e404c12eb72fa406b4 Mon Sep 17 00:00:00 2001 From: Peter Fogg Date: Thu, 12 Nov 2015 11:27:01 -0500 Subject: [PATCH 13/87] Update LMS footer links. SWAT-92 --- lms/djangoapps/branding/api.py | 4 ++-- lms/djangoapps/courseware/features/homepage.feature | 12 ++++++------ lms/envs/aws.py | 1 + lms/envs/common.py | 2 ++ lms/envs/test.py | 5 +++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/lms/djangoapps/branding/api.py b/lms/djangoapps/branding/api.py index 2cda491b530d..4d3e377a4d54 100644 --- a/lms/djangoapps/branding/api.py +++ b/lms/djangoapps/branding/api.py @@ -178,9 +178,9 @@ def _footer_navigation_links(): ("about", marketing_link("ABOUT"), _("About")), ("blog", marketing_link("BLOG"), _("Blog")), ("news", marketing_link("NEWS"), _("News")), - ("faq", marketing_link("FAQ"), _("FAQs")), + ("help-center", settings.SUPPORT_SITE_LINK, _("Help Center")), ("contact", marketing_link("CONTACT"), _("Contact")), - ("jobs", marketing_link("JOBS"), _("Jobs")), + ("careers", marketing_link("CAREERS"), _("Careers")), ("donate", marketing_link("DONATE"), _("Donate")), ("sitemap", marketing_link("SITE_MAP"), _("Sitemap")), ] diff --git a/lms/djangoapps/courseware/features/homepage.feature b/lms/djangoapps/courseware/features/homepage.feature index 9457d6e7b8e2..25220db56742 100644 --- a/lms/djangoapps/courseware/features/homepage.feature +++ b/lms/djangoapps/courseware/features/homepage.feature @@ -15,9 +15,9 @@ Feature: LMS.Homepage for web users Scenario Outline: User can see main parts of the page Given I visit the homepage Then I should see the following links and ids - | id | Link | - | about | About | - | jobs | Jobs | - | faq | FAQs | - | contact | Contact| - | news | News | + | id | Link | + | about | About | + | careers | Careers | + | help-center | Help Center | + | contact | Contact | + | news | News | diff --git a/lms/envs/aws.py b/lms/envs/aws.py index cdb61f972a54..34447114353f 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -236,6 +236,7 @@ # Marketing link overrides MKTG_URL_LINK_MAP.update(ENV_TOKENS.get('MKTG_URL_LINK_MAP', {})) +SUPPORT_SITE_LINK = ENV_TOKENS.get('SUPPORT_SITE_LINK', SUPPORT_SITE_LINK) # Mobile store URL overrides MOBILE_STORE_URLS = ENV_TOKENS.get('MOBILE_STORE_URLS', MOBILE_STORE_URLS) diff --git a/lms/envs/common.py b/lms/envs/common.py index 6072e7087eb4..6e2691678941 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -2023,6 +2023,8 @@ 'WHAT_IS_VERIFIED_CERT': 'verified-certificate', } +SUPPORT_SITE_LINK = '' + ############################# SOCIAL MEDIA SHARING ############################# # Social Media Sharing on Student Dashboard SOCIAL_SHARING_SETTINGS = { diff --git a/lms/envs/test.py b/lms/envs/test.py index 91fe133dd912..84a0334e479b 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -327,13 +327,13 @@ MKTG_URL_LINK_MAP = { 'ABOUT': 'about', 'CONTACT': 'contact', - 'FAQ': 'help', + 'HELP_CENTER': 'help-center', 'COURSES': 'courses', 'ROOT': 'root', 'TOS': 'tos', 'HONOR': 'honor', 'PRIVACY': 'privacy', - 'JOBS': 'jobs', + 'CAREERS': 'careers', 'NEWS': 'news', 'PRESS': 'press', 'BLOG': 'blog', @@ -343,6 +343,7 @@ 'WHAT_IS_VERIFIED_CERT': 'verified-certificate', } +SUPPORT_SITE_LINK = 'https://support.example.com' ############################ STATIC FILES ############################# DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' From 707675d72055cef0f6100a0b67e40b716988ab61 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 13 Nov 2015 12:06:52 -0500 Subject: [PATCH 14/87] Use correct version of ora2 --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 5e5fdee5d2c6..8a3eef81eccf 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -44,7 +44,7 @@ git+https://github.com/edx/nose.git@99c2aff0ff51bf228bfa5482e97e612c97a23245#egg -e git+https://github.com/edx/event-tracking.git@django1.8-upgrade#egg=event-tracking==0.2.1 -e git+https://github.com/edx/django-splash.git@ammar/upgrade-to-django1.8#egg=django-splash==0.2 -e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock --e git+https://github.com/edx/edx-ora2.git@ned/django-upgrade-1.8#egg=ora2==0.2.1 +-e git+https://github.com/edx/edx-ora2.git@mzfr/django18-from-release#egg=ora2==0.2.2 -e git+https://github.com/edx/edx-submissions.git@django-upgrade/1.8#egg=edx-submissions==0.1.2 -e git+https://github.com/edx/opaque-keys.git@27dc382ea587483b1e3889a3d19cbd90b9023a06#egg=opaque-keys git+https://github.com/edx/ease.git@release-2015-07-14#egg=ease==0.1.3 From ccc6e5077d625afd75323f5813b1e745ec24d34d Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 13 Nov 2015 12:25:00 -0500 Subject: [PATCH 15/87] Make sure Studio has a secret key --- cms/envs/aws.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 3656569a9811..44f1861b0522 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -249,7 +249,7 @@ # Note that this is the Studio key for Segment. There is a separate key for the LMS. CMS_SEGMENT_KEY = AUTH_TOKENS.get('SEGMENT_KEY') -# SECRET_KEY = AUTH_TOKENS['SECRET_KEY'] +SECRET_KEY = AUTH_TOKENS['SECRET_KEY'] AWS_ACCESS_KEY_ID = AUTH_TOKENS["AWS_ACCESS_KEY_ID"] if AWS_ACCESS_KEY_ID == "": From 02550cb3686cb5a1b04b514356502cd2e42d6d6d Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Fri, 6 Nov 2015 10:49:37 -0500 Subject: [PATCH 16/87] Disable posting to LinkedIn feature for microsites until we can support multiple LinkedIn accounts --- .../student/tests/test_certificates.py | 64 +++++++++++++++++++ common/djangoapps/student/views.py | 5 +- .../certificates/tests/test_webview_views.py | 26 +++++++- lms/djangoapps/certificates/views/webview.py | 5 +- 4 files changed, 97 insertions(+), 3 deletions(-) diff --git a/common/djangoapps/student/tests/test_certificates.py b/common/djangoapps/student/tests/test_certificates.py index af4a6db8f1c6..313f9b54f716 100644 --- a/common/djangoapps/student/tests/test_certificates.py +++ b/common/djangoapps/student/tests/test_certificates.py @@ -2,6 +2,7 @@ import unittest import ddt +import mock from django.conf import settings from django.core.urlresolvers import reverse @@ -15,9 +16,18 @@ from certificates.api import get_certificate_url # pylint: disable=import-error from course_modes.models import CourseMode +from student.models import LinkedInAddToProfileConfiguration + # pylint: disable=no-member +def _fake_is_request_in_microsite(): + """ + Mocked version of microsite helper method to always return true + """ + return True + + @ddt.ddt @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') class CertificateDisplayTest(ModuleStoreTestCase): @@ -98,6 +108,60 @@ def test_linked_student_to_web_view_credential(self, enrollment_mode): self.assertContains(response, u'View Test_Certificate') self.assertContains(response, test_url) + def test_post_to_linkedin_invisibility(self): + """ + Verifies that the post certificate to linked button + does not appear by default (when config is not set) + """ + self._create_certificate('honor') + + # until we set up the configuration, the LinkedIn action + # button should not be visible + self._check_linkedin_visibility(False) + + def test_post_to_linkedin_visibility(self): + """ + Verifies that the post certificate to linked button appears + as expected + """ + self._create_certificate('honor') + + config = LinkedInAddToProfileConfiguration( + company_identifier='0_mC_o2MizqdtZEmkVXjH4eYwMj4DnkCWrZP_D9', + enabled=True + ) + config.save() + + # now we should see it + self._check_linkedin_visibility(True) + + @mock.patch("microsite_configuration.microsite.is_request_in_microsite", _fake_is_request_in_microsite) + def test_post_to_linkedin_microsite(self): + """ + Verifies behavior for microsites which disables the post to LinkedIn + feature (for now) + """ + self._create_certificate('honor') + + config = LinkedInAddToProfileConfiguration( + company_identifier='0_mC_o2MizqdtZEmkVXjH4eYwMj4DnkCWrZP_D9', + enabled=True + ) + config.save() + + # now we should not see it because we are in a microsite + self._check_linkedin_visibility(False) + + def _check_linkedin_visibility(self, is_visible): + """ + Performs assertions on the Dashboard + """ + response = self.client.get(reverse('dashboard')) + if is_visible: + self.assertContains(response, u'Add Certificate to LinkedIn Profile') + else: + self.assertNotContains(response, u'Add Certificate to LinkedIn Profile') + def _create_certificate(self, enrollment_mode): """Simulate that the user has a generated certificate. """ CourseEnrollmentFactory.create(user=self.user, course_id=self.course.id, mode=enrollment_mode) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 15776e69ddf0..dcf9aacab6fd 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -363,7 +363,10 @@ def _cert_info(user, course_overview, cert_status, course_mode): # pylint: disa # Clicking this button sends the user to LinkedIn where they # can add the certificate information to their profile. linkedin_config = LinkedInAddToProfileConfiguration.current() - if linkedin_config.enabled: + + # posting certificates to LinkedIn is not currently + # supported in microsites/White Labels + if linkedin_config.enabled and not microsite.is_request_in_microsite(): status_dict['linked_in_url'] = linkedin_config.add_to_profile_url( course_overview.id, course_overview.display_name, diff --git a/lms/djangoapps/certificates/tests/test_webview_views.py b/lms/djangoapps/certificates/tests/test_webview_views.py index 44dc9223ead7..18727eb04eac 100644 --- a/lms/djangoapps/certificates/tests/test_webview_views.py +++ b/lms/djangoapps/certificates/tests/test_webview_views.py @@ -3,6 +3,7 @@ import json import ddt +import mock from uuid import uuid4 from nose.plugins.attrib import attr from mock import patch @@ -49,6 +50,13 @@ FEATURES_WITH_CUSTOM_CERTS_ENABLED.update(FEATURES_WITH_CERTS_ENABLED) +def _fake_is_request_in_microsite(): + """ + Mocked version of microsite helper method to always return true + """ + return True + + @attr('shard_1') @ddt.ddt class CertificatesViewsTests(ModuleStoreTestCase, EventTrackingTestCase): @@ -161,7 +169,23 @@ def test_linkedin_share_url(self): course_id=unicode(self.course.id) ) response = self.client.get(test_url) - self.assertTrue(urllib.quote_plus(self.request.build_absolute_uri(test_url)) in response.content) + self.assertIn(urllib.quote_plus(self.request.build_absolute_uri(test_url)), response.content) + + @override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED) + @mock.patch("microsite_configuration.microsite.is_request_in_microsite", _fake_is_request_in_microsite) + def test_linkedin_share_microsites(self): + """ + Test: LinkedIn share URL should not be visible when called from within a microsite (for now) + """ + self._add_course_certificates(count=1, signatory_count=1, is_active=True) + test_url = get_certificate_url( + user_id=self.user.id, + course_id=unicode(self.course.id) + ) + response = self.client.get(test_url) + + # the URL should not be present + self.assertNotIn(urllib.quote_plus(self.request.build_absolute_uri(test_url)), response.content) @override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED) def test_rendering_course_organization_data(self): diff --git a/lms/djangoapps/certificates/views/webview.py b/lms/djangoapps/certificates/views/webview.py index e075e1378ae8..11465db16b71 100644 --- a/lms/djangoapps/certificates/views/webview.py +++ b/lms/djangoapps/certificates/views/webview.py @@ -430,7 +430,10 @@ def render_html_view(request, user_id, course_id): # Clicking this button sends the user to LinkedIn where they # can add the certificate information to their profile. linkedin_config = LinkedInAddToProfileConfiguration.current() - if linkedin_config.enabled: + + # posting certificates to LinkedIn is not currently + # supported in microsites/White Labels + if linkedin_config.enabled and not microsite.is_request_in_microsite(): context['linked_in_url'] = linkedin_config.add_to_profile_url( course.id, course.display_name, From 29acc3acfc913cd2cba1d82eeba575ffa097985f Mon Sep 17 00:00:00 2001 From: muhammad-ammar Date: Wed, 18 Nov 2015 18:33:54 +0500 Subject: [PATCH 17/87] resolve merge conflicts test fixes --- common/djangoapps/util/testing.py | 5 +- lms/djangoapps/instructor/views/api.py | 46 +----------- .../instructor/views/gradebook_api.py | 2 + lms/djangoapps/teams/tests/test_views.py | 6 +- ...__add_field_programsapiconfig_cache_ttl.py | 73 ------------------- .../0002_programsapiconfig_cache_ttl.py | 19 +++++ openedx/core/djangoapps/programs/models.py | 6 +- .../user_api/accounts/tests/test_views.py | 12 +-- requirements/edx/github.txt | 9 +-- 9 files changed, 29 insertions(+), 149 deletions(-) delete mode 100644 openedx/core/djangoapps/programs/migrations/0002_auto__add_field_programsapiconfig_cache_ttl.py create mode 100644 openedx/core/djangoapps/programs/migrations/0002_programsapiconfig_cache_ttl.py diff --git a/common/djangoapps/util/testing.py b/common/djangoapps/util/testing.py index 9abd89ae2677..083034c9674d 100644 --- a/common/djangoapps/util/testing.py +++ b/common/djangoapps/util/testing.py @@ -100,7 +100,6 @@ def reset_tracker(self): self.mock_tracker.reset_mock() -<<<<<<< HEAD class PatchMediaTypeMixin(object): """ Generic mixin for verifying unsupported media type in PATCH @@ -112,7 +111,8 @@ def test_patch_unsupported_media_type(self): content_type=self.unsupported_media_type ) self.assertEqual(response.status_code, 415) -======= + + def patch_testcase(): """ Disable commit_on_success decorators for tests in TestCase subclasses. @@ -159,4 +159,3 @@ def _wrapper(*args, **kwargs): # pylint: disable=protected-access TestCase._enter_atomics = enter_atomics_wrapper(TestCase._enter_atomics) TestCase._rollback_atomics = rollback_atomics_wrapper(TestCase._rollback_atomics) ->>>>>>> origin/release diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index 4539d51ad2bf..a6fb2113c3c5 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -2643,51 +2643,6 @@ def enable_certificate_generation(request, course_id=None): return redirect(_instructor_dash_url(course_key, section='certificates')) -<<<<<<< HEAD -======= -#---- Gradebook (shown to small courses only) ---- -# Grades can potentially be written - if so, let grading manage the transaction. -@transaction.non_atomic_requests -@cache_control(no_cache=True, no_store=True, must_revalidate=True) -@require_level('staff') -def spoc_gradebook(request, course_id): - """ - Show the gradebook for this course: - - Only shown for courses with enrollment < settings.FEATURES.get("MAX_ENROLLMENT_INSTR_BUTTONS") - - Only displayed to course staff - """ - course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id) - course = get_course_with_access(request.user, 'staff', course_key, depth=None) - - enrolled_students = User.objects.filter( - courseenrollment__course_id=course_key, - courseenrollment__is_active=1 - ).order_by('username').select_related("profile") - - # possible extension: implement pagination to show to large courses - - student_info = [ - { - 'username': student.username, - 'id': student.id, - 'email': student.email, - 'grade_summary': student_grades(student, request, course), - 'realname': student.profile.name, - } - for student in enrolled_students - ] - - return render_to_response('courseware/gradebook.html', { - 'students': student_info, - 'course': course, - 'course_id': course_key, - # Checked above - 'staff_access': True, - 'ordered_grades': sorted(course.grade_cutoffs.items(), key=lambda i: i[1], reverse=True), - }) - - ->>>>>>> origin/release @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @@ -2770,6 +2725,7 @@ def start_certificate_regeneration(request, course_id): return JsonResponse(response_payload) +@transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_global_staff diff --git a/lms/djangoapps/instructor/views/gradebook_api.py b/lms/djangoapps/instructor/views/gradebook_api.py index 2d9e5fd0a274..f51cdfbd4bfb 100644 --- a/lms/djangoapps/instructor/views/gradebook_api.py +++ b/lms/djangoapps/instructor/views/gradebook_api.py @@ -6,6 +6,7 @@ from django.contrib.auth.models import User from django.core.urlresolvers import reverse +from django.db import transaction from django.views.decorators.cache import cache_control from opaque_keys.edx.keys import CourseKey @@ -96,6 +97,7 @@ def get_grade_book_page(request, course, course_key): return student_info, page +@transaction.non_atomic_requests @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') def spoc_gradebook(request, course_id): diff --git a/lms/djangoapps/teams/tests/test_views.py b/lms/djangoapps/teams/tests/test_views.py index 53ad3a2df2d5..182ddffa58a3 100644 --- a/lms/djangoapps/teams/tests/test_views.py +++ b/lms/djangoapps/teams/tests/test_views.py @@ -129,11 +129,7 @@ def test_query_counts(self): team.add_user(self.user) # Check the query count on the dashboard again -<<<<<<< HEAD - with self.assertNumQueries(19): -======= - with self.assertNumQueries(24): ->>>>>>> origin/release + with self.assertNumQueries(23): self.client.get(self.teams_url) def test_bad_course_id(self): diff --git a/openedx/core/djangoapps/programs/migrations/0002_auto__add_field_programsapiconfig_cache_ttl.py b/openedx/core/djangoapps/programs/migrations/0002_auto__add_field_programsapiconfig_cache_ttl.py deleted file mode 100644 index 5f7b5cff9487..000000000000 --- a/openedx/core/djangoapps/programs/migrations/0002_auto__add_field_programsapiconfig_cache_ttl.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'ProgramsApiConfig.cache_ttl' - db.add_column('programs_programsapiconfig', 'cache_ttl', - self.gf('django.db.models.fields.PositiveIntegerField')(default=0), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'ProgramsApiConfig.cache_ttl' - db.delete_column('programs_programsapiconfig', 'cache_ttl') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'programs.programsapiconfig': { - 'Meta': {'ordering': "('-change_date',)", 'object_name': 'ProgramsApiConfig'}, - 'api_version_number': ('django.db.models.fields.IntegerField', [], {}), - 'cache_ttl': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), - 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), - 'enable_student_dashboard': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'internal_service_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'public_service_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}) - } - } - - complete_apps = ['programs'] diff --git a/openedx/core/djangoapps/programs/migrations/0002_programsapiconfig_cache_ttl.py b/openedx/core/djangoapps/programs/migrations/0002_programsapiconfig_cache_ttl.py new file mode 100644 index 000000000000..92e7f984339b --- /dev/null +++ b/openedx/core/djangoapps/programs/migrations/0002_programsapiconfig_cache_ttl.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('programs', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='programsapiconfig', + name='cache_ttl', + field=models.PositiveIntegerField(default=0, help_text='Specified in seconds. Enable caching by setting this to a value greater than 0.', verbose_name='Cache Time To Live'), + ), + ] diff --git a/openedx/core/djangoapps/programs/models.py b/openedx/core/djangoapps/programs/models.py index 4f7a8846c7f0..db9fa5caf1e6 100644 --- a/openedx/core/djangoapps/programs/models.py +++ b/openedx/core/djangoapps/programs/models.py @@ -20,8 +20,7 @@ class ProgramsApiConfig(ConfigurationModel): internal_service_url = URLField(verbose_name=_("Internal Service URL")) public_service_url = URLField(verbose_name=_("Public Service URL")) api_version_number = IntegerField(verbose_name=_("API Version")) -<<<<<<< HEAD - enable_student_dashboard = BooleanField(verbose_name=_("Enable Student Dashboard Displays")) + enable_student_dashboard = NullBooleanField(verbose_name=_("Enable Student Dashboard Displays")) cache_ttl = models.PositiveIntegerField( verbose_name=_("Cache Time To Live"), default=0, @@ -31,9 +30,6 @@ class ProgramsApiConfig(ConfigurationModel): ) PROGRAMS_API_CACHE_KEY = "programs.api.data" -======= - enable_student_dashboard = NullBooleanField(verbose_name=_("Enable Student Dashboard Displays")) ->>>>>>> origin/release @property def internal_api_url(self): diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_views.py b/openedx/core/djangoapps/user_api/accounts/tests/test_views.py index d19662827f17..2ce732e056a5 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_views.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_views.py @@ -306,11 +306,7 @@ def verify_get_own_information(): """ Internal helper to perform the actual assertions """ -<<<<<<< HEAD - with self.assertNumQueries(7): -======= - with self.assertNumQueries(10): ->>>>>>> origin/release + with self.assertNumQueries(9): response = self.send_get(self.client) data = response.data self.assertEqual(16, len(data)) @@ -349,11 +345,7 @@ def test_get_account_empty_string(self): legacy_profile.save() self.client.login(username=self.user.username, password=self.test_password) -<<<<<<< HEAD - with self.assertNumQueries(7): -======= - with self.assertNumQueries(10): ->>>>>>> origin/release + with self.assertNumQueries(9): response = self.send_get(self.client) for empty_field in ("level_of_education", "gender", "country", "bio"): self.assertIsNone(response.data[empty_field]) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 1415d23720fa..851cbfb875ca 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -57,16 +57,9 @@ git+https://github.com/edx/edx-lint.git@v0.3.2#egg=edx_lint==0.3.2 -e git+https://github.com/edx-solutions/xblock-google-drive.git@138e6fa0bf3a2013e904a085b9fed77dab7f3f21#egg=xblock-google-drive -e git+https://github.com/edx/edx-reverification-block.git@ned/upgrade-django-1.8#egg=edx-reverification-block==0.0.5 -e git+https://github.com/edx/edx-user-state-client.git@30c0ad4b9f57f8d48d6943eb585ec8a9205f4469#egg=edx-user-state-client -<<<<<<< HEAD -git+https://github.com/edx/edx-organizations.git@release-2015-11-17#egg=edx-organizations==0.1.7 - -git+https://github.com/edx/edx-proctoring.git@0.10.20#egg=edx-proctoring==0.10.20 - -======= git+https://github.com/edx/edx-organizations.git@ned/django-18#egg=edx-organizations==0.1.7 git+https://github.com/edx/edx-proctoring.git@django1.8-upgrade#egg=edx-proctoring==0.11.2 ->>>>>>> origin/release # Third Party XBlocks -e git+https://github.com/mitodl/edx-sga@172a90fd2738f8142c10478356b2d9ed3e55334a#egg=edx-sga --e git+https://github.com/open-craft/xblock-poll@e7a6c95c300e95c51e42bfd1eba70489c05a6527#egg=xblock-poll +-e git+https://github.com/open-craft/xblock-poll@e7a6c95c300e95c51e42bfd1eba70489c05a6527#egg=xblock-poll \ No newline at end of file From d8fd8ed6784e5ab8aa250e4b02a59c2361c9bbe7 Mon Sep 17 00:00:00 2001 From: Usman Khalid <2200617@gmail.com> Date: Wed, 18 Nov 2015 21:08:05 +0500 Subject: [PATCH 18/87] Recreate db caches for bokchoy and lettuce --- common/test/db_cache/bok_choy_data.json | 1 + .../db_cache/bok_choy_migrations_data.sql | 37 + common/test/db_cache/bok_choy_schema.sql | 4147 +++++++++++++++++ common/test/db_cache/lettuce.db | Bin 0 -> 1199104 bytes scripts/reset-test-db.sh | 12 +- 5 files changed, 4191 insertions(+), 6 deletions(-) create mode 100644 common/test/db_cache/bok_choy_data.json create mode 100644 common/test/db_cache/bok_choy_migrations_data.sql create mode 100644 common/test/db_cache/bok_choy_schema.sql diff --git a/common/test/db_cache/bok_choy_data.json b/common/test/db_cache/bok_choy_data.json new file mode 100644 index 000000000000..2070ba49bca9 --- /dev/null +++ b/common/test/db_cache/bok_choy_data.json @@ -0,0 +1 @@ +[{"fields": {"model": "permission", "app_label": "auth"}, "model": "contenttypes.contenttype", "pk": 1}, {"fields": {"model": "group", "app_label": "auth"}, "model": "contenttypes.contenttype", "pk": 2}, {"fields": {"model": "user", "app_label": "auth"}, "model": "contenttypes.contenttype", "pk": 3}, {"fields": {"model": "contenttype", "app_label": "contenttypes"}, "model": "contenttypes.contenttype", "pk": 4}, {"fields": {"model": "session", "app_label": "sessions"}, "model": "contenttypes.contenttype", "pk": 5}, {"fields": {"model": "site", "app_label": "sites"}, "model": "contenttypes.contenttype", "pk": 6}, {"fields": {"model": "taskmeta", "app_label": "djcelery"}, "model": "contenttypes.contenttype", "pk": 7}, {"fields": {"model": "tasksetmeta", "app_label": "djcelery"}, "model": "contenttypes.contenttype", "pk": 8}, {"fields": {"model": "intervalschedule", "app_label": "djcelery"}, "model": "contenttypes.contenttype", "pk": 9}, {"fields": {"model": "crontabschedule", "app_label": "djcelery"}, "model": "contenttypes.contenttype", "pk": 10}, {"fields": {"model": "periodictasks", "app_label": "djcelery"}, "model": "contenttypes.contenttype", "pk": 11}, {"fields": {"model": "periodictask", "app_label": "djcelery"}, "model": "contenttypes.contenttype", "pk": 12}, {"fields": {"model": "workerstate", "app_label": "djcelery"}, "model": "contenttypes.contenttype", "pk": 13}, {"fields": {"model": "taskstate", "app_label": "djcelery"}, "model": "contenttypes.contenttype", "pk": 14}, {"fields": {"model": "globalstatusmessage", "app_label": "status"}, "model": "contenttypes.contenttype", "pk": 15}, {"fields": {"model": "coursemessage", "app_label": "status"}, "model": "contenttypes.contenttype", "pk": 16}, {"fields": {"model": "studentmodule", "app_label": "courseware"}, "model": "contenttypes.contenttype", "pk": 17}, {"fields": {"model": "studentmodulehistory", "app_label": "courseware"}, "model": "contenttypes.contenttype", "pk": 18}, {"fields": {"model": "xmoduleuserstatesummaryfield", "app_label": "courseware"}, "model": "contenttypes.contenttype", "pk": 19}, {"fields": {"model": "xmodulestudentprefsfield", "app_label": "courseware"}, "model": "contenttypes.contenttype", "pk": 20}, {"fields": {"model": "xmodulestudentinfofield", "app_label": "courseware"}, "model": "contenttypes.contenttype", "pk": 21}, {"fields": {"model": "offlinecomputedgrade", "app_label": "courseware"}, "model": "contenttypes.contenttype", "pk": 22}, {"fields": {"model": "offlinecomputedgradelog", "app_label": "courseware"}, "model": "contenttypes.contenttype", "pk": 23}, {"fields": {"model": "studentfieldoverride", "app_label": "courseware"}, "model": "contenttypes.contenttype", "pk": 24}, {"fields": {"model": "anonymoususerid", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 25}, {"fields": {"model": "userstanding", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 26}, {"fields": {"model": "userprofile", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 27}, {"fields": {"model": "usersignupsource", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 28}, {"fields": {"model": "usertestgroup", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 29}, {"fields": {"model": "registration", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 30}, {"fields": {"model": "pendingnamechange", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 31}, {"fields": {"model": "pendingemailchange", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 32}, {"fields": {"model": "passwordhistory", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 33}, {"fields": {"model": "loginfailures", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 34}, {"fields": {"model": "historicalcourseenrollment", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 35}, {"fields": {"model": "courseenrollment", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 36}, {"fields": {"model": "manualenrollmentaudit", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 37}, {"fields": {"model": "courseenrollmentallowed", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 38}, {"fields": {"model": "courseaccessrole", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 39}, {"fields": {"model": "dashboardconfiguration", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 40}, {"fields": {"model": "linkedinaddtoprofileconfiguration", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 41}, {"fields": {"model": "entranceexamconfiguration", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 42}, {"fields": {"model": "languageproficiency", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 43}, {"fields": {"model": "courseenrollmentattribute", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 44}, {"fields": {"model": "enrollmentrefundconfiguration", "app_label": "student"}, "model": "contenttypes.contenttype", "pk": 45}, {"fields": {"model": "trackinglog", "app_label": "track"}, "model": "contenttypes.contenttype", "pk": 46}, {"fields": {"model": "ratelimitconfiguration", "app_label": "util"}, "model": "contenttypes.contenttype", "pk": 47}, {"fields": {"model": "certificatewhitelist", "app_label": "certificates"}, "model": "contenttypes.contenttype", "pk": 48}, {"fields": {"model": "generatedcertificate", "app_label": "certificates"}, "model": "contenttypes.contenttype", "pk": 49}, {"fields": {"model": "examplecertificateset", "app_label": "certificates"}, "model": "contenttypes.contenttype", "pk": 50}, {"fields": {"model": "examplecertificate", "app_label": "certificates"}, "model": "contenttypes.contenttype", "pk": 51}, {"fields": {"model": "certificategenerationcoursesetting", "app_label": "certificates"}, "model": "contenttypes.contenttype", "pk": 52}, {"fields": {"model": "certificategenerationconfiguration", "app_label": "certificates"}, "model": "contenttypes.contenttype", "pk": 53}, {"fields": {"model": "certificatehtmlviewconfiguration", "app_label": "certificates"}, "model": "contenttypes.contenttype", "pk": 54}, {"fields": {"model": "badgeassertion", "app_label": "certificates"}, "model": "contenttypes.contenttype", "pk": 55}, {"fields": {"model": "badgeimageconfiguration", "app_label": "certificates"}, "model": "contenttypes.contenttype", "pk": 56}, {"fields": {"model": "certificatetemplate", "app_label": "certificates"}, "model": "contenttypes.contenttype", "pk": 57}, {"fields": {"model": "certificatetemplateasset", "app_label": "certificates"}, "model": "contenttypes.contenttype", "pk": 58}, {"fields": {"model": "instructortask", "app_label": "instructor_task"}, "model": "contenttypes.contenttype", "pk": 59}, {"fields": {"model": "psychometricdata", "app_label": "psychometrics"}, "model": "contenttypes.contenttype", "pk": 60}, {"fields": {"model": "coursesoftware", "app_label": "licenses"}, "model": "contenttypes.contenttype", "pk": 61}, {"fields": {"model": "userlicense", "app_label": "licenses"}, "model": "contenttypes.contenttype", "pk": 62}, {"fields": {"model": "courseusergroup", "app_label": "course_groups"}, "model": "contenttypes.contenttype", "pk": 63}, {"fields": {"model": "cohortmembership", "app_label": "course_groups"}, "model": "contenttypes.contenttype", "pk": 64}, {"fields": {"model": "courseusergrouppartitiongroup", "app_label": "course_groups"}, "model": "contenttypes.contenttype", "pk": 65}, {"fields": {"model": "coursecohortssettings", "app_label": "course_groups"}, "model": "contenttypes.contenttype", "pk": 66}, {"fields": {"model": "coursecohort", "app_label": "course_groups"}, "model": "contenttypes.contenttype", "pk": 67}, {"fields": {"model": "courseemail", "app_label": "bulk_email"}, "model": "contenttypes.contenttype", "pk": 68}, {"fields": {"model": "optout", "app_label": "bulk_email"}, "model": "contenttypes.contenttype", "pk": 69}, {"fields": {"model": "courseemailtemplate", "app_label": "bulk_email"}, "model": "contenttypes.contenttype", "pk": 70}, {"fields": {"model": "courseauthorization", "app_label": "bulk_email"}, "model": "contenttypes.contenttype", "pk": 71}, {"fields": {"model": "brandinginfoconfig", "app_label": "branding"}, "model": "contenttypes.contenttype", "pk": 72}, {"fields": {"model": "brandingapiconfig", "app_label": "branding"}, "model": "contenttypes.contenttype", "pk": 73}, {"fields": {"model": "externalauthmap", "app_label": "external_auth"}, "model": "contenttypes.contenttype", "pk": 74}, {"fields": {"model": "nonce", "app_label": "django_openid_auth"}, "model": "contenttypes.contenttype", "pk": 75}, {"fields": {"model": "association", "app_label": "django_openid_auth"}, "model": "contenttypes.contenttype", "pk": 76}, {"fields": {"model": "useropenid", "app_label": "django_openid_auth"}, "model": "contenttypes.contenttype", "pk": 77}, {"fields": {"model": "client", "app_label": "oauth2"}, "model": "contenttypes.contenttype", "pk": 78}, {"fields": {"model": "grant", "app_label": "oauth2"}, "model": "contenttypes.contenttype", "pk": 79}, {"fields": {"model": "accesstoken", "app_label": "oauth2"}, "model": "contenttypes.contenttype", "pk": 80}, {"fields": {"model": "refreshtoken", "app_label": "oauth2"}, "model": "contenttypes.contenttype", "pk": 81}, {"fields": {"model": "trustedclient", "app_label": "oauth2_provider"}, "model": "contenttypes.contenttype", "pk": 82}, {"fields": {"model": "oauth2providerconfig", "app_label": "third_party_auth"}, "model": "contenttypes.contenttype", "pk": 83}, {"fields": {"model": "samlproviderconfig", "app_label": "third_party_auth"}, "model": "contenttypes.contenttype", "pk": 84}, {"fields": {"model": "samlconfiguration", "app_label": "third_party_auth"}, "model": "contenttypes.contenttype", "pk": 85}, {"fields": {"model": "samlproviderdata", "app_label": "third_party_auth"}, "model": "contenttypes.contenttype", "pk": 86}, {"fields": {"model": "ltiproviderconfig", "app_label": "third_party_auth"}, "model": "contenttypes.contenttype", "pk": 87}, {"fields": {"model": "providerapipermissions", "app_label": "third_party_auth"}, "model": "contenttypes.contenttype", "pk": 88}, {"fields": {"model": "nonce", "app_label": "oauth_provider"}, "model": "contenttypes.contenttype", "pk": 89}, {"fields": {"model": "scope", "app_label": "oauth_provider"}, "model": "contenttypes.contenttype", "pk": 90}, {"fields": {"model": "consumer", "app_label": "oauth_provider"}, "model": "contenttypes.contenttype", "pk": 91}, {"fields": {"model": "token", "app_label": "oauth_provider"}, "model": "contenttypes.contenttype", "pk": 92}, {"fields": {"model": "resource", "app_label": "oauth_provider"}, "model": "contenttypes.contenttype", "pk": 93}, {"fields": {"model": "article", "app_label": "wiki"}, "model": "contenttypes.contenttype", "pk": 94}, {"fields": {"model": "articleforobject", "app_label": "wiki"}, "model": "contenttypes.contenttype", "pk": 95}, {"fields": {"model": "articlerevision", "app_label": "wiki"}, "model": "contenttypes.contenttype", "pk": 96}, {"fields": {"model": "urlpath", "app_label": "wiki"}, "model": "contenttypes.contenttype", "pk": 97}, {"fields": {"model": "articleplugin", "app_label": "wiki"}, "model": "contenttypes.contenttype", "pk": 98}, {"fields": {"model": "reusableplugin", "app_label": "wiki"}, "model": "contenttypes.contenttype", "pk": 99}, {"fields": {"model": "simpleplugin", "app_label": "wiki"}, "model": "contenttypes.contenttype", "pk": 100}, {"fields": {"model": "revisionplugin", "app_label": "wiki"}, "model": "contenttypes.contenttype", "pk": 101}, {"fields": {"model": "revisionpluginrevision", "app_label": "wiki"}, "model": "contenttypes.contenttype", "pk": 102}, {"fields": {"model": "image", "app_label": "wiki"}, "model": "contenttypes.contenttype", "pk": 103}, {"fields": {"model": "imagerevision", "app_label": "wiki"}, "model": "contenttypes.contenttype", "pk": 104}, {"fields": {"model": "attachment", "app_label": "wiki"}, "model": "contenttypes.contenttype", "pk": 105}, {"fields": {"model": "attachmentrevision", "app_label": "wiki"}, "model": "contenttypes.contenttype", "pk": 106}, {"fields": {"model": "notificationtype", "app_label": "django_notify"}, "model": "contenttypes.contenttype", "pk": 107}, {"fields": {"model": "settings", "app_label": "django_notify"}, "model": "contenttypes.contenttype", "pk": 108}, {"fields": {"model": "subscription", "app_label": "django_notify"}, "model": "contenttypes.contenttype", "pk": 109}, {"fields": {"model": "notification", "app_label": "django_notify"}, "model": "contenttypes.contenttype", "pk": 110}, {"fields": {"model": "score", "app_label": "foldit"}, "model": "contenttypes.contenttype", "pk": 111}, {"fields": {"model": "puzzlecomplete", "app_label": "foldit"}, "model": "contenttypes.contenttype", "pk": 112}, {"fields": {"model": "logentry", "app_label": "admin"}, "model": "contenttypes.contenttype", "pk": 113}, {"fields": {"model": "role", "app_label": "django_comment_common"}, "model": "contenttypes.contenttype", "pk": 114}, {"fields": {"model": "permission", "app_label": "django_comment_common"}, "model": "contenttypes.contenttype", "pk": 115}, {"fields": {"model": "note", "app_label": "notes"}, "model": "contenttypes.contenttype", "pk": 116}, {"fields": {"model": "splashconfig", "app_label": "splash"}, "model": "contenttypes.contenttype", "pk": 117}, {"fields": {"model": "userpreference", "app_label": "user_api"}, "model": "contenttypes.contenttype", "pk": 118}, {"fields": {"model": "usercoursetag", "app_label": "user_api"}, "model": "contenttypes.contenttype", "pk": 119}, {"fields": {"model": "userorgtag", "app_label": "user_api"}, "model": "contenttypes.contenttype", "pk": 120}, {"fields": {"model": "order", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 121}, {"fields": {"model": "orderitem", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 122}, {"fields": {"model": "invoice", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 123}, {"fields": {"model": "invoicetransaction", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 124}, {"fields": {"model": "invoiceitem", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 125}, {"fields": {"model": "courseregistrationcodeinvoiceitem", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 126}, {"fields": {"model": "invoicehistory", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 127}, {"fields": {"model": "courseregistrationcode", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 128}, {"fields": {"model": "registrationcoderedemption", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 129}, {"fields": {"model": "coupon", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 130}, {"fields": {"model": "couponredemption", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 131}, {"fields": {"model": "paidcourseregistration", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 132}, {"fields": {"model": "courseregcodeitem", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 133}, {"fields": {"model": "courseregcodeitemannotation", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 134}, {"fields": {"model": "paidcourseregistrationannotation", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 135}, {"fields": {"model": "certificateitem", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 136}, {"fields": {"model": "donationconfiguration", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 137}, {"fields": {"model": "donation", "app_label": "shoppingcart"}, "model": "contenttypes.contenttype", "pk": 138}, {"fields": {"model": "coursemode", "app_label": "course_modes"}, "model": "contenttypes.contenttype", "pk": 139}, {"fields": {"model": "coursemodesarchive", "app_label": "course_modes"}, "model": "contenttypes.contenttype", "pk": 140}, {"fields": {"model": "softwaresecurephotoverification", "app_label": "verify_student"}, "model": "contenttypes.contenttype", "pk": 141}, {"fields": {"model": "historicalverificationdeadline", "app_label": "verify_student"}, "model": "contenttypes.contenttype", "pk": 142}, {"fields": {"model": "verificationdeadline", "app_label": "verify_student"}, "model": "contenttypes.contenttype", "pk": 143}, {"fields": {"model": "verificationcheckpoint", "app_label": "verify_student"}, "model": "contenttypes.contenttype", "pk": 144}, {"fields": {"model": "verificationstatus", "app_label": "verify_student"}, "model": "contenttypes.contenttype", "pk": 145}, {"fields": {"model": "incoursereverificationconfiguration", "app_label": "verify_student"}, "model": "contenttypes.contenttype", "pk": 146}, {"fields": {"model": "icrvstatusemailsconfiguration", "app_label": "verify_student"}, "model": "contenttypes.contenttype", "pk": 147}, {"fields": {"model": "skippedreverification", "app_label": "verify_student"}, "model": "contenttypes.contenttype", "pk": 148}, {"fields": {"model": "darklangconfig", "app_label": "dark_lang"}, "model": "contenttypes.contenttype", "pk": 149}, {"fields": {"model": "embargoedcourse", "app_label": "embargo"}, "model": "contenttypes.contenttype", "pk": 150}, {"fields": {"model": "embargoedstate", "app_label": "embargo"}, "model": "contenttypes.contenttype", "pk": 151}, {"fields": {"model": "restrictedcourse", "app_label": "embargo"}, "model": "contenttypes.contenttype", "pk": 152}, {"fields": {"model": "country", "app_label": "embargo"}, "model": "contenttypes.contenttype", "pk": 153}, {"fields": {"model": "countryaccessrule", "app_label": "embargo"}, "model": "contenttypes.contenttype", "pk": 154}, {"fields": {"model": "courseaccessrulehistory", "app_label": "embargo"}, "model": "contenttypes.contenttype", "pk": 155}, {"fields": {"model": "ipfilter", "app_label": "embargo"}, "model": "contenttypes.contenttype", "pk": 156}, {"fields": {"model": "coursererunstate", "app_label": "course_action_state"}, "model": "contenttypes.contenttype", "pk": 157}, {"fields": {"model": "mobileapiconfig", "app_label": "mobile_api"}, "model": "contenttypes.contenttype", "pk": 158}, {"fields": {"model": "usersocialauth", "app_label": "default"}, "model": "contenttypes.contenttype", "pk": 159}, {"fields": {"model": "nonce", "app_label": "default"}, "model": "contenttypes.contenttype", "pk": 160}, {"fields": {"model": "association", "app_label": "default"}, "model": "contenttypes.contenttype", "pk": 161}, {"fields": {"model": "code", "app_label": "default"}, "model": "contenttypes.contenttype", "pk": 162}, {"fields": {"model": "surveyform", "app_label": "survey"}, "model": "contenttypes.contenttype", "pk": 163}, {"fields": {"model": "surveyanswer", "app_label": "survey"}, "model": "contenttypes.contenttype", "pk": 164}, {"fields": {"model": "xblockasidesconfig", "app_label": "lms_xblock"}, "model": "contenttypes.contenttype", "pk": 165}, {"fields": {"model": "courseoverview", "app_label": "course_overviews"}, "model": "contenttypes.contenttype", "pk": 166}, {"fields": {"model": "courseoverviewtab", "app_label": "course_overviews"}, "model": "contenttypes.contenttype", "pk": 167}, {"fields": {"model": "coursestructure", "app_label": "course_structures"}, "model": "contenttypes.contenttype", "pk": 168}, {"fields": {"model": "corsmodel", "app_label": "corsheaders"}, "model": "contenttypes.contenttype", "pk": 169}, {"fields": {"model": "xdomainproxyconfiguration", "app_label": "cors_csrf"}, "model": "contenttypes.contenttype", "pk": 170}, {"fields": {"model": "creditprovider", "app_label": "credit"}, "model": "contenttypes.contenttype", "pk": 171}, {"fields": {"model": "creditcourse", "app_label": "credit"}, "model": "contenttypes.contenttype", "pk": 172}, {"fields": {"model": "creditrequirement", "app_label": "credit"}, "model": "contenttypes.contenttype", "pk": 173}, {"fields": {"model": "historicalcreditrequirementstatus", "app_label": "credit"}, "model": "contenttypes.contenttype", "pk": 174}, {"fields": {"model": "creditrequirementstatus", "app_label": "credit"}, "model": "contenttypes.contenttype", "pk": 175}, {"fields": {"model": "crediteligibility", "app_label": "credit"}, "model": "contenttypes.contenttype", "pk": 176}, {"fields": {"model": "historicalcreditrequest", "app_label": "credit"}, "model": "contenttypes.contenttype", "pk": 177}, {"fields": {"model": "creditrequest", "app_label": "credit"}, "model": "contenttypes.contenttype", "pk": 178}, {"fields": {"model": "courseteam", "app_label": "teams"}, "model": "contenttypes.contenttype", "pk": 179}, {"fields": {"model": "courseteammembership", "app_label": "teams"}, "model": "contenttypes.contenttype", "pk": 180}, {"fields": {"model": "xblockdisableconfig", "app_label": "xblock_django"}, "model": "contenttypes.contenttype", "pk": 181}, {"fields": {"model": "programsapiconfig", "app_label": "programs"}, "model": "contenttypes.contenttype", "pk": 182}, {"fields": {"model": "selfpacedconfiguration", "app_label": "self_paced"}, "model": "contenttypes.contenttype", "pk": 183}, {"fields": {"model": "kvstore", "app_label": "thumbnail"}, "model": "contenttypes.contenttype", "pk": 184}, {"fields": {"model": "studentitem", "app_label": "submissions"}, "model": "contenttypes.contenttype", "pk": 185}, {"fields": {"model": "submission", "app_label": "submissions"}, "model": "contenttypes.contenttype", "pk": 186}, {"fields": {"model": "score", "app_label": "submissions"}, "model": "contenttypes.contenttype", "pk": 187}, {"fields": {"model": "scoresummary", "app_label": "submissions"}, "model": "contenttypes.contenttype", "pk": 188}, {"fields": {"model": "rubric", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 189}, {"fields": {"model": "criterion", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 190}, {"fields": {"model": "criterionoption", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 191}, {"fields": {"model": "assessment", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 192}, {"fields": {"model": "assessmentpart", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 193}, {"fields": {"model": "assessmentfeedbackoption", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 194}, {"fields": {"model": "assessmentfeedback", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 195}, {"fields": {"model": "peerworkflow", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 196}, {"fields": {"model": "peerworkflowitem", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 197}, {"fields": {"model": "trainingexample", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 198}, {"fields": {"model": "studenttrainingworkflow", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 199}, {"fields": {"model": "studenttrainingworkflowitem", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 200}, {"fields": {"model": "aiclassifierset", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 201}, {"fields": {"model": "aiclassifier", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 202}, {"fields": {"model": "aitrainingworkflow", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 203}, {"fields": {"model": "aigradingworkflow", "app_label": "assessment"}, "model": "contenttypes.contenttype", "pk": 204}, {"fields": {"model": "assessmentworkflow", "app_label": "workflow"}, "model": "contenttypes.contenttype", "pk": 205}, {"fields": {"model": "assessmentworkflowstep", "app_label": "workflow"}, "model": "contenttypes.contenttype", "pk": 206}, {"fields": {"model": "assessmentworkflowcancellation", "app_label": "workflow"}, "model": "contenttypes.contenttype", "pk": 207}, {"fields": {"model": "profile", "app_label": "edxval"}, "model": "contenttypes.contenttype", "pk": 208}, {"fields": {"model": "video", "app_label": "edxval"}, "model": "contenttypes.contenttype", "pk": 209}, {"fields": {"model": "coursevideo", "app_label": "edxval"}, "model": "contenttypes.contenttype", "pk": 210}, {"fields": {"model": "encodedvideo", "app_label": "edxval"}, "model": "contenttypes.contenttype", "pk": 211}, {"fields": {"model": "subtitle", "app_label": "edxval"}, "model": "contenttypes.contenttype", "pk": 212}, {"fields": {"model": "milestone", "app_label": "milestones"}, "model": "contenttypes.contenttype", "pk": 213}, {"fields": {"model": "milestonerelationshiptype", "app_label": "milestones"}, "model": "contenttypes.contenttype", "pk": 214}, {"fields": {"model": "coursemilestone", "app_label": "milestones"}, "model": "contenttypes.contenttype", "pk": 215}, {"fields": {"model": "coursecontentmilestone", "app_label": "milestones"}, "model": "contenttypes.contenttype", "pk": 216}, {"fields": {"model": "usermilestone", "app_label": "milestones"}, "model": "contenttypes.contenttype", "pk": 217}, {"fields": {"model": "proctoredexam", "app_label": "edx_proctoring"}, "model": "contenttypes.contenttype", "pk": 218}, {"fields": {"model": "proctoredexamreviewpolicy", "app_label": "edx_proctoring"}, "model": "contenttypes.contenttype", "pk": 219}, {"fields": {"model": "proctoredexamreviewpolicyhistory", "app_label": "edx_proctoring"}, "model": "contenttypes.contenttype", "pk": 220}, {"fields": {"model": "proctoredexamstudentattempt", "app_label": "edx_proctoring"}, "model": "contenttypes.contenttype", "pk": 221}, {"fields": {"model": "proctoredexamstudentattempthistory", "app_label": "edx_proctoring"}, "model": "contenttypes.contenttype", "pk": 222}, {"fields": {"model": "proctoredexamstudentallowance", "app_label": "edx_proctoring"}, "model": "contenttypes.contenttype", "pk": 223}, {"fields": {"model": "proctoredexamstudentallowancehistory", "app_label": "edx_proctoring"}, "model": "contenttypes.contenttype", "pk": 224}, {"fields": {"model": "proctoredexamsoftwaresecurereview", "app_label": "edx_proctoring"}, "model": "contenttypes.contenttype", "pk": 225}, {"fields": {"model": "proctoredexamsoftwaresecurereviewhistory", "app_label": "edx_proctoring"}, "model": "contenttypes.contenttype", "pk": 226}, {"fields": {"model": "proctoredexamsoftwaresecurecomment", "app_label": "edx_proctoring"}, "model": "contenttypes.contenttype", "pk": 227}, {"fields": {"model": "organization", "app_label": "organizations"}, "model": "contenttypes.contenttype", "pk": 228}, {"fields": {"model": "organizationcourse", "app_label": "organizations"}, "model": "contenttypes.contenttype", "pk": 229}, {"fields": {"model": "videouploadconfig", "app_label": "contentstore"}, "model": "contenttypes.contenttype", "pk": 230}, {"fields": {"model": "pushnotificationconfig", "app_label": "contentstore"}, "model": "contenttypes.contenttype", "pk": 231}, {"fields": {"model": "coursecreator", "app_label": "course_creators"}, "model": "contenttypes.contenttype", "pk": 232}, {"fields": {"model": "studioconfig", "app_label": "xblock_config"}, "model": "contenttypes.contenttype", "pk": 233}, {"fields": {"domain": "example.com", "name": "example.com"}, "model": "sites.site", "pk": 1}, {"fields": {"default": false, "mode": "honor", "icon": "badges/honor_MDmkxcI.png"}, "model": "certificates.badgeimageconfiguration", "pk": 1}, {"fields": {"default": false, "mode": "verified", "icon": "badges/verified_UjvtLzD.png"}, "model": "certificates.badgeimageconfiguration", "pk": 2}, {"fields": {"default": false, "mode": "professional", "icon": "badges/professional_Lg7aA7P.png"}, "model": "certificates.badgeimageconfiguration", "pk": 3}, {"fields": {"plain_template": "{course_title}\n\n{{message_body}}\r\n----\r\nCopyright 2013 edX, All rights reserved.\r\n----\r\nConnect with edX:\r\nFacebook (http://facebook.com/edxonline)\r\nTwitter (http://twitter.com/edxonline)\r\nGoogle+ (https://plus.google.com/108235383044095082735)\r\nMeetup (http://www.meetup.com/edX-Communities/)\r\n----\r\nThis email was automatically sent from {platform_name}.\r\nYou are receiving this email at address {email} because you are enrolled in {course_title}\r\n(URL: {course_url} ).\r\nTo stop receiving email like this, update your course email settings at {email_settings_url}.\r\n", "html_template": " Update from {course_title}


edX
Connect with edX:        

{course_title}


{{message_body}}
       
Copyright \u00a9 2013 edX, All rights reserved.


Our mailing address is:
edX
11 Cambridge Center, Suite 101
Cambridge, MA, USA 02142


This email was automatically sent from {platform_name}.
You are receiving this email at address {email} because you are enrolled in {course_title}.
To stop receiving email like this, update your course email settings here.
", "name": null}, "model": "bulk_email.courseemailtemplate", "pk": 1}, {"fields": {"plain_template": "THIS IS A BRANDED TEXT TEMPLATE. {course_title}\n\n{{message_body}}\r\n----\r\nCopyright 2013 edX, All rights reserved.\r\n----\r\nConnect with edX:\r\nFacebook (http://facebook.com/edxonline)\r\nTwitter (http://twitter.com/edxonline)\r\nGoogle+ (https://plus.google.com/108235383044095082735)\r\nMeetup (http://www.meetup.com/edX-Communities/)\r\n----\r\nThis email was automatically sent from {platform_name}.\r\nYou are receiving this email at address {email} because you are enrolled in {course_title}\r\n(URL: {course_url} ).\r\nTo stop receiving email like this, update your course email settings at {email_settings_url}.\r\n", "html_template": " THIS IS A BRANDED HTML TEMPLATE Update from {course_title}

edX
Connect with edX:        

{course_title}


{{message_body}}
       
Copyright \u00a9 2013 edX, All rights reserved.


Our mailing address is:
edX
11 Cambridge Center, Suite 101
Cambridge, MA, USA 02142


This email was automatically sent from {platform_name}.
You are receiving this email at address {email} because you are enrolled in {course_title}.
To stop receiving email like this, update your course email settings here.
", "name": "branded.template"}, "model": "bulk_email.courseemailtemplate", "pk": 2}, {"fields": {"country": "AF"}, "model": "embargo.country", "pk": 1}, {"fields": {"country": "AX"}, "model": "embargo.country", "pk": 2}, {"fields": {"country": "AL"}, "model": "embargo.country", "pk": 3}, {"fields": {"country": "DZ"}, "model": "embargo.country", "pk": 4}, {"fields": {"country": "AS"}, "model": "embargo.country", "pk": 5}, {"fields": {"country": "AD"}, "model": "embargo.country", "pk": 6}, {"fields": {"country": "AO"}, "model": "embargo.country", "pk": 7}, {"fields": {"country": "AI"}, "model": "embargo.country", "pk": 8}, {"fields": {"country": "AQ"}, "model": "embargo.country", "pk": 9}, {"fields": {"country": "AG"}, "model": "embargo.country", "pk": 10}, {"fields": {"country": "AR"}, "model": "embargo.country", "pk": 11}, {"fields": {"country": "AM"}, "model": "embargo.country", "pk": 12}, {"fields": {"country": "AW"}, "model": "embargo.country", "pk": 13}, {"fields": {"country": "AU"}, "model": "embargo.country", "pk": 14}, {"fields": {"country": "AT"}, "model": "embargo.country", "pk": 15}, {"fields": {"country": "AZ"}, "model": "embargo.country", "pk": 16}, {"fields": {"country": "BS"}, "model": "embargo.country", "pk": 17}, {"fields": {"country": "BH"}, "model": "embargo.country", "pk": 18}, {"fields": {"country": "BD"}, "model": "embargo.country", "pk": 19}, {"fields": {"country": "BB"}, "model": "embargo.country", "pk": 20}, {"fields": {"country": "BY"}, "model": "embargo.country", "pk": 21}, {"fields": {"country": "BE"}, "model": "embargo.country", "pk": 22}, {"fields": {"country": "BZ"}, "model": "embargo.country", "pk": 23}, {"fields": {"country": "BJ"}, "model": "embargo.country", "pk": 24}, {"fields": {"country": "BM"}, "model": "embargo.country", "pk": 25}, {"fields": {"country": "BT"}, "model": "embargo.country", "pk": 26}, {"fields": {"country": "BO"}, "model": "embargo.country", "pk": 27}, {"fields": {"country": "BQ"}, "model": "embargo.country", "pk": 28}, {"fields": {"country": "BA"}, "model": "embargo.country", "pk": 29}, {"fields": {"country": "BW"}, "model": "embargo.country", "pk": 30}, {"fields": {"country": "BV"}, "model": "embargo.country", "pk": 31}, {"fields": {"country": "BR"}, "model": "embargo.country", "pk": 32}, {"fields": {"country": "IO"}, "model": "embargo.country", "pk": 33}, {"fields": {"country": "BN"}, "model": "embargo.country", "pk": 34}, {"fields": {"country": "BG"}, "model": "embargo.country", "pk": 35}, {"fields": {"country": "BF"}, "model": "embargo.country", "pk": 36}, {"fields": {"country": "BI"}, "model": "embargo.country", "pk": 37}, {"fields": {"country": "CV"}, "model": "embargo.country", "pk": 38}, {"fields": {"country": "KH"}, "model": "embargo.country", "pk": 39}, {"fields": {"country": "CM"}, "model": "embargo.country", "pk": 40}, {"fields": {"country": "CA"}, "model": "embargo.country", "pk": 41}, {"fields": {"country": "KY"}, "model": "embargo.country", "pk": 42}, {"fields": {"country": "CF"}, "model": "embargo.country", "pk": 43}, {"fields": {"country": "TD"}, "model": "embargo.country", "pk": 44}, {"fields": {"country": "CL"}, "model": "embargo.country", "pk": 45}, {"fields": {"country": "CN"}, "model": "embargo.country", "pk": 46}, {"fields": {"country": "CX"}, "model": "embargo.country", "pk": 47}, {"fields": {"country": "CC"}, "model": "embargo.country", "pk": 48}, {"fields": {"country": "CO"}, "model": "embargo.country", "pk": 49}, {"fields": {"country": "KM"}, "model": "embargo.country", "pk": 50}, {"fields": {"country": "CG"}, "model": "embargo.country", "pk": 51}, {"fields": {"country": "CD"}, "model": "embargo.country", "pk": 52}, {"fields": {"country": "CK"}, "model": "embargo.country", "pk": 53}, {"fields": {"country": "CR"}, "model": "embargo.country", "pk": 54}, {"fields": {"country": "CI"}, "model": "embargo.country", "pk": 55}, {"fields": {"country": "HR"}, "model": "embargo.country", "pk": 56}, {"fields": {"country": "CU"}, "model": "embargo.country", "pk": 57}, {"fields": {"country": "CW"}, "model": "embargo.country", "pk": 58}, {"fields": {"country": "CY"}, "model": "embargo.country", "pk": 59}, {"fields": {"country": "CZ"}, "model": "embargo.country", "pk": 60}, {"fields": {"country": "DK"}, "model": "embargo.country", "pk": 61}, {"fields": {"country": "DJ"}, "model": "embargo.country", "pk": 62}, {"fields": {"country": "DM"}, "model": "embargo.country", "pk": 63}, {"fields": {"country": "DO"}, "model": "embargo.country", "pk": 64}, {"fields": {"country": "EC"}, "model": "embargo.country", "pk": 65}, {"fields": {"country": "EG"}, "model": "embargo.country", "pk": 66}, {"fields": {"country": "SV"}, "model": "embargo.country", "pk": 67}, {"fields": {"country": "GQ"}, "model": "embargo.country", "pk": 68}, {"fields": {"country": "ER"}, "model": "embargo.country", "pk": 69}, {"fields": {"country": "EE"}, "model": "embargo.country", "pk": 70}, {"fields": {"country": "ET"}, "model": "embargo.country", "pk": 71}, {"fields": {"country": "FK"}, "model": "embargo.country", "pk": 72}, {"fields": {"country": "FO"}, "model": "embargo.country", "pk": 73}, {"fields": {"country": "FJ"}, "model": "embargo.country", "pk": 74}, {"fields": {"country": "FI"}, "model": "embargo.country", "pk": 75}, {"fields": {"country": "FR"}, "model": "embargo.country", "pk": 76}, {"fields": {"country": "GF"}, "model": "embargo.country", "pk": 77}, {"fields": {"country": "PF"}, "model": "embargo.country", "pk": 78}, {"fields": {"country": "TF"}, "model": "embargo.country", "pk": 79}, {"fields": {"country": "GA"}, "model": "embargo.country", "pk": 80}, {"fields": {"country": "GM"}, "model": "embargo.country", "pk": 81}, {"fields": {"country": "GE"}, "model": "embargo.country", "pk": 82}, {"fields": {"country": "DE"}, "model": "embargo.country", "pk": 83}, {"fields": {"country": "GH"}, "model": "embargo.country", "pk": 84}, {"fields": {"country": "GI"}, "model": "embargo.country", "pk": 85}, {"fields": {"country": "GR"}, "model": "embargo.country", "pk": 86}, {"fields": {"country": "GL"}, "model": "embargo.country", "pk": 87}, {"fields": {"country": "GD"}, "model": "embargo.country", "pk": 88}, {"fields": {"country": "GP"}, "model": "embargo.country", "pk": 89}, {"fields": {"country": "GU"}, "model": "embargo.country", "pk": 90}, {"fields": {"country": "GT"}, "model": "embargo.country", "pk": 91}, {"fields": {"country": "GG"}, "model": "embargo.country", "pk": 92}, {"fields": {"country": "GN"}, "model": "embargo.country", "pk": 93}, {"fields": {"country": "GW"}, "model": "embargo.country", "pk": 94}, {"fields": {"country": "GY"}, "model": "embargo.country", "pk": 95}, {"fields": {"country": "HT"}, "model": "embargo.country", "pk": 96}, {"fields": {"country": "HM"}, "model": "embargo.country", "pk": 97}, {"fields": {"country": "VA"}, "model": "embargo.country", "pk": 98}, {"fields": {"country": "HN"}, "model": "embargo.country", "pk": 99}, {"fields": {"country": "HK"}, "model": "embargo.country", "pk": 100}, {"fields": {"country": "HU"}, "model": "embargo.country", "pk": 101}, {"fields": {"country": "IS"}, "model": "embargo.country", "pk": 102}, {"fields": {"country": "IN"}, "model": "embargo.country", "pk": 103}, {"fields": {"country": "ID"}, "model": "embargo.country", "pk": 104}, {"fields": {"country": "IR"}, "model": "embargo.country", "pk": 105}, {"fields": {"country": "IQ"}, "model": "embargo.country", "pk": 106}, {"fields": {"country": "IE"}, "model": "embargo.country", "pk": 107}, {"fields": {"country": "IM"}, "model": "embargo.country", "pk": 108}, {"fields": {"country": "IL"}, "model": "embargo.country", "pk": 109}, {"fields": {"country": "IT"}, "model": "embargo.country", "pk": 110}, {"fields": {"country": "JM"}, "model": "embargo.country", "pk": 111}, {"fields": {"country": "JP"}, "model": "embargo.country", "pk": 112}, {"fields": {"country": "JE"}, "model": "embargo.country", "pk": 113}, {"fields": {"country": "JO"}, "model": "embargo.country", "pk": 114}, {"fields": {"country": "KZ"}, "model": "embargo.country", "pk": 115}, {"fields": {"country": "KE"}, "model": "embargo.country", "pk": 116}, {"fields": {"country": "KI"}, "model": "embargo.country", "pk": 117}, {"fields": {"country": "KW"}, "model": "embargo.country", "pk": 118}, {"fields": {"country": "KG"}, "model": "embargo.country", "pk": 119}, {"fields": {"country": "LA"}, "model": "embargo.country", "pk": 120}, {"fields": {"country": "LV"}, "model": "embargo.country", "pk": 121}, {"fields": {"country": "LB"}, "model": "embargo.country", "pk": 122}, {"fields": {"country": "LS"}, "model": "embargo.country", "pk": 123}, {"fields": {"country": "LR"}, "model": "embargo.country", "pk": 124}, {"fields": {"country": "LY"}, "model": "embargo.country", "pk": 125}, {"fields": {"country": "LI"}, "model": "embargo.country", "pk": 126}, {"fields": {"country": "LT"}, "model": "embargo.country", "pk": 127}, {"fields": {"country": "LU"}, "model": "embargo.country", "pk": 128}, {"fields": {"country": "MO"}, "model": "embargo.country", "pk": 129}, {"fields": {"country": "MK"}, "model": "embargo.country", "pk": 130}, {"fields": {"country": "MG"}, "model": "embargo.country", "pk": 131}, {"fields": {"country": "MW"}, "model": "embargo.country", "pk": 132}, {"fields": {"country": "MY"}, "model": "embargo.country", "pk": 133}, {"fields": {"country": "MV"}, "model": "embargo.country", "pk": 134}, {"fields": {"country": "ML"}, "model": "embargo.country", "pk": 135}, {"fields": {"country": "MT"}, "model": "embargo.country", "pk": 136}, {"fields": {"country": "MH"}, "model": "embargo.country", "pk": 137}, {"fields": {"country": "MQ"}, "model": "embargo.country", "pk": 138}, {"fields": {"country": "MR"}, "model": "embargo.country", "pk": 139}, {"fields": {"country": "MU"}, "model": "embargo.country", "pk": 140}, {"fields": {"country": "YT"}, "model": "embargo.country", "pk": 141}, {"fields": {"country": "MX"}, "model": "embargo.country", "pk": 142}, {"fields": {"country": "FM"}, "model": "embargo.country", "pk": 143}, {"fields": {"country": "MD"}, "model": "embargo.country", "pk": 144}, {"fields": {"country": "MC"}, "model": "embargo.country", "pk": 145}, {"fields": {"country": "MN"}, "model": "embargo.country", "pk": 146}, {"fields": {"country": "ME"}, "model": "embargo.country", "pk": 147}, {"fields": {"country": "MS"}, "model": "embargo.country", "pk": 148}, {"fields": {"country": "MA"}, "model": "embargo.country", "pk": 149}, {"fields": {"country": "MZ"}, "model": "embargo.country", "pk": 150}, {"fields": {"country": "MM"}, "model": "embargo.country", "pk": 151}, {"fields": {"country": "NA"}, "model": "embargo.country", "pk": 152}, {"fields": {"country": "NR"}, "model": "embargo.country", "pk": 153}, {"fields": {"country": "NP"}, "model": "embargo.country", "pk": 154}, {"fields": {"country": "NL"}, "model": "embargo.country", "pk": 155}, {"fields": {"country": "NC"}, "model": "embargo.country", "pk": 156}, {"fields": {"country": "NZ"}, "model": "embargo.country", "pk": 157}, {"fields": {"country": "NI"}, "model": "embargo.country", "pk": 158}, {"fields": {"country": "NE"}, "model": "embargo.country", "pk": 159}, {"fields": {"country": "NG"}, "model": "embargo.country", "pk": 160}, {"fields": {"country": "NU"}, "model": "embargo.country", "pk": 161}, {"fields": {"country": "NF"}, "model": "embargo.country", "pk": 162}, {"fields": {"country": "KP"}, "model": "embargo.country", "pk": 163}, {"fields": {"country": "MP"}, "model": "embargo.country", "pk": 164}, {"fields": {"country": "NO"}, "model": "embargo.country", "pk": 165}, {"fields": {"country": "OM"}, "model": "embargo.country", "pk": 166}, {"fields": {"country": "PK"}, "model": "embargo.country", "pk": 167}, {"fields": {"country": "PW"}, "model": "embargo.country", "pk": 168}, {"fields": {"country": "PS"}, "model": "embargo.country", "pk": 169}, {"fields": {"country": "PA"}, "model": "embargo.country", "pk": 170}, {"fields": {"country": "PG"}, "model": "embargo.country", "pk": 171}, {"fields": {"country": "PY"}, "model": "embargo.country", "pk": 172}, {"fields": {"country": "PE"}, "model": "embargo.country", "pk": 173}, {"fields": {"country": "PH"}, "model": "embargo.country", "pk": 174}, {"fields": {"country": "PN"}, "model": "embargo.country", "pk": 175}, {"fields": {"country": "PL"}, "model": "embargo.country", "pk": 176}, {"fields": {"country": "PT"}, "model": "embargo.country", "pk": 177}, {"fields": {"country": "PR"}, "model": "embargo.country", "pk": 178}, {"fields": {"country": "QA"}, "model": "embargo.country", "pk": 179}, {"fields": {"country": "RE"}, "model": "embargo.country", "pk": 180}, {"fields": {"country": "RO"}, "model": "embargo.country", "pk": 181}, {"fields": {"country": "RU"}, "model": "embargo.country", "pk": 182}, {"fields": {"country": "RW"}, "model": "embargo.country", "pk": 183}, {"fields": {"country": "BL"}, "model": "embargo.country", "pk": 184}, {"fields": {"country": "SH"}, "model": "embargo.country", "pk": 185}, {"fields": {"country": "KN"}, "model": "embargo.country", "pk": 186}, {"fields": {"country": "LC"}, "model": "embargo.country", "pk": 187}, {"fields": {"country": "MF"}, "model": "embargo.country", "pk": 188}, {"fields": {"country": "PM"}, "model": "embargo.country", "pk": 189}, {"fields": {"country": "VC"}, "model": "embargo.country", "pk": 190}, {"fields": {"country": "WS"}, "model": "embargo.country", "pk": 191}, {"fields": {"country": "SM"}, "model": "embargo.country", "pk": 192}, {"fields": {"country": "ST"}, "model": "embargo.country", "pk": 193}, {"fields": {"country": "SA"}, "model": "embargo.country", "pk": 194}, {"fields": {"country": "SN"}, "model": "embargo.country", "pk": 195}, {"fields": {"country": "RS"}, "model": "embargo.country", "pk": 196}, {"fields": {"country": "SC"}, "model": "embargo.country", "pk": 197}, {"fields": {"country": "SL"}, "model": "embargo.country", "pk": 198}, {"fields": {"country": "SG"}, "model": "embargo.country", "pk": 199}, {"fields": {"country": "SX"}, "model": "embargo.country", "pk": 200}, {"fields": {"country": "SK"}, "model": "embargo.country", "pk": 201}, {"fields": {"country": "SI"}, "model": "embargo.country", "pk": 202}, {"fields": {"country": "SB"}, "model": "embargo.country", "pk": 203}, {"fields": {"country": "SO"}, "model": "embargo.country", "pk": 204}, {"fields": {"country": "ZA"}, "model": "embargo.country", "pk": 205}, {"fields": {"country": "GS"}, "model": "embargo.country", "pk": 206}, {"fields": {"country": "KR"}, "model": "embargo.country", "pk": 207}, {"fields": {"country": "SS"}, "model": "embargo.country", "pk": 208}, {"fields": {"country": "ES"}, "model": "embargo.country", "pk": 209}, {"fields": {"country": "LK"}, "model": "embargo.country", "pk": 210}, {"fields": {"country": "SD"}, "model": "embargo.country", "pk": 211}, {"fields": {"country": "SR"}, "model": "embargo.country", "pk": 212}, {"fields": {"country": "SJ"}, "model": "embargo.country", "pk": 213}, {"fields": {"country": "SZ"}, "model": "embargo.country", "pk": 214}, {"fields": {"country": "SE"}, "model": "embargo.country", "pk": 215}, {"fields": {"country": "CH"}, "model": "embargo.country", "pk": 216}, {"fields": {"country": "SY"}, "model": "embargo.country", "pk": 217}, {"fields": {"country": "TW"}, "model": "embargo.country", "pk": 218}, {"fields": {"country": "TJ"}, "model": "embargo.country", "pk": 219}, {"fields": {"country": "TZ"}, "model": "embargo.country", "pk": 220}, {"fields": {"country": "TH"}, "model": "embargo.country", "pk": 221}, {"fields": {"country": "TL"}, "model": "embargo.country", "pk": 222}, {"fields": {"country": "TG"}, "model": "embargo.country", "pk": 223}, {"fields": {"country": "TK"}, "model": "embargo.country", "pk": 224}, {"fields": {"country": "TO"}, "model": "embargo.country", "pk": 225}, {"fields": {"country": "TT"}, "model": "embargo.country", "pk": 226}, {"fields": {"country": "TN"}, "model": "embargo.country", "pk": 227}, {"fields": {"country": "TR"}, "model": "embargo.country", "pk": 228}, {"fields": {"country": "TM"}, "model": "embargo.country", "pk": 229}, {"fields": {"country": "TC"}, "model": "embargo.country", "pk": 230}, {"fields": {"country": "TV"}, "model": "embargo.country", "pk": 231}, {"fields": {"country": "UG"}, "model": "embargo.country", "pk": 232}, {"fields": {"country": "UA"}, "model": "embargo.country", "pk": 233}, {"fields": {"country": "AE"}, "model": "embargo.country", "pk": 234}, {"fields": {"country": "GB"}, "model": "embargo.country", "pk": 235}, {"fields": {"country": "UM"}, "model": "embargo.country", "pk": 236}, {"fields": {"country": "US"}, "model": "embargo.country", "pk": 237}, {"fields": {"country": "UY"}, "model": "embargo.country", "pk": 238}, {"fields": {"country": "UZ"}, "model": "embargo.country", "pk": 239}, {"fields": {"country": "VU"}, "model": "embargo.country", "pk": 240}, {"fields": {"country": "VE"}, "model": "embargo.country", "pk": 241}, {"fields": {"country": "VN"}, "model": "embargo.country", "pk": 242}, {"fields": {"country": "VG"}, "model": "embargo.country", "pk": 243}, {"fields": {"country": "VI"}, "model": "embargo.country", "pk": 244}, {"fields": {"country": "WF"}, "model": "embargo.country", "pk": 245}, {"fields": {"country": "EH"}, "model": "embargo.country", "pk": 246}, {"fields": {"country": "YE"}, "model": "embargo.country", "pk": 247}, {"fields": {"country": "ZM"}, "model": "embargo.country", "pk": 248}, {"fields": {"country": "ZW"}, "model": "embargo.country", "pk": 249}, {"fields": {"profile_name": "desktop_mp4"}, "model": "edxval.profile", "pk": 1}, {"fields": {"profile_name": "desktop_webm"}, "model": "edxval.profile", "pk": 2}, {"fields": {"profile_name": "mobile_high"}, "model": "edxval.profile", "pk": 3}, {"fields": {"profile_name": "mobile_low"}, "model": "edxval.profile", "pk": 4}, {"fields": {"profile_name": "youtube"}, "model": "edxval.profile", "pk": 5}, {"fields": {"active": true, "description": "Autogenerated milestone relationship type \"fulfills\"", "modified": "2015-11-18T15:37:41.266Z", "name": "fulfills", "created": "2015-11-18T15:37:41.265Z"}, "model": "milestones.milestonerelationshiptype", "pk": 1}, {"fields": {"active": true, "description": "Autogenerated milestone relationship type \"requires\"", "modified": "2015-11-18T15:37:41.269Z", "name": "requires", "created": "2015-11-18T15:37:41.268Z"}, "model": "milestones.milestonerelationshiptype", "pk": 2}, {"fields": {"codename": "add_permission", "name": "Can add permission", "content_type": 1}, "model": "auth.permission", "pk": 1}, {"fields": {"codename": "change_permission", "name": "Can change permission", "content_type": 1}, "model": "auth.permission", "pk": 2}, {"fields": {"codename": "delete_permission", "name": "Can delete permission", "content_type": 1}, "model": "auth.permission", "pk": 3}, {"fields": {"codename": "add_group", "name": "Can add group", "content_type": 2}, "model": "auth.permission", "pk": 4}, {"fields": {"codename": "change_group", "name": "Can change group", "content_type": 2}, "model": "auth.permission", "pk": 5}, {"fields": {"codename": "delete_group", "name": "Can delete group", "content_type": 2}, "model": "auth.permission", "pk": 6}, {"fields": {"codename": "add_user", "name": "Can add user", "content_type": 3}, "model": "auth.permission", "pk": 7}, {"fields": {"codename": "change_user", "name": "Can change user", "content_type": 3}, "model": "auth.permission", "pk": 8}, {"fields": {"codename": "delete_user", "name": "Can delete user", "content_type": 3}, "model": "auth.permission", "pk": 9}, {"fields": {"codename": "add_contenttype", "name": "Can add content type", "content_type": 4}, "model": "auth.permission", "pk": 10}, {"fields": {"codename": "change_contenttype", "name": "Can change content type", "content_type": 4}, "model": "auth.permission", "pk": 11}, {"fields": {"codename": "delete_contenttype", "name": "Can delete content type", "content_type": 4}, "model": "auth.permission", "pk": 12}, {"fields": {"codename": "add_session", "name": "Can add session", "content_type": 5}, "model": "auth.permission", "pk": 13}, {"fields": {"codename": "change_session", "name": "Can change session", "content_type": 5}, "model": "auth.permission", "pk": 14}, {"fields": {"codename": "delete_session", "name": "Can delete session", "content_type": 5}, "model": "auth.permission", "pk": 15}, {"fields": {"codename": "add_site", "name": "Can add site", "content_type": 6}, "model": "auth.permission", "pk": 16}, {"fields": {"codename": "change_site", "name": "Can change site", "content_type": 6}, "model": "auth.permission", "pk": 17}, {"fields": {"codename": "delete_site", "name": "Can delete site", "content_type": 6}, "model": "auth.permission", "pk": 18}, {"fields": {"codename": "add_taskmeta", "name": "Can add task state", "content_type": 7}, "model": "auth.permission", "pk": 19}, {"fields": {"codename": "change_taskmeta", "name": "Can change task state", "content_type": 7}, "model": "auth.permission", "pk": 20}, {"fields": {"codename": "delete_taskmeta", "name": "Can delete task state", "content_type": 7}, "model": "auth.permission", "pk": 21}, {"fields": {"codename": "add_tasksetmeta", "name": "Can add saved group result", "content_type": 8}, "model": "auth.permission", "pk": 22}, {"fields": {"codename": "change_tasksetmeta", "name": "Can change saved group result", "content_type": 8}, "model": "auth.permission", "pk": 23}, {"fields": {"codename": "delete_tasksetmeta", "name": "Can delete saved group result", "content_type": 8}, "model": "auth.permission", "pk": 24}, {"fields": {"codename": "add_intervalschedule", "name": "Can add interval", "content_type": 9}, "model": "auth.permission", "pk": 25}, {"fields": {"codename": "change_intervalschedule", "name": "Can change interval", "content_type": 9}, "model": "auth.permission", "pk": 26}, {"fields": {"codename": "delete_intervalschedule", "name": "Can delete interval", "content_type": 9}, "model": "auth.permission", "pk": 27}, {"fields": {"codename": "add_crontabschedule", "name": "Can add crontab", "content_type": 10}, "model": "auth.permission", "pk": 28}, {"fields": {"codename": "change_crontabschedule", "name": "Can change crontab", "content_type": 10}, "model": "auth.permission", "pk": 29}, {"fields": {"codename": "delete_crontabschedule", "name": "Can delete crontab", "content_type": 10}, "model": "auth.permission", "pk": 30}, {"fields": {"codename": "add_periodictasks", "name": "Can add periodic tasks", "content_type": 11}, "model": "auth.permission", "pk": 31}, {"fields": {"codename": "change_periodictasks", "name": "Can change periodic tasks", "content_type": 11}, "model": "auth.permission", "pk": 32}, {"fields": {"codename": "delete_periodictasks", "name": "Can delete periodic tasks", "content_type": 11}, "model": "auth.permission", "pk": 33}, {"fields": {"codename": "add_periodictask", "name": "Can add periodic task", "content_type": 12}, "model": "auth.permission", "pk": 34}, {"fields": {"codename": "change_periodictask", "name": "Can change periodic task", "content_type": 12}, "model": "auth.permission", "pk": 35}, {"fields": {"codename": "delete_periodictask", "name": "Can delete periodic task", "content_type": 12}, "model": "auth.permission", "pk": 36}, {"fields": {"codename": "add_workerstate", "name": "Can add worker", "content_type": 13}, "model": "auth.permission", "pk": 37}, {"fields": {"codename": "change_workerstate", "name": "Can change worker", "content_type": 13}, "model": "auth.permission", "pk": 38}, {"fields": {"codename": "delete_workerstate", "name": "Can delete worker", "content_type": 13}, "model": "auth.permission", "pk": 39}, {"fields": {"codename": "add_taskstate", "name": "Can add task", "content_type": 14}, "model": "auth.permission", "pk": 40}, {"fields": {"codename": "change_taskstate", "name": "Can change task", "content_type": 14}, "model": "auth.permission", "pk": 41}, {"fields": {"codename": "delete_taskstate", "name": "Can delete task", "content_type": 14}, "model": "auth.permission", "pk": 42}, {"fields": {"codename": "add_globalstatusmessage", "name": "Can add global status message", "content_type": 15}, "model": "auth.permission", "pk": 43}, {"fields": {"codename": "change_globalstatusmessage", "name": "Can change global status message", "content_type": 15}, "model": "auth.permission", "pk": 44}, {"fields": {"codename": "delete_globalstatusmessage", "name": "Can delete global status message", "content_type": 15}, "model": "auth.permission", "pk": 45}, {"fields": {"codename": "add_coursemessage", "name": "Can add course message", "content_type": 16}, "model": "auth.permission", "pk": 46}, {"fields": {"codename": "change_coursemessage", "name": "Can change course message", "content_type": 16}, "model": "auth.permission", "pk": 47}, {"fields": {"codename": "delete_coursemessage", "name": "Can delete course message", "content_type": 16}, "model": "auth.permission", "pk": 48}, {"fields": {"codename": "add_studentmodule", "name": "Can add student module", "content_type": 17}, "model": "auth.permission", "pk": 49}, {"fields": {"codename": "change_studentmodule", "name": "Can change student module", "content_type": 17}, "model": "auth.permission", "pk": 50}, {"fields": {"codename": "delete_studentmodule", "name": "Can delete student module", "content_type": 17}, "model": "auth.permission", "pk": 51}, {"fields": {"codename": "add_studentmodulehistory", "name": "Can add student module history", "content_type": 18}, "model": "auth.permission", "pk": 52}, {"fields": {"codename": "change_studentmodulehistory", "name": "Can change student module history", "content_type": 18}, "model": "auth.permission", "pk": 53}, {"fields": {"codename": "delete_studentmodulehistory", "name": "Can delete student module history", "content_type": 18}, "model": "auth.permission", "pk": 54}, {"fields": {"codename": "add_xmoduleuserstatesummaryfield", "name": "Can add x module user state summary field", "content_type": 19}, "model": "auth.permission", "pk": 55}, {"fields": {"codename": "change_xmoduleuserstatesummaryfield", "name": "Can change x module user state summary field", "content_type": 19}, "model": "auth.permission", "pk": 56}, {"fields": {"codename": "delete_xmoduleuserstatesummaryfield", "name": "Can delete x module user state summary field", "content_type": 19}, "model": "auth.permission", "pk": 57}, {"fields": {"codename": "add_xmodulestudentprefsfield", "name": "Can add x module student prefs field", "content_type": 20}, "model": "auth.permission", "pk": 58}, {"fields": {"codename": "change_xmodulestudentprefsfield", "name": "Can change x module student prefs field", "content_type": 20}, "model": "auth.permission", "pk": 59}, {"fields": {"codename": "delete_xmodulestudentprefsfield", "name": "Can delete x module student prefs field", "content_type": 20}, "model": "auth.permission", "pk": 60}, {"fields": {"codename": "add_xmodulestudentinfofield", "name": "Can add x module student info field", "content_type": 21}, "model": "auth.permission", "pk": 61}, {"fields": {"codename": "change_xmodulestudentinfofield", "name": "Can change x module student info field", "content_type": 21}, "model": "auth.permission", "pk": 62}, {"fields": {"codename": "delete_xmodulestudentinfofield", "name": "Can delete x module student info field", "content_type": 21}, "model": "auth.permission", "pk": 63}, {"fields": {"codename": "add_offlinecomputedgrade", "name": "Can add offline computed grade", "content_type": 22}, "model": "auth.permission", "pk": 64}, {"fields": {"codename": "change_offlinecomputedgrade", "name": "Can change offline computed grade", "content_type": 22}, "model": "auth.permission", "pk": 65}, {"fields": {"codename": "delete_offlinecomputedgrade", "name": "Can delete offline computed grade", "content_type": 22}, "model": "auth.permission", "pk": 66}, {"fields": {"codename": "add_offlinecomputedgradelog", "name": "Can add offline computed grade log", "content_type": 23}, "model": "auth.permission", "pk": 67}, {"fields": {"codename": "change_offlinecomputedgradelog", "name": "Can change offline computed grade log", "content_type": 23}, "model": "auth.permission", "pk": 68}, {"fields": {"codename": "delete_offlinecomputedgradelog", "name": "Can delete offline computed grade log", "content_type": 23}, "model": "auth.permission", "pk": 69}, {"fields": {"codename": "add_studentfieldoverride", "name": "Can add student field override", "content_type": 24}, "model": "auth.permission", "pk": 70}, {"fields": {"codename": "change_studentfieldoverride", "name": "Can change student field override", "content_type": 24}, "model": "auth.permission", "pk": 71}, {"fields": {"codename": "delete_studentfieldoverride", "name": "Can delete student field override", "content_type": 24}, "model": "auth.permission", "pk": 72}, {"fields": {"codename": "add_anonymoususerid", "name": "Can add anonymous user id", "content_type": 25}, "model": "auth.permission", "pk": 73}, {"fields": {"codename": "change_anonymoususerid", "name": "Can change anonymous user id", "content_type": 25}, "model": "auth.permission", "pk": 74}, {"fields": {"codename": "delete_anonymoususerid", "name": "Can delete anonymous user id", "content_type": 25}, "model": "auth.permission", "pk": 75}, {"fields": {"codename": "add_userstanding", "name": "Can add user standing", "content_type": 26}, "model": "auth.permission", "pk": 76}, {"fields": {"codename": "change_userstanding", "name": "Can change user standing", "content_type": 26}, "model": "auth.permission", "pk": 77}, {"fields": {"codename": "delete_userstanding", "name": "Can delete user standing", "content_type": 26}, "model": "auth.permission", "pk": 78}, {"fields": {"codename": "add_userprofile", "name": "Can add user profile", "content_type": 27}, "model": "auth.permission", "pk": 79}, {"fields": {"codename": "change_userprofile", "name": "Can change user profile", "content_type": 27}, "model": "auth.permission", "pk": 80}, {"fields": {"codename": "delete_userprofile", "name": "Can delete user profile", "content_type": 27}, "model": "auth.permission", "pk": 81}, {"fields": {"codename": "add_usersignupsource", "name": "Can add user signup source", "content_type": 28}, "model": "auth.permission", "pk": 82}, {"fields": {"codename": "change_usersignupsource", "name": "Can change user signup source", "content_type": 28}, "model": "auth.permission", "pk": 83}, {"fields": {"codename": "delete_usersignupsource", "name": "Can delete user signup source", "content_type": 28}, "model": "auth.permission", "pk": 84}, {"fields": {"codename": "add_usertestgroup", "name": "Can add user test group", "content_type": 29}, "model": "auth.permission", "pk": 85}, {"fields": {"codename": "change_usertestgroup", "name": "Can change user test group", "content_type": 29}, "model": "auth.permission", "pk": 86}, {"fields": {"codename": "delete_usertestgroup", "name": "Can delete user test group", "content_type": 29}, "model": "auth.permission", "pk": 87}, {"fields": {"codename": "add_registration", "name": "Can add registration", "content_type": 30}, "model": "auth.permission", "pk": 88}, {"fields": {"codename": "change_registration", "name": "Can change registration", "content_type": 30}, "model": "auth.permission", "pk": 89}, {"fields": {"codename": "delete_registration", "name": "Can delete registration", "content_type": 30}, "model": "auth.permission", "pk": 90}, {"fields": {"codename": "add_pendingnamechange", "name": "Can add pending name change", "content_type": 31}, "model": "auth.permission", "pk": 91}, {"fields": {"codename": "change_pendingnamechange", "name": "Can change pending name change", "content_type": 31}, "model": "auth.permission", "pk": 92}, {"fields": {"codename": "delete_pendingnamechange", "name": "Can delete pending name change", "content_type": 31}, "model": "auth.permission", "pk": 93}, {"fields": {"codename": "add_pendingemailchange", "name": "Can add pending email change", "content_type": 32}, "model": "auth.permission", "pk": 94}, {"fields": {"codename": "change_pendingemailchange", "name": "Can change pending email change", "content_type": 32}, "model": "auth.permission", "pk": 95}, {"fields": {"codename": "delete_pendingemailchange", "name": "Can delete pending email change", "content_type": 32}, "model": "auth.permission", "pk": 96}, {"fields": {"codename": "add_passwordhistory", "name": "Can add password history", "content_type": 33}, "model": "auth.permission", "pk": 97}, {"fields": {"codename": "change_passwordhistory", "name": "Can change password history", "content_type": 33}, "model": "auth.permission", "pk": 98}, {"fields": {"codename": "delete_passwordhistory", "name": "Can delete password history", "content_type": 33}, "model": "auth.permission", "pk": 99}, {"fields": {"codename": "add_loginfailures", "name": "Can add login failures", "content_type": 34}, "model": "auth.permission", "pk": 100}, {"fields": {"codename": "change_loginfailures", "name": "Can change login failures", "content_type": 34}, "model": "auth.permission", "pk": 101}, {"fields": {"codename": "delete_loginfailures", "name": "Can delete login failures", "content_type": 34}, "model": "auth.permission", "pk": 102}, {"fields": {"codename": "add_historicalcourseenrollment", "name": "Can add historical course enrollment", "content_type": 35}, "model": "auth.permission", "pk": 103}, {"fields": {"codename": "change_historicalcourseenrollment", "name": "Can change historical course enrollment", "content_type": 35}, "model": "auth.permission", "pk": 104}, {"fields": {"codename": "delete_historicalcourseenrollment", "name": "Can delete historical course enrollment", "content_type": 35}, "model": "auth.permission", "pk": 105}, {"fields": {"codename": "add_courseenrollment", "name": "Can add course enrollment", "content_type": 36}, "model": "auth.permission", "pk": 106}, {"fields": {"codename": "change_courseenrollment", "name": "Can change course enrollment", "content_type": 36}, "model": "auth.permission", "pk": 107}, {"fields": {"codename": "delete_courseenrollment", "name": "Can delete course enrollment", "content_type": 36}, "model": "auth.permission", "pk": 108}, {"fields": {"codename": "add_manualenrollmentaudit", "name": "Can add manual enrollment audit", "content_type": 37}, "model": "auth.permission", "pk": 109}, {"fields": {"codename": "change_manualenrollmentaudit", "name": "Can change manual enrollment audit", "content_type": 37}, "model": "auth.permission", "pk": 110}, {"fields": {"codename": "delete_manualenrollmentaudit", "name": "Can delete manual enrollment audit", "content_type": 37}, "model": "auth.permission", "pk": 111}, {"fields": {"codename": "add_courseenrollmentallowed", "name": "Can add course enrollment allowed", "content_type": 38}, "model": "auth.permission", "pk": 112}, {"fields": {"codename": "change_courseenrollmentallowed", "name": "Can change course enrollment allowed", "content_type": 38}, "model": "auth.permission", "pk": 113}, {"fields": {"codename": "delete_courseenrollmentallowed", "name": "Can delete course enrollment allowed", "content_type": 38}, "model": "auth.permission", "pk": 114}, {"fields": {"codename": "add_courseaccessrole", "name": "Can add course access role", "content_type": 39}, "model": "auth.permission", "pk": 115}, {"fields": {"codename": "change_courseaccessrole", "name": "Can change course access role", "content_type": 39}, "model": "auth.permission", "pk": 116}, {"fields": {"codename": "delete_courseaccessrole", "name": "Can delete course access role", "content_type": 39}, "model": "auth.permission", "pk": 117}, {"fields": {"codename": "add_dashboardconfiguration", "name": "Can add dashboard configuration", "content_type": 40}, "model": "auth.permission", "pk": 118}, {"fields": {"codename": "change_dashboardconfiguration", "name": "Can change dashboard configuration", "content_type": 40}, "model": "auth.permission", "pk": 119}, {"fields": {"codename": "delete_dashboardconfiguration", "name": "Can delete dashboard configuration", "content_type": 40}, "model": "auth.permission", "pk": 120}, {"fields": {"codename": "add_linkedinaddtoprofileconfiguration", "name": "Can add linked in add to profile configuration", "content_type": 41}, "model": "auth.permission", "pk": 121}, {"fields": {"codename": "change_linkedinaddtoprofileconfiguration", "name": "Can change linked in add to profile configuration", "content_type": 41}, "model": "auth.permission", "pk": 122}, {"fields": {"codename": "delete_linkedinaddtoprofileconfiguration", "name": "Can delete linked in add to profile configuration", "content_type": 41}, "model": "auth.permission", "pk": 123}, {"fields": {"codename": "add_entranceexamconfiguration", "name": "Can add entrance exam configuration", "content_type": 42}, "model": "auth.permission", "pk": 124}, {"fields": {"codename": "change_entranceexamconfiguration", "name": "Can change entrance exam configuration", "content_type": 42}, "model": "auth.permission", "pk": 125}, {"fields": {"codename": "delete_entranceexamconfiguration", "name": "Can delete entrance exam configuration", "content_type": 42}, "model": "auth.permission", "pk": 126}, {"fields": {"codename": "add_languageproficiency", "name": "Can add language proficiency", "content_type": 43}, "model": "auth.permission", "pk": 127}, {"fields": {"codename": "change_languageproficiency", "name": "Can change language proficiency", "content_type": 43}, "model": "auth.permission", "pk": 128}, {"fields": {"codename": "delete_languageproficiency", "name": "Can delete language proficiency", "content_type": 43}, "model": "auth.permission", "pk": 129}, {"fields": {"codename": "add_courseenrollmentattribute", "name": "Can add course enrollment attribute", "content_type": 44}, "model": "auth.permission", "pk": 130}, {"fields": {"codename": "change_courseenrollmentattribute", "name": "Can change course enrollment attribute", "content_type": 44}, "model": "auth.permission", "pk": 131}, {"fields": {"codename": "delete_courseenrollmentattribute", "name": "Can delete course enrollment attribute", "content_type": 44}, "model": "auth.permission", "pk": 132}, {"fields": {"codename": "add_enrollmentrefundconfiguration", "name": "Can add enrollment refund configuration", "content_type": 45}, "model": "auth.permission", "pk": 133}, {"fields": {"codename": "change_enrollmentrefundconfiguration", "name": "Can change enrollment refund configuration", "content_type": 45}, "model": "auth.permission", "pk": 134}, {"fields": {"codename": "delete_enrollmentrefundconfiguration", "name": "Can delete enrollment refund configuration", "content_type": 45}, "model": "auth.permission", "pk": 135}, {"fields": {"codename": "add_trackinglog", "name": "Can add tracking log", "content_type": 46}, "model": "auth.permission", "pk": 136}, {"fields": {"codename": "change_trackinglog", "name": "Can change tracking log", "content_type": 46}, "model": "auth.permission", "pk": 137}, {"fields": {"codename": "delete_trackinglog", "name": "Can delete tracking log", "content_type": 46}, "model": "auth.permission", "pk": 138}, {"fields": {"codename": "add_ratelimitconfiguration", "name": "Can add rate limit configuration", "content_type": 47}, "model": "auth.permission", "pk": 139}, {"fields": {"codename": "change_ratelimitconfiguration", "name": "Can change rate limit configuration", "content_type": 47}, "model": "auth.permission", "pk": 140}, {"fields": {"codename": "delete_ratelimitconfiguration", "name": "Can delete rate limit configuration", "content_type": 47}, "model": "auth.permission", "pk": 141}, {"fields": {"codename": "add_certificatewhitelist", "name": "Can add certificate whitelist", "content_type": 48}, "model": "auth.permission", "pk": 142}, {"fields": {"codename": "change_certificatewhitelist", "name": "Can change certificate whitelist", "content_type": 48}, "model": "auth.permission", "pk": 143}, {"fields": {"codename": "delete_certificatewhitelist", "name": "Can delete certificate whitelist", "content_type": 48}, "model": "auth.permission", "pk": 144}, {"fields": {"codename": "add_generatedcertificate", "name": "Can add generated certificate", "content_type": 49}, "model": "auth.permission", "pk": 145}, {"fields": {"codename": "change_generatedcertificate", "name": "Can change generated certificate", "content_type": 49}, "model": "auth.permission", "pk": 146}, {"fields": {"codename": "delete_generatedcertificate", "name": "Can delete generated certificate", "content_type": 49}, "model": "auth.permission", "pk": 147}, {"fields": {"codename": "add_examplecertificateset", "name": "Can add example certificate set", "content_type": 50}, "model": "auth.permission", "pk": 148}, {"fields": {"codename": "change_examplecertificateset", "name": "Can change example certificate set", "content_type": 50}, "model": "auth.permission", "pk": 149}, {"fields": {"codename": "delete_examplecertificateset", "name": "Can delete example certificate set", "content_type": 50}, "model": "auth.permission", "pk": 150}, {"fields": {"codename": "add_examplecertificate", "name": "Can add example certificate", "content_type": 51}, "model": "auth.permission", "pk": 151}, {"fields": {"codename": "change_examplecertificate", "name": "Can change example certificate", "content_type": 51}, "model": "auth.permission", "pk": 152}, {"fields": {"codename": "delete_examplecertificate", "name": "Can delete example certificate", "content_type": 51}, "model": "auth.permission", "pk": 153}, {"fields": {"codename": "add_certificategenerationcoursesetting", "name": "Can add certificate generation course setting", "content_type": 52}, "model": "auth.permission", "pk": 154}, {"fields": {"codename": "change_certificategenerationcoursesetting", "name": "Can change certificate generation course setting", "content_type": 52}, "model": "auth.permission", "pk": 155}, {"fields": {"codename": "delete_certificategenerationcoursesetting", "name": "Can delete certificate generation course setting", "content_type": 52}, "model": "auth.permission", "pk": 156}, {"fields": {"codename": "add_certificategenerationconfiguration", "name": "Can add certificate generation configuration", "content_type": 53}, "model": "auth.permission", "pk": 157}, {"fields": {"codename": "change_certificategenerationconfiguration", "name": "Can change certificate generation configuration", "content_type": 53}, "model": "auth.permission", "pk": 158}, {"fields": {"codename": "delete_certificategenerationconfiguration", "name": "Can delete certificate generation configuration", "content_type": 53}, "model": "auth.permission", "pk": 159}, {"fields": {"codename": "add_certificatehtmlviewconfiguration", "name": "Can add certificate html view configuration", "content_type": 54}, "model": "auth.permission", "pk": 160}, {"fields": {"codename": "change_certificatehtmlviewconfiguration", "name": "Can change certificate html view configuration", "content_type": 54}, "model": "auth.permission", "pk": 161}, {"fields": {"codename": "delete_certificatehtmlviewconfiguration", "name": "Can delete certificate html view configuration", "content_type": 54}, "model": "auth.permission", "pk": 162}, {"fields": {"codename": "add_badgeassertion", "name": "Can add badge assertion", "content_type": 55}, "model": "auth.permission", "pk": 163}, {"fields": {"codename": "change_badgeassertion", "name": "Can change badge assertion", "content_type": 55}, "model": "auth.permission", "pk": 164}, {"fields": {"codename": "delete_badgeassertion", "name": "Can delete badge assertion", "content_type": 55}, "model": "auth.permission", "pk": 165}, {"fields": {"codename": "add_badgeimageconfiguration", "name": "Can add badge image configuration", "content_type": 56}, "model": "auth.permission", "pk": 166}, {"fields": {"codename": "change_badgeimageconfiguration", "name": "Can change badge image configuration", "content_type": 56}, "model": "auth.permission", "pk": 167}, {"fields": {"codename": "delete_badgeimageconfiguration", "name": "Can delete badge image configuration", "content_type": 56}, "model": "auth.permission", "pk": 168}, {"fields": {"codename": "add_certificatetemplate", "name": "Can add certificate template", "content_type": 57}, "model": "auth.permission", "pk": 169}, {"fields": {"codename": "change_certificatetemplate", "name": "Can change certificate template", "content_type": 57}, "model": "auth.permission", "pk": 170}, {"fields": {"codename": "delete_certificatetemplate", "name": "Can delete certificate template", "content_type": 57}, "model": "auth.permission", "pk": 171}, {"fields": {"codename": "add_certificatetemplateasset", "name": "Can add certificate template asset", "content_type": 58}, "model": "auth.permission", "pk": 172}, {"fields": {"codename": "change_certificatetemplateasset", "name": "Can change certificate template asset", "content_type": 58}, "model": "auth.permission", "pk": 173}, {"fields": {"codename": "delete_certificatetemplateasset", "name": "Can delete certificate template asset", "content_type": 58}, "model": "auth.permission", "pk": 174}, {"fields": {"codename": "add_instructortask", "name": "Can add instructor task", "content_type": 59}, "model": "auth.permission", "pk": 175}, {"fields": {"codename": "change_instructortask", "name": "Can change instructor task", "content_type": 59}, "model": "auth.permission", "pk": 176}, {"fields": {"codename": "delete_instructortask", "name": "Can delete instructor task", "content_type": 59}, "model": "auth.permission", "pk": 177}, {"fields": {"codename": "add_psychometricdata", "name": "Can add psychometric data", "content_type": 60}, "model": "auth.permission", "pk": 178}, {"fields": {"codename": "change_psychometricdata", "name": "Can change psychometric data", "content_type": 60}, "model": "auth.permission", "pk": 179}, {"fields": {"codename": "delete_psychometricdata", "name": "Can delete psychometric data", "content_type": 60}, "model": "auth.permission", "pk": 180}, {"fields": {"codename": "add_coursesoftware", "name": "Can add course software", "content_type": 61}, "model": "auth.permission", "pk": 181}, {"fields": {"codename": "change_coursesoftware", "name": "Can change course software", "content_type": 61}, "model": "auth.permission", "pk": 182}, {"fields": {"codename": "delete_coursesoftware", "name": "Can delete course software", "content_type": 61}, "model": "auth.permission", "pk": 183}, {"fields": {"codename": "add_userlicense", "name": "Can add user license", "content_type": 62}, "model": "auth.permission", "pk": 184}, {"fields": {"codename": "change_userlicense", "name": "Can change user license", "content_type": 62}, "model": "auth.permission", "pk": 185}, {"fields": {"codename": "delete_userlicense", "name": "Can delete user license", "content_type": 62}, "model": "auth.permission", "pk": 186}, {"fields": {"codename": "add_courseusergroup", "name": "Can add course user group", "content_type": 63}, "model": "auth.permission", "pk": 187}, {"fields": {"codename": "change_courseusergroup", "name": "Can change course user group", "content_type": 63}, "model": "auth.permission", "pk": 188}, {"fields": {"codename": "delete_courseusergroup", "name": "Can delete course user group", "content_type": 63}, "model": "auth.permission", "pk": 189}, {"fields": {"codename": "add_cohortmembership", "name": "Can add cohort membership", "content_type": 64}, "model": "auth.permission", "pk": 190}, {"fields": {"codename": "change_cohortmembership", "name": "Can change cohort membership", "content_type": 64}, "model": "auth.permission", "pk": 191}, {"fields": {"codename": "delete_cohortmembership", "name": "Can delete cohort membership", "content_type": 64}, "model": "auth.permission", "pk": 192}, {"fields": {"codename": "add_courseusergrouppartitiongroup", "name": "Can add course user group partition group", "content_type": 65}, "model": "auth.permission", "pk": 193}, {"fields": {"codename": "change_courseusergrouppartitiongroup", "name": "Can change course user group partition group", "content_type": 65}, "model": "auth.permission", "pk": 194}, {"fields": {"codename": "delete_courseusergrouppartitiongroup", "name": "Can delete course user group partition group", "content_type": 65}, "model": "auth.permission", "pk": 195}, {"fields": {"codename": "add_coursecohortssettings", "name": "Can add course cohorts settings", "content_type": 66}, "model": "auth.permission", "pk": 196}, {"fields": {"codename": "change_coursecohortssettings", "name": "Can change course cohorts settings", "content_type": 66}, "model": "auth.permission", "pk": 197}, {"fields": {"codename": "delete_coursecohortssettings", "name": "Can delete course cohorts settings", "content_type": 66}, "model": "auth.permission", "pk": 198}, {"fields": {"codename": "add_coursecohort", "name": "Can add course cohort", "content_type": 67}, "model": "auth.permission", "pk": 199}, {"fields": {"codename": "change_coursecohort", "name": "Can change course cohort", "content_type": 67}, "model": "auth.permission", "pk": 200}, {"fields": {"codename": "delete_coursecohort", "name": "Can delete course cohort", "content_type": 67}, "model": "auth.permission", "pk": 201}, {"fields": {"codename": "add_courseemail", "name": "Can add course email", "content_type": 68}, "model": "auth.permission", "pk": 202}, {"fields": {"codename": "change_courseemail", "name": "Can change course email", "content_type": 68}, "model": "auth.permission", "pk": 203}, {"fields": {"codename": "delete_courseemail", "name": "Can delete course email", "content_type": 68}, "model": "auth.permission", "pk": 204}, {"fields": {"codename": "add_optout", "name": "Can add optout", "content_type": 69}, "model": "auth.permission", "pk": 205}, {"fields": {"codename": "change_optout", "name": "Can change optout", "content_type": 69}, "model": "auth.permission", "pk": 206}, {"fields": {"codename": "delete_optout", "name": "Can delete optout", "content_type": 69}, "model": "auth.permission", "pk": 207}, {"fields": {"codename": "add_courseemailtemplate", "name": "Can add course email template", "content_type": 70}, "model": "auth.permission", "pk": 208}, {"fields": {"codename": "change_courseemailtemplate", "name": "Can change course email template", "content_type": 70}, "model": "auth.permission", "pk": 209}, {"fields": {"codename": "delete_courseemailtemplate", "name": "Can delete course email template", "content_type": 70}, "model": "auth.permission", "pk": 210}, {"fields": {"codename": "add_courseauthorization", "name": "Can add course authorization", "content_type": 71}, "model": "auth.permission", "pk": 211}, {"fields": {"codename": "change_courseauthorization", "name": "Can change course authorization", "content_type": 71}, "model": "auth.permission", "pk": 212}, {"fields": {"codename": "delete_courseauthorization", "name": "Can delete course authorization", "content_type": 71}, "model": "auth.permission", "pk": 213}, {"fields": {"codename": "add_brandinginfoconfig", "name": "Can add branding info config", "content_type": 72}, "model": "auth.permission", "pk": 214}, {"fields": {"codename": "change_brandinginfoconfig", "name": "Can change branding info config", "content_type": 72}, "model": "auth.permission", "pk": 215}, {"fields": {"codename": "delete_brandinginfoconfig", "name": "Can delete branding info config", "content_type": 72}, "model": "auth.permission", "pk": 216}, {"fields": {"codename": "add_brandingapiconfig", "name": "Can add branding api config", "content_type": 73}, "model": "auth.permission", "pk": 217}, {"fields": {"codename": "change_brandingapiconfig", "name": "Can change branding api config", "content_type": 73}, "model": "auth.permission", "pk": 218}, {"fields": {"codename": "delete_brandingapiconfig", "name": "Can delete branding api config", "content_type": 73}, "model": "auth.permission", "pk": 219}, {"fields": {"codename": "add_externalauthmap", "name": "Can add external auth map", "content_type": 74}, "model": "auth.permission", "pk": 220}, {"fields": {"codename": "change_externalauthmap", "name": "Can change external auth map", "content_type": 74}, "model": "auth.permission", "pk": 221}, {"fields": {"codename": "delete_externalauthmap", "name": "Can delete external auth map", "content_type": 74}, "model": "auth.permission", "pk": 222}, {"fields": {"codename": "add_nonce", "name": "Can add nonce", "content_type": 75}, "model": "auth.permission", "pk": 223}, {"fields": {"codename": "change_nonce", "name": "Can change nonce", "content_type": 75}, "model": "auth.permission", "pk": 224}, {"fields": {"codename": "delete_nonce", "name": "Can delete nonce", "content_type": 75}, "model": "auth.permission", "pk": 225}, {"fields": {"codename": "add_association", "name": "Can add association", "content_type": 76}, "model": "auth.permission", "pk": 226}, {"fields": {"codename": "change_association", "name": "Can change association", "content_type": 76}, "model": "auth.permission", "pk": 227}, {"fields": {"codename": "delete_association", "name": "Can delete association", "content_type": 76}, "model": "auth.permission", "pk": 228}, {"fields": {"codename": "add_useropenid", "name": "Can add user open id", "content_type": 77}, "model": "auth.permission", "pk": 229}, {"fields": {"codename": "change_useropenid", "name": "Can change user open id", "content_type": 77}, "model": "auth.permission", "pk": 230}, {"fields": {"codename": "delete_useropenid", "name": "Can delete user open id", "content_type": 77}, "model": "auth.permission", "pk": 231}, {"fields": {"codename": "account_verified", "name": "The OpenID has been verified", "content_type": 77}, "model": "auth.permission", "pk": 232}, {"fields": {"codename": "add_client", "name": "Can add client", "content_type": 78}, "model": "auth.permission", "pk": 233}, {"fields": {"codename": "change_client", "name": "Can change client", "content_type": 78}, "model": "auth.permission", "pk": 234}, {"fields": {"codename": "delete_client", "name": "Can delete client", "content_type": 78}, "model": "auth.permission", "pk": 235}, {"fields": {"codename": "add_grant", "name": "Can add grant", "content_type": 79}, "model": "auth.permission", "pk": 236}, {"fields": {"codename": "change_grant", "name": "Can change grant", "content_type": 79}, "model": "auth.permission", "pk": 237}, {"fields": {"codename": "delete_grant", "name": "Can delete grant", "content_type": 79}, "model": "auth.permission", "pk": 238}, {"fields": {"codename": "add_accesstoken", "name": "Can add access token", "content_type": 80}, "model": "auth.permission", "pk": 239}, {"fields": {"codename": "change_accesstoken", "name": "Can change access token", "content_type": 80}, "model": "auth.permission", "pk": 240}, {"fields": {"codename": "delete_accesstoken", "name": "Can delete access token", "content_type": 80}, "model": "auth.permission", "pk": 241}, {"fields": {"codename": "add_refreshtoken", "name": "Can add refresh token", "content_type": 81}, "model": "auth.permission", "pk": 242}, {"fields": {"codename": "change_refreshtoken", "name": "Can change refresh token", "content_type": 81}, "model": "auth.permission", "pk": 243}, {"fields": {"codename": "delete_refreshtoken", "name": "Can delete refresh token", "content_type": 81}, "model": "auth.permission", "pk": 244}, {"fields": {"codename": "add_trustedclient", "name": "Can add trusted client", "content_type": 82}, "model": "auth.permission", "pk": 245}, {"fields": {"codename": "change_trustedclient", "name": "Can change trusted client", "content_type": 82}, "model": "auth.permission", "pk": 246}, {"fields": {"codename": "delete_trustedclient", "name": "Can delete trusted client", "content_type": 82}, "model": "auth.permission", "pk": 247}, {"fields": {"codename": "add_oauth2providerconfig", "name": "Can add Provider Configuration (OAuth)", "content_type": 83}, "model": "auth.permission", "pk": 248}, {"fields": {"codename": "change_oauth2providerconfig", "name": "Can change Provider Configuration (OAuth)", "content_type": 83}, "model": "auth.permission", "pk": 249}, {"fields": {"codename": "delete_oauth2providerconfig", "name": "Can delete Provider Configuration (OAuth)", "content_type": 83}, "model": "auth.permission", "pk": 250}, {"fields": {"codename": "add_samlproviderconfig", "name": "Can add Provider Configuration (SAML IdP)", "content_type": 84}, "model": "auth.permission", "pk": 251}, {"fields": {"codename": "change_samlproviderconfig", "name": "Can change Provider Configuration (SAML IdP)", "content_type": 84}, "model": "auth.permission", "pk": 252}, {"fields": {"codename": "delete_samlproviderconfig", "name": "Can delete Provider Configuration (SAML IdP)", "content_type": 84}, "model": "auth.permission", "pk": 253}, {"fields": {"codename": "add_samlconfiguration", "name": "Can add SAML Configuration", "content_type": 85}, "model": "auth.permission", "pk": 254}, {"fields": {"codename": "change_samlconfiguration", "name": "Can change SAML Configuration", "content_type": 85}, "model": "auth.permission", "pk": 255}, {"fields": {"codename": "delete_samlconfiguration", "name": "Can delete SAML Configuration", "content_type": 85}, "model": "auth.permission", "pk": 256}, {"fields": {"codename": "add_samlproviderdata", "name": "Can add SAML Provider Data", "content_type": 86}, "model": "auth.permission", "pk": 257}, {"fields": {"codename": "change_samlproviderdata", "name": "Can change SAML Provider Data", "content_type": 86}, "model": "auth.permission", "pk": 258}, {"fields": {"codename": "delete_samlproviderdata", "name": "Can delete SAML Provider Data", "content_type": 86}, "model": "auth.permission", "pk": 259}, {"fields": {"codename": "add_ltiproviderconfig", "name": "Can add Provider Configuration (LTI)", "content_type": 87}, "model": "auth.permission", "pk": 260}, {"fields": {"codename": "change_ltiproviderconfig", "name": "Can change Provider Configuration (LTI)", "content_type": 87}, "model": "auth.permission", "pk": 261}, {"fields": {"codename": "delete_ltiproviderconfig", "name": "Can delete Provider Configuration (LTI)", "content_type": 87}, "model": "auth.permission", "pk": 262}, {"fields": {"codename": "add_providerapipermissions", "name": "Can add Provider API Permission", "content_type": 88}, "model": "auth.permission", "pk": 263}, {"fields": {"codename": "change_providerapipermissions", "name": "Can change Provider API Permission", "content_type": 88}, "model": "auth.permission", "pk": 264}, {"fields": {"codename": "delete_providerapipermissions", "name": "Can delete Provider API Permission", "content_type": 88}, "model": "auth.permission", "pk": 265}, {"fields": {"codename": "add_nonce", "name": "Can add nonce", "content_type": 89}, "model": "auth.permission", "pk": 266}, {"fields": {"codename": "change_nonce", "name": "Can change nonce", "content_type": 89}, "model": "auth.permission", "pk": 267}, {"fields": {"codename": "delete_nonce", "name": "Can delete nonce", "content_type": 89}, "model": "auth.permission", "pk": 268}, {"fields": {"codename": "add_scope", "name": "Can add scope", "content_type": 90}, "model": "auth.permission", "pk": 269}, {"fields": {"codename": "change_scope", "name": "Can change scope", "content_type": 90}, "model": "auth.permission", "pk": 270}, {"fields": {"codename": "delete_scope", "name": "Can delete scope", "content_type": 90}, "model": "auth.permission", "pk": 271}, {"fields": {"codename": "add_resource", "name": "Can add resource", "content_type": 90}, "model": "auth.permission", "pk": 272}, {"fields": {"codename": "change_resource", "name": "Can change resource", "content_type": 90}, "model": "auth.permission", "pk": 273}, {"fields": {"codename": "delete_resource", "name": "Can delete resource", "content_type": 90}, "model": "auth.permission", "pk": 274}, {"fields": {"codename": "add_consumer", "name": "Can add consumer", "content_type": 91}, "model": "auth.permission", "pk": 275}, {"fields": {"codename": "change_consumer", "name": "Can change consumer", "content_type": 91}, "model": "auth.permission", "pk": 276}, {"fields": {"codename": "delete_consumer", "name": "Can delete consumer", "content_type": 91}, "model": "auth.permission", "pk": 277}, {"fields": {"codename": "add_token", "name": "Can add token", "content_type": 92}, "model": "auth.permission", "pk": 278}, {"fields": {"codename": "change_token", "name": "Can change token", "content_type": 92}, "model": "auth.permission", "pk": 279}, {"fields": {"codename": "delete_token", "name": "Can delete token", "content_type": 92}, "model": "auth.permission", "pk": 280}, {"fields": {"codename": "add_article", "name": "Can add article", "content_type": 94}, "model": "auth.permission", "pk": 281}, {"fields": {"codename": "change_article", "name": "Can change article", "content_type": 94}, "model": "auth.permission", "pk": 282}, {"fields": {"codename": "delete_article", "name": "Can delete article", "content_type": 94}, "model": "auth.permission", "pk": 283}, {"fields": {"codename": "moderate", "name": "Can edit all articles and lock/unlock/restore", "content_type": 94}, "model": "auth.permission", "pk": 284}, {"fields": {"codename": "assign", "name": "Can change ownership of any article", "content_type": 94}, "model": "auth.permission", "pk": 285}, {"fields": {"codename": "grant", "name": "Can assign permissions to other users", "content_type": 94}, "model": "auth.permission", "pk": 286}, {"fields": {"codename": "add_articleforobject", "name": "Can add Article for object", "content_type": 95}, "model": "auth.permission", "pk": 287}, {"fields": {"codename": "change_articleforobject", "name": "Can change Article for object", "content_type": 95}, "model": "auth.permission", "pk": 288}, {"fields": {"codename": "delete_articleforobject", "name": "Can delete Article for object", "content_type": 95}, "model": "auth.permission", "pk": 289}, {"fields": {"codename": "add_articlerevision", "name": "Can add article revision", "content_type": 96}, "model": "auth.permission", "pk": 290}, {"fields": {"codename": "change_articlerevision", "name": "Can change article revision", "content_type": 96}, "model": "auth.permission", "pk": 291}, {"fields": {"codename": "delete_articlerevision", "name": "Can delete article revision", "content_type": 96}, "model": "auth.permission", "pk": 292}, {"fields": {"codename": "add_urlpath", "name": "Can add URL path", "content_type": 97}, "model": "auth.permission", "pk": 293}, {"fields": {"codename": "change_urlpath", "name": "Can change URL path", "content_type": 97}, "model": "auth.permission", "pk": 294}, {"fields": {"codename": "delete_urlpath", "name": "Can delete URL path", "content_type": 97}, "model": "auth.permission", "pk": 295}, {"fields": {"codename": "add_articleplugin", "name": "Can add article plugin", "content_type": 98}, "model": "auth.permission", "pk": 296}, {"fields": {"codename": "change_articleplugin", "name": "Can change article plugin", "content_type": 98}, "model": "auth.permission", "pk": 297}, {"fields": {"codename": "delete_articleplugin", "name": "Can delete article plugin", "content_type": 98}, "model": "auth.permission", "pk": 298}, {"fields": {"codename": "add_reusableplugin", "name": "Can add reusable plugin", "content_type": 99}, "model": "auth.permission", "pk": 299}, {"fields": {"codename": "change_reusableplugin", "name": "Can change reusable plugin", "content_type": 99}, "model": "auth.permission", "pk": 300}, {"fields": {"codename": "delete_reusableplugin", "name": "Can delete reusable plugin", "content_type": 99}, "model": "auth.permission", "pk": 301}, {"fields": {"codename": "add_simpleplugin", "name": "Can add simple plugin", "content_type": 100}, "model": "auth.permission", "pk": 302}, {"fields": {"codename": "change_simpleplugin", "name": "Can change simple plugin", "content_type": 100}, "model": "auth.permission", "pk": 303}, {"fields": {"codename": "delete_simpleplugin", "name": "Can delete simple plugin", "content_type": 100}, "model": "auth.permission", "pk": 304}, {"fields": {"codename": "add_revisionplugin", "name": "Can add revision plugin", "content_type": 101}, "model": "auth.permission", "pk": 305}, {"fields": {"codename": "change_revisionplugin", "name": "Can change revision plugin", "content_type": 101}, "model": "auth.permission", "pk": 306}, {"fields": {"codename": "delete_revisionplugin", "name": "Can delete revision plugin", "content_type": 101}, "model": "auth.permission", "pk": 307}, {"fields": {"codename": "add_revisionpluginrevision", "name": "Can add revision plugin revision", "content_type": 102}, "model": "auth.permission", "pk": 308}, {"fields": {"codename": "change_revisionpluginrevision", "name": "Can change revision plugin revision", "content_type": 102}, "model": "auth.permission", "pk": 309}, {"fields": {"codename": "delete_revisionpluginrevision", "name": "Can delete revision plugin revision", "content_type": 102}, "model": "auth.permission", "pk": 310}, {"fields": {"codename": "add_image", "name": "Can add image", "content_type": 103}, "model": "auth.permission", "pk": 311}, {"fields": {"codename": "change_image", "name": "Can change image", "content_type": 103}, "model": "auth.permission", "pk": 312}, {"fields": {"codename": "delete_image", "name": "Can delete image", "content_type": 103}, "model": "auth.permission", "pk": 313}, {"fields": {"codename": "add_imagerevision", "name": "Can add image revision", "content_type": 104}, "model": "auth.permission", "pk": 314}, {"fields": {"codename": "change_imagerevision", "name": "Can change image revision", "content_type": 104}, "model": "auth.permission", "pk": 315}, {"fields": {"codename": "delete_imagerevision", "name": "Can delete image revision", "content_type": 104}, "model": "auth.permission", "pk": 316}, {"fields": {"codename": "add_attachment", "name": "Can add attachment", "content_type": 105}, "model": "auth.permission", "pk": 317}, {"fields": {"codename": "change_attachment", "name": "Can change attachment", "content_type": 105}, "model": "auth.permission", "pk": 318}, {"fields": {"codename": "delete_attachment", "name": "Can delete attachment", "content_type": 105}, "model": "auth.permission", "pk": 319}, {"fields": {"codename": "add_attachmentrevision", "name": "Can add attachment revision", "content_type": 106}, "model": "auth.permission", "pk": 320}, {"fields": {"codename": "change_attachmentrevision", "name": "Can change attachment revision", "content_type": 106}, "model": "auth.permission", "pk": 321}, {"fields": {"codename": "delete_attachmentrevision", "name": "Can delete attachment revision", "content_type": 106}, "model": "auth.permission", "pk": 322}, {"fields": {"codename": "add_notificationtype", "name": "Can add type", "content_type": 107}, "model": "auth.permission", "pk": 323}, {"fields": {"codename": "change_notificationtype", "name": "Can change type", "content_type": 107}, "model": "auth.permission", "pk": 324}, {"fields": {"codename": "delete_notificationtype", "name": "Can delete type", "content_type": 107}, "model": "auth.permission", "pk": 325}, {"fields": {"codename": "add_settings", "name": "Can add settings", "content_type": 108}, "model": "auth.permission", "pk": 326}, {"fields": {"codename": "change_settings", "name": "Can change settings", "content_type": 108}, "model": "auth.permission", "pk": 327}, {"fields": {"codename": "delete_settings", "name": "Can delete settings", "content_type": 108}, "model": "auth.permission", "pk": 328}, {"fields": {"codename": "add_subscription", "name": "Can add subscription", "content_type": 109}, "model": "auth.permission", "pk": 329}, {"fields": {"codename": "change_subscription", "name": "Can change subscription", "content_type": 109}, "model": "auth.permission", "pk": 330}, {"fields": {"codename": "delete_subscription", "name": "Can delete subscription", "content_type": 109}, "model": "auth.permission", "pk": 331}, {"fields": {"codename": "add_notification", "name": "Can add notification", "content_type": 110}, "model": "auth.permission", "pk": 332}, {"fields": {"codename": "change_notification", "name": "Can change notification", "content_type": 110}, "model": "auth.permission", "pk": 333}, {"fields": {"codename": "delete_notification", "name": "Can delete notification", "content_type": 110}, "model": "auth.permission", "pk": 334}, {"fields": {"codename": "add_score", "name": "Can add score", "content_type": 111}, "model": "auth.permission", "pk": 335}, {"fields": {"codename": "change_score", "name": "Can change score", "content_type": 111}, "model": "auth.permission", "pk": 336}, {"fields": {"codename": "delete_score", "name": "Can delete score", "content_type": 111}, "model": "auth.permission", "pk": 337}, {"fields": {"codename": "add_puzzlecomplete", "name": "Can add puzzle complete", "content_type": 112}, "model": "auth.permission", "pk": 338}, {"fields": {"codename": "change_puzzlecomplete", "name": "Can change puzzle complete", "content_type": 112}, "model": "auth.permission", "pk": 339}, {"fields": {"codename": "delete_puzzlecomplete", "name": "Can delete puzzle complete", "content_type": 112}, "model": "auth.permission", "pk": 340}, {"fields": {"codename": "add_logentry", "name": "Can add log entry", "content_type": 113}, "model": "auth.permission", "pk": 341}, {"fields": {"codename": "change_logentry", "name": "Can change log entry", "content_type": 113}, "model": "auth.permission", "pk": 342}, {"fields": {"codename": "delete_logentry", "name": "Can delete log entry", "content_type": 113}, "model": "auth.permission", "pk": 343}, {"fields": {"codename": "add_role", "name": "Can add role", "content_type": 114}, "model": "auth.permission", "pk": 344}, {"fields": {"codename": "change_role", "name": "Can change role", "content_type": 114}, "model": "auth.permission", "pk": 345}, {"fields": {"codename": "delete_role", "name": "Can delete role", "content_type": 114}, "model": "auth.permission", "pk": 346}, {"fields": {"codename": "add_permission", "name": "Can add permission", "content_type": 115}, "model": "auth.permission", "pk": 347}, {"fields": {"codename": "change_permission", "name": "Can change permission", "content_type": 115}, "model": "auth.permission", "pk": 348}, {"fields": {"codename": "delete_permission", "name": "Can delete permission", "content_type": 115}, "model": "auth.permission", "pk": 349}, {"fields": {"codename": "add_note", "name": "Can add note", "content_type": 116}, "model": "auth.permission", "pk": 350}, {"fields": {"codename": "change_note", "name": "Can change note", "content_type": 116}, "model": "auth.permission", "pk": 351}, {"fields": {"codename": "delete_note", "name": "Can delete note", "content_type": 116}, "model": "auth.permission", "pk": 352}, {"fields": {"codename": "add_splashconfig", "name": "Can add splash config", "content_type": 117}, "model": "auth.permission", "pk": 353}, {"fields": {"codename": "change_splashconfig", "name": "Can change splash config", "content_type": 117}, "model": "auth.permission", "pk": 354}, {"fields": {"codename": "delete_splashconfig", "name": "Can delete splash config", "content_type": 117}, "model": "auth.permission", "pk": 355}, {"fields": {"codename": "add_userpreference", "name": "Can add user preference", "content_type": 118}, "model": "auth.permission", "pk": 356}, {"fields": {"codename": "change_userpreference", "name": "Can change user preference", "content_type": 118}, "model": "auth.permission", "pk": 357}, {"fields": {"codename": "delete_userpreference", "name": "Can delete user preference", "content_type": 118}, "model": "auth.permission", "pk": 358}, {"fields": {"codename": "add_usercoursetag", "name": "Can add user course tag", "content_type": 119}, "model": "auth.permission", "pk": 359}, {"fields": {"codename": "change_usercoursetag", "name": "Can change user course tag", "content_type": 119}, "model": "auth.permission", "pk": 360}, {"fields": {"codename": "delete_usercoursetag", "name": "Can delete user course tag", "content_type": 119}, "model": "auth.permission", "pk": 361}, {"fields": {"codename": "add_userorgtag", "name": "Can add user org tag", "content_type": 120}, "model": "auth.permission", "pk": 362}, {"fields": {"codename": "change_userorgtag", "name": "Can change user org tag", "content_type": 120}, "model": "auth.permission", "pk": 363}, {"fields": {"codename": "delete_userorgtag", "name": "Can delete user org tag", "content_type": 120}, "model": "auth.permission", "pk": 364}, {"fields": {"codename": "add_order", "name": "Can add order", "content_type": 121}, "model": "auth.permission", "pk": 365}, {"fields": {"codename": "change_order", "name": "Can change order", "content_type": 121}, "model": "auth.permission", "pk": 366}, {"fields": {"codename": "delete_order", "name": "Can delete order", "content_type": 121}, "model": "auth.permission", "pk": 367}, {"fields": {"codename": "add_orderitem", "name": "Can add order item", "content_type": 122}, "model": "auth.permission", "pk": 368}, {"fields": {"codename": "change_orderitem", "name": "Can change order item", "content_type": 122}, "model": "auth.permission", "pk": 369}, {"fields": {"codename": "delete_orderitem", "name": "Can delete order item", "content_type": 122}, "model": "auth.permission", "pk": 370}, {"fields": {"codename": "add_invoice", "name": "Can add invoice", "content_type": 123}, "model": "auth.permission", "pk": 371}, {"fields": {"codename": "change_invoice", "name": "Can change invoice", "content_type": 123}, "model": "auth.permission", "pk": 372}, {"fields": {"codename": "delete_invoice", "name": "Can delete invoice", "content_type": 123}, "model": "auth.permission", "pk": 373}, {"fields": {"codename": "add_invoicetransaction", "name": "Can add invoice transaction", "content_type": 124}, "model": "auth.permission", "pk": 374}, {"fields": {"codename": "change_invoicetransaction", "name": "Can change invoice transaction", "content_type": 124}, "model": "auth.permission", "pk": 375}, {"fields": {"codename": "delete_invoicetransaction", "name": "Can delete invoice transaction", "content_type": 124}, "model": "auth.permission", "pk": 376}, {"fields": {"codename": "add_invoiceitem", "name": "Can add invoice item", "content_type": 125}, "model": "auth.permission", "pk": 377}, {"fields": {"codename": "change_invoiceitem", "name": "Can change invoice item", "content_type": 125}, "model": "auth.permission", "pk": 378}, {"fields": {"codename": "delete_invoiceitem", "name": "Can delete invoice item", "content_type": 125}, "model": "auth.permission", "pk": 379}, {"fields": {"codename": "add_courseregistrationcodeinvoiceitem", "name": "Can add course registration code invoice item", "content_type": 126}, "model": "auth.permission", "pk": 380}, {"fields": {"codename": "change_courseregistrationcodeinvoiceitem", "name": "Can change course registration code invoice item", "content_type": 126}, "model": "auth.permission", "pk": 381}, {"fields": {"codename": "delete_courseregistrationcodeinvoiceitem", "name": "Can delete course registration code invoice item", "content_type": 126}, "model": "auth.permission", "pk": 382}, {"fields": {"codename": "add_invoicehistory", "name": "Can add invoice history", "content_type": 127}, "model": "auth.permission", "pk": 383}, {"fields": {"codename": "change_invoicehistory", "name": "Can change invoice history", "content_type": 127}, "model": "auth.permission", "pk": 384}, {"fields": {"codename": "delete_invoicehistory", "name": "Can delete invoice history", "content_type": 127}, "model": "auth.permission", "pk": 385}, {"fields": {"codename": "add_courseregistrationcode", "name": "Can add course registration code", "content_type": 128}, "model": "auth.permission", "pk": 386}, {"fields": {"codename": "change_courseregistrationcode", "name": "Can change course registration code", "content_type": 128}, "model": "auth.permission", "pk": 387}, {"fields": {"codename": "delete_courseregistrationcode", "name": "Can delete course registration code", "content_type": 128}, "model": "auth.permission", "pk": 388}, {"fields": {"codename": "add_registrationcoderedemption", "name": "Can add registration code redemption", "content_type": 129}, "model": "auth.permission", "pk": 389}, {"fields": {"codename": "change_registrationcoderedemption", "name": "Can change registration code redemption", "content_type": 129}, "model": "auth.permission", "pk": 390}, {"fields": {"codename": "delete_registrationcoderedemption", "name": "Can delete registration code redemption", "content_type": 129}, "model": "auth.permission", "pk": 391}, {"fields": {"codename": "add_coupon", "name": "Can add coupon", "content_type": 130}, "model": "auth.permission", "pk": 392}, {"fields": {"codename": "change_coupon", "name": "Can change coupon", "content_type": 130}, "model": "auth.permission", "pk": 393}, {"fields": {"codename": "delete_coupon", "name": "Can delete coupon", "content_type": 130}, "model": "auth.permission", "pk": 394}, {"fields": {"codename": "add_couponredemption", "name": "Can add coupon redemption", "content_type": 131}, "model": "auth.permission", "pk": 395}, {"fields": {"codename": "change_couponredemption", "name": "Can change coupon redemption", "content_type": 131}, "model": "auth.permission", "pk": 396}, {"fields": {"codename": "delete_couponredemption", "name": "Can delete coupon redemption", "content_type": 131}, "model": "auth.permission", "pk": 397}, {"fields": {"codename": "add_paidcourseregistration", "name": "Can add paid course registration", "content_type": 132}, "model": "auth.permission", "pk": 398}, {"fields": {"codename": "change_paidcourseregistration", "name": "Can change paid course registration", "content_type": 132}, "model": "auth.permission", "pk": 399}, {"fields": {"codename": "delete_paidcourseregistration", "name": "Can delete paid course registration", "content_type": 132}, "model": "auth.permission", "pk": 400}, {"fields": {"codename": "add_courseregcodeitem", "name": "Can add course reg code item", "content_type": 133}, "model": "auth.permission", "pk": 401}, {"fields": {"codename": "change_courseregcodeitem", "name": "Can change course reg code item", "content_type": 133}, "model": "auth.permission", "pk": 402}, {"fields": {"codename": "delete_courseregcodeitem", "name": "Can delete course reg code item", "content_type": 133}, "model": "auth.permission", "pk": 403}, {"fields": {"codename": "add_courseregcodeitemannotation", "name": "Can add course reg code item annotation", "content_type": 134}, "model": "auth.permission", "pk": 404}, {"fields": {"codename": "change_courseregcodeitemannotation", "name": "Can change course reg code item annotation", "content_type": 134}, "model": "auth.permission", "pk": 405}, {"fields": {"codename": "delete_courseregcodeitemannotation", "name": "Can delete course reg code item annotation", "content_type": 134}, "model": "auth.permission", "pk": 406}, {"fields": {"codename": "add_paidcourseregistrationannotation", "name": "Can add paid course registration annotation", "content_type": 135}, "model": "auth.permission", "pk": 407}, {"fields": {"codename": "change_paidcourseregistrationannotation", "name": "Can change paid course registration annotation", "content_type": 135}, "model": "auth.permission", "pk": 408}, {"fields": {"codename": "delete_paidcourseregistrationannotation", "name": "Can delete paid course registration annotation", "content_type": 135}, "model": "auth.permission", "pk": 409}, {"fields": {"codename": "add_certificateitem", "name": "Can add certificate item", "content_type": 136}, "model": "auth.permission", "pk": 410}, {"fields": {"codename": "change_certificateitem", "name": "Can change certificate item", "content_type": 136}, "model": "auth.permission", "pk": 411}, {"fields": {"codename": "delete_certificateitem", "name": "Can delete certificate item", "content_type": 136}, "model": "auth.permission", "pk": 412}, {"fields": {"codename": "add_donationconfiguration", "name": "Can add donation configuration", "content_type": 137}, "model": "auth.permission", "pk": 413}, {"fields": {"codename": "change_donationconfiguration", "name": "Can change donation configuration", "content_type": 137}, "model": "auth.permission", "pk": 414}, {"fields": {"codename": "delete_donationconfiguration", "name": "Can delete donation configuration", "content_type": 137}, "model": "auth.permission", "pk": 415}, {"fields": {"codename": "add_donation", "name": "Can add donation", "content_type": 138}, "model": "auth.permission", "pk": 416}, {"fields": {"codename": "change_donation", "name": "Can change donation", "content_type": 138}, "model": "auth.permission", "pk": 417}, {"fields": {"codename": "delete_donation", "name": "Can delete donation", "content_type": 138}, "model": "auth.permission", "pk": 418}, {"fields": {"codename": "add_coursemode", "name": "Can add course mode", "content_type": 139}, "model": "auth.permission", "pk": 419}, {"fields": {"codename": "change_coursemode", "name": "Can change course mode", "content_type": 139}, "model": "auth.permission", "pk": 420}, {"fields": {"codename": "delete_coursemode", "name": "Can delete course mode", "content_type": 139}, "model": "auth.permission", "pk": 421}, {"fields": {"codename": "add_coursemodesarchive", "name": "Can add course modes archive", "content_type": 140}, "model": "auth.permission", "pk": 422}, {"fields": {"codename": "change_coursemodesarchive", "name": "Can change course modes archive", "content_type": 140}, "model": "auth.permission", "pk": 423}, {"fields": {"codename": "delete_coursemodesarchive", "name": "Can delete course modes archive", "content_type": 140}, "model": "auth.permission", "pk": 424}, {"fields": {"codename": "add_softwaresecurephotoverification", "name": "Can add software secure photo verification", "content_type": 141}, "model": "auth.permission", "pk": 425}, {"fields": {"codename": "change_softwaresecurephotoverification", "name": "Can change software secure photo verification", "content_type": 141}, "model": "auth.permission", "pk": 426}, {"fields": {"codename": "delete_softwaresecurephotoverification", "name": "Can delete software secure photo verification", "content_type": 141}, "model": "auth.permission", "pk": 427}, {"fields": {"codename": "add_historicalverificationdeadline", "name": "Can add historical verification deadline", "content_type": 142}, "model": "auth.permission", "pk": 428}, {"fields": {"codename": "change_historicalverificationdeadline", "name": "Can change historical verification deadline", "content_type": 142}, "model": "auth.permission", "pk": 429}, {"fields": {"codename": "delete_historicalverificationdeadline", "name": "Can delete historical verification deadline", "content_type": 142}, "model": "auth.permission", "pk": 430}, {"fields": {"codename": "add_verificationdeadline", "name": "Can add verification deadline", "content_type": 143}, "model": "auth.permission", "pk": 431}, {"fields": {"codename": "change_verificationdeadline", "name": "Can change verification deadline", "content_type": 143}, "model": "auth.permission", "pk": 432}, {"fields": {"codename": "delete_verificationdeadline", "name": "Can delete verification deadline", "content_type": 143}, "model": "auth.permission", "pk": 433}, {"fields": {"codename": "add_verificationcheckpoint", "name": "Can add verification checkpoint", "content_type": 144}, "model": "auth.permission", "pk": 434}, {"fields": {"codename": "change_verificationcheckpoint", "name": "Can change verification checkpoint", "content_type": 144}, "model": "auth.permission", "pk": 435}, {"fields": {"codename": "delete_verificationcheckpoint", "name": "Can delete verification checkpoint", "content_type": 144}, "model": "auth.permission", "pk": 436}, {"fields": {"codename": "add_verificationstatus", "name": "Can add Verification Status", "content_type": 145}, "model": "auth.permission", "pk": 437}, {"fields": {"codename": "change_verificationstatus", "name": "Can change Verification Status", "content_type": 145}, "model": "auth.permission", "pk": 438}, {"fields": {"codename": "delete_verificationstatus", "name": "Can delete Verification Status", "content_type": 145}, "model": "auth.permission", "pk": 439}, {"fields": {"codename": "add_incoursereverificationconfiguration", "name": "Can add in course reverification configuration", "content_type": 146}, "model": "auth.permission", "pk": 440}, {"fields": {"codename": "change_incoursereverificationconfiguration", "name": "Can change in course reverification configuration", "content_type": 146}, "model": "auth.permission", "pk": 441}, {"fields": {"codename": "delete_incoursereverificationconfiguration", "name": "Can delete in course reverification configuration", "content_type": 146}, "model": "auth.permission", "pk": 442}, {"fields": {"codename": "add_icrvstatusemailsconfiguration", "name": "Can add icrv status emails configuration", "content_type": 147}, "model": "auth.permission", "pk": 443}, {"fields": {"codename": "change_icrvstatusemailsconfiguration", "name": "Can change icrv status emails configuration", "content_type": 147}, "model": "auth.permission", "pk": 444}, {"fields": {"codename": "delete_icrvstatusemailsconfiguration", "name": "Can delete icrv status emails configuration", "content_type": 147}, "model": "auth.permission", "pk": 445}, {"fields": {"codename": "add_skippedreverification", "name": "Can add skipped reverification", "content_type": 148}, "model": "auth.permission", "pk": 446}, {"fields": {"codename": "change_skippedreverification", "name": "Can change skipped reverification", "content_type": 148}, "model": "auth.permission", "pk": 447}, {"fields": {"codename": "delete_skippedreverification", "name": "Can delete skipped reverification", "content_type": 148}, "model": "auth.permission", "pk": 448}, {"fields": {"codename": "add_darklangconfig", "name": "Can add dark lang config", "content_type": 149}, "model": "auth.permission", "pk": 449}, {"fields": {"codename": "change_darklangconfig", "name": "Can change dark lang config", "content_type": 149}, "model": "auth.permission", "pk": 450}, {"fields": {"codename": "delete_darklangconfig", "name": "Can delete dark lang config", "content_type": 149}, "model": "auth.permission", "pk": 451}, {"fields": {"codename": "add_embargoedcourse", "name": "Can add embargoed course", "content_type": 150}, "model": "auth.permission", "pk": 452}, {"fields": {"codename": "change_embargoedcourse", "name": "Can change embargoed course", "content_type": 150}, "model": "auth.permission", "pk": 453}, {"fields": {"codename": "delete_embargoedcourse", "name": "Can delete embargoed course", "content_type": 150}, "model": "auth.permission", "pk": 454}, {"fields": {"codename": "add_embargoedstate", "name": "Can add embargoed state", "content_type": 151}, "model": "auth.permission", "pk": 455}, {"fields": {"codename": "change_embargoedstate", "name": "Can change embargoed state", "content_type": 151}, "model": "auth.permission", "pk": 456}, {"fields": {"codename": "delete_embargoedstate", "name": "Can delete embargoed state", "content_type": 151}, "model": "auth.permission", "pk": 457}, {"fields": {"codename": "add_restrictedcourse", "name": "Can add restricted course", "content_type": 152}, "model": "auth.permission", "pk": 458}, {"fields": {"codename": "change_restrictedcourse", "name": "Can change restricted course", "content_type": 152}, "model": "auth.permission", "pk": 459}, {"fields": {"codename": "delete_restrictedcourse", "name": "Can delete restricted course", "content_type": 152}, "model": "auth.permission", "pk": 460}, {"fields": {"codename": "add_country", "name": "Can add country", "content_type": 153}, "model": "auth.permission", "pk": 461}, {"fields": {"codename": "change_country", "name": "Can change country", "content_type": 153}, "model": "auth.permission", "pk": 462}, {"fields": {"codename": "delete_country", "name": "Can delete country", "content_type": 153}, "model": "auth.permission", "pk": 463}, {"fields": {"codename": "add_countryaccessrule", "name": "Can add country access rule", "content_type": 154}, "model": "auth.permission", "pk": 464}, {"fields": {"codename": "change_countryaccessrule", "name": "Can change country access rule", "content_type": 154}, "model": "auth.permission", "pk": 465}, {"fields": {"codename": "delete_countryaccessrule", "name": "Can delete country access rule", "content_type": 154}, "model": "auth.permission", "pk": 466}, {"fields": {"codename": "add_courseaccessrulehistory", "name": "Can add course access rule history", "content_type": 155}, "model": "auth.permission", "pk": 467}, {"fields": {"codename": "change_courseaccessrulehistory", "name": "Can change course access rule history", "content_type": 155}, "model": "auth.permission", "pk": 468}, {"fields": {"codename": "delete_courseaccessrulehistory", "name": "Can delete course access rule history", "content_type": 155}, "model": "auth.permission", "pk": 469}, {"fields": {"codename": "add_ipfilter", "name": "Can add ip filter", "content_type": 156}, "model": "auth.permission", "pk": 470}, {"fields": {"codename": "change_ipfilter", "name": "Can change ip filter", "content_type": 156}, "model": "auth.permission", "pk": 471}, {"fields": {"codename": "delete_ipfilter", "name": "Can delete ip filter", "content_type": 156}, "model": "auth.permission", "pk": 472}, {"fields": {"codename": "add_coursererunstate", "name": "Can add course rerun state", "content_type": 157}, "model": "auth.permission", "pk": 473}, {"fields": {"codename": "change_coursererunstate", "name": "Can change course rerun state", "content_type": 157}, "model": "auth.permission", "pk": 474}, {"fields": {"codename": "delete_coursererunstate", "name": "Can delete course rerun state", "content_type": 157}, "model": "auth.permission", "pk": 475}, {"fields": {"codename": "add_mobileapiconfig", "name": "Can add mobile api config", "content_type": 158}, "model": "auth.permission", "pk": 476}, {"fields": {"codename": "change_mobileapiconfig", "name": "Can change mobile api config", "content_type": 158}, "model": "auth.permission", "pk": 477}, {"fields": {"codename": "delete_mobileapiconfig", "name": "Can delete mobile api config", "content_type": 158}, "model": "auth.permission", "pk": 478}, {"fields": {"codename": "add_usersocialauth", "name": "Can add user social auth", "content_type": 159}, "model": "auth.permission", "pk": 479}, {"fields": {"codename": "change_usersocialauth", "name": "Can change user social auth", "content_type": 159}, "model": "auth.permission", "pk": 480}, {"fields": {"codename": "delete_usersocialauth", "name": "Can delete user social auth", "content_type": 159}, "model": "auth.permission", "pk": 481}, {"fields": {"codename": "add_nonce", "name": "Can add nonce", "content_type": 160}, "model": "auth.permission", "pk": 482}, {"fields": {"codename": "change_nonce", "name": "Can change nonce", "content_type": 160}, "model": "auth.permission", "pk": 483}, {"fields": {"codename": "delete_nonce", "name": "Can delete nonce", "content_type": 160}, "model": "auth.permission", "pk": 484}, {"fields": {"codename": "add_association", "name": "Can add association", "content_type": 161}, "model": "auth.permission", "pk": 485}, {"fields": {"codename": "change_association", "name": "Can change association", "content_type": 161}, "model": "auth.permission", "pk": 486}, {"fields": {"codename": "delete_association", "name": "Can delete association", "content_type": 161}, "model": "auth.permission", "pk": 487}, {"fields": {"codename": "add_code", "name": "Can add code", "content_type": 162}, "model": "auth.permission", "pk": 488}, {"fields": {"codename": "change_code", "name": "Can change code", "content_type": 162}, "model": "auth.permission", "pk": 489}, {"fields": {"codename": "delete_code", "name": "Can delete code", "content_type": 162}, "model": "auth.permission", "pk": 490}, {"fields": {"codename": "add_surveyform", "name": "Can add survey form", "content_type": 163}, "model": "auth.permission", "pk": 491}, {"fields": {"codename": "change_surveyform", "name": "Can change survey form", "content_type": 163}, "model": "auth.permission", "pk": 492}, {"fields": {"codename": "delete_surveyform", "name": "Can delete survey form", "content_type": 163}, "model": "auth.permission", "pk": 493}, {"fields": {"codename": "add_surveyanswer", "name": "Can add survey answer", "content_type": 164}, "model": "auth.permission", "pk": 494}, {"fields": {"codename": "change_surveyanswer", "name": "Can change survey answer", "content_type": 164}, "model": "auth.permission", "pk": 495}, {"fields": {"codename": "delete_surveyanswer", "name": "Can delete survey answer", "content_type": 164}, "model": "auth.permission", "pk": 496}, {"fields": {"codename": "add_xblockasidesconfig", "name": "Can add x block asides config", "content_type": 165}, "model": "auth.permission", "pk": 497}, {"fields": {"codename": "change_xblockasidesconfig", "name": "Can change x block asides config", "content_type": 165}, "model": "auth.permission", "pk": 498}, {"fields": {"codename": "delete_xblockasidesconfig", "name": "Can delete x block asides config", "content_type": 165}, "model": "auth.permission", "pk": 499}, {"fields": {"codename": "add_courseoverview", "name": "Can add course overview", "content_type": 166}, "model": "auth.permission", "pk": 500}, {"fields": {"codename": "change_courseoverview", "name": "Can change course overview", "content_type": 166}, "model": "auth.permission", "pk": 501}, {"fields": {"codename": "delete_courseoverview", "name": "Can delete course overview", "content_type": 166}, "model": "auth.permission", "pk": 502}, {"fields": {"codename": "add_courseoverviewtab", "name": "Can add course overview tab", "content_type": 167}, "model": "auth.permission", "pk": 503}, {"fields": {"codename": "change_courseoverviewtab", "name": "Can change course overview tab", "content_type": 167}, "model": "auth.permission", "pk": 504}, {"fields": {"codename": "delete_courseoverviewtab", "name": "Can delete course overview tab", "content_type": 167}, "model": "auth.permission", "pk": 505}, {"fields": {"codename": "add_coursestructure", "name": "Can add course structure", "content_type": 168}, "model": "auth.permission", "pk": 506}, {"fields": {"codename": "change_coursestructure", "name": "Can change course structure", "content_type": 168}, "model": "auth.permission", "pk": 507}, {"fields": {"codename": "delete_coursestructure", "name": "Can delete course structure", "content_type": 168}, "model": "auth.permission", "pk": 508}, {"fields": {"codename": "add_corsmodel", "name": "Can add cors model", "content_type": 169}, "model": "auth.permission", "pk": 509}, {"fields": {"codename": "change_corsmodel", "name": "Can change cors model", "content_type": 169}, "model": "auth.permission", "pk": 510}, {"fields": {"codename": "delete_corsmodel", "name": "Can delete cors model", "content_type": 169}, "model": "auth.permission", "pk": 511}, {"fields": {"codename": "add_xdomainproxyconfiguration", "name": "Can add x domain proxy configuration", "content_type": 170}, "model": "auth.permission", "pk": 512}, {"fields": {"codename": "change_xdomainproxyconfiguration", "name": "Can change x domain proxy configuration", "content_type": 170}, "model": "auth.permission", "pk": 513}, {"fields": {"codename": "delete_xdomainproxyconfiguration", "name": "Can delete x domain proxy configuration", "content_type": 170}, "model": "auth.permission", "pk": 514}, {"fields": {"codename": "add_creditprovider", "name": "Can add credit provider", "content_type": 171}, "model": "auth.permission", "pk": 515}, {"fields": {"codename": "change_creditprovider", "name": "Can change credit provider", "content_type": 171}, "model": "auth.permission", "pk": 516}, {"fields": {"codename": "delete_creditprovider", "name": "Can delete credit provider", "content_type": 171}, "model": "auth.permission", "pk": 517}, {"fields": {"codename": "add_creditcourse", "name": "Can add credit course", "content_type": 172}, "model": "auth.permission", "pk": 518}, {"fields": {"codename": "change_creditcourse", "name": "Can change credit course", "content_type": 172}, "model": "auth.permission", "pk": 519}, {"fields": {"codename": "delete_creditcourse", "name": "Can delete credit course", "content_type": 172}, "model": "auth.permission", "pk": 520}, {"fields": {"codename": "add_creditrequirement", "name": "Can add credit requirement", "content_type": 173}, "model": "auth.permission", "pk": 521}, {"fields": {"codename": "change_creditrequirement", "name": "Can change credit requirement", "content_type": 173}, "model": "auth.permission", "pk": 522}, {"fields": {"codename": "delete_creditrequirement", "name": "Can delete credit requirement", "content_type": 173}, "model": "auth.permission", "pk": 523}, {"fields": {"codename": "add_historicalcreditrequirementstatus", "name": "Can add historical credit requirement status", "content_type": 174}, "model": "auth.permission", "pk": 524}, {"fields": {"codename": "change_historicalcreditrequirementstatus", "name": "Can change historical credit requirement status", "content_type": 174}, "model": "auth.permission", "pk": 525}, {"fields": {"codename": "delete_historicalcreditrequirementstatus", "name": "Can delete historical credit requirement status", "content_type": 174}, "model": "auth.permission", "pk": 526}, {"fields": {"codename": "add_creditrequirementstatus", "name": "Can add credit requirement status", "content_type": 175}, "model": "auth.permission", "pk": 527}, {"fields": {"codename": "change_creditrequirementstatus", "name": "Can change credit requirement status", "content_type": 175}, "model": "auth.permission", "pk": 528}, {"fields": {"codename": "delete_creditrequirementstatus", "name": "Can delete credit requirement status", "content_type": 175}, "model": "auth.permission", "pk": 529}, {"fields": {"codename": "add_crediteligibility", "name": "Can add credit eligibility", "content_type": 176}, "model": "auth.permission", "pk": 530}, {"fields": {"codename": "change_crediteligibility", "name": "Can change credit eligibility", "content_type": 176}, "model": "auth.permission", "pk": 531}, {"fields": {"codename": "delete_crediteligibility", "name": "Can delete credit eligibility", "content_type": 176}, "model": "auth.permission", "pk": 532}, {"fields": {"codename": "add_historicalcreditrequest", "name": "Can add historical credit request", "content_type": 177}, "model": "auth.permission", "pk": 533}, {"fields": {"codename": "change_historicalcreditrequest", "name": "Can change historical credit request", "content_type": 177}, "model": "auth.permission", "pk": 534}, {"fields": {"codename": "delete_historicalcreditrequest", "name": "Can delete historical credit request", "content_type": 177}, "model": "auth.permission", "pk": 535}, {"fields": {"codename": "add_creditrequest", "name": "Can add credit request", "content_type": 178}, "model": "auth.permission", "pk": 536}, {"fields": {"codename": "change_creditrequest", "name": "Can change credit request", "content_type": 178}, "model": "auth.permission", "pk": 537}, {"fields": {"codename": "delete_creditrequest", "name": "Can delete credit request", "content_type": 178}, "model": "auth.permission", "pk": 538}, {"fields": {"codename": "add_courseteam", "name": "Can add course team", "content_type": 179}, "model": "auth.permission", "pk": 539}, {"fields": {"codename": "change_courseteam", "name": "Can change course team", "content_type": 179}, "model": "auth.permission", "pk": 540}, {"fields": {"codename": "delete_courseteam", "name": "Can delete course team", "content_type": 179}, "model": "auth.permission", "pk": 541}, {"fields": {"codename": "add_courseteammembership", "name": "Can add course team membership", "content_type": 180}, "model": "auth.permission", "pk": 542}, {"fields": {"codename": "change_courseteammembership", "name": "Can change course team membership", "content_type": 180}, "model": "auth.permission", "pk": 543}, {"fields": {"codename": "delete_courseteammembership", "name": "Can delete course team membership", "content_type": 180}, "model": "auth.permission", "pk": 544}, {"fields": {"codename": "add_xblockdisableconfig", "name": "Can add x block disable config", "content_type": 181}, "model": "auth.permission", "pk": 545}, {"fields": {"codename": "change_xblockdisableconfig", "name": "Can change x block disable config", "content_type": 181}, "model": "auth.permission", "pk": 546}, {"fields": {"codename": "delete_xblockdisableconfig", "name": "Can delete x block disable config", "content_type": 181}, "model": "auth.permission", "pk": 547}, {"fields": {"codename": "add_programsapiconfig", "name": "Can add programs api config", "content_type": 182}, "model": "auth.permission", "pk": 548}, {"fields": {"codename": "change_programsapiconfig", "name": "Can change programs api config", "content_type": 182}, "model": "auth.permission", "pk": 549}, {"fields": {"codename": "delete_programsapiconfig", "name": "Can delete programs api config", "content_type": 182}, "model": "auth.permission", "pk": 550}, {"fields": {"codename": "add_selfpacedconfiguration", "name": "Can add self paced configuration", "content_type": 183}, "model": "auth.permission", "pk": 551}, {"fields": {"codename": "change_selfpacedconfiguration", "name": "Can change self paced configuration", "content_type": 183}, "model": "auth.permission", "pk": 552}, {"fields": {"codename": "delete_selfpacedconfiguration", "name": "Can delete self paced configuration", "content_type": 183}, "model": "auth.permission", "pk": 553}, {"fields": {"codename": "add_kvstore", "name": "Can add kv store", "content_type": 184}, "model": "auth.permission", "pk": 554}, {"fields": {"codename": "change_kvstore", "name": "Can change kv store", "content_type": 184}, "model": "auth.permission", "pk": 555}, {"fields": {"codename": "delete_kvstore", "name": "Can delete kv store", "content_type": 184}, "model": "auth.permission", "pk": 556}, {"fields": {"codename": "add_studentitem", "name": "Can add student item", "content_type": 185}, "model": "auth.permission", "pk": 557}, {"fields": {"codename": "change_studentitem", "name": "Can change student item", "content_type": 185}, "model": "auth.permission", "pk": 558}, {"fields": {"codename": "delete_studentitem", "name": "Can delete student item", "content_type": 185}, "model": "auth.permission", "pk": 559}, {"fields": {"codename": "add_submission", "name": "Can add submission", "content_type": 186}, "model": "auth.permission", "pk": 560}, {"fields": {"codename": "change_submission", "name": "Can change submission", "content_type": 186}, "model": "auth.permission", "pk": 561}, {"fields": {"codename": "delete_submission", "name": "Can delete submission", "content_type": 186}, "model": "auth.permission", "pk": 562}, {"fields": {"codename": "add_score", "name": "Can add score", "content_type": 187}, "model": "auth.permission", "pk": 563}, {"fields": {"codename": "change_score", "name": "Can change score", "content_type": 187}, "model": "auth.permission", "pk": 564}, {"fields": {"codename": "delete_score", "name": "Can delete score", "content_type": 187}, "model": "auth.permission", "pk": 565}, {"fields": {"codename": "add_scoresummary", "name": "Can add score summary", "content_type": 188}, "model": "auth.permission", "pk": 566}, {"fields": {"codename": "change_scoresummary", "name": "Can change score summary", "content_type": 188}, "model": "auth.permission", "pk": 567}, {"fields": {"codename": "delete_scoresummary", "name": "Can delete score summary", "content_type": 188}, "model": "auth.permission", "pk": 568}, {"fields": {"codename": "add_rubric", "name": "Can add rubric", "content_type": 189}, "model": "auth.permission", "pk": 569}, {"fields": {"codename": "change_rubric", "name": "Can change rubric", "content_type": 189}, "model": "auth.permission", "pk": 570}, {"fields": {"codename": "delete_rubric", "name": "Can delete rubric", "content_type": 189}, "model": "auth.permission", "pk": 571}, {"fields": {"codename": "add_criterion", "name": "Can add criterion", "content_type": 190}, "model": "auth.permission", "pk": 572}, {"fields": {"codename": "change_criterion", "name": "Can change criterion", "content_type": 190}, "model": "auth.permission", "pk": 573}, {"fields": {"codename": "delete_criterion", "name": "Can delete criterion", "content_type": 190}, "model": "auth.permission", "pk": 574}, {"fields": {"codename": "add_criterionoption", "name": "Can add criterion option", "content_type": 191}, "model": "auth.permission", "pk": 575}, {"fields": {"codename": "change_criterionoption", "name": "Can change criterion option", "content_type": 191}, "model": "auth.permission", "pk": 576}, {"fields": {"codename": "delete_criterionoption", "name": "Can delete criterion option", "content_type": 191}, "model": "auth.permission", "pk": 577}, {"fields": {"codename": "add_assessment", "name": "Can add assessment", "content_type": 192}, "model": "auth.permission", "pk": 578}, {"fields": {"codename": "change_assessment", "name": "Can change assessment", "content_type": 192}, "model": "auth.permission", "pk": 579}, {"fields": {"codename": "delete_assessment", "name": "Can delete assessment", "content_type": 192}, "model": "auth.permission", "pk": 580}, {"fields": {"codename": "add_assessmentpart", "name": "Can add assessment part", "content_type": 193}, "model": "auth.permission", "pk": 581}, {"fields": {"codename": "change_assessmentpart", "name": "Can change assessment part", "content_type": 193}, "model": "auth.permission", "pk": 582}, {"fields": {"codename": "delete_assessmentpart", "name": "Can delete assessment part", "content_type": 193}, "model": "auth.permission", "pk": 583}, {"fields": {"codename": "add_assessmentfeedbackoption", "name": "Can add assessment feedback option", "content_type": 194}, "model": "auth.permission", "pk": 584}, {"fields": {"codename": "change_assessmentfeedbackoption", "name": "Can change assessment feedback option", "content_type": 194}, "model": "auth.permission", "pk": 585}, {"fields": {"codename": "delete_assessmentfeedbackoption", "name": "Can delete assessment feedback option", "content_type": 194}, "model": "auth.permission", "pk": 586}, {"fields": {"codename": "add_assessmentfeedback", "name": "Can add assessment feedback", "content_type": 195}, "model": "auth.permission", "pk": 587}, {"fields": {"codename": "change_assessmentfeedback", "name": "Can change assessment feedback", "content_type": 195}, "model": "auth.permission", "pk": 588}, {"fields": {"codename": "delete_assessmentfeedback", "name": "Can delete assessment feedback", "content_type": 195}, "model": "auth.permission", "pk": 589}, {"fields": {"codename": "add_peerworkflow", "name": "Can add peer workflow", "content_type": 196}, "model": "auth.permission", "pk": 590}, {"fields": {"codename": "change_peerworkflow", "name": "Can change peer workflow", "content_type": 196}, "model": "auth.permission", "pk": 591}, {"fields": {"codename": "delete_peerworkflow", "name": "Can delete peer workflow", "content_type": 196}, "model": "auth.permission", "pk": 592}, {"fields": {"codename": "add_peerworkflowitem", "name": "Can add peer workflow item", "content_type": 197}, "model": "auth.permission", "pk": 593}, {"fields": {"codename": "change_peerworkflowitem", "name": "Can change peer workflow item", "content_type": 197}, "model": "auth.permission", "pk": 594}, {"fields": {"codename": "delete_peerworkflowitem", "name": "Can delete peer workflow item", "content_type": 197}, "model": "auth.permission", "pk": 595}, {"fields": {"codename": "add_trainingexample", "name": "Can add training example", "content_type": 198}, "model": "auth.permission", "pk": 596}, {"fields": {"codename": "change_trainingexample", "name": "Can change training example", "content_type": 198}, "model": "auth.permission", "pk": 597}, {"fields": {"codename": "delete_trainingexample", "name": "Can delete training example", "content_type": 198}, "model": "auth.permission", "pk": 598}, {"fields": {"codename": "add_studenttrainingworkflow", "name": "Can add student training workflow", "content_type": 199}, "model": "auth.permission", "pk": 599}, {"fields": {"codename": "change_studenttrainingworkflow", "name": "Can change student training workflow", "content_type": 199}, "model": "auth.permission", "pk": 600}, {"fields": {"codename": "delete_studenttrainingworkflow", "name": "Can delete student training workflow", "content_type": 199}, "model": "auth.permission", "pk": 601}, {"fields": {"codename": "add_studenttrainingworkflowitem", "name": "Can add student training workflow item", "content_type": 200}, "model": "auth.permission", "pk": 602}, {"fields": {"codename": "change_studenttrainingworkflowitem", "name": "Can change student training workflow item", "content_type": 200}, "model": "auth.permission", "pk": 603}, {"fields": {"codename": "delete_studenttrainingworkflowitem", "name": "Can delete student training workflow item", "content_type": 200}, "model": "auth.permission", "pk": 604}, {"fields": {"codename": "add_aiclassifierset", "name": "Can add ai classifier set", "content_type": 201}, "model": "auth.permission", "pk": 605}, {"fields": {"codename": "change_aiclassifierset", "name": "Can change ai classifier set", "content_type": 201}, "model": "auth.permission", "pk": 606}, {"fields": {"codename": "delete_aiclassifierset", "name": "Can delete ai classifier set", "content_type": 201}, "model": "auth.permission", "pk": 607}, {"fields": {"codename": "add_aiclassifier", "name": "Can add ai classifier", "content_type": 202}, "model": "auth.permission", "pk": 608}, {"fields": {"codename": "change_aiclassifier", "name": "Can change ai classifier", "content_type": 202}, "model": "auth.permission", "pk": 609}, {"fields": {"codename": "delete_aiclassifier", "name": "Can delete ai classifier", "content_type": 202}, "model": "auth.permission", "pk": 610}, {"fields": {"codename": "add_aitrainingworkflow", "name": "Can add ai training workflow", "content_type": 203}, "model": "auth.permission", "pk": 611}, {"fields": {"codename": "change_aitrainingworkflow", "name": "Can change ai training workflow", "content_type": 203}, "model": "auth.permission", "pk": 612}, {"fields": {"codename": "delete_aitrainingworkflow", "name": "Can delete ai training workflow", "content_type": 203}, "model": "auth.permission", "pk": 613}, {"fields": {"codename": "add_aigradingworkflow", "name": "Can add ai grading workflow", "content_type": 204}, "model": "auth.permission", "pk": 614}, {"fields": {"codename": "change_aigradingworkflow", "name": "Can change ai grading workflow", "content_type": 204}, "model": "auth.permission", "pk": 615}, {"fields": {"codename": "delete_aigradingworkflow", "name": "Can delete ai grading workflow", "content_type": 204}, "model": "auth.permission", "pk": 616}, {"fields": {"codename": "add_assessmentworkflow", "name": "Can add assessment workflow", "content_type": 205}, "model": "auth.permission", "pk": 617}, {"fields": {"codename": "change_assessmentworkflow", "name": "Can change assessment workflow", "content_type": 205}, "model": "auth.permission", "pk": 618}, {"fields": {"codename": "delete_assessmentworkflow", "name": "Can delete assessment workflow", "content_type": 205}, "model": "auth.permission", "pk": 619}, {"fields": {"codename": "add_assessmentworkflowstep", "name": "Can add assessment workflow step", "content_type": 206}, "model": "auth.permission", "pk": 620}, {"fields": {"codename": "change_assessmentworkflowstep", "name": "Can change assessment workflow step", "content_type": 206}, "model": "auth.permission", "pk": 621}, {"fields": {"codename": "delete_assessmentworkflowstep", "name": "Can delete assessment workflow step", "content_type": 206}, "model": "auth.permission", "pk": 622}, {"fields": {"codename": "add_assessmentworkflowcancellation", "name": "Can add assessment workflow cancellation", "content_type": 207}, "model": "auth.permission", "pk": 623}, {"fields": {"codename": "change_assessmentworkflowcancellation", "name": "Can change assessment workflow cancellation", "content_type": 207}, "model": "auth.permission", "pk": 624}, {"fields": {"codename": "delete_assessmentworkflowcancellation", "name": "Can delete assessment workflow cancellation", "content_type": 207}, "model": "auth.permission", "pk": 625}, {"fields": {"codename": "add_profile", "name": "Can add profile", "content_type": 208}, "model": "auth.permission", "pk": 626}, {"fields": {"codename": "change_profile", "name": "Can change profile", "content_type": 208}, "model": "auth.permission", "pk": 627}, {"fields": {"codename": "delete_profile", "name": "Can delete profile", "content_type": 208}, "model": "auth.permission", "pk": 628}, {"fields": {"codename": "add_video", "name": "Can add video", "content_type": 209}, "model": "auth.permission", "pk": 629}, {"fields": {"codename": "change_video", "name": "Can change video", "content_type": 209}, "model": "auth.permission", "pk": 630}, {"fields": {"codename": "delete_video", "name": "Can delete video", "content_type": 209}, "model": "auth.permission", "pk": 631}, {"fields": {"codename": "add_coursevideo", "name": "Can add course video", "content_type": 210}, "model": "auth.permission", "pk": 632}, {"fields": {"codename": "change_coursevideo", "name": "Can change course video", "content_type": 210}, "model": "auth.permission", "pk": 633}, {"fields": {"codename": "delete_coursevideo", "name": "Can delete course video", "content_type": 210}, "model": "auth.permission", "pk": 634}, {"fields": {"codename": "add_encodedvideo", "name": "Can add encoded video", "content_type": 211}, "model": "auth.permission", "pk": 635}, {"fields": {"codename": "change_encodedvideo", "name": "Can change encoded video", "content_type": 211}, "model": "auth.permission", "pk": 636}, {"fields": {"codename": "delete_encodedvideo", "name": "Can delete encoded video", "content_type": 211}, "model": "auth.permission", "pk": 637}, {"fields": {"codename": "add_subtitle", "name": "Can add subtitle", "content_type": 212}, "model": "auth.permission", "pk": 638}, {"fields": {"codename": "change_subtitle", "name": "Can change subtitle", "content_type": 212}, "model": "auth.permission", "pk": 639}, {"fields": {"codename": "delete_subtitle", "name": "Can delete subtitle", "content_type": 212}, "model": "auth.permission", "pk": 640}, {"fields": {"codename": "add_milestone", "name": "Can add milestone", "content_type": 213}, "model": "auth.permission", "pk": 641}, {"fields": {"codename": "change_milestone", "name": "Can change milestone", "content_type": 213}, "model": "auth.permission", "pk": 642}, {"fields": {"codename": "delete_milestone", "name": "Can delete milestone", "content_type": 213}, "model": "auth.permission", "pk": 643}, {"fields": {"codename": "add_milestonerelationshiptype", "name": "Can add milestone relationship type", "content_type": 214}, "model": "auth.permission", "pk": 644}, {"fields": {"codename": "change_milestonerelationshiptype", "name": "Can change milestone relationship type", "content_type": 214}, "model": "auth.permission", "pk": 645}, {"fields": {"codename": "delete_milestonerelationshiptype", "name": "Can delete milestone relationship type", "content_type": 214}, "model": "auth.permission", "pk": 646}, {"fields": {"codename": "add_coursemilestone", "name": "Can add course milestone", "content_type": 215}, "model": "auth.permission", "pk": 647}, {"fields": {"codename": "change_coursemilestone", "name": "Can change course milestone", "content_type": 215}, "model": "auth.permission", "pk": 648}, {"fields": {"codename": "delete_coursemilestone", "name": "Can delete course milestone", "content_type": 215}, "model": "auth.permission", "pk": 649}, {"fields": {"codename": "add_coursecontentmilestone", "name": "Can add course content milestone", "content_type": 216}, "model": "auth.permission", "pk": 650}, {"fields": {"codename": "change_coursecontentmilestone", "name": "Can change course content milestone", "content_type": 216}, "model": "auth.permission", "pk": 651}, {"fields": {"codename": "delete_coursecontentmilestone", "name": "Can delete course content milestone", "content_type": 216}, "model": "auth.permission", "pk": 652}, {"fields": {"codename": "add_usermilestone", "name": "Can add user milestone", "content_type": 217}, "model": "auth.permission", "pk": 653}, {"fields": {"codename": "change_usermilestone", "name": "Can change user milestone", "content_type": 217}, "model": "auth.permission", "pk": 654}, {"fields": {"codename": "delete_usermilestone", "name": "Can delete user milestone", "content_type": 217}, "model": "auth.permission", "pk": 655}, {"fields": {"codename": "add_proctoredexam", "name": "Can add proctored exam", "content_type": 218}, "model": "auth.permission", "pk": 656}, {"fields": {"codename": "change_proctoredexam", "name": "Can change proctored exam", "content_type": 218}, "model": "auth.permission", "pk": 657}, {"fields": {"codename": "delete_proctoredexam", "name": "Can delete proctored exam", "content_type": 218}, "model": "auth.permission", "pk": 658}, {"fields": {"codename": "add_proctoredexamreviewpolicy", "name": "Can add Proctored exam review policy", "content_type": 219}, "model": "auth.permission", "pk": 659}, {"fields": {"codename": "change_proctoredexamreviewpolicy", "name": "Can change Proctored exam review policy", "content_type": 219}, "model": "auth.permission", "pk": 660}, {"fields": {"codename": "delete_proctoredexamreviewpolicy", "name": "Can delete Proctored exam review policy", "content_type": 219}, "model": "auth.permission", "pk": 661}, {"fields": {"codename": "add_proctoredexamreviewpolicyhistory", "name": "Can add proctored exam review policy history", "content_type": 220}, "model": "auth.permission", "pk": 662}, {"fields": {"codename": "change_proctoredexamreviewpolicyhistory", "name": "Can change proctored exam review policy history", "content_type": 220}, "model": "auth.permission", "pk": 663}, {"fields": {"codename": "delete_proctoredexamreviewpolicyhistory", "name": "Can delete proctored exam review policy history", "content_type": 220}, "model": "auth.permission", "pk": 664}, {"fields": {"codename": "add_proctoredexamstudentattempt", "name": "Can add proctored exam attempt", "content_type": 221}, "model": "auth.permission", "pk": 665}, {"fields": {"codename": "change_proctoredexamstudentattempt", "name": "Can change proctored exam attempt", "content_type": 221}, "model": "auth.permission", "pk": 666}, {"fields": {"codename": "delete_proctoredexamstudentattempt", "name": "Can delete proctored exam attempt", "content_type": 221}, "model": "auth.permission", "pk": 667}, {"fields": {"codename": "add_proctoredexamstudentattempthistory", "name": "Can add proctored exam attempt history", "content_type": 222}, "model": "auth.permission", "pk": 668}, {"fields": {"codename": "change_proctoredexamstudentattempthistory", "name": "Can change proctored exam attempt history", "content_type": 222}, "model": "auth.permission", "pk": 669}, {"fields": {"codename": "delete_proctoredexamstudentattempthistory", "name": "Can delete proctored exam attempt history", "content_type": 222}, "model": "auth.permission", "pk": 670}, {"fields": {"codename": "add_proctoredexamstudentallowance", "name": "Can add proctored allowance", "content_type": 223}, "model": "auth.permission", "pk": 671}, {"fields": {"codename": "change_proctoredexamstudentallowance", "name": "Can change proctored allowance", "content_type": 223}, "model": "auth.permission", "pk": 672}, {"fields": {"codename": "delete_proctoredexamstudentallowance", "name": "Can delete proctored allowance", "content_type": 223}, "model": "auth.permission", "pk": 673}, {"fields": {"codename": "add_proctoredexamstudentallowancehistory", "name": "Can add proctored allowance history", "content_type": 224}, "model": "auth.permission", "pk": 674}, {"fields": {"codename": "change_proctoredexamstudentallowancehistory", "name": "Can change proctored allowance history", "content_type": 224}, "model": "auth.permission", "pk": 675}, {"fields": {"codename": "delete_proctoredexamstudentallowancehistory", "name": "Can delete proctored allowance history", "content_type": 224}, "model": "auth.permission", "pk": 676}, {"fields": {"codename": "add_proctoredexamsoftwaresecurereview", "name": "Can add Proctored exam software secure review", "content_type": 225}, "model": "auth.permission", "pk": 677}, {"fields": {"codename": "change_proctoredexamsoftwaresecurereview", "name": "Can change Proctored exam software secure review", "content_type": 225}, "model": "auth.permission", "pk": 678}, {"fields": {"codename": "delete_proctoredexamsoftwaresecurereview", "name": "Can delete Proctored exam software secure review", "content_type": 225}, "model": "auth.permission", "pk": 679}, {"fields": {"codename": "add_proctoredexamsoftwaresecurereviewhistory", "name": "Can add Proctored exam review archive", "content_type": 226}, "model": "auth.permission", "pk": 680}, {"fields": {"codename": "change_proctoredexamsoftwaresecurereviewhistory", "name": "Can change Proctored exam review archive", "content_type": 226}, "model": "auth.permission", "pk": 681}, {"fields": {"codename": "delete_proctoredexamsoftwaresecurereviewhistory", "name": "Can delete Proctored exam review archive", "content_type": 226}, "model": "auth.permission", "pk": 682}, {"fields": {"codename": "add_proctoredexamsoftwaresecurecomment", "name": "Can add proctored exam software secure comment", "content_type": 227}, "model": "auth.permission", "pk": 683}, {"fields": {"codename": "change_proctoredexamsoftwaresecurecomment", "name": "Can change proctored exam software secure comment", "content_type": 227}, "model": "auth.permission", "pk": 684}, {"fields": {"codename": "delete_proctoredexamsoftwaresecurecomment", "name": "Can delete proctored exam software secure comment", "content_type": 227}, "model": "auth.permission", "pk": 685}, {"fields": {"codename": "add_organization", "name": "Can add organization", "content_type": 228}, "model": "auth.permission", "pk": 686}, {"fields": {"codename": "change_organization", "name": "Can change organization", "content_type": 228}, "model": "auth.permission", "pk": 687}, {"fields": {"codename": "delete_organization", "name": "Can delete organization", "content_type": 228}, "model": "auth.permission", "pk": 688}, {"fields": {"codename": "add_organizationcourse", "name": "Can add Link Course", "content_type": 229}, "model": "auth.permission", "pk": 689}, {"fields": {"codename": "change_organizationcourse", "name": "Can change Link Course", "content_type": 229}, "model": "auth.permission", "pk": 690}, {"fields": {"codename": "delete_organizationcourse", "name": "Can delete Link Course", "content_type": 229}, "model": "auth.permission", "pk": 691}, {"fields": {"codename": "add_videouploadconfig", "name": "Can add video upload config", "content_type": 230}, "model": "auth.permission", "pk": 692}, {"fields": {"codename": "change_videouploadconfig", "name": "Can change video upload config", "content_type": 230}, "model": "auth.permission", "pk": 693}, {"fields": {"codename": "delete_videouploadconfig", "name": "Can delete video upload config", "content_type": 230}, "model": "auth.permission", "pk": 694}, {"fields": {"codename": "add_pushnotificationconfig", "name": "Can add push notification config", "content_type": 231}, "model": "auth.permission", "pk": 695}, {"fields": {"codename": "change_pushnotificationconfig", "name": "Can change push notification config", "content_type": 231}, "model": "auth.permission", "pk": 696}, {"fields": {"codename": "delete_pushnotificationconfig", "name": "Can delete push notification config", "content_type": 231}, "model": "auth.permission", "pk": 697}, {"fields": {"codename": "add_coursecreator", "name": "Can add course creator", "content_type": 232}, "model": "auth.permission", "pk": 698}, {"fields": {"codename": "change_coursecreator", "name": "Can change course creator", "content_type": 232}, "model": "auth.permission", "pk": 699}, {"fields": {"codename": "delete_coursecreator", "name": "Can delete course creator", "content_type": 232}, "model": "auth.permission", "pk": 700}, {"fields": {"codename": "add_studioconfig", "name": "Can add studio config", "content_type": 233}, "model": "auth.permission", "pk": 701}, {"fields": {"codename": "change_studioconfig", "name": "Can change studio config", "content_type": 233}, "model": "auth.permission", "pk": 702}, {"fields": {"codename": "delete_studioconfig", "name": "Can delete studio config", "content_type": 233}, "model": "auth.permission", "pk": 703}, {"fields": {"username": "ecommerce_worker", "first_name": "", "last_name": "", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": null, "groups": [], "user_permissions": [], "password": "!0m5sUKBMVXqMUTBYafhaZdGTCm3zKrBFjYVvTTag", "email": "ecommerce_worker@fake.email", "date_joined": "2015-11-18T15:37:13.234Z"}, "model": "auth.user", "pk": 1}, {"fields": {"change_date": "2015-11-18T15:38:43.819Z", "changed_by": null, "enabled": true}, "model": "util.ratelimitconfiguration", "pk": 1}, {"fields": {"change_date": "2015-11-18T15:37:12.737Z", "changed_by": null, "configuration": "{\"default\": {\"accomplishment_class_append\": \"accomplishment-certificate\", \"platform_name\": \"Your Platform Name Here\", \"logo_src\": \"/static/certificates/images/logo.png\", \"logo_url\": \"http://www.example.com\", \"company_verified_certificate_url\": \"http://www.example.com/verified-certificate\", \"company_privacy_url\": \"http://www.example.com/privacy-policy\", \"company_tos_url\": \"http://www.example.com/terms-service\", \"company_about_url\": \"http://www.example.com/about-us\"}, \"verified\": {\"certificate_type\": \"Verified\", \"certificate_title\": \"Verified Certificate of Achievement\"}, \"honor\": {\"certificate_type\": \"Honor Code\", \"certificate_title\": \"Certificate of Achievement\"}}", "enabled": false}, "model": "certificates.certificatehtmlviewconfiguration", "pk": 1}, {"fields": {"change_date": "2015-11-18T15:37:21.957Z", "changed_by": null, "enabled": true, "released_languages": ""}, "model": "dark_lang.darklangconfig", "pk": 1}] \ No newline at end of file diff --git a/common/test/db_cache/bok_choy_migrations_data.sql b/common/test/db_cache/bok_choy_migrations_data.sql new file mode 100644 index 000000000000..12826204fcee --- /dev/null +++ b/common/test/db_cache/bok_choy_migrations_data.sql @@ -0,0 +1,37 @@ +-- MySQL dump 10.13 Distrib 5.6.24, for debian-linux-gnu (x86_64) +-- +-- Host: localhost Database: edxtest +-- ------------------------------------------------------ +-- Server version 5.6.24-2+deb.sury.org~precise+2 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Dumping data for table `django_migrations` +-- + +LOCK TABLES `django_migrations` WRITE; +/*!40000 ALTER TABLE `django_migrations` DISABLE KEYS */; +INSERT INTO `django_migrations` VALUES (1,'contenttypes','0001_initial','2015-11-18 15:37:03.679215'),(2,'auth','0001_initial','2015-11-18 15:37:04.239453'),(3,'admin','0001_initial','2015-11-18 15:37:04.375156'),(4,'assessment','0001_initial','2015-11-18 15:37:09.037208'),(5,'contenttypes','0002_remove_content_type_name','2015-11-18 15:37:09.345424'),(6,'auth','0002_alter_permission_name_max_length','2015-11-18 15:37:09.479742'),(7,'auth','0003_alter_user_email_max_length','2015-11-18 15:37:09.677049'),(8,'auth','0004_alter_user_username_opts','2015-11-18 15:37:09.805606'),(9,'auth','0005_alter_user_last_login_null','2015-11-18 15:37:09.949394'),(10,'auth','0006_require_contenttypes_0002','2015-11-18 15:37:09.978283'),(11,'branding','0001_initial','2015-11-18 15:37:10.295010'),(12,'bulk_email','0001_initial','2015-11-18 15:37:10.849873'),(13,'bulk_email','0002_data__load_course_email_template','2015-11-18 15:37:10.939652'),(14,'certificates','0001_initial','2015-11-18 15:37:12.698538'),(15,'certificates','0002_data__certificatehtmlviewconfiguration_data','2015-11-18 15:37:12.746221'),(16,'certificates','0003_data__default_modes','2015-11-18 15:37:13.182516'),(17,'commerce','0001_data__add_ecommerce_service_user','2015-11-18 15:37:13.269990'),(18,'cors_csrf','0001_initial','2015-11-18 15:37:13.459604'),(19,'course_action_state','0001_initial','2015-11-18 15:37:14.011267'),(20,'course_groups','0001_initial','2015-11-18 15:37:15.487063'),(21,'course_modes','0001_initial','2015-11-18 15:37:15.719347'),(22,'course_overviews','0001_initial','2015-11-18 15:37:15.932886'),(23,'course_structures','0001_initial','2015-11-18 15:37:16.000954'),(24,'courseware','0001_initial','2015-11-18 15:37:18.771429'),(25,'credit','0001_initial','2015-11-18 15:37:21.519361'),(26,'dark_lang','0001_initial','2015-11-18 15:37:21.846133'),(27,'dark_lang','0002_data__enable_on_install','2015-11-18 15:37:21.995633'),(28,'default','0001_initial','2015-11-18 15:37:23.147337'),(29,'default','0002_add_related_name','2015-11-18 15:37:23.421429'),(30,'default','0003_alter_email_max_length','2015-11-18 15:37:23.512312'),(31,'django_comment_common','0001_initial','2015-11-18 15:37:24.320730'),(32,'django_notify','0001_initial','2015-11-18 15:37:25.685195'),(33,'django_openid_auth','0001_initial','2015-11-18 15:37:26.276837'),(34,'edx_proctoring','0001_initial','2015-11-18 15:37:30.965630'),(35,'edxval','0001_initial','2015-11-18 15:37:32.899299'),(36,'edxval','0002_data__default_profiles','2015-11-18 15:37:32.962490'),(37,'embargo','0001_initial','2015-11-18 15:37:34.781531'),(38,'embargo','0002_data__add_countries','2015-11-18 15:37:36.006428'),(39,'external_auth','0001_initial','2015-11-18 15:37:36.857447'),(40,'foldit','0001_initial','2015-11-18 15:37:38.106002'),(41,'instructor_task','0001_initial','2015-11-18 15:37:38.670378'),(42,'licenses','0001_initial','2015-11-18 15:37:39.225872'),(43,'lms_xblock','0001_initial','2015-11-18 15:37:39.674372'),(44,'milestones','0001_initial','2015-11-18 15:37:41.240336'),(45,'milestones','0002_data__seed_relationship_types','2015-11-18 15:37:41.287383'),(46,'mobile_api','0001_initial','2015-11-18 15:37:41.822343'),(47,'notes','0001_initial','2015-11-18 15:37:42.381389'),(48,'oauth2','0001_initial','2015-11-18 15:37:45.638217'),(49,'oauth2_provider','0001_initial','2015-11-18 15:37:46.173938'),(50,'oauth_provider','0001_initial','2015-11-18 15:37:47.398936'),(51,'organizations','0001_initial','2015-11-18 15:37:47.863329'),(52,'programs','0001_initial','2015-11-18 15:37:48.427080'),(53,'psychometrics','0001_initial','2015-11-18 15:37:48.987109'),(54,'self_paced','0001_initial','2015-11-18 15:37:49.523078'),(55,'sessions','0001_initial','2015-11-18 15:37:49.646106'),(56,'student','0001_initial','2015-11-18 15:38:05.543390'),(57,'shoppingcart','0001_initial','2015-11-18 15:38:21.727512'),(58,'sites','0001_initial','2015-11-18 15:38:21.837391'),(59,'splash','0001_initial','2015-11-18 15:38:23.244678'),(60,'status','0001_initial','2015-11-18 15:38:24.981737'),(61,'submissions','0001_initial','2015-11-18 15:38:26.499689'),(62,'survey','0001_initial','2015-11-18 15:38:28.962457'),(63,'teams','0001_initial','2015-11-18 15:38:31.641489'),(64,'third_party_auth','0001_initial','2015-11-18 15:38:35.861826'),(65,'track','0001_initial','2015-11-18 15:38:35.952939'),(66,'user_api','0001_initial','2015-11-18 15:38:42.846323'),(67,'util','0001_initial','2015-11-18 15:38:43.780691'),(68,'util','0002_data__default_rate_limit_config','2015-11-18 15:38:43.844470'),(69,'verify_student','0001_initial','2015-11-18 15:39:02.098134'),(70,'wiki','0001_initial','2015-11-18 15:39:50.801336'),(71,'workflow','0001_initial','2015-11-18 15:39:51.336698'),(72,'xblock_django','0001_initial','2015-11-18 15:39:52.487567'),(73,'contentstore','0001_initial','2015-11-18 15:40:36.154872'),(74,'course_creators','0001_initial','2015-11-18 15:40:36.715711'),(75,'xblock_config','0001_initial','2015-11-18 15:40:38.167185'); +/*!40000 ALTER TABLE `django_migrations` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2015-11-18 15:40:53 diff --git a/common/test/db_cache/bok_choy_schema.sql b/common/test/db_cache/bok_choy_schema.sql new file mode 100644 index 000000000000..2c83c1836c9a --- /dev/null +++ b/common/test/db_cache/bok_choy_schema.sql @@ -0,0 +1,4147 @@ + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `assessment_aiclassifier`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_aiclassifier` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `classifier_data` varchar(100) NOT NULL, + `classifier_set_id` int(11) NOT NULL, + `criterion_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `assessment_aiclassifier_962f069f` (`classifier_set_id`), + KEY `assessment_aiclassifier_385b00a3` (`criterion_id`), + CONSTRAINT `D3bd45d5e3c9cfdc4f3b442119adebe8` FOREIGN KEY (`classifier_set_id`) REFERENCES `assessment_aiclassifierset` (`id`), + CONSTRAINT `assessm_criterion_id_275db29f2a0e1711_fk_assessment_criterion_id` FOREIGN KEY (`criterion_id`) REFERENCES `assessment_criterion` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_aiclassifierset`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_aiclassifierset` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created_at` datetime(6) NOT NULL, + `algorithm_id` varchar(128) NOT NULL, + `course_id` varchar(40) NOT NULL, + `item_id` varchar(128) NOT NULL, + `rubric_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `assessment_aiclassifierset_fde81f11` (`created_at`), + KEY `assessment_aiclassifierset_65143c91` (`algorithm_id`), + KEY `assessment_aiclassifierset_ea134da7` (`course_id`), + KEY `assessment_aiclassifierset_82bfda79` (`item_id`), + KEY `assessment_aiclassifierset_8980b7ae` (`rubric_id`), + CONSTRAINT `assessment_ai_rubric_id_45488be94ea0aea5_fk_assessment_rubric_id` FOREIGN KEY (`rubric_id`) REFERENCES `assessment_rubric` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_aigradingworkflow`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_aigradingworkflow` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `uuid` varchar(36) NOT NULL, + `course_id` varchar(40) NOT NULL, + `item_id` varchar(128) NOT NULL, + `scheduled_at` datetime(6) NOT NULL, + `completed_at` datetime(6) DEFAULT NULL, + `algorithm_id` varchar(128) NOT NULL, + `submission_uuid` varchar(128) NOT NULL, + `essay_text` longtext NOT NULL, + `student_id` varchar(40) NOT NULL, + `assessment_id` int(11) DEFAULT NULL, + `classifier_set_id` int(11) DEFAULT NULL, + `rubric_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uuid` (`uuid`), + KEY `assessment_aigradingworkflow_ea134da7` (`course_id`), + KEY `assessment_aigradingworkflow_82bfda79` (`item_id`), + KEY `assessment_aigradingworkflow_96e4551c` (`scheduled_at`), + KEY `assessment_aigradingworkflow_4430a679` (`completed_at`), + KEY `assessment_aigradingworkflow_65143c91` (`algorithm_id`), + KEY `assessment_aigradingworkflow_ab5b2b73` (`submission_uuid`), + KEY `assessment_aigradingworkflow_30a811f6` (`student_id`), + KEY `assessment_aigradingworkflow_a4079fcf` (`assessment_id`), + KEY `assessment_aigradingworkflow_962f069f` (`classifier_set_id`), + KEY `assessment_aigradingworkflow_8980b7ae` (`rubric_id`), + CONSTRAINT `D4d9bca115376aeb07fd970155499db3` FOREIGN KEY (`classifier_set_id`) REFERENCES `assessment_aiclassifierset` (`id`), + CONSTRAINT `asses_assessment_id_68b86880a7f62f1c_fk_assessment_assessment_id` FOREIGN KEY (`assessment_id`) REFERENCES `assessment_assessment` (`id`), + CONSTRAINT `assessment_ai_rubric_id_3fc938e9e3ae7b2d_fk_assessment_rubric_id` FOREIGN KEY (`rubric_id`) REFERENCES `assessment_rubric` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_aitrainingworkflow`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_aitrainingworkflow` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `uuid` varchar(36) NOT NULL, + `course_id` varchar(40) NOT NULL, + `item_id` varchar(128) NOT NULL, + `scheduled_at` datetime(6) NOT NULL, + `completed_at` datetime(6) DEFAULT NULL, + `algorithm_id` varchar(128) NOT NULL, + `classifier_set_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uuid` (`uuid`), + KEY `fb3b73b224dc39eb386f5d3ec67998b7` (`classifier_set_id`), + KEY `assessment_aitrainingworkflow_ea134da7` (`course_id`), + KEY `assessment_aitrainingworkflow_82bfda79` (`item_id`), + KEY `assessment_aitrainingworkflow_96e4551c` (`scheduled_at`), + KEY `assessment_aitrainingworkflow_4430a679` (`completed_at`), + KEY `assessment_aitrainingworkflow_65143c91` (`algorithm_id`), + CONSTRAINT `fb3b73b224dc39eb386f5d3ec67998b7` FOREIGN KEY (`classifier_set_id`) REFERENCES `assessment_aiclassifierset` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_aitrainingworkflow_training_examples`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_aitrainingworkflow_training_examples` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `aitrainingworkflow_id` int(11) NOT NULL, + `trainingexample_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `aitrainingworkflow_id` (`aitrainingworkflow_id`,`trainingexample_id`), + KEY `ff4ddecc43bd06c0d85785a61e955133` (`trainingexample_id`), + CONSTRAINT `da55be90caee21d95136e40c53e5c754` FOREIGN KEY (`aitrainingworkflow_id`) REFERENCES `assessment_aitrainingworkflow` (`id`), + CONSTRAINT `ff4ddecc43bd06c0d85785a61e955133` FOREIGN KEY (`trainingexample_id`) REFERENCES `assessment_trainingexample` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_assessment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_assessment` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `submission_uuid` varchar(128) NOT NULL, + `scored_at` datetime(6) NOT NULL, + `scorer_id` varchar(40) NOT NULL, + `score_type` varchar(2) NOT NULL, + `feedback` longtext NOT NULL, + `rubric_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `assessment_assessment_ab5b2b73` (`submission_uuid`), + KEY `assessment_assessment_ef4c53ff` (`scored_at`), + KEY `assessment_assessment_7b0042c0` (`scorer_id`), + KEY `assessment_assessment_8980b7ae` (`rubric_id`), + CONSTRAINT `assessment_as_rubric_id_7997f01dcbd05633_fk_assessment_rubric_id` FOREIGN KEY (`rubric_id`) REFERENCES `assessment_rubric` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_assessmentfeedback`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_assessmentfeedback` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `submission_uuid` varchar(128) NOT NULL, + `feedback_text` longtext NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `submission_uuid` (`submission_uuid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_assessmentfeedback_assessments`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_assessmentfeedback_assessments` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `assessmentfeedback_id` int(11) NOT NULL, + `assessment_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `assessmentfeedback_id` (`assessmentfeedback_id`,`assessment_id`), + KEY `asses_assessment_id_392d354eca2e0c87_fk_assessment_assessment_id` (`assessment_id`), + CONSTRAINT `D1fc3fa7cd7be79d20561668a95a9fc1` FOREIGN KEY (`assessmentfeedback_id`) REFERENCES `assessment_assessmentfeedback` (`id`), + CONSTRAINT `asses_assessment_id_392d354eca2e0c87_fk_assessment_assessment_id` FOREIGN KEY (`assessment_id`) REFERENCES `assessment_assessment` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_assessmentfeedback_options`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_assessmentfeedback_options` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `assessmentfeedback_id` int(11) NOT NULL, + `assessmentfeedbackoption_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `assessmentfeedback_id` (`assessmentfeedback_id`,`assessmentfeedbackoption_id`), + KEY `cc7028abc88c431df3172c9b2d6422e4` (`assessmentfeedbackoption_id`), + CONSTRAINT `cba12ac98c4a04d67d5edaa2223f4fe5` FOREIGN KEY (`assessmentfeedback_id`) REFERENCES `assessment_assessmentfeedback` (`id`), + CONSTRAINT `cc7028abc88c431df3172c9b2d6422e4` FOREIGN KEY (`assessmentfeedbackoption_id`) REFERENCES `assessment_assessmentfeedbackoption` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_assessmentfeedbackoption`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_assessmentfeedbackoption` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `text` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `text` (`text`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_assessmentpart`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_assessmentpart` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `feedback` longtext NOT NULL, + `assessment_id` int(11) NOT NULL, + `criterion_id` int(11) NOT NULL, + `option_id` int(11), + PRIMARY KEY (`id`), + KEY `asses_assessment_id_1d752290138ce479_fk_assessment_assessment_id` (`assessment_id`), + KEY `assessment_assessmentpart_385b00a3` (`criterion_id`), + KEY `assessment_assessmentpart_28df3725` (`option_id`), + CONSTRAINT `asse_option_id_2508a14feeabf4ce_fk_assessment_criterionoption_id` FOREIGN KEY (`option_id`) REFERENCES `assessment_criterionoption` (`id`), + CONSTRAINT `asses_assessment_id_1d752290138ce479_fk_assessment_assessment_id` FOREIGN KEY (`assessment_id`) REFERENCES `assessment_assessment` (`id`), + CONSTRAINT `assessm_criterion_id_2061f2359fd292bf_fk_assessment_criterion_id` FOREIGN KEY (`criterion_id`) REFERENCES `assessment_criterion` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_criterion`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_criterion` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `label` varchar(100) NOT NULL, + `order_num` int(10) unsigned NOT NULL, + `prompt` longtext NOT NULL, + `rubric_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `assessment_criterion_8980b7ae` (`rubric_id`), + CONSTRAINT `assessment_cr_rubric_id_30b7422eb7f191cd_fk_assessment_rubric_id` FOREIGN KEY (`rubric_id`) REFERENCES `assessment_rubric` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_criterionoption`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_criterionoption` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `order_num` int(10) unsigned NOT NULL, + `points` int(10) unsigned NOT NULL, + `name` varchar(100) NOT NULL, + `label` varchar(100) NOT NULL, + `explanation` longtext NOT NULL, + `criterion_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `assessm_criterion_id_4d0f74d959b454af_fk_assessment_criterion_id` (`criterion_id`), + CONSTRAINT `assessm_criterion_id_4d0f74d959b454af_fk_assessment_criterion_id` FOREIGN KEY (`criterion_id`) REFERENCES `assessment_criterion` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_peerworkflow`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_peerworkflow` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `student_id` varchar(40) NOT NULL, + `item_id` varchar(128) NOT NULL, + `course_id` varchar(40) NOT NULL, + `submission_uuid` varchar(128) NOT NULL, + `created_at` datetime(6) NOT NULL, + `completed_at` datetime(6) DEFAULT NULL, + `grading_completed_at` datetime(6) DEFAULT NULL, + `cancelled_at` datetime(6) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `submission_uuid` (`submission_uuid`), + KEY `assessment_peerworkflow_30a811f6` (`student_id`), + KEY `assessment_peerworkflow_82bfda79` (`item_id`), + KEY `assessment_peerworkflow_ea134da7` (`course_id`), + KEY `assessment_peerworkflow_fde81f11` (`created_at`), + KEY `assessment_peerworkflow_4430a679` (`completed_at`), + KEY `assessment_peerworkflow_85d183d8` (`grading_completed_at`), + KEY `assessment_peerworkflow_740da1db` (`cancelled_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_peerworkflowitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_peerworkflowitem` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `submission_uuid` varchar(128) NOT NULL, + `started_at` datetime(6) NOT NULL, + `scored` tinyint(1) NOT NULL, + `assessment_id` int(11) DEFAULT NULL, + `author_id` int(11) NOT NULL, + `scorer_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `asses_assessment_id_15cadfae90ddcc2a_fk_assessment_assessment_id` (`assessment_id`), + KEY `assessm_author_id_1948f89dea6d2b5f_fk_assessment_peerworkflow_id` (`author_id`), + KEY `assessm_scorer_id_2d803ee2d52c0e2c_fk_assessment_peerworkflow_id` (`scorer_id`), + KEY `assessment_peerworkflowitem_ab5b2b73` (`submission_uuid`), + KEY `assessment_peerworkflowitem_ff1ae11b` (`started_at`), + CONSTRAINT `asses_assessment_id_15cadfae90ddcc2a_fk_assessment_assessment_id` FOREIGN KEY (`assessment_id`) REFERENCES `assessment_assessment` (`id`), + CONSTRAINT `assessm_author_id_1948f89dea6d2b5f_fk_assessment_peerworkflow_id` FOREIGN KEY (`author_id`) REFERENCES `assessment_peerworkflow` (`id`), + CONSTRAINT `assessm_scorer_id_2d803ee2d52c0e2c_fk_assessment_peerworkflow_id` FOREIGN KEY (`scorer_id`) REFERENCES `assessment_peerworkflow` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_rubric`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_rubric` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `content_hash` varchar(40) NOT NULL, + `structure_hash` varchar(40) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `content_hash` (`content_hash`), + KEY `assessment_rubric_873e9e2d` (`structure_hash`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_studenttrainingworkflow`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_studenttrainingworkflow` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `submission_uuid` varchar(128) NOT NULL, + `student_id` varchar(40) NOT NULL, + `item_id` varchar(128) NOT NULL, + `course_id` varchar(40) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `submission_uuid` (`submission_uuid`), + KEY `assessment_studenttrainingworkflow_30a811f6` (`student_id`), + KEY `assessment_studenttrainingworkflow_82bfda79` (`item_id`), + KEY `assessment_studenttrainingworkflow_ea134da7` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_studenttrainingworkflowitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_studenttrainingworkflowitem` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `order_num` int(10) unsigned NOT NULL, + `started_at` datetime(6) NOT NULL, + `completed_at` datetime(6) DEFAULT NULL, + `training_example_id` int(11) NOT NULL, + `workflow_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `assessment_studenttrainingwork_workflow_id_484e930feb86ad74_uniq` (`workflow_id`,`order_num`), + KEY `assessment_studenttrainingworkflowitem_9cc97abc` (`training_example_id`), + KEY `assessment_studenttrainingworkflowitem_846c77cf` (`workflow_id`), + CONSTRAINT `D74ce3e30635de397fef41ac869640c7` FOREIGN KEY (`training_example_id`) REFERENCES `assessment_trainingexample` (`id`), + CONSTRAINT `f9c080ebc7ad16394edda963ed3f280f` FOREIGN KEY (`workflow_id`) REFERENCES `assessment_studenttrainingworkflow` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_trainingexample`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_trainingexample` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `raw_answer` longtext NOT NULL, + `content_hash` varchar(40) NOT NULL, + `rubric_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `content_hash` (`content_hash`), + KEY `assessment_tr_rubric_id_33664d383bafcaaa_fk_assessment_rubric_id` (`rubric_id`), + CONSTRAINT `assessment_tr_rubric_id_33664d383bafcaaa_fk_assessment_rubric_id` FOREIGN KEY (`rubric_id`) REFERENCES `assessment_rubric` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `assessment_trainingexample_options_selected`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assessment_trainingexample_options_selected` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `trainingexample_id` int(11) NOT NULL, + `criterionoption_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `trainingexample_id` (`trainingexample_id`,`criterionoption_id`), + KEY `D0b4a450eed0c653d223e489254ed8a1` (`criterionoption_id`), + CONSTRAINT `D0b4a450eed0c653d223e489254ed8a1` FOREIGN KEY (`criterionoption_id`) REFERENCES `assessment_criterionoption` (`id`), + CONSTRAINT `ae406d6687690bb9277287984729cfd8` FOREIGN KEY (`trainingexample_id`) REFERENCES `assessment_trainingexample` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_group`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_group` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(80) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_group_permissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_group_permissions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `group_id` int(11) NOT NULL, + `permission_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `group_id` (`group_id`,`permission_id`), + KEY `auth_group__permission_id_1f49ccbbdc69d2fc_fk_auth_permission_id` (`permission_id`), + CONSTRAINT `auth_group__permission_id_1f49ccbbdc69d2fc_fk_auth_permission_id` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), + CONSTRAINT `auth_group_permission_group_id_689710a9a73b7457_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_permission`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_permission` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `content_type_id` int(11) NOT NULL, + `codename` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `content_type_id` (`content_type_id`,`codename`), + CONSTRAINT `auth__content_type_id_508cf46651277a81_fk_django_content_type_id` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=704 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_registration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_registration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `activation_key` varchar(32) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `activation_key` (`activation_key`), + UNIQUE KEY `user_id` (`user_id`), + CONSTRAINT `auth_registration_user_id_734af68780d0cf34_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_user` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `password` varchar(128) NOT NULL, + `last_login` datetime(6) DEFAULT NULL, + `is_superuser` tinyint(1) NOT NULL, + `username` varchar(30) NOT NULL, + `first_name` varchar(30) NOT NULL, + `last_name` varchar(30) NOT NULL, + `email` varchar(254) NOT NULL, + `is_staff` tinyint(1) NOT NULL, + `is_active` tinyint(1) NOT NULL, + `date_joined` datetime(6) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username` (`username`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_user_groups`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_user_groups` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `group_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_id` (`user_id`,`group_id`), + KEY `auth_user_groups_group_id_33ac548dcf5f8e37_fk_auth_group_id` (`group_id`), + CONSTRAINT `auth_user_groups_group_id_33ac548dcf5f8e37_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), + CONSTRAINT `auth_user_groups_user_id_4b5ed4ffdb8fd9b0_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_user_user_permissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_user_user_permissions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `permission_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_id` (`user_id`,`permission_id`), + KEY `auth_user_u_permission_id_384b62483d7071f0_fk_auth_permission_id` (`permission_id`), + CONSTRAINT `auth_user_u_permission_id_384b62483d7071f0_fk_auth_permission_id` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), + CONSTRAINT `auth_user_user_permissi_user_id_7f0938558328534a_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_userprofile`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_userprofile` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `meta` longtext NOT NULL, + `courseware` varchar(255) NOT NULL, + `language` varchar(255) NOT NULL, + `location` varchar(255) NOT NULL, + `year_of_birth` int(11) DEFAULT NULL, + `gender` varchar(6) DEFAULT NULL, + `level_of_education` varchar(6) DEFAULT NULL, + `mailing_address` longtext, + `city` longtext, + `country` varchar(2) DEFAULT NULL, + `goals` longtext, + `allow_certificate` tinyint(1) NOT NULL, + `bio` varchar(3000) DEFAULT NULL, + `profile_image_uploaded_at` datetime(6) DEFAULT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_id` (`user_id`), + KEY `auth_userprofile_b068931c` (`name`), + KEY `auth_userprofile_8512ae7d` (`language`), + KEY `auth_userprofile_d5189de0` (`location`), + KEY `auth_userprofile_8939d49d` (`year_of_birth`), + KEY `auth_userprofile_cc90f191` (`gender`), + KEY `auth_userprofile_a895faa8` (`level_of_education`), + CONSTRAINT `auth_userprofile_user_id_4c194f9b5650ad70_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `branding_brandingapiconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `branding_brandingapiconfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `branding_branding_changed_by_id_127fa63777522d05_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `branding_branding_changed_by_id_127fa63777522d05_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `branding_brandinginfoconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `branding_brandinginfoconfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `configuration` longtext NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `branding_branding_changed_by_id_298e4241fae118cc_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `branding_branding_changed_by_id_298e4241fae118cc_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `bulk_email_courseauthorization`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bulk_email_courseauthorization` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `email_enabled` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `course_id` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `bulk_email_courseemail`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bulk_email_courseemail` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `slug` varchar(128) NOT NULL, + `subject` varchar(128) NOT NULL, + `html_message` longtext, + `text_message` longtext, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `course_id` varchar(255) NOT NULL, + `to_option` varchar(64) NOT NULL, + `template_name` varchar(255) DEFAULT NULL, + `from_addr` varchar(255) DEFAULT NULL, + `sender_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `bulk_email_courseemai_sender_id_37be3a6322a26640_fk_auth_user_id` (`sender_id`), + KEY `bulk_email_courseemail_2dbcba41` (`slug`), + KEY `bulk_email_courseemail_ea134da7` (`course_id`), + CONSTRAINT `bulk_email_courseemai_sender_id_37be3a6322a26640_fk_auth_user_id` FOREIGN KEY (`sender_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `bulk_email_courseemailtemplate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bulk_email_courseemailtemplate` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `html_template` longtext, + `plain_template` longtext, + `name` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `bulk_email_optout`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bulk_email_optout` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `bulk_email_optout_user_id_7710cb544aafa8a_uniq` (`user_id`,`course_id`), + KEY `bulk_email_optout_ea134da7` (`course_id`), + CONSTRAINT `bulk_email_optout_user_id_5d6e4a037bcf14bd_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `celery_taskmeta`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `celery_taskmeta` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `task_id` varchar(255) NOT NULL, + `status` varchar(50) NOT NULL, + `result` longtext, + `date_done` datetime(6) NOT NULL, + `traceback` longtext, + `hidden` tinyint(1) NOT NULL, + `meta` longtext, + PRIMARY KEY (`id`), + UNIQUE KEY `task_id` (`task_id`), + KEY `celery_taskmeta_662f707d` (`hidden`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `celery_tasksetmeta`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `celery_tasksetmeta` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `taskset_id` varchar(255) NOT NULL, + `result` longtext NOT NULL, + `date_done` datetime(6) NOT NULL, + `hidden` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `taskset_id` (`taskset_id`), + KEY `celery_tasksetmeta_662f707d` (`hidden`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `certificates_badgeassertion`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `certificates_badgeassertion` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `mode` varchar(100) NOT NULL, + `data` longtext NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `certificates_badgeassertion_course_id_4dc2a23e1c0cd3ff_uniq` (`course_id`,`user_id`,`mode`), + KEY `certificates_badgeassert_user_id_65bbbec450cd344_fk_auth_user_id` (`user_id`), + CONSTRAINT `certificates_badgeassert_user_id_65bbbec450cd344_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `certificates_badgeimageconfiguration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `certificates_badgeimageconfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `mode` varchar(125) NOT NULL, + `icon` varchar(100) NOT NULL, + `default` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `mode` (`mode`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `certificates_certificategenerationconfiguration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `certificates_certificategenerationconfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `certificates_cert_changed_by_id_2a1d896cdbd5fec5_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `certificates_cert_changed_by_id_2a1d896cdbd5fec5_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `certificates_certificategenerationcoursesetting`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `certificates_certificategenerationcoursesetting` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `course_key` varchar(255) NOT NULL, + `enabled` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + KEY `certificates_certificategenerationcoursesetting_c8235886` (`course_key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `certificates_certificatehtmlviewconfiguration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `certificates_certificatehtmlviewconfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `configuration` longtext NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `certificates_cert_changed_by_id_1de6cf549bca749b_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `certificates_cert_changed_by_id_1de6cf549bca749b_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `certificates_certificatetemplate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `certificates_certificatetemplate` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `name` varchar(255) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `template` longtext NOT NULL, + `organization_id` int(11) DEFAULT NULL, + `course_key` varchar(255) DEFAULT NULL, + `mode` varchar(125) DEFAULT NULL, + `is_active` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `certificates_certificatetem_organization_id_f0c7bfd32b374fb_uniq` (`organization_id`,`course_key`,`mode`), + KEY `certificates_certificatetemplate_26b2345e` (`organization_id`), + KEY `certificates_certificatetemplate_c8235886` (`course_key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `certificates_certificatetemplateasset`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `certificates_certificatetemplateasset` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `asset` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `certificates_certificatewhitelist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `certificates_certificatewhitelist` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `whitelist` tinyint(1) NOT NULL, + `created` datetime(6) NOT NULL, + `notes` longtext, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `certificates_certificat_user_id_50b0bc90075a5407_fk_auth_user_id` (`user_id`), + CONSTRAINT `certificates_certificat_user_id_50b0bc90075a5407_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `certificates_examplecertificate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `certificates_examplecertificate` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `description` varchar(255) NOT NULL, + `uuid` varchar(255) NOT NULL, + `access_key` varchar(255) NOT NULL, + `full_name` varchar(255) NOT NULL, + `template` varchar(255) NOT NULL, + `status` varchar(255) NOT NULL, + `error_reason` longtext, + `download_url` varchar(255) DEFAULT NULL, + `example_cert_set_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uuid` (`uuid`), + KEY `certificates_examplecertificate_91685379` (`access_key`), + KEY `certificates_examplecertificate_c9ee6da7` (`example_cert_set_id`), + CONSTRAINT `D5ceae87b49ed6ab15ace7b6f1c01c35` FOREIGN KEY (`example_cert_set_id`) REFERENCES `certificates_examplecertificateset` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `certificates_examplecertificateset`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `certificates_examplecertificateset` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `course_key` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + KEY `certificates_examplecertificateset_c8235886` (`course_key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `certificates_generatedcertificate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `certificates_generatedcertificate` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `verify_uuid` varchar(32) NOT NULL, + `download_uuid` varchar(32) NOT NULL, + `download_url` varchar(128) NOT NULL, + `grade` varchar(5) NOT NULL, + `key` varchar(32) NOT NULL, + `distinction` tinyint(1) NOT NULL, + `status` varchar(32) NOT NULL, + `mode` varchar(32) NOT NULL, + `name` varchar(255) NOT NULL, + `created_date` datetime(6) NOT NULL, + `modified_date` datetime(6) NOT NULL, + `error_reason` varchar(512) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `certificates_generatedcertificate_user_id_552a0fa6f7d3f7e8_uniq` (`user_id`,`course_id`), + CONSTRAINT `certificates_generatedc_user_id_77ed5f7a53121815_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `contentstore_pushnotificationconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `contentstore_pushnotificationconfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `contentstore_push_changed_by_id_72c47af098f7f8b1_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `contentstore_push_changed_by_id_72c47af098f7f8b1_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `contentstore_videouploadconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `contentstore_videouploadconfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `profile_whitelist` longtext NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `contentstore_vide_changed_by_id_17a489d0a46d9a4b_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `contentstore_vide_changed_by_id_17a489d0a46d9a4b_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `cors_csrf_xdomainproxyconfiguration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cors_csrf_xdomainproxyconfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `whitelist` longtext NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `cors_csrf_xdomain_changed_by_id_31e52cd1bcef52c4_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `cors_csrf_xdomain_changed_by_id_31e52cd1bcef52c4_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `corsheaders_corsmodel`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `corsheaders_corsmodel` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `cors` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_action_state_coursererunstate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_action_state_coursererunstate` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created_time` datetime(6) NOT NULL, + `updated_time` datetime(6) NOT NULL, + `course_key` varchar(255) NOT NULL, + `action` varchar(100) NOT NULL, + `state` varchar(50) NOT NULL, + `should_display` tinyint(1) NOT NULL, + `message` varchar(1000) NOT NULL, + `source_course_key` varchar(255) NOT NULL, + `display_name` varchar(255) NOT NULL, + `created_user_id` int(11) DEFAULT NULL, + `updated_user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `course_action_state_coursereruns_course_key_cf5da77ed3032d6_uniq` (`course_key`,`action`), + KEY `course_action_s_created_user_id_7f53088ef8dccd0b_fk_auth_user_id` (`created_user_id`), + KEY `course_action_s_updated_user_id_4fab18012332c9a4_fk_auth_user_id` (`updated_user_id`), + KEY `course_action_state_coursererunstate_c8235886` (`course_key`), + KEY `course_action_state_coursererunstate_418c5509` (`action`), + KEY `course_action_state_coursererunstate_a9bd7343` (`source_course_key`), + CONSTRAINT `course_action_s_created_user_id_7f53088ef8dccd0b_fk_auth_user_id` FOREIGN KEY (`created_user_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `course_action_s_updated_user_id_4fab18012332c9a4_fk_auth_user_id` FOREIGN KEY (`updated_user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_creators_coursecreator`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_creators_coursecreator` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `state_changed` datetime(6) NOT NULL, + `state` varchar(24) NOT NULL, + `note` varchar(512) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_id` (`user_id`), + CONSTRAINT `course_creators_coursec_user_id_46ea06ad28f0be3b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_groups_cohortmembership`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_groups_cohortmembership` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `course_user_group_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `course_groups_cohortmembership_user_id_395bddd0389ed7da_uniq` (`user_id`,`course_id`), + KEY `course_groups_cohortmembership_6e438ee3` (`course_user_group_id`), + KEY `course_groups_cohortmembership_e8701ad4` (`user_id`), + CONSTRAINT `D004e77c965054d46217a8bd48bcaec8` FOREIGN KEY (`course_user_group_id`) REFERENCES `course_groups_courseusergroup` (`id`), + CONSTRAINT `course_groups_cohortmem_user_id_15d408bf736398bf_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_groups_coursecohort`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_groups_coursecohort` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `assignment_type` varchar(20) NOT NULL, + `course_user_group_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `course_user_group_id` (`course_user_group_id`), + CONSTRAINT `D339c347a8fab561c2e92ea09f250df8` FOREIGN KEY (`course_user_group_id`) REFERENCES `course_groups_courseusergroup` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_groups_coursecohortssettings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_groups_coursecohortssettings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `is_cohorted` tinyint(1) NOT NULL, + `course_id` varchar(255) NOT NULL, + `cohorted_discussions` longtext, + `always_cohort_inline_discussions` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `course_id` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_groups_courseusergroup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_groups_courseusergroup` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `course_id` varchar(255) NOT NULL, + `group_type` varchar(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `course_groups_courseusergroup_name_63f7511804c52f38_uniq` (`name`,`course_id`), + KEY `course_groups_courseusergroup_ea134da7` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_groups_courseusergroup_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_groups_courseusergroup_users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `courseusergroup_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `courseusergroup_id` (`courseusergroup_id`,`user_id`), + KEY `course_groups_courseuse_user_id_7b26cdeaeb621a93_fk_auth_user_id` (`user_id`), + CONSTRAINT `course_groups_courseuse_user_id_7b26cdeaeb621a93_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `db746f642b1b8232920506afe242fe6b` FOREIGN KEY (`courseusergroup_id`) REFERENCES `course_groups_courseusergroup` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_groups_courseusergrouppartitiongroup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_groups_courseusergrouppartitiongroup` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `partition_id` int(11) NOT NULL, + `group_id` int(11) NOT NULL, + `created_at` datetime(6) NOT NULL, + `updated_at` datetime(6) NOT NULL, + `course_user_group_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `course_user_group_id` (`course_user_group_id`), + CONSTRAINT `D1516b3811dd6dd500bfae054d6fdc92` FOREIGN KEY (`course_user_group_id`) REFERENCES `course_groups_courseusergroup` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_modes_coursemode`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_modes_coursemode` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `mode_slug` varchar(100) NOT NULL, + `mode_display_name` varchar(255) NOT NULL, + `min_price` int(11) NOT NULL, + `currency` varchar(8) NOT NULL, + `expiration_datetime` datetime(6) DEFAULT NULL, + `expiration_date` date DEFAULT NULL, + `suggested_prices` varchar(255) NOT NULL, + `description` longtext, + `sku` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `course_modes_coursemode_course_id_6fbb1796ace558b4_uniq` (`course_id`,`mode_slug`,`currency`), + KEY `course_modes_coursemode_ea134da7` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_modes_coursemodesarchive`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_modes_coursemodesarchive` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `mode_slug` varchar(100) NOT NULL, + `mode_display_name` varchar(255) NOT NULL, + `min_price` int(11) NOT NULL, + `suggested_prices` varchar(255) NOT NULL, + `currency` varchar(8) NOT NULL, + `expiration_date` date DEFAULT NULL, + `expiration_datetime` datetime(6) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `course_modes_coursemodesarchive_ea134da7` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_overviews_courseoverview`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_overviews_courseoverview` ( + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `version` int(11) NOT NULL, + `id` varchar(255) NOT NULL, + `_location` varchar(255) NOT NULL, + `display_name` longtext, + `display_number_with_default` longtext NOT NULL, + `display_org_with_default` longtext NOT NULL, + `start` datetime(6) DEFAULT NULL, + `end` datetime(6) DEFAULT NULL, + `advertised_start` longtext, + `course_image_url` longtext NOT NULL, + `facebook_url` longtext, + `social_sharing_url` longtext, + `end_of_course_survey_url` longtext, + `certificates_display_behavior` longtext, + `certificates_show_before_end` tinyint(1) NOT NULL, + `cert_html_view_enabled` tinyint(1) NOT NULL, + `has_any_active_web_certificate` tinyint(1) NOT NULL, + `cert_name_short` longtext NOT NULL, + `cert_name_long` longtext NOT NULL, + `lowest_passing_grade` decimal(5,2) DEFAULT NULL, + `days_early_for_beta` double DEFAULT NULL, + `mobile_available` tinyint(1) NOT NULL, + `visible_to_staff_only` tinyint(1) NOT NULL, + `_pre_requisite_courses_json` longtext NOT NULL, + `enrollment_start` datetime(6) DEFAULT NULL, + `enrollment_end` datetime(6) DEFAULT NULL, + `enrollment_domain` longtext, + `invitation_only` tinyint(1) NOT NULL, + `max_student_enrollments_allowed` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_overviews_courseoverviewtab`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_overviews_courseoverviewtab` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `tab_id` varchar(50) NOT NULL, + `course_overview_id` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + KEY `D298658de1d4c8777e046eed658fc94e` (`course_overview_id`), + CONSTRAINT `D298658de1d4c8777e046eed658fc94e` FOREIGN KEY (`course_overview_id`) REFERENCES `course_overviews_courseoverview` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_structures_coursestructure`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_structures_coursestructure` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `course_id` varchar(255) NOT NULL, + `structure_json` longtext, + `discussion_id_map_json` longtext, + PRIMARY KEY (`id`), + UNIQUE KEY `course_id` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_offlinecomputedgrade`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_offlinecomputedgrade` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `created` datetime(6) DEFAULT NULL, + `updated` datetime(6) NOT NULL, + `gradeset` longtext, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `courseware_offlinecomputedgrade_user_id_46133bbd0926078f_uniq` (`user_id`,`course_id`), + KEY `courseware_offlinecomputedgrade_ea134da7` (`course_id`), + KEY `courseware_offlinecomputedgrade_e2fa5388` (`created`), + KEY `courseware_offlinecomputedgrade_0f81d52e` (`updated`), + CONSTRAINT `courseware_offlinecompu_user_id_66bbccbf945dfd56_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_offlinecomputedgradelog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_offlinecomputedgradelog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `created` datetime(6) DEFAULT NULL, + `seconds` int(11) NOT NULL, + `nstudents` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `courseware_offlinecomputedgradelog_ea134da7` (`course_id`), + KEY `courseware_offlinecomputedgradelog_e2fa5388` (`created`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_studentfieldoverride`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_studentfieldoverride` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `course_id` varchar(255) NOT NULL, + `location` varchar(255) NOT NULL, + `field` varchar(255) NOT NULL, + `value` longtext NOT NULL, + `student_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `courseware_studentfieldoverride_course_id_39dd7eaeac5623d2_uniq` (`course_id`,`field`,`location`,`student_id`), + KEY `courseware_studentfi_student_id_70e7c0f5a4f91b65_fk_auth_user_id` (`student_id`), + KEY `courseware_studentfieldoverride_ea134da7` (`course_id`), + KEY `courseware_studentfieldoverride_d5189de0` (`location`), + CONSTRAINT `courseware_studentfi_student_id_70e7c0f5a4f91b65_fk_auth_user_id` FOREIGN KEY (`student_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_studentmodule`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_studentmodule` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `module_type` varchar(32) NOT NULL, + `module_id` varchar(255) NOT NULL, + `course_id` varchar(255) NOT NULL, + `state` longtext, + `grade` double DEFAULT NULL, + `max_grade` double DEFAULT NULL, + `done` varchar(8) NOT NULL, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `student_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `courseware_studentmodule_student_id_635d77aea1256de5_uniq` (`student_id`,`module_id`,`course_id`), + KEY `courseware_studentmodule_82bd5515` (`module_type`), + KEY `courseware_studentmodule_c9799665` (`module_id`), + KEY `courseware_studentmodule_ea134da7` (`course_id`), + KEY `courseware_studentmodule_de6a20aa` (`grade`), + KEY `courseware_studentmodule_6b2ded51` (`done`), + KEY `courseware_studentmodule_e2fa5388` (`created`), + KEY `courseware_studentmodule_9ae73c65` (`modified`), + CONSTRAINT `courseware_studentmo_student_id_57005a9a97046500_fk_auth_user_id` FOREIGN KEY (`student_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_studentmodulehistory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_studentmodulehistory` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `version` varchar(255) DEFAULT NULL, + `created` datetime(6) NOT NULL, + `state` longtext, + `grade` double DEFAULT NULL, + `max_grade` double DEFAULT NULL, + `student_module_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `D45b867f7277556beb93bff02eba5f03` (`student_module_id`), + KEY `courseware_studentmodulehistory_2af72f10` (`version`), + KEY `courseware_studentmodulehistory_e2fa5388` (`created`), + CONSTRAINT `D45b867f7277556beb93bff02eba5f03` FOREIGN KEY (`student_module_id`) REFERENCES `courseware_studentmodule` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_xmodulestudentinfofield`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_xmodulestudentinfofield` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `field_name` varchar(64) NOT NULL, + `value` longtext NOT NULL, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `student_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `courseware_xmodulestudentinfofi_student_id_33f2f772c49db067_uniq` (`student_id`,`field_name`), + KEY `courseware_xmodulestudentinfofield_73f329f1` (`field_name`), + KEY `courseware_xmodulestudentinfofield_e2fa5388` (`created`), + KEY `courseware_xmodulestudentinfofield_9ae73c65` (`modified`), + CONSTRAINT `courseware_xmodulestu_student_id_fb4c5883b541e28_fk_auth_user_id` FOREIGN KEY (`student_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_xmodulestudentprefsfield`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_xmodulestudentprefsfield` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `field_name` varchar(64) NOT NULL, + `value` longtext NOT NULL, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `module_type` varchar(64) NOT NULL, + `student_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `courseware_xmodulestudentprefsf_student_id_2a5d275498b7a407_uniq` (`student_id`,`module_type`,`field_name`), + KEY `courseware_xmodulestudentprefsfield_73f329f1` (`field_name`), + KEY `courseware_xmodulestudentprefsfield_e2fa5388` (`created`), + KEY `courseware_xmodulestudentprefsfield_9ae73c65` (`modified`), + KEY `courseware_xmodulestudentprefsfield_82bd5515` (`module_type`), + CONSTRAINT `courseware_xmodulest_student_id_48b35c14cbc17185_fk_auth_user_id` FOREIGN KEY (`student_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_xmoduleuserstatesummaryfield`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_xmoduleuserstatesummaryfield` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `field_name` varchar(64) NOT NULL, + `value` longtext NOT NULL, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `usage_id` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `courseware_xmoduleuserstatesummar_usage_id_5cc7ed48d6e2e021_uniq` (`usage_id`,`field_name`), + KEY `courseware_xmoduleuserstatesummaryfield_73f329f1` (`field_name`), + KEY `courseware_xmoduleuserstatesummaryfield_e2fa5388` (`created`), + KEY `courseware_xmoduleuserstatesummaryfield_9ae73c65` (`modified`), + KEY `courseware_xmoduleuserstatesummaryfield_0528eb2a` (`usage_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `credit_creditcourse`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `credit_creditcourse` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_key` varchar(255) NOT NULL, + `enabled` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `course_key` (`course_key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `credit_crediteligibility`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `credit_crediteligibility` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `username` varchar(255) NOT NULL, + `deadline` datetime(6) NOT NULL, + `course_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `credit_crediteligibility_username_936cb16677e83e_uniq` (`username`,`course_id`), + KEY `credit_cred_course_id_4218adeba258bf8b_fk_credit_creditcourse_id` (`course_id`), + KEY `credit_crediteligibility_14c4b06b` (`username`), + CONSTRAINT `credit_cred_course_id_4218adeba258bf8b_fk_credit_creditcourse_id` FOREIGN KEY (`course_id`) REFERENCES `credit_creditcourse` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `credit_creditprovider`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `credit_creditprovider` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `provider_id` varchar(255) NOT NULL, + `active` tinyint(1) NOT NULL, + `display_name` varchar(255) NOT NULL, + `enable_integration` tinyint(1) NOT NULL, + `provider_url` varchar(200) NOT NULL, + `provider_status_url` varchar(200) NOT NULL, + `provider_description` longtext NOT NULL, + `fulfillment_instructions` longtext, + `eligibility_email_message` longtext NOT NULL, + `receipt_email_message` longtext NOT NULL, + `thumbnail_url` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `provider_id` (`provider_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `credit_creditrequest`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `credit_creditrequest` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `uuid` varchar(32) NOT NULL, + `username` varchar(255) NOT NULL, + `parameters` longtext NOT NULL, + `status` varchar(255) NOT NULL, + `course_id` int(11) NOT NULL, + `provider_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uuid` (`uuid`), + UNIQUE KEY `credit_creditrequest_username_4f61c10bb0d67c01_uniq` (`username`,`course_id`,`provider_id`), + KEY `credit_cred_course_id_578c5f1124002bab_fk_credit_creditcourse_id` (`course_id`), + KEY `credit_c_provider_id_f2973cc3e38a483_fk_credit_creditprovider_id` (`provider_id`), + KEY `credit_creditrequest_14c4b06b` (`username`), + CONSTRAINT `credit_c_provider_id_f2973cc3e38a483_fk_credit_creditprovider_id` FOREIGN KEY (`provider_id`) REFERENCES `credit_creditprovider` (`id`), + CONSTRAINT `credit_cred_course_id_578c5f1124002bab_fk_credit_creditcourse_id` FOREIGN KEY (`course_id`) REFERENCES `credit_creditcourse` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `credit_creditrequirement`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `credit_creditrequirement` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `namespace` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `display_name` varchar(255) NOT NULL, + `order` int(10) unsigned NOT NULL, + `criteria` longtext NOT NULL, + `active` tinyint(1) NOT NULL, + `course_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `credit_creditrequirement_namespace_33039c83b3e69b8_uniq` (`namespace`,`name`,`course_id`), + KEY `credit_cred_course_id_1c8fb9ebd295ae19_fk_credit_creditcourse_id` (`course_id`), + CONSTRAINT `credit_cred_course_id_1c8fb9ebd295ae19_fk_credit_creditcourse_id` FOREIGN KEY (`course_id`) REFERENCES `credit_creditcourse` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `credit_creditrequirementstatus`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `credit_creditrequirementstatus` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `username` varchar(255) NOT NULL, + `status` varchar(32) NOT NULL, + `reason` longtext NOT NULL, + `requirement_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `credit_creditrequirementstatus_username_67dcb69ebf779e3b_uniq` (`username`,`requirement_id`), + KEY `c_requirement_id_3896aa6db214f84a_fk_credit_creditrequirement_id` (`requirement_id`), + KEY `credit_creditrequirementstatus_14c4b06b` (`username`), + CONSTRAINT `c_requirement_id_3896aa6db214f84a_fk_credit_creditrequirement_id` FOREIGN KEY (`requirement_id`) REFERENCES `credit_creditrequirement` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `credit_historicalcreditrequest`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `credit_historicalcreditrequest` ( + `id` int(11) NOT NULL, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `uuid` varchar(32) NOT NULL, + `username` varchar(255) NOT NULL, + `parameters` longtext NOT NULL, + `status` varchar(255) NOT NULL, + `history_id` int(11) NOT NULL AUTO_INCREMENT, + `history_date` datetime(6) NOT NULL, + `history_type` varchar(1) NOT NULL, + `course_id` int(11) DEFAULT NULL, + `history_user_id` int(11) DEFAULT NULL, + `provider_id` int(11) DEFAULT NULL, + PRIMARY KEY (`history_id`), + KEY `credit_historic_history_user_id_52a9922f26a69e7e_fk_auth_user_id` (`history_user_id`), + KEY `credit_historicalcreditrequest_b80bb774` (`id`), + KEY `credit_historicalcreditrequest_ef7c876f` (`uuid`), + KEY `credit_historicalcreditrequest_14c4b06b` (`username`), + CONSTRAINT `credit_historic_history_user_id_52a9922f26a69e7e_fk_auth_user_id` FOREIGN KEY (`history_user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `credit_historicalcreditrequirementstatus`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `credit_historicalcreditrequirementstatus` ( + `id` int(11) NOT NULL, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `username` varchar(255) NOT NULL, + `status` varchar(32) NOT NULL, + `reason` longtext NOT NULL, + `history_id` int(11) NOT NULL AUTO_INCREMENT, + `history_date` datetime(6) NOT NULL, + `history_type` varchar(1) NOT NULL, + `history_user_id` int(11) DEFAULT NULL, + `requirement_id` int(11) DEFAULT NULL, + PRIMARY KEY (`history_id`), + KEY `credit_historic_history_user_id_72b045b9192495cc_fk_auth_user_id` (`history_user_id`), + KEY `credit_historicalcreditrequirementstatus_b80bb774` (`id`), + KEY `credit_historicalcreditrequirementstatus_14c4b06b` (`username`), + CONSTRAINT `credit_historic_history_user_id_72b045b9192495cc_fk_auth_user_id` FOREIGN KEY (`history_user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `dark_lang_darklangconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `dark_lang_darklangconfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `released_languages` longtext NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `dark_lang_darklan_changed_by_id_7e1defb1121d58b8_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `dark_lang_darklan_changed_by_id_7e1defb1121d58b8_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_admin_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_admin_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `action_time` datetime(6) NOT NULL, + `object_id` longtext, + `object_repr` varchar(200) NOT NULL, + `action_flag` smallint(5) unsigned NOT NULL, + `change_message` longtext NOT NULL, + `content_type_id` int(11) DEFAULT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `djang_content_type_id_697914295151027a_fk_django_content_type_id` (`content_type_id`), + KEY `django_admin_log_user_id_52fdd58701c5f563_fk_auth_user_id` (`user_id`), + CONSTRAINT `djang_content_type_id_697914295151027a_fk_django_content_type_id` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`), + CONSTRAINT `django_admin_log_user_id_52fdd58701c5f563_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_comment_client_permission`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_comment_client_permission` ( + `name` varchar(30) NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_comment_client_permission_roles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_comment_client_permission_roles` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `permission_id` varchar(30) NOT NULL, + `role_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `permission_id` (`permission_id`,`role_id`), + KEY `django_role_id_558412c96ef7ba87_fk_django_comment_client_role_id` (`role_id`), + CONSTRAINT `D4e9a4067c1db9041491363f5e032121` FOREIGN KEY (`permission_id`) REFERENCES `django_comment_client_permission` (`name`), + CONSTRAINT `django_role_id_558412c96ef7ba87_fk_django_comment_client_role_id` FOREIGN KEY (`role_id`) REFERENCES `django_comment_client_role` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_comment_client_role`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_comment_client_role` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(30) NOT NULL, + `course_id` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + KEY `django_comment_client_role_ea134da7` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_comment_client_role_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_comment_client_role_users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `role_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `role_id` (`role_id`,`user_id`), + KEY `django_comment_client_r_user_id_139843e7dcf77368_fk_auth_user_id` (`user_id`), + CONSTRAINT `django_comment_client_r_user_id_139843e7dcf77368_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `django_role_id_75cf4005dc1fb11d_fk_django_comment_client_role_id` FOREIGN KEY (`role_id`) REFERENCES `django_comment_client_role` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_content_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_content_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `app_label` varchar(100) NOT NULL, + `model` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `django_content_type_app_label_45f3b1d93ec8c61c_uniq` (`app_label`,`model`) +) ENGINE=InnoDB AUTO_INCREMENT=234 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_migrations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_migrations` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `app` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `applied` datetime(6) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=76 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_openid_auth_association`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_openid_auth_association` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `server_url` longtext NOT NULL, + `handle` varchar(255) NOT NULL, + `secret` longtext NOT NULL, + `issued` int(11) NOT NULL, + `lifetime` int(11) NOT NULL, + `assoc_type` longtext NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_openid_auth_nonce`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_openid_auth_nonce` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `server_url` varchar(2047) NOT NULL, + `timestamp` int(11) NOT NULL, + `salt` varchar(40) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_openid_auth_useropenid`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_openid_auth_useropenid` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `claimed_id` longtext NOT NULL, + `display_id` longtext NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `django_openid_auth_user_user_id_136119e72782e2cf_fk_auth_user_id` (`user_id`), + CONSTRAINT `django_openid_auth_user_user_id_136119e72782e2cf_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_session`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_session` ( + `session_key` varchar(40) NOT NULL, + `session_data` longtext NOT NULL, + `expire_date` datetime(6) NOT NULL, + PRIMARY KEY (`session_key`), + KEY `django_session_de54fa62` (`expire_date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_site`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_site` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `domain` varchar(100) NOT NULL, + `name` varchar(50) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `djcelery_crontabschedule`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `djcelery_crontabschedule` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `minute` varchar(64) NOT NULL, + `hour` varchar(64) NOT NULL, + `day_of_week` varchar(64) NOT NULL, + `day_of_month` varchar(64) NOT NULL, + `month_of_year` varchar(64) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `djcelery_intervalschedule`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `djcelery_intervalschedule` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `every` int(11) NOT NULL, + `period` varchar(24) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `djcelery_periodictask`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `djcelery_periodictask` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(200) NOT NULL, + `task` varchar(200) NOT NULL, + `interval_id` int(11) DEFAULT NULL, + `crontab_id` int(11) DEFAULT NULL, + `args` longtext NOT NULL, + `kwargs` longtext NOT NULL, + `queue` varchar(200) DEFAULT NULL, + `exchange` varchar(200) DEFAULT NULL, + `routing_key` varchar(200) DEFAULT NULL, + `expires` datetime(6) DEFAULT NULL, + `enabled` tinyint(1) NOT NULL, + `last_run_at` datetime(6) DEFAULT NULL, + `total_run_count` int(10) unsigned NOT NULL, + `date_changed` datetime(6) NOT NULL, + `description` longtext NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`), + KEY `djc_interval_id_20cfc1cad060dfad_fk_djcelery_intervalschedule_id` (`interval_id`), + KEY `djcel_crontab_id_1d8228f5b44b680a_fk_djcelery_crontabschedule_id` (`crontab_id`), + CONSTRAINT `djc_interval_id_20cfc1cad060dfad_fk_djcelery_intervalschedule_id` FOREIGN KEY (`interval_id`) REFERENCES `djcelery_intervalschedule` (`id`), + CONSTRAINT `djcel_crontab_id_1d8228f5b44b680a_fk_djcelery_crontabschedule_id` FOREIGN KEY (`crontab_id`) REFERENCES `djcelery_crontabschedule` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `djcelery_periodictasks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `djcelery_periodictasks` ( + `ident` smallint(6) NOT NULL, + `last_update` datetime(6) NOT NULL, + PRIMARY KEY (`ident`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `djcelery_taskstate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `djcelery_taskstate` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `state` varchar(64) NOT NULL, + `task_id` varchar(36) NOT NULL, + `name` varchar(200) DEFAULT NULL, + `tstamp` datetime(6) NOT NULL, + `args` longtext, + `kwargs` longtext, + `eta` datetime(6) DEFAULT NULL, + `expires` datetime(6) DEFAULT NULL, + `result` longtext, + `traceback` longtext, + `runtime` double DEFAULT NULL, + `retries` int(11) NOT NULL, + `worker_id` int(11) DEFAULT NULL, + `hidden` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `task_id` (`task_id`), + KEY `djcelery_t_worker_id_30050731b1c3d3d9_fk_djcelery_workerstate_id` (`worker_id`), + KEY `djcelery_taskstate_9ed39e2e` (`state`), + KEY `djcelery_taskstate_b068931c` (`name`), + KEY `djcelery_taskstate_863bb2ee` (`tstamp`), + KEY `djcelery_taskstate_662f707d` (`hidden`), + CONSTRAINT `djcelery_t_worker_id_30050731b1c3d3d9_fk_djcelery_workerstate_id` FOREIGN KEY (`worker_id`) REFERENCES `djcelery_workerstate` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `djcelery_workerstate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `djcelery_workerstate` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `hostname` varchar(255) NOT NULL, + `last_heartbeat` datetime(6) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `hostname` (`hostname`), + KEY `djcelery_workerstate_f129901a` (`last_heartbeat`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `edxval_coursevideo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `edxval_coursevideo` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `video_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `edxval_coursevideo_course_id_42cecee05cff2d8c_uniq` (`course_id`,`video_id`), + KEY `edxval_coursevideo_b58b747e` (`video_id`), + CONSTRAINT `edxval_coursevideo_video_id_68b2969f352edd03_fk_edxval_video_id` FOREIGN KEY (`video_id`) REFERENCES `edxval_video` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `edxval_encodedvideo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `edxval_encodedvideo` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `url` varchar(200) NOT NULL, + `file_size` int(10) unsigned NOT NULL, + `bitrate` int(10) unsigned NOT NULL, + `profile_id` int(11) NOT NULL, + `video_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `edxval_encodedvideo_83a0eb3f` (`profile_id`), + KEY `edxval_encodedvideo_b58b747e` (`video_id`), + CONSTRAINT `edxval_encodedv_profile_id_484a111092acafb3_fk_edxval_profile_id` FOREIGN KEY (`profile_id`) REFERENCES `edxval_profile` (`id`), + CONSTRAINT `edxval_encodedvideo_video_id_56934bca09fc3b13_fk_edxval_video_id` FOREIGN KEY (`video_id`) REFERENCES `edxval_video` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `edxval_profile`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `edxval_profile` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `profile_name` varchar(50) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `profile_name` (`profile_name`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `edxval_subtitle`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `edxval_subtitle` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `fmt` varchar(20) NOT NULL, + `language` varchar(8) NOT NULL, + `content` longtext NOT NULL, + `video_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `edxval_subtitle_76314543` (`fmt`), + KEY `edxval_subtitle_8512ae7d` (`language`), + KEY `edxval_subtitle_b58b747e` (`video_id`), + CONSTRAINT `edxval_subtitle_video_id_5fabb0e154dda720_fk_edxval_video_id` FOREIGN KEY (`video_id`) REFERENCES `edxval_video` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `edxval_video`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `edxval_video` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `edx_video_id` varchar(100) NOT NULL, + `client_video_id` varchar(255) NOT NULL, + `duration` double NOT NULL, + `status` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `edx_video_id` (`edx_video_id`), + KEY `edxval_video_8d63c4f7` (`client_video_id`), + KEY `edxval_video_9acb4454` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `embargo_country`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `embargo_country` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `country` varchar(2) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `country` (`country`) +) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `embargo_countryaccessrule`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `embargo_countryaccessrule` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `rule_type` varchar(255) NOT NULL, + `country_id` int(11) NOT NULL, + `restricted_course_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `embargo_countryaccess_restricted_course_id_6f340c36c633cb0a_uniq` (`restricted_course_id`,`country_id`), + KEY `embargo_countr_country_id_6244ff9d9c405c6e_fk_embargo_country_id` (`country_id`), + KEY `embargo_countryaccessrule_77607676` (`restricted_course_id`), + CONSTRAINT `d140f72cce132ba9230b3ff66d8761ad` FOREIGN KEY (`restricted_course_id`) REFERENCES `embargo_restrictedcourse` (`id`), + CONSTRAINT `embargo_countr_country_id_6244ff9d9c405c6e_fk_embargo_country_id` FOREIGN KEY (`country_id`) REFERENCES `embargo_country` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `embargo_courseaccessrulehistory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `embargo_courseaccessrulehistory` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `timestamp` datetime(6) NOT NULL, + `course_key` varchar(255) NOT NULL, + `snapshot` longtext, + PRIMARY KEY (`id`), + KEY `embargo_courseaccessrulehistory_d7e6d55b` (`timestamp`), + KEY `embargo_courseaccessrulehistory_c8235886` (`course_key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `embargo_embargoedcourse`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `embargo_embargoedcourse` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `embargoed` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `course_id` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `embargo_embargoedstate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `embargo_embargoedstate` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `embargoed_countries` longtext NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `embargo_embargoeds_changed_by_id_7e30811d0e5008b_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `embargo_embargoeds_changed_by_id_7e30811d0e5008b_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `embargo_ipfilter`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `embargo_ipfilter` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `whitelist` longtext NOT NULL, + `blacklist` longtext NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `embargo_ipfilter_changed_by_id_5c820bfac889ea81_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `embargo_ipfilter_changed_by_id_5c820bfac889ea81_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `embargo_restrictedcourse`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `embargo_restrictedcourse` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_key` varchar(255) NOT NULL, + `enroll_msg_key` varchar(255) NOT NULL, + `access_msg_key` varchar(255) NOT NULL, + `disable_access_check` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `course_key` (`course_key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `external_auth_externalauthmap`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `external_auth_externalauthmap` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `external_id` varchar(255) NOT NULL, + `external_domain` varchar(255) NOT NULL, + `external_credentials` longtext NOT NULL, + `external_email` varchar(255) NOT NULL, + `external_name` varchar(255) NOT NULL, + `internal_password` varchar(31) NOT NULL, + `dtcreated` datetime(6) NOT NULL, + `dtsignup` datetime(6) DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `external_auth_externalauthmap_external_id_7f035ef8bc4d313e_uniq` (`external_id`,`external_domain`), + UNIQUE KEY `user_id` (`user_id`), + KEY `external_auth_externalauthmap_0e684294` (`external_id`), + KEY `external_auth_externalauthmap_630a0308` (`external_domain`), + KEY `external_auth_externalauthmap_e9425fc5` (`external_email`), + KEY `external_auth_externalauthmap_c9555995` (`external_name`), + CONSTRAINT `external_auth_externala_user_id_644e7779f2d52b9a_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `foldit_puzzlecomplete`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `foldit_puzzlecomplete` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `unique_user_id` varchar(50) NOT NULL, + `puzzle_id` int(11) NOT NULL, + `puzzle_set` int(11) NOT NULL, + `puzzle_subset` int(11) NOT NULL, + `created` datetime(6) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `foldit_puzzlecomplete_user_id_4c63656af6674331_uniq` (`user_id`,`puzzle_id`,`puzzle_set`,`puzzle_subset`), + KEY `foldit_puzzlecomplete_ff2b2d15` (`unique_user_id`), + KEY `foldit_puzzlecomplete_56c088b4` (`puzzle_set`), + KEY `foldit_puzzlecomplete_2dc27ffb` (`puzzle_subset`), + CONSTRAINT `foldit_puzzlecomplete_user_id_cd0294fb3a392_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `foldit_score`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `foldit_score` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `unique_user_id` varchar(50) NOT NULL, + `puzzle_id` int(11) NOT NULL, + `best_score` double NOT NULL, + `current_score` double NOT NULL, + `score_version` int(11) NOT NULL, + `created` datetime(6) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `foldit_score_user_id_6ac502fe1f6861b2_fk_auth_user_id` (`user_id`), + KEY `foldit_score_ff2b2d15` (`unique_user_id`), + KEY `foldit_score_44726e86` (`best_score`), + KEY `foldit_score_32d6f808` (`current_score`), + CONSTRAINT `foldit_score_user_id_6ac502fe1f6861b2_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `instructor_task_instructortask`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `instructor_task_instructortask` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `task_type` varchar(50) NOT NULL, + `course_id` varchar(255) NOT NULL, + `task_key` varchar(255) NOT NULL, + `task_input` varchar(255) NOT NULL, + `task_id` varchar(255) NOT NULL, + `task_state` varchar(50) DEFAULT NULL, + `task_output` varchar(1024) DEFAULT NULL, + `created` datetime(6) DEFAULT NULL, + `updated` datetime(6) NOT NULL, + `subtasks` longtext NOT NULL, + `requester_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `instructor_task_in_requester_id_3383acfe2fe42391_fk_auth_user_id` (`requester_id`), + KEY `instructor_task_instructortask_5361aa34` (`task_type`), + KEY `instructor_task_instructortask_ea134da7` (`course_id`), + KEY `instructor_task_instructortask_a2903537` (`task_key`), + KEY `instructor_task_instructortask_57746cc8` (`task_id`), + KEY `instructor_task_instructortask_76980a94` (`task_state`), + CONSTRAINT `instructor_task_in_requester_id_3383acfe2fe42391_fk_auth_user_id` FOREIGN KEY (`requester_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `licenses_coursesoftware`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `licenses_coursesoftware` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `full_name` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL, + `course_id` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `licenses_userlicense`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `licenses_userlicense` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `serial` varchar(255) NOT NULL, + `software_id` int(11) NOT NULL, + `user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `licen_software_id_209fd400b7c7a3ca_fk_licenses_coursesoftware_id` (`software_id`), + KEY `licenses_userlicense_user_id_7d98c37aa4438a34_fk_auth_user_id` (`user_id`), + CONSTRAINT `licen_software_id_209fd400b7c7a3ca_fk_licenses_coursesoftware_id` FOREIGN KEY (`software_id`) REFERENCES `licenses_coursesoftware` (`id`), + CONSTRAINT `licenses_userlicense_user_id_7d98c37aa4438a34_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `lms_xblock_xblockasidesconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `lms_xblock_xblockasidesconfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `disabled_blocks` longtext NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `lms_xblock_xblocka_changed_by_id_eabf5ef3e34dfb8_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `lms_xblock_xblocka_changed_by_id_eabf5ef3e34dfb8_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `milestones_coursecontentmilestone`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `milestones_coursecontentmilestone` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `course_id` varchar(255) NOT NULL, + `content_id` varchar(255) NOT NULL, + `active` tinyint(1) NOT NULL, + `milestone_id` int(11) NOT NULL, + `milestone_relationship_type_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `milestones_coursecontentmileston_course_id_68d1457cd52d6dff_uniq` (`course_id`,`content_id`,`milestone_id`), + KEY `milestones_coursecontentmilestone_ea134da7` (`course_id`), + KEY `milestones_coursecontentmilestone_e14f02ad` (`content_id`), + KEY `milestones_coursecontentmilestone_dbb5cd1e` (`milestone_id`), + KEY `milestones_coursecontentmilestone_db6866e3` (`milestone_relationship_type_id`), + CONSTRAINT `D84e404851bc6d6b9fe0d60955e8729c` FOREIGN KEY (`milestone_relationship_type_id`) REFERENCES `milestones_milestonerelationshiptype` (`id`), + CONSTRAINT `milesto_milestone_id_73b6eddde5b205a8_fk_milestones_milestone_id` FOREIGN KEY (`milestone_id`) REFERENCES `milestones_milestone` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `milestones_coursemilestone`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `milestones_coursemilestone` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `course_id` varchar(255) NOT NULL, + `active` tinyint(1) NOT NULL, + `milestone_id` int(11) NOT NULL, + `milestone_relationship_type_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `milestones_coursemilestone_course_id_5a06e10579eab3b7_uniq` (`course_id`,`milestone_id`), + KEY `milestones_coursemilestone_ea134da7` (`course_id`), + KEY `milestones_coursemilestone_dbb5cd1e` (`milestone_id`), + KEY `milestones_coursemilestone_db6866e3` (`milestone_relationship_type_id`), + CONSTRAINT `D69536d0d313008147c5daf5341090e1` FOREIGN KEY (`milestone_relationship_type_id`) REFERENCES `milestones_milestonerelationshiptype` (`id`), + CONSTRAINT `milesto_milestone_id_284153799c54d7d8_fk_milestones_milestone_id` FOREIGN KEY (`milestone_id`) REFERENCES `milestones_milestone` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `milestones_milestone`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `milestones_milestone` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `namespace` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `display_name` varchar(255) NOT NULL, + `description` longtext NOT NULL, + `active` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `milestones_milestone_namespace_460a2f6943016c0b_uniq` (`namespace`,`name`), + KEY `milestones_milestone_89801e9e` (`namespace`), + KEY `milestones_milestone_b068931c` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `milestones_milestonerelationshiptype`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `milestones_milestonerelationshiptype` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `name` varchar(25) NOT NULL, + `description` longtext NOT NULL, + `active` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `milestones_usermilestone`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `milestones_usermilestone` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `user_id` int(11) NOT NULL, + `source` longtext NOT NULL, + `collected` datetime(6) DEFAULT NULL, + `active` tinyint(1) NOT NULL, + `milestone_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `milestones_usermilestone_user_id_10206aa452468351_uniq` (`user_id`,`milestone_id`), + KEY `milesto_milestone_id_4fe38e3e9994f15c_fk_milestones_milestone_id` (`milestone_id`), + KEY `milestones_usermilestone_e8701ad4` (`user_id`), + CONSTRAINT `milesto_milestone_id_4fe38e3e9994f15c_fk_milestones_milestone_id` FOREIGN KEY (`milestone_id`) REFERENCES `milestones_milestone` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `mobile_api_mobileapiconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mobile_api_mobileapiconfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `video_profiles` longtext NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `mobile_api_mobile_changed_by_id_439d2c27670d0fc4_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `mobile_api_mobile_changed_by_id_439d2c27670d0fc4_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `notes_note`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notes_note` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `uri` varchar(255) NOT NULL, + `text` longtext NOT NULL, + `quote` longtext NOT NULL, + `range_start` varchar(2048) NOT NULL, + `range_start_offset` int(11) NOT NULL, + `range_end` varchar(2048) NOT NULL, + `range_end_offset` int(11) NOT NULL, + `tags` longtext NOT NULL, + `created` datetime(6) DEFAULT NULL, + `updated` datetime(6) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `notes_note_user_id_2aa1ff88fd937cb3_fk_auth_user_id` (`user_id`), + KEY `notes_note_ea134da7` (`course_id`), + KEY `notes_note_9305b73d` (`uri`), + KEY `notes_note_e2fa5388` (`created`), + KEY `notes_note_0f81d52e` (`updated`), + CONSTRAINT `notes_note_user_id_2aa1ff88fd937cb3_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `notify_notification`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notify_notification` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `message` longtext NOT NULL, + `url` varchar(200) DEFAULT NULL, + `is_viewed` tinyint(1) NOT NULL, + `is_emailed` tinyint(1) NOT NULL, + `created` datetime(6) NOT NULL, + `subscription_id` int(11), + PRIMARY KEY (`id`), + KEY `notify_notification_ef42673f` (`subscription_id`), + CONSTRAINT `D48032390695e0699e92b8d7ccdbff7e` FOREIGN KEY (`subscription_id`) REFERENCES `notify_subscription` (`subscription_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `notify_notificationtype`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notify_notificationtype` ( + `key` varchar(128) NOT NULL, + `label` varchar(128) DEFAULT NULL, + `content_type_id` int(11) DEFAULT NULL, + PRIMARY KEY (`key`), + KEY `notif_content_type_id_181f055892581fd8_fk_django_content_type_id` (`content_type_id`), + CONSTRAINT `notif_content_type_id_181f055892581fd8_fk_django_content_type_id` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `notify_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notify_settings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `interval` smallint(6) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `notify_settings_user_id_14e062dc3d4345b3_fk_auth_user_id` (`user_id`), + CONSTRAINT `notify_settings_user_id_14e062dc3d4345b3_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `notify_subscription`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notify_subscription` ( + `subscription_id` int(11) NOT NULL AUTO_INCREMENT, + `object_id` varchar(64) DEFAULT NULL, + `send_emails` tinyint(1) NOT NULL, + `notification_type_id` varchar(128) NOT NULL, + `settings_id` int(11) NOT NULL, + PRIMARY KEY (`subscription_id`), + KEY `a2462650bbefc26547210b80dec61069` (`notification_type_id`), + KEY `notify_subscr_settings_id_64d594d127e8ca95_fk_notify_settings_id` (`settings_id`), + CONSTRAINT `a2462650bbefc26547210b80dec61069` FOREIGN KEY (`notification_type_id`) REFERENCES `notify_notificationtype` (`key`), + CONSTRAINT `notify_subscr_settings_id_64d594d127e8ca95_fk_notify_settings_id` FOREIGN KEY (`settings_id`) REFERENCES `notify_settings` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `oauth2_accesstoken`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oauth2_accesstoken` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `token` varchar(255) NOT NULL, + `expires` datetime(6) NOT NULL, + `scope` int(11) NOT NULL, + `client_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `oauth2_accesstoken_94a08da1` (`token`), + KEY `oauth2_accesstoken_2bfe9d72` (`client_id`), + KEY `oauth2_accesstoken_e8701ad4` (`user_id`), + CONSTRAINT `oauth2_accesstoke_client_id_20c73b03a7c139a2_fk_oauth2_client_id` FOREIGN KEY (`client_id`) REFERENCES `oauth2_client` (`id`), + CONSTRAINT `oauth2_accesstoken_user_id_7a865c7085722378_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `oauth2_client`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oauth2_client` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `url` varchar(200) NOT NULL, + `redirect_uri` varchar(200) NOT NULL, + `client_id` varchar(255) NOT NULL, + `client_secret` varchar(255) NOT NULL, + `client_type` int(11) NOT NULL, + `user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `oauth2_client_user_id_2b47284bbd512fe1_fk_auth_user_id` (`user_id`), + CONSTRAINT `oauth2_client_user_id_2b47284bbd512fe1_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `oauth2_grant`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oauth2_grant` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(255) NOT NULL, + `expires` datetime(6) NOT NULL, + `redirect_uri` varchar(255) NOT NULL, + `scope` int(11) NOT NULL, + `client_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `oauth2_grant_client_id_fbfc174fbc856af_fk_oauth2_client_id` (`client_id`), + KEY `oauth2_grant_user_id_3de96a461bb76819_fk_auth_user_id` (`user_id`), + CONSTRAINT `oauth2_grant_client_id_fbfc174fbc856af_fk_oauth2_client_id` FOREIGN KEY (`client_id`) REFERENCES `oauth2_client` (`id`), + CONSTRAINT `oauth2_grant_user_id_3de96a461bb76819_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `oauth2_provider_trustedclient`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oauth2_provider_trustedclient` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `client_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `oauth2_provider_tr_client_id_bb96ea0be42c00a_fk_oauth2_client_id` (`client_id`), + CONSTRAINT `oauth2_provider_tr_client_id_bb96ea0be42c00a_fk_oauth2_client_id` FOREIGN KEY (`client_id`) REFERENCES `oauth2_client` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `oauth2_refreshtoken`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oauth2_refreshtoken` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `token` varchar(255) NOT NULL, + `expired` tinyint(1) NOT NULL, + `access_token_id` int(11) NOT NULL, + `client_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `access_token_id` (`access_token_id`), + KEY `oauth2_refreshtok_client_id_2f55036ac9aa614e_fk_oauth2_client_id` (`client_id`), + KEY `oauth2_refreshtoken_user_id_acecf94460b787c_fk_auth_user_id` (`user_id`), + CONSTRAINT `oauth2__access_token_id_f99377d503a000b_fk_oauth2_accesstoken_id` FOREIGN KEY (`access_token_id`) REFERENCES `oauth2_accesstoken` (`id`), + CONSTRAINT `oauth2_refreshtok_client_id_2f55036ac9aa614e_fk_oauth2_client_id` FOREIGN KEY (`client_id`) REFERENCES `oauth2_client` (`id`), + CONSTRAINT `oauth2_refreshtoken_user_id_acecf94460b787c_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `oauth_provider_consumer`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oauth_provider_consumer` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `description` longtext NOT NULL, + `key` varchar(256) NOT NULL, + `secret` varchar(16) NOT NULL, + `status` smallint(6) NOT NULL, + `xauth_allowed` tinyint(1) NOT NULL, + `user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `oauth_provider_consumer_user_id_4f22b60d2b258006_fk_auth_user_id` (`user_id`), + CONSTRAINT `oauth_provider_consumer_user_id_4f22b60d2b258006_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `oauth_provider_nonce`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oauth_provider_nonce` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `token_key` varchar(32) NOT NULL, + `consumer_key` varchar(256) NOT NULL, + `key` varchar(255) NOT NULL, + `timestamp` int(10) unsigned NOT NULL, + PRIMARY KEY (`id`), + KEY `oauth_provider_nonce_d7e6d55b` (`timestamp`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `oauth_provider_scope`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oauth_provider_scope` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `url` longtext NOT NULL, + `is_readonly` tinyint(1) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `oauth_provider_token`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `oauth_provider_token` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `key` varchar(32) DEFAULT NULL, + `secret` varchar(16) DEFAULT NULL, + `token_type` smallint(6) NOT NULL, + `timestamp` int(11) NOT NULL, + `is_approved` tinyint(1) NOT NULL, + `verifier` varchar(10) NOT NULL, + `callback` varchar(2083) DEFAULT NULL, + `callback_confirmed` tinyint(1) NOT NULL, + `consumer_id` int(11) NOT NULL, + `scope_id` int(11) DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `oauth_consumer_id_1b9915b5bcf1ee5b_fk_oauth_provider_consumer_id` (`consumer_id`), + KEY `oauth_provi_scope_id_459821b6fecbc02a_fk_oauth_provider_scope_id` (`scope_id`), + KEY `oauth_provider_token_user_id_588adbcffc892186_fk_auth_user_id` (`user_id`), + CONSTRAINT `oauth_consumer_id_1b9915b5bcf1ee5b_fk_oauth_provider_consumer_id` FOREIGN KEY (`consumer_id`) REFERENCES `oauth_provider_consumer` (`id`), + CONSTRAINT `oauth_provi_scope_id_459821b6fecbc02a_fk_oauth_provider_scope_id` FOREIGN KEY (`scope_id`) REFERENCES `oauth_provider_scope` (`id`), + CONSTRAINT `oauth_provider_token_user_id_588adbcffc892186_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `organizations_organization`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `organizations_organization` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `name` varchar(255) NOT NULL, + `short_name` varchar(255) NOT NULL, + `description` longtext NOT NULL, + `logo` varchar(255) DEFAULT NULL, + `active` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + KEY `organizations_organization_b068931c` (`name`), + KEY `organizations_organization_4698bac7` (`short_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `organizations_organizationcourse`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `organizations_organizationcourse` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `course_id` varchar(255) NOT NULL, + `active` tinyint(1) NOT NULL, + `organization_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `organizations_organizationcourse_course_id_3f0149776c0495ff_uniq` (`course_id`,`organization_id`), + KEY `a7b04b16eba98e518fbe21d390bd8e3e` (`organization_id`), + KEY `organizations_organizationcourse_ea134da7` (`course_id`), + CONSTRAINT `a7b04b16eba98e518fbe21d390bd8e3e` FOREIGN KEY (`organization_id`) REFERENCES `organizations_organization` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `proctoring_proctoredexam`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proctoring_proctoredexam` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `course_id` varchar(255) NOT NULL, + `content_id` varchar(255) NOT NULL, + `external_id` varchar(255) DEFAULT NULL, + `exam_name` longtext NOT NULL, + `time_limit_mins` int(11) NOT NULL, + `due_date` datetime(6) DEFAULT NULL, + `is_proctored` tinyint(1) NOT NULL, + `is_practice_exam` tinyint(1) NOT NULL, + `is_active` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `proctoring_proctoredexam_course_id_7d8ab189323890c0_uniq` (`course_id`,`content_id`), + KEY `proctoring_proctoredexam_ea134da7` (`course_id`), + KEY `proctoring_proctoredexam_e14f02ad` (`content_id`), + KEY `proctoring_proctoredexam_0e684294` (`external_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `proctoring_proctoredexamreviewpolicy`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proctoring_proctoredexamreviewpolicy` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `review_policy` longtext NOT NULL, + `proctored_exam_id` int(11) NOT NULL, + `set_by_user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `D32bab97500954b362d3f768dd89b6da` (`proctored_exam_id`), + KEY `proctoring_proct_set_by_user_id_75a66580aa44cd84_fk_auth_user_id` (`set_by_user_id`), + CONSTRAINT `D32bab97500954b362d3f768dd89b6da` FOREIGN KEY (`proctored_exam_id`) REFERENCES `proctoring_proctoredexam` (`id`), + CONSTRAINT `proctoring_proct_set_by_user_id_75a66580aa44cd84_fk_auth_user_id` FOREIGN KEY (`set_by_user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `proctoring_proctoredexamreviewpolicyhistory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proctoring_proctoredexamreviewpolicyhistory` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `original_id` int(11) NOT NULL, + `review_policy` longtext NOT NULL, + `proctored_exam_id` int(11) NOT NULL, + `set_by_user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `d9965d8af87bebd0587414ca1ba4826f` (`proctored_exam_id`), + KEY `proctoring_procto_set_by_user_id_31fae610848d90f_fk_auth_user_id` (`set_by_user_id`), + KEY `proctoring_proctoredexamreviewpolicyhistory_524b09d0` (`original_id`), + CONSTRAINT `d9965d8af87bebd0587414ca1ba4826f` FOREIGN KEY (`proctored_exam_id`) REFERENCES `proctoring_proctoredexam` (`id`), + CONSTRAINT `proctoring_procto_set_by_user_id_31fae610848d90f_fk_auth_user_id` FOREIGN KEY (`set_by_user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `proctoring_proctoredexamsoftwaresecurereview`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proctoring_proctoredexamsoftwaresecurereview` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `attempt_code` varchar(255) NOT NULL, + `review_status` varchar(255) NOT NULL, + `raw_data` longtext NOT NULL, + `video_url` longtext NOT NULL, + `exam_id` int(11) DEFAULT NULL, + `reviewed_by_id` int(11) DEFAULT NULL, + `student_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `proctori_exam_id_635059f5fe2cc392_fk_proctoring_proctoredexam_id` (`exam_id`), + KEY `proctoring_proct_reviewed_by_id_4cff67b7de094f65_fk_auth_user_id` (`reviewed_by_id`), + KEY `proctoring_proctored_student_id_14c182517b0cbb5b_fk_auth_user_id` (`student_id`), + KEY `proctoring_proctoredexamsoftwaresecurereview_b38e5b0e` (`attempt_code`), + CONSTRAINT `proctori_exam_id_635059f5fe2cc392_fk_proctoring_proctoredexam_id` FOREIGN KEY (`exam_id`) REFERENCES `proctoring_proctoredexam` (`id`), + CONSTRAINT `proctoring_proct_reviewed_by_id_4cff67b7de094f65_fk_auth_user_id` FOREIGN KEY (`reviewed_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `proctoring_proctored_student_id_14c182517b0cbb5b_fk_auth_user_id` FOREIGN KEY (`student_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `proctoring_proctoredexamsoftwaresecurereviewhistory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proctoring_proctoredexamsoftwaresecurereviewhistory` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `attempt_code` varchar(255) NOT NULL, + `review_status` varchar(255) NOT NULL, + `raw_data` longtext NOT NULL, + `video_url` longtext NOT NULL, + `exam_id` int(11) DEFAULT NULL, + `reviewed_by_id` int(11) DEFAULT NULL, + `student_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `proctori_exam_id_73969ae423813477_fk_proctoring_proctoredexam_id` (`exam_id`), + KEY `proctoring_proct_reviewed_by_id_139568d0bf423998_fk_auth_user_id` (`reviewed_by_id`), + KEY `proctoring_proctored_student_id_6922ba3b791462d8_fk_auth_user_id` (`student_id`), + KEY `proctoring_proctoredexamsoftwaresecurereviewhistory_b38e5b0e` (`attempt_code`), + CONSTRAINT `proctori_exam_id_73969ae423813477_fk_proctoring_proctoredexam_id` FOREIGN KEY (`exam_id`) REFERENCES `proctoring_proctoredexam` (`id`), + CONSTRAINT `proctoring_proct_reviewed_by_id_139568d0bf423998_fk_auth_user_id` FOREIGN KEY (`reviewed_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `proctoring_proctored_student_id_6922ba3b791462d8_fk_auth_user_id` FOREIGN KEY (`student_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `proctoring_proctoredexamstudentallowance`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proctoring_proctoredexamstudentallowance` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `key` varchar(255) NOT NULL, + `value` varchar(255) NOT NULL, + `proctored_exam_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `proctoring_proctoredexamstudentall_user_id_665ed945152c2f60_uniq` (`user_id`,`proctored_exam_id`,`key`), + KEY `db55b83a7875e70b3a0ebd1f81a898d8` (`proctored_exam_id`), + CONSTRAINT `db55b83a7875e70b3a0ebd1f81a898d8` FOREIGN KEY (`proctored_exam_id`) REFERENCES `proctoring_proctoredexam` (`id`), + CONSTRAINT `proctoring_proctoredexam_user_id_a0a0681d4a01661_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `proctoring_proctoredexamstudentallowancehistory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proctoring_proctoredexamstudentallowancehistory` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `allowance_id` int(11) NOT NULL, + `key` varchar(255) NOT NULL, + `value` varchar(255) NOT NULL, + `proctored_exam_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `D169ec97a7fca1dbf6b0bb2929d41ccc` (`proctored_exam_id`), + KEY `proctoring_proctoredexa_user_id_68e25e3abb187580_fk_auth_user_id` (`user_id`), + CONSTRAINT `D169ec97a7fca1dbf6b0bb2929d41ccc` FOREIGN KEY (`proctored_exam_id`) REFERENCES `proctoring_proctoredexam` (`id`), + CONSTRAINT `proctoring_proctoredexa_user_id_68e25e3abb187580_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `proctoring_proctoredexamstudentattempt`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proctoring_proctoredexamstudentattempt` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `started_at` datetime(6) DEFAULT NULL, + `completed_at` datetime(6) DEFAULT NULL, + `last_poll_timestamp` datetime(6) DEFAULT NULL, + `last_poll_ipaddr` varchar(32) DEFAULT NULL, + `attempt_code` varchar(255) DEFAULT NULL, + `external_id` varchar(255) DEFAULT NULL, + `allowed_time_limit_mins` int(11) NOT NULL, + `status` varchar(64) NOT NULL, + `taking_as_proctored` tinyint(1) NOT NULL, + `is_sample_attempt` tinyint(1) NOT NULL, + `student_name` varchar(255) NOT NULL, + `review_policy_id` int(11) DEFAULT NULL, + `proctored_exam_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `proctoring_proctoredexamstudentatt_user_id_15d13fa8dac316a0_uniq` (`user_id`,`proctored_exam_id`), + KEY `D5e0a120c32f715bfe04a0a57f399ec0` (`proctored_exam_id`), + KEY `proctoring_proctoredexamstudentattempt_b38e5b0e` (`attempt_code`), + KEY `proctoring_proctoredexamstudentattempt_0e684294` (`external_id`), + CONSTRAINT `D5e0a120c32f715bfe04a0a57f399ec0` FOREIGN KEY (`proctored_exam_id`) REFERENCES `proctoring_proctoredexam` (`id`), + CONSTRAINT `proctoring_proctoredexa_user_id_633fd8f4f65a0cac_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `proctoring_proctoredexamstudentattemptcomment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proctoring_proctoredexamstudentattemptcomment` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `start_time` int(11) NOT NULL, + `stop_time` int(11) NOT NULL, + `duration` int(11) NOT NULL, + `comment` longtext NOT NULL, + `status` varchar(255) NOT NULL, + `review_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `proctoring_proctoredexamstudentattemptcomment_5bd2a989` (`review_id`), + CONSTRAINT `D596dd9c7d948d9256c2e29e6194b5e7` FOREIGN KEY (`review_id`) REFERENCES `proctoring_proctoredexamsoftwaresecurereview` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `proctoring_proctoredexamstudentattempthistory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proctoring_proctoredexamstudentattempthistory` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `attempt_id` int(11) DEFAULT NULL, + `started_at` datetime(6) DEFAULT NULL, + `completed_at` datetime(6) DEFAULT NULL, + `attempt_code` varchar(255) DEFAULT NULL, + `external_id` varchar(255) DEFAULT NULL, + `allowed_time_limit_mins` int(11) NOT NULL, + `status` varchar(64) NOT NULL, + `taking_as_proctored` tinyint(1) NOT NULL, + `is_sample_attempt` tinyint(1) NOT NULL, + `student_name` varchar(255) NOT NULL, + `review_policy_id` int(11) DEFAULT NULL, + `last_poll_timestamp` datetime(6) DEFAULT NULL, + `last_poll_ipaddr` varchar(32) DEFAULT NULL, + `proctored_exam_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `cbccbfd5c4c427541fdce96e77e6bf6c` (`proctored_exam_id`), + KEY `proctoring_proctoredexa_user_id_59ce75db7c4fc769_fk_auth_user_id` (`user_id`), + KEY `proctoring_proctoredexamstudentattempthistory_b38e5b0e` (`attempt_code`), + KEY `proctoring_proctoredexamstudentattempthistory_0e684294` (`external_id`), + CONSTRAINT `cbccbfd5c4c427541fdce96e77e6bf6c` FOREIGN KEY (`proctored_exam_id`) REFERENCES `proctoring_proctoredexam` (`id`), + CONSTRAINT `proctoring_proctoredexa_user_id_59ce75db7c4fc769_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `programs_programsapiconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `programs_programsapiconfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `internal_service_url` varchar(200) NOT NULL, + `public_service_url` varchar(200) NOT NULL, + `api_version_number` int(11) NOT NULL, + `enable_student_dashboard` tinyint(1) DEFAULT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `programs_programsa_changed_by_id_b7c3b49d5c0dcd3_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `programs_programsa_changed_by_id_b7c3b49d5c0dcd3_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `psychometrics_psychometricdata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `psychometrics_psychometricdata` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `done` tinyint(1) NOT NULL, + `attempts` int(11) NOT NULL, + `checktimes` longtext, + `studentmodule_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `studentmodule_id` (`studentmodule_id`), + CONSTRAINT `D758b867e6fa9161734bd9cb58b9a485` FOREIGN KEY (`studentmodule_id`) REFERENCES `courseware_studentmodule` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `self_paced_selfpacedconfiguration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `self_paced_selfpacedconfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `enable_course_home_improvements` tinyint(1) NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `self_paced_selfpa_changed_by_id_62c0bd4c6725fd15_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `self_paced_selfpa_changed_by_id_62c0bd4c6725fd15_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_certificateitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_certificateitem` ( + `orderitem_ptr_id` int(11) NOT NULL, + `course_id` varchar(128) NOT NULL, + `mode` varchar(50) NOT NULL, + `course_enrollment_id` int(11) NOT NULL, + PRIMARY KEY (`orderitem_ptr_id`), + KEY `D231cb871868cb92e6ed1ee8e53a1bee` (`course_enrollment_id`), + KEY `shoppingcart_certificateitem_ea134da7` (`course_id`), + KEY `shoppingcart_certificateitem_15d61712` (`mode`), + CONSTRAINT `D231cb871868cb92e6ed1ee8e53a1bee` FOREIGN KEY (`course_enrollment_id`) REFERENCES `student_courseenrollment` (`id`), + CONSTRAINT `s_orderitem_ptr_id_5127313bc5a09762_fk_shoppingcart_orderitem_id` FOREIGN KEY (`orderitem_ptr_id`) REFERENCES `shoppingcart_orderitem` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_coupon`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_coupon` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(32) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `course_id` varchar(255) NOT NULL, + `percentage_discount` int(11) NOT NULL, + `created_at` datetime(6) NOT NULL, + `is_active` tinyint(1) NOT NULL, + `expiration_date` datetime(6) DEFAULT NULL, + `created_by_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `shoppingcart_coup_created_by_id_625ade1b541f5324_fk_auth_user_id` (`created_by_id`), + KEY `shoppingcart_coupon_c1336794` (`code`), + CONSTRAINT `shoppingcart_coup_created_by_id_625ade1b541f5324_fk_auth_user_id` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_couponredemption`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_couponredemption` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `coupon_id` int(11) NOT NULL, + `order_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `shoppingcar_coupon_id_1afa016627ac44bb_fk_shoppingcart_coupon_id` (`coupon_id`), + KEY `shoppingcart_couponredemption_69dfcb07` (`order_id`), + KEY `shoppingcart_couponredemption_e8701ad4` (`user_id`), + CONSTRAINT `shoppingcar_coupon_id_1afa016627ac44bb_fk_shoppingcart_coupon_id` FOREIGN KEY (`coupon_id`) REFERENCES `shoppingcart_coupon` (`id`), + CONSTRAINT `shoppingcart__order_id_5ba031c3bfaf643a_fk_shoppingcart_order_id` FOREIGN KEY (`order_id`) REFERENCES `shoppingcart_order` (`id`), + CONSTRAINT `shoppingcart_couponredemp_user_id_f5b814b7d92666_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_courseregcodeitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_courseregcodeitem` ( + `orderitem_ptr_id` int(11) NOT NULL, + `course_id` varchar(128) NOT NULL, + `mode` varchar(50) NOT NULL, + PRIMARY KEY (`orderitem_ptr_id`), + KEY `shoppingcart_courseregcodeitem_ea134da7` (`course_id`), + KEY `shoppingcart_courseregcodeitem_15d61712` (`mode`), + CONSTRAINT `s_orderitem_ptr_id_7ca6c1b9c7df7905_fk_shoppingcart_orderitem_id` FOREIGN KEY (`orderitem_ptr_id`) REFERENCES `shoppingcart_orderitem` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_courseregcodeitemannotation`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_courseregcodeitemannotation` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(128) NOT NULL, + `annotation` longtext, + PRIMARY KEY (`id`), + UNIQUE KEY `course_id` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_courseregistrationcode`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_courseregistrationcode` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(32) NOT NULL, + `course_id` varchar(255) NOT NULL, + `created_at` datetime(6) NOT NULL, + `mode_slug` varchar(100) DEFAULT NULL, + `is_valid` tinyint(1) NOT NULL, + `created_by_id` int(11) NOT NULL, + `invoice_id` int(11), + `order_id` int(11), + `invoice_item_id` int(11), + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`), + KEY `shoppingcart_cour_created_by_id_11125a9667aa01c9_fk_auth_user_id` (`created_by_id`), + KEY `shoppingcart_courseregistrationcode_ea134da7` (`course_id`), + KEY `shoppingcart_courseregistrationcode_f1f5d967` (`invoice_id`), + KEY `shoppingcart_courseregistrationcode_69dfcb07` (`order_id`), + KEY `shoppingcart_courseregistrationcode_7a471658` (`invoice_item_id`), + CONSTRAINT `f040030b6361304bd87eb40c09a82094` FOREIGN KEY (`invoice_item_id`) REFERENCES `shoppingcart_courseregistrationcodeinvoiceitem` (`invoiceitem_ptr_id`), + CONSTRAINT `shoppingc_invoice_id_422f26bdc7c5cb99_fk_shoppingcart_invoice_id` FOREIGN KEY (`invoice_id`) REFERENCES `shoppingcart_invoice` (`id`), + CONSTRAINT `shoppingcart__order_id_279d7e2df3fe6b6a_fk_shoppingcart_order_id` FOREIGN KEY (`order_id`) REFERENCES `shoppingcart_order` (`id`), + CONSTRAINT `shoppingcart_cour_created_by_id_11125a9667aa01c9_fk_auth_user_id` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_courseregistrationcodeinvoiceitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_courseregistrationcodeinvoiceitem` ( + `invoiceitem_ptr_id` int(11) NOT NULL, + `course_id` varchar(128) NOT NULL, + PRIMARY KEY (`invoiceitem_ptr_id`), + KEY `shoppingcart_courseregistrationcodeinvoiceitem_ea134da7` (`course_id`), + CONSTRAINT `D75797188300cb2dc6a7b16353295aaf` FOREIGN KEY (`invoiceitem_ptr_id`) REFERENCES `shoppingcart_invoiceitem` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_donation`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_donation` ( + `orderitem_ptr_id` int(11) NOT NULL, + `donation_type` varchar(32) NOT NULL, + `course_id` varchar(255) NOT NULL, + PRIMARY KEY (`orderitem_ptr_id`), + KEY `shoppingcart_donation_ea134da7` (`course_id`), + CONSTRAINT `s_orderitem_ptr_id_18caefe119e0bd2f_fk_shoppingcart_orderitem_id` FOREIGN KEY (`orderitem_ptr_id`) REFERENCES `shoppingcart_orderitem` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_donationconfiguration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_donationconfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `shoppingcart_dona_changed_by_id_10ac60a96e315545_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `shoppingcart_dona_changed_by_id_10ac60a96e315545_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_invoice`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_invoice` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `company_name` varchar(255) NOT NULL, + `company_contact_name` varchar(255) NOT NULL, + `company_contact_email` varchar(255) NOT NULL, + `recipient_name` varchar(255) NOT NULL, + `recipient_email` varchar(255) NOT NULL, + `address_line_1` varchar(255) NOT NULL, + `address_line_2` varchar(255) DEFAULT NULL, + `address_line_3` varchar(255) DEFAULT NULL, + `city` varchar(255) DEFAULT NULL, + `state` varchar(255) DEFAULT NULL, + `zip` varchar(15) DEFAULT NULL, + `country` varchar(64) DEFAULT NULL, + `total_amount` double NOT NULL, + `course_id` varchar(255) NOT NULL, + `internal_reference` varchar(255) DEFAULT NULL, + `customer_reference_number` varchar(63) DEFAULT NULL, + `is_valid` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + KEY `shoppingcart_invoice_c1007e8a` (`company_name`), + KEY `shoppingcart_invoice_ea134da7` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_invoicehistory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_invoicehistory` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `timestamp` datetime(6) NOT NULL, + `snapshot` longtext NOT NULL, + `invoice_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `shoppingca_invoice_id_e314dc5a906704d_fk_shoppingcart_invoice_id` (`invoice_id`), + KEY `shoppingcart_invoicehistory_d7e6d55b` (`timestamp`), + CONSTRAINT `shoppingca_invoice_id_e314dc5a906704d_fk_shoppingcart_invoice_id` FOREIGN KEY (`invoice_id`) REFERENCES `shoppingcart_invoice` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_invoiceitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_invoiceitem` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `qty` int(11) NOT NULL, + `unit_price` decimal(30,2) NOT NULL, + `currency` varchar(8) NOT NULL, + `invoice_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `shoppingcart_invoiceitem_f1f5d967` (`invoice_id`), + CONSTRAINT `shoppingc_invoice_id_35828791c8405d01_fk_shoppingcart_invoice_id` FOREIGN KEY (`invoice_id`) REFERENCES `shoppingcart_invoice` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_invoicetransaction`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_invoicetransaction` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `amount` decimal(30,2) NOT NULL, + `currency` varchar(8) NOT NULL, + `comments` longtext, + `status` varchar(32) NOT NULL, + `created_by_id` int(11) NOT NULL, + `invoice_id` int(11) NOT NULL, + `last_modified_by_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `shoppingcart_invoi_created_by_id_f5f3d90ce55a145_fk_auth_user_id` (`created_by_id`), + KEY `shoppingc_invoice_id_66bdbfa6f029288b_fk_shoppingcart_invoice_id` (`invoice_id`), + KEY `shoppingcar_last_modified_by_id_5e10e433f9576d91_fk_auth_user_id` (`last_modified_by_id`), + CONSTRAINT `shoppingc_invoice_id_66bdbfa6f029288b_fk_shoppingcart_invoice_id` FOREIGN KEY (`invoice_id`) REFERENCES `shoppingcart_invoice` (`id`), + CONSTRAINT `shoppingcar_last_modified_by_id_5e10e433f9576d91_fk_auth_user_id` FOREIGN KEY (`last_modified_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `shoppingcart_invoi_created_by_id_f5f3d90ce55a145_fk_auth_user_id` FOREIGN KEY (`created_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_order`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_order` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `currency` varchar(8) NOT NULL, + `status` varchar(32) NOT NULL, + `purchase_time` datetime(6) DEFAULT NULL, + `refunded_time` datetime(6) DEFAULT NULL, + `bill_to_first` varchar(64) NOT NULL, + `bill_to_last` varchar(64) NOT NULL, + `bill_to_street1` varchar(128) NOT NULL, + `bill_to_street2` varchar(128) NOT NULL, + `bill_to_city` varchar(64) NOT NULL, + `bill_to_state` varchar(8) NOT NULL, + `bill_to_postalcode` varchar(16) NOT NULL, + `bill_to_country` varchar(64) NOT NULL, + `bill_to_ccnum` varchar(8) NOT NULL, + `bill_to_cardtype` varchar(32) NOT NULL, + `processor_reply_dump` longtext NOT NULL, + `company_name` varchar(255) DEFAULT NULL, + `company_contact_name` varchar(255) DEFAULT NULL, + `company_contact_email` varchar(255) DEFAULT NULL, + `recipient_name` varchar(255) DEFAULT NULL, + `recipient_email` varchar(255) DEFAULT NULL, + `customer_reference_number` varchar(63) DEFAULT NULL, + `order_type` varchar(32) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `shoppingcart_order_user_id_4e1f3e3b06ee22a6_fk_auth_user_id` (`user_id`), + CONSTRAINT `shoppingcart_order_user_id_4e1f3e3b06ee22a6_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_orderitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_orderitem` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `status` varchar(32) NOT NULL, + `qty` int(11) NOT NULL, + `unit_cost` decimal(30,2) NOT NULL, + `list_price` decimal(30,2) DEFAULT NULL, + `line_desc` varchar(1024) NOT NULL, + `currency` varchar(8) NOT NULL, + `fulfilled_time` datetime(6) DEFAULT NULL, + `refund_requested_time` datetime(6) DEFAULT NULL, + `service_fee` decimal(30,2) NOT NULL, + `report_comments` longtext NOT NULL, + `order_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `shoppingcart_orderitem_9acb4454` (`status`), + KEY `shoppingcart_orderitem_3b927c91` (`fulfilled_time`), + KEY `shoppingcart_orderitem_76ed2946` (`refund_requested_time`), + KEY `shoppingcart_orderitem_69dfcb07` (`order_id`), + KEY `shoppingcart_orderitem_e8701ad4` (`user_id`), + CONSTRAINT `shoppingcart__order_id_325e5347f18743e3_fk_shoppingcart_order_id` FOREIGN KEY (`order_id`) REFERENCES `shoppingcart_order` (`id`), + CONSTRAINT `shoppingcart_orderitem_user_id_5708ec7aabe24a31_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_paidcourseregistration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_paidcourseregistration` ( + `orderitem_ptr_id` int(11) NOT NULL, + `course_id` varchar(128) NOT NULL, + `mode` varchar(50) NOT NULL, + `course_enrollment_id` int(11) DEFAULT NULL, + PRIMARY KEY (`orderitem_ptr_id`), + KEY `D8d681d7e59c2dcf2ea55e7e5e06553d` (`course_enrollment_id`), + KEY `shoppingcart_paidcourseregistration_ea134da7` (`course_id`), + KEY `shoppingcart_paidcourseregistration_15d61712` (`mode`), + CONSTRAINT `D8d681d7e59c2dcf2ea55e7e5e06553d` FOREIGN KEY (`course_enrollment_id`) REFERENCES `student_courseenrollment` (`id`), + CONSTRAINT `s_orderitem_ptr_id_3c991acc5d644f13_fk_shoppingcart_orderitem_id` FOREIGN KEY (`orderitem_ptr_id`) REFERENCES `shoppingcart_orderitem` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_paidcourseregistrationannotation`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_paidcourseregistrationannotation` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(128) NOT NULL, + `annotation` longtext, + PRIMARY KEY (`id`), + UNIQUE KEY `course_id` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_registrationcoderedemption`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_registrationcoderedemption` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `redeemed_at` datetime(6) DEFAULT NULL, + `course_enrollment_id` int(11) DEFAULT NULL, + `order_id` int(11) DEFAULT NULL, + `redeemed_by_id` int(11) NOT NULL, + `registration_code_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `D6654a8efe686d45804b6116dfc6bee1` (`course_enrollment_id`), + KEY `shoppingcart_r_order_id_752ddc3003afe96_fk_shoppingcart_order_id` (`order_id`), + KEY `shoppingcart_reg_redeemed_by_id_455df2dd74004fff_fk_auth_user_id` (`redeemed_by_id`), + KEY `D1ed44c4be114e424571929bce972f54` (`registration_code_id`), + CONSTRAINT `D1ed44c4be114e424571929bce972f54` FOREIGN KEY (`registration_code_id`) REFERENCES `shoppingcart_courseregistrationcode` (`id`), + CONSTRAINT `D6654a8efe686d45804b6116dfc6bee1` FOREIGN KEY (`course_enrollment_id`) REFERENCES `student_courseenrollment` (`id`), + CONSTRAINT `shoppingcart_r_order_id_752ddc3003afe96_fk_shoppingcart_order_id` FOREIGN KEY (`order_id`) REFERENCES `shoppingcart_order` (`id`), + CONSTRAINT `shoppingcart_reg_redeemed_by_id_455df2dd74004fff_fk_auth_user_id` FOREIGN KEY (`redeemed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `social_auth_association`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `social_auth_association` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `server_url` varchar(255) NOT NULL, + `handle` varchar(255) NOT NULL, + `secret` varchar(255) NOT NULL, + `issued` int(11) NOT NULL, + `lifetime` int(11) NOT NULL, + `assoc_type` varchar(64) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `social_auth_code`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `social_auth_code` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `email` varchar(254) NOT NULL, + `code` varchar(32) NOT NULL, + `verified` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `social_auth_code_email_75f27066d057e3b6_uniq` (`email`,`code`), + KEY `social_auth_code_c1336794` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `social_auth_nonce`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `social_auth_nonce` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `server_url` varchar(255) NOT NULL, + `timestamp` int(11) NOT NULL, + `salt` varchar(65) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `social_auth_nonce_server_url_36601f978463b4_uniq` (`server_url`,`timestamp`,`salt`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `social_auth_usersocialauth`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `social_auth_usersocialauth` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `provider` varchar(32) NOT NULL, + `uid` varchar(255) NOT NULL, + `extra_data` longtext NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `social_auth_usersocialauth_provider_2f763109e2c4a1fb_uniq` (`provider`,`uid`), + KEY `social_auth_usersociala_user_id_193b2d80880502b2_fk_auth_user_id` (`user_id`), + CONSTRAINT `social_auth_usersociala_user_id_193b2d80880502b2_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `splash_splashconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `splash_splashconfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `cookie_name` longtext NOT NULL, + `cookie_allowed_values` longtext NOT NULL, + `unaffected_usernames` longtext NOT NULL, + `unaffected_url_paths` longtext NOT NULL, + `redirect_url` varchar(200) NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `splash_splashconf_changed_by_id_735b38ad8ed19270_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `splash_splashconf_changed_by_id_735b38ad8ed19270_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `status_coursemessage`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `status_coursemessage` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_key` varchar(255) NOT NULL, + `message` longtext, + `global_message_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `status_coursemessage_c8235886` (`course_key`), + KEY `status_coursemessage_ba4cddbf` (`global_message_id`), + CONSTRAINT `be73d6672c3000f87521c37bc8ad4139` FOREIGN KEY (`global_message_id`) REFERENCES `status_globalstatusmessage` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `status_globalstatusmessage`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `status_globalstatusmessage` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `message` longtext, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `status_globalstat_changed_by_id_76ab1cf17be5644d_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `status_globalstat_changed_by_id_76ab1cf17be5644d_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_anonymoususerid`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_anonymoususerid` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `anonymous_user_id` varchar(32) NOT NULL, + `course_id` varchar(255) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `anonymous_user_id` (`anonymous_user_id`), + KEY `student_anonymoususerid_user_id_1a18af72cf6b95f7_fk_auth_user_id` (`user_id`), + KEY `student_anonymoususerid_ea134da7` (`course_id`), + CONSTRAINT `student_anonymoususerid_user_id_1a18af72cf6b95f7_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_courseaccessrole`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_courseaccessrole` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `org` varchar(64) NOT NULL, + `course_id` varchar(255) NOT NULL, + `role` varchar(64) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `student_courseaccessrole_user_id_3203176c4f474414_uniq` (`user_id`,`org`,`course_id`,`role`), + KEY `student_courseaccessrole_5a445d71` (`org`), + KEY `student_courseaccessrole_ea134da7` (`course_id`), + KEY `student_courseaccessrole_29a7e964` (`role`), + CONSTRAINT `student_courseaccessrol_user_id_5e0f68b978ad0792_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_courseenrollment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_courseenrollment` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `created` datetime(6) DEFAULT NULL, + `is_active` tinyint(1) NOT NULL, + `mode` varchar(100) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `student_courseenrollment_user_id_2d2a572f07dd8e37_uniq` (`user_id`,`course_id`), + KEY `student_courseenrollment_ea134da7` (`course_id`), + KEY `student_courseenrollment_e2fa5388` (`created`), + CONSTRAINT `student_courseenrollmen_user_id_15beaaebc8333ce4_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_courseenrollmentallowed`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_courseenrollmentallowed` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `email` varchar(255) NOT NULL, + `course_id` varchar(255) NOT NULL, + `auto_enroll` tinyint(1) NOT NULL, + `created` datetime(6) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `student_courseenrollmentallowed_email_6f3eafd4a6c58591_uniq` (`email`,`course_id`), + KEY `student_courseenrollmentallowed_0c83f57c` (`email`), + KEY `student_courseenrollmentallowed_ea134da7` (`course_id`), + KEY `student_courseenrollmentallowed_e2fa5388` (`created`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_courseenrollmentattribute`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_courseenrollmentattribute` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `namespace` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `value` varchar(255) NOT NULL, + `enrollment_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `stu_enrollment_id_674188e6fcb084c_fk_student_courseenrollment_id` (`enrollment_id`), + CONSTRAINT `stu_enrollment_id_674188e6fcb084c_fk_student_courseenrollment_id` FOREIGN KEY (`enrollment_id`) REFERENCES `student_courseenrollment` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_dashboardconfiguration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_dashboardconfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `recent_enrollment_time_delta` int(10) unsigned NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `student_dashboard_changed_by_id_4db1e1194c4ae32c_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `student_dashboard_changed_by_id_4db1e1194c4ae32c_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_enrollmentrefundconfiguration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_enrollmentrefundconfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `refund_window_microseconds` bigint(20) NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `student_enrollmen_changed_by_id_59c187ac05e64a11_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `student_enrollmen_changed_by_id_59c187ac05e64a11_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_entranceexamconfiguration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_entranceexamconfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `created` datetime(6) DEFAULT NULL, + `updated` datetime(6) NOT NULL, + `skip_entrance_exam` tinyint(1) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `student_entranceexamconfiguration_user_id_714c2ef6a88504f0_uniq` (`user_id`,`course_id`), + KEY `student_entranceexamconfiguration_ea134da7` (`course_id`), + KEY `student_entranceexamconfiguration_e2fa5388` (`created`), + KEY `student_entranceexamconfiguration_0f81d52e` (`updated`), + CONSTRAINT `student_entranceexamcon_user_id_530195af5babe0dd_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_historicalcourseenrollment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_historicalcourseenrollment` ( + `id` int(11) NOT NULL, + `course_id` varchar(255) NOT NULL, + `created` datetime(6) DEFAULT NULL, + `is_active` tinyint(1) NOT NULL, + `mode` varchar(100) NOT NULL, + `history_id` int(11) NOT NULL AUTO_INCREMENT, + `history_date` datetime(6) NOT NULL, + `history_type` varchar(1) NOT NULL, + `history_user_id` int(11) DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`history_id`), + KEY `student_histori_history_user_id_49fd2870709a6441_fk_auth_user_id` (`history_user_id`), + KEY `student_historicalcourseenrollment_b80bb774` (`id`), + KEY `student_historicalcourseenrollment_ea134da7` (`course_id`), + KEY `student_historicalcourseenrollment_e2fa5388` (`created`), + CONSTRAINT `student_histori_history_user_id_49fd2870709a6441_fk_auth_user_id` FOREIGN KEY (`history_user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_languageproficiency`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_languageproficiency` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(16) NOT NULL, + `user_profile_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `student_languageproficiency_code_68e76171684c62e5_uniq` (`code`,`user_profile_id`), + KEY `student_languageproficiency_06037614` (`user_profile_id`), + CONSTRAINT `student__user_profile_id_283edb437b102619_fk_auth_userprofile_id` FOREIGN KEY (`user_profile_id`) REFERENCES `auth_userprofile` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_linkedinaddtoprofileconfiguration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_linkedinaddtoprofileconfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `company_identifier` longtext NOT NULL, + `dashboard_tracking_code` longtext NOT NULL, + `trk_partner_name` varchar(10) NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `student_linkedina_changed_by_id_226a4de3af0f3296_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `student_linkedina_changed_by_id_226a4de3af0f3296_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_loginfailures`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_loginfailures` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `failure_count` int(11) NOT NULL, + `lockout_until` datetime(6) DEFAULT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `student_loginfailures_user_id_3daac39f3118bac4_fk_auth_user_id` (`user_id`), + CONSTRAINT `student_loginfailures_user_id_3daac39f3118bac4_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_manualenrollmentaudit`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_manualenrollmentaudit` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `enrolled_email` varchar(255) NOT NULL, + `time_stamp` datetime(6) DEFAULT NULL, + `state_transition` varchar(255) NOT NULL, + `reason` longtext, + `enrolled_by_id` int(11) DEFAULT NULL, + `enrollment_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `student_manualenr_enrolled_by_id_729cecdc9f746e2_fk_auth_user_id` (`enrolled_by_id`), + KEY `st_enrollment_id_60349e74284df0d6_fk_student_courseenrollment_id` (`enrollment_id`), + KEY `student_manualenrollmentaudit_ce9e7289` (`enrolled_email`), + CONSTRAINT `st_enrollment_id_60349e74284df0d6_fk_student_courseenrollment_id` FOREIGN KEY (`enrollment_id`) REFERENCES `student_courseenrollment` (`id`), + CONSTRAINT `student_manualenr_enrolled_by_id_729cecdc9f746e2_fk_auth_user_id` FOREIGN KEY (`enrolled_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_passwordhistory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_passwordhistory` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `password` varchar(128) NOT NULL, + `time_set` datetime(6) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `student_passwordhistory_user_id_21328c8c512d6c0d_fk_auth_user_id` (`user_id`), + CONSTRAINT `student_passwordhistory_user_id_21328c8c512d6c0d_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_pendingemailchange`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_pendingemailchange` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `new_email` varchar(255) NOT NULL, + `activation_key` varchar(32) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `activation_key` (`activation_key`), + UNIQUE KEY `user_id` (`user_id`), + KEY `student_pendingemailchange_a4a65cd1` (`new_email`), + CONSTRAINT `student_pendingemailcha_user_id_566caccc3f3c3966_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_pendingnamechange`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_pendingnamechange` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `new_name` varchar(255) NOT NULL, + `rationale` varchar(1024) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_id` (`user_id`), + CONSTRAINT `student_pendingnamechan_user_id_6c3c9d77fc5898a6_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_usersignupsource`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_usersignupsource` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `site` varchar(255) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `student_usersignupsourc_user_id_4db69fdecf32119f_fk_auth_user_id` (`user_id`), + KEY `student_usersignupsource_98defd6e` (`site`), + CONSTRAINT `student_usersignupsourc_user_id_4db69fdecf32119f_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_userstanding`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_userstanding` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `account_status` varchar(31) NOT NULL, + `standing_last_changed_at` datetime(6) NOT NULL, + `changed_by_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_id` (`user_id`), + KEY `student_userstand_changed_by_id_23784b83f2849aff_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `student_userstand_changed_by_id_23784b83f2849aff_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `student_userstanding_user_id_6bb90abaaa05d42e_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_usertestgroup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_usertestgroup` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(32) NOT NULL, + `description` longtext NOT NULL, + PRIMARY KEY (`id`), + KEY `student_usertestgroup_b068931c` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_usertestgroup_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_usertestgroup_users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `usertestgroup_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `usertestgroup_id` (`usertestgroup_id`,`user_id`), + KEY `student_usertestgroup_u_user_id_26c886de60cceacb_fk_auth_user_id` (`user_id`), + CONSTRAINT `st_usertestgroup_id_3d634741f1dd4e4f_fk_student_usertestgroup_id` FOREIGN KEY (`usertestgroup_id`) REFERENCES `student_usertestgroup` (`id`), + CONSTRAINT `student_usertestgroup_u_user_id_26c886de60cceacb_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `submissions_score`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `submissions_score` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `points_earned` int(10) unsigned NOT NULL, + `points_possible` int(10) unsigned NOT NULL, + `created_at` datetime(6) NOT NULL, + `reset` tinyint(1) NOT NULL, + `student_item_id` int(11) NOT NULL, + `submission_id` int(11), + PRIMARY KEY (`id`), + KEY `submissions_score_fde81f11` (`created_at`), + KEY `submissions_score_02d5e83e` (`student_item_id`), + KEY `submissions_score_1dd9cfcc` (`submission_id`), + CONSTRAINT `s_student_item_id_7d4d4bb6a7dd0642_fk_submissions_studentitem_id` FOREIGN KEY (`student_item_id`) REFERENCES `submissions_studentitem` (`id`), + CONSTRAINT `subm_submission_id_3fc975fe88442ff7_fk_submissions_submission_id` FOREIGN KEY (`submission_id`) REFERENCES `submissions_submission` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `submissions_scoresummary`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `submissions_scoresummary` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `highest_id` int(11) NOT NULL, + `latest_id` int(11) NOT NULL, + `student_item_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `student_item_id` (`student_item_id`), + KEY `submissions__highest_id_7fd91b8eb312c175_fk_submissions_score_id` (`highest_id`), + KEY `submissions_s_latest_id_2b352506a35fd569_fk_submissions_score_id` (`latest_id`), + CONSTRAINT `s_student_item_id_32fa0a425a149b1b_fk_submissions_studentitem_id` FOREIGN KEY (`student_item_id`) REFERENCES `submissions_studentitem` (`id`), + CONSTRAINT `submissions__highest_id_7fd91b8eb312c175_fk_submissions_score_id` FOREIGN KEY (`highest_id`) REFERENCES `submissions_score` (`id`), + CONSTRAINT `submissions_s_latest_id_2b352506a35fd569_fk_submissions_score_id` FOREIGN KEY (`latest_id`) REFERENCES `submissions_score` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `submissions_studentitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `submissions_studentitem` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `student_id` varchar(255) NOT NULL, + `course_id` varchar(255) NOT NULL, + `item_id` varchar(255) NOT NULL, + `item_type` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `submissions_studentitem_course_id_6a6eccbdec6ffd0b_uniq` (`course_id`,`student_id`,`item_id`), + KEY `submissions_studentitem_30a811f6` (`student_id`), + KEY `submissions_studentitem_ea134da7` (`course_id`), + KEY `submissions_studentitem_82bfda79` (`item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `submissions_submission`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `submissions_submission` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `uuid` varchar(36) NOT NULL, + `attempt_number` int(10) unsigned NOT NULL, + `submitted_at` datetime(6) NOT NULL, + `created_at` datetime(6) NOT NULL, + `raw_answer` longtext NOT NULL, + `student_item_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `su_student_item_id_d3801ff833d05b1_fk_submissions_studentitem_id` (`student_item_id`), + KEY `submissions_submission_ef7c876f` (`uuid`), + KEY `submissions_submission_22bb6ff9` (`submitted_at`), + KEY `submissions_submission_fde81f11` (`created_at`), + CONSTRAINT `su_student_item_id_d3801ff833d05b1_fk_submissions_studentitem_id` FOREIGN KEY (`student_item_id`) REFERENCES `submissions_studentitem` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `survey_surveyanswer`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `survey_surveyanswer` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `field_name` varchar(255) NOT NULL, + `field_value` varchar(1024) NOT NULL, + `course_key` varchar(255) DEFAULT NULL, + `form_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `survey_surveyanswer_73f329f1` (`field_name`), + KEY `survey_surveyanswer_c8235886` (`course_key`), + KEY `survey_surveyanswer_d6cba1ad` (`form_id`), + KEY `survey_surveyanswer_e8701ad4` (`user_id`), + CONSTRAINT `survey_surveyan_form_id_1c835afe12a54912_fk_survey_surveyform_id` FOREIGN KEY (`form_id`) REFERENCES `survey_surveyform` (`id`), + CONSTRAINT `survey_surveyanswer_user_id_4e77d83a82fd0b2b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `survey_surveyform`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `survey_surveyform` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `name` varchar(255) NOT NULL, + `form` longtext NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `teams_courseteam`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `teams_courseteam` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `team_id` varchar(255) NOT NULL, + `discussion_topic_id` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `course_id` varchar(255) NOT NULL, + `topic_id` varchar(255) NOT NULL, + `date_created` datetime(6) NOT NULL, + `description` varchar(300) NOT NULL, + `country` varchar(2) NOT NULL, + `language` varchar(16) NOT NULL, + `last_activity_at` datetime(6) NOT NULL, + `team_size` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `team_id` (`team_id`), + UNIQUE KEY `discussion_topic_id` (`discussion_topic_id`), + KEY `teams_courseteam_b068931c` (`name`), + KEY `teams_courseteam_ea134da7` (`course_id`), + KEY `teams_courseteam_19b4d727` (`topic_id`), + KEY `teams_courseteam_5ea53fcc` (`last_activity_at`), + KEY `teams_courseteam_181d83a1` (`team_size`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `teams_courseteammembership`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `teams_courseteammembership` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `date_joined` datetime(6) NOT NULL, + `last_activity_at` datetime(6) NOT NULL, + `team_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `teams_courseteammembership_user_id_48efa8e8971947c3_uniq` (`user_id`,`team_id`), + KEY `teams_courseteam_team_id_594700d19b04f922_fk_teams_courseteam_id` (`team_id`), + CONSTRAINT `teams_courseteam_team_id_594700d19b04f922_fk_teams_courseteam_id` FOREIGN KEY (`team_id`) REFERENCES `teams_courseteam` (`id`), + CONSTRAINT `teams_courseteammembers_user_id_2d93b28be22c3c40_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `third_party_auth_ltiproviderconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `third_party_auth_ltiproviderconfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `icon_class` varchar(50) NOT NULL, + `name` varchar(50) NOT NULL, + `secondary` tinyint(1) NOT NULL, + `skip_registration_form` tinyint(1) NOT NULL, + `skip_email_verification` tinyint(1) NOT NULL, + `lti_consumer_key` varchar(255) NOT NULL, + `lti_hostname` varchar(255) NOT NULL, + `lti_consumer_secret` varchar(255) NOT NULL, + `lti_max_timestamp_age` int(11) NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `third_party_auth__changed_by_id_7749e09fd5f71ab0_fk_auth_user_id` (`changed_by_id`), + KEY `third_party_auth_ltiproviderconfig_fe8da584` (`lti_hostname`), + CONSTRAINT `third_party_auth__changed_by_id_7749e09fd5f71ab0_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `third_party_auth_oauth2providerconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `third_party_auth_oauth2providerconfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `icon_class` varchar(50) NOT NULL, + `name` varchar(50) NOT NULL, + `secondary` tinyint(1) NOT NULL, + `skip_registration_form` tinyint(1) NOT NULL, + `skip_email_verification` tinyint(1) NOT NULL, + `backend_name` varchar(50) NOT NULL, + `key` longtext NOT NULL, + `secret` longtext NOT NULL, + `other_settings` longtext NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `third_party_auth__changed_by_id_17044d1cd96e8d57_fk_auth_user_id` (`changed_by_id`), + KEY `third_party_auth_oauth2providerconfig_abcd61c0` (`backend_name`), + CONSTRAINT `third_party_auth__changed_by_id_17044d1cd96e8d57_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `third_party_auth_providerapipermissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `third_party_auth_providerapipermissions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `provider_id` varchar(255) NOT NULL, + `client_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `third_party_auth__client_id_648d3f6d6109693b_fk_oauth2_client_id` (`client_id`), + CONSTRAINT `third_party_auth__client_id_648d3f6d6109693b_fk_oauth2_client_id` FOREIGN KEY (`client_id`) REFERENCES `oauth2_client` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `third_party_auth_samlconfiguration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `third_party_auth_samlconfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `private_key` longtext NOT NULL, + `public_key` longtext NOT NULL, + `entity_id` varchar(255) NOT NULL, + `org_info_str` longtext NOT NULL, + `other_config_str` longtext NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `third_party_auth__changed_by_id_67a92ed1a69a5d1f_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `third_party_auth__changed_by_id_67a92ed1a69a5d1f_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `third_party_auth_samlproviderconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `third_party_auth_samlproviderconfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `icon_class` varchar(50) NOT NULL, + `name` varchar(50) NOT NULL, + `secondary` tinyint(1) NOT NULL, + `skip_registration_form` tinyint(1) NOT NULL, + `skip_email_verification` tinyint(1) NOT NULL, + `backend_name` varchar(50) NOT NULL, + `idp_slug` varchar(30) NOT NULL, + `entity_id` varchar(255) NOT NULL, + `metadata_source` varchar(255) NOT NULL, + `attr_user_permanent_id` varchar(128) NOT NULL, + `attr_full_name` varchar(128) NOT NULL, + `attr_first_name` varchar(128) NOT NULL, + `attr_last_name` varchar(128) NOT NULL, + `attr_username` varchar(128) NOT NULL, + `attr_email` varchar(128) NOT NULL, + `other_settings` longtext NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `third_party_auth__changed_by_id_508190ecd0b0e845_fk_auth_user_id` (`changed_by_id`), + KEY `third_party_auth_samlproviderconfig_098674f1` (`idp_slug`), + CONSTRAINT `third_party_auth__changed_by_id_508190ecd0b0e845_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `third_party_auth_samlproviderdata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `third_party_auth_samlproviderdata` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `fetched_at` datetime(6) NOT NULL, + `expires_at` datetime(6) DEFAULT NULL, + `entity_id` varchar(255) NOT NULL, + `sso_url` varchar(200) NOT NULL, + `public_key` longtext NOT NULL, + PRIMARY KEY (`id`), + KEY `third_party_auth_samlproviderdata_d674fcb7` (`fetched_at`), + KEY `third_party_auth_samlproviderdata_81aefa79` (`expires_at`), + KEY `third_party_auth_samlproviderdata_dffc4713` (`entity_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `thumbnail_kvstore`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `thumbnail_kvstore` ( + `key` varchar(200) NOT NULL, + `value` longtext NOT NULL, + PRIMARY KEY (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `track_trackinglog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `track_trackinglog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `dtcreated` datetime(6) NOT NULL, + `username` varchar(32) NOT NULL, + `ip` varchar(32) NOT NULL, + `event_source` varchar(32) NOT NULL, + `event_type` varchar(512) NOT NULL, + `event` longtext NOT NULL, + `agent` varchar(256) NOT NULL, + `page` varchar(512) DEFAULT NULL, + `time` datetime(6) NOT NULL, + `host` varchar(64) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_api_usercoursetag`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_api_usercoursetag` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL, + `course_id` varchar(255) NOT NULL, + `value` longtext NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_api_usercoursetag_user_id_64d9a32c9890f610_uniq` (`user_id`,`course_id`,`key`), + KEY `user_api_usercoursetag_3c6e0b8a` (`key`), + KEY `user_api_usercoursetag_ea134da7` (`course_id`), + CONSTRAINT `user_api_usercoursetag_user_id_2692245bbb861fc2_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_api_userorgtag`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_api_userorgtag` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `key` varchar(255) NOT NULL, + `org` varchar(255) NOT NULL, + `value` longtext NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_api_userorgtag_user_id_694f9e3322120c6f_uniq` (`user_id`,`org`,`key`), + KEY `user_api_userorgtag_3c6e0b8a` (`key`), + KEY `user_api_userorgtag_5a445d71` (`org`), + CONSTRAINT `user_api_userorgtag_user_id_16c7189496b4df00_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_api_userpreference`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_api_userpreference` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL, + `value` longtext NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_api_userpreference_user_id_4e4942d73f760072_uniq` (`user_id`,`key`), + KEY `user_api_userpreference_3c6e0b8a` (`key`), + CONSTRAINT `user_api_userpreference_user_id_41f12e3954b69095_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `util_ratelimitconfiguration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `util_ratelimitconfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `util_ratelimitcon_changed_by_id_2c8891cb4854f3b5_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `util_ratelimitcon_changed_by_id_2c8891cb4854f3b5_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `verify_student_historicalverificationdeadline`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `verify_student_historicalverificationdeadline` ( + `id` int(11) NOT NULL, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `course_key` varchar(255) NOT NULL, + `deadline` datetime(6) NOT NULL, + `history_id` int(11) NOT NULL AUTO_INCREMENT, + `history_date` datetime(6) NOT NULL, + `history_type` varchar(1) NOT NULL, + `history_user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`history_id`), + KEY `verify_student__history_user_id_1e374d24cb7902c2_fk_auth_user_id` (`history_user_id`), + KEY `verify_student_historicalverificationdeadline_b80bb774` (`id`), + KEY `verify_student_historicalverificationdeadline_c8235886` (`course_key`), + CONSTRAINT `verify_student__history_user_id_1e374d24cb7902c2_fk_auth_user_id` FOREIGN KEY (`history_user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `verify_student_icrvstatusemailsconfiguration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `verify_student_icrvstatusemailsconfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `verify_student_icr_changed_by_id_52e319582f18ea3_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `verify_student_icr_changed_by_id_52e319582f18ea3_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `verify_student_incoursereverificationconfiguration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `verify_student_incoursereverificationconfiguration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `verify_student_in_changed_by_id_1f3e3fa462a6ded6_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `verify_student_in_changed_by_id_1f3e3fa462a6ded6_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `verify_student_skippedreverification`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `verify_student_skippedreverification` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `created_at` datetime(6) NOT NULL, + `checkpoint_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `verify_student_skippedreverificati_user_id_1e8af5a5e735aa1a_uniq` (`user_id`,`course_id`), + KEY `verify_student_skippedreverification_ea134da7` (`course_id`), + KEY `verify_student_skippedreverification_bef2d98a` (`checkpoint_id`), + KEY `verify_student_skippedreverification_e8701ad4` (`user_id`), + CONSTRAINT `D759ffa5ca66ef1a2c8c200f7a21365b` FOREIGN KEY (`checkpoint_id`) REFERENCES `verify_student_verificationcheckpoint` (`id`), + CONSTRAINT `verify_student_skippedr_user_id_6752b392e3d3c501_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `verify_student_softwaresecurephotoverification`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `verify_student_softwaresecurephotoverification` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `status` varchar(100) NOT NULL, + `status_changed` datetime(6) NOT NULL, + `name` varchar(255) NOT NULL, + `face_image_url` varchar(255) NOT NULL, + `photo_id_image_url` varchar(255) NOT NULL, + `receipt_id` varchar(255) NOT NULL, + `created_at` datetime(6) NOT NULL, + `updated_at` datetime(6) NOT NULL, + `display` tinyint(1) NOT NULL, + `submitted_at` datetime(6) DEFAULT NULL, + `reviewing_service` varchar(255) NOT NULL, + `error_msg` longtext NOT NULL, + `error_code` varchar(50) NOT NULL, + `photo_id_key` longtext NOT NULL, + `copy_id_photo_from_id` int(11) DEFAULT NULL, + `reviewing_user_id` int(11) DEFAULT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `D01dce17b91c9382bd80d4be23a3e0cf` (`copy_id_photo_from_id`), + KEY `verify_studen_reviewing_user_id_727fae1d0bcf8aaf_fk_auth_user_id` (`reviewing_user_id`), + KEY `verify_student_software_user_id_61ffab9c12020106_fk_auth_user_id` (`user_id`), + KEY `verify_student_softwaresecurephotoverification_f6fc3014` (`receipt_id`), + KEY `verify_student_softwaresecurephotoverification_fde81f11` (`created_at`), + KEY `verify_student_softwaresecurephotoverification_afd1a1a8` (`updated_at`), + KEY `verify_student_softwaresecurephotoverification_ebf78b51` (`display`), + KEY `verify_student_softwaresecurephotoverification_22bb6ff9` (`submitted_at`), + CONSTRAINT `D01dce17b91c9382bd80d4be23a3e0cf` FOREIGN KEY (`copy_id_photo_from_id`) REFERENCES `verify_student_softwaresecurephotoverification` (`id`), + CONSTRAINT `verify_studen_reviewing_user_id_727fae1d0bcf8aaf_fk_auth_user_id` FOREIGN KEY (`reviewing_user_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `verify_student_software_user_id_61ffab9c12020106_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `verify_student_verificationcheckpoint`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `verify_student_verificationcheckpoint` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `checkpoint_location` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `verify_student_verificationcheck_course_id_2c6a1f5c22b4cc19_uniq` (`course_id`,`checkpoint_location`), + KEY `verify_student_verificationcheckpoint_ea134da7` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `verify_student_verificationcheckpoint_photo_verification`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `verify_student_verificationcheckpoint_photo_verification` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `verificationcheckpoint_id` int(11) NOT NULL, + `softwaresecurephotoverification_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `verificationcheckpoint_id` (`verificationcheckpoint_id`,`softwaresecurephotoverification_id`), + KEY `c7846aea49a044a1161a4b9b6d70e050` (`softwaresecurephotoverification_id`), + CONSTRAINT `c7846aea49a044a1161a4b9b6d70e050` FOREIGN KEY (`softwaresecurephotoverification_id`) REFERENCES `verify_student_softwaresecurephotoverification` (`id`), + CONSTRAINT `e4d180f9ca43c3b66693c416a36cfb9d` FOREIGN KEY (`verificationcheckpoint_id`) REFERENCES `verify_student_verificationcheckpoint` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `verify_student_verificationdeadline`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `verify_student_verificationdeadline` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `course_key` varchar(255) NOT NULL, + `deadline` datetime(6) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `course_key` (`course_key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `verify_student_verificationstatus`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `verify_student_verificationstatus` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `status` varchar(32) NOT NULL, + `timestamp` datetime(6) NOT NULL, + `response` longtext, + `error` longtext, + `checkpoint_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `D4cefb6d3d71c9b26af2a5ece4c37277` (`checkpoint_id`), + KEY `verify_student_verifica_user_id_5c19fcd6dc05f211_fk_auth_user_id` (`user_id`), + KEY `verify_student_verificationstatus_9acb4454` (`status`), + CONSTRAINT `D4cefb6d3d71c9b26af2a5ece4c37277` FOREIGN KEY (`checkpoint_id`) REFERENCES `verify_student_verificationcheckpoint` (`id`), + CONSTRAINT `verify_student_verifica_user_id_5c19fcd6dc05f211_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_article`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_article` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `group_read` tinyint(1) NOT NULL, + `group_write` tinyint(1) NOT NULL, + `other_read` tinyint(1) NOT NULL, + `other_write` tinyint(1) NOT NULL, + `current_revision_id` int(11), + `group_id` int(11), + `owner_id` int(11), + PRIMARY KEY (`id`), + UNIQUE KEY `current_revision_id` (`current_revision_id`), + KEY `wiki_article_0e939a4f` (`group_id`), + KEY `wiki_article_5e7b1936` (`owner_id`), + CONSTRAINT `current_revision_id_42a9dbec1e0dd15c_fk_wiki_articlerevision_id` FOREIGN KEY (`current_revision_id`) REFERENCES `wiki_articlerevision` (`id`), + CONSTRAINT `wiki_article_group_id_2b38601b6aa39f3d_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), + CONSTRAINT `wiki_article_owner_id_b1c1e44609a378f_fk_auth_user_id` FOREIGN KEY (`owner_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_articleforobject`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_articleforobject` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `object_id` int(10) unsigned NOT NULL, + `is_mptt` tinyint(1) NOT NULL, + `article_id` int(11) NOT NULL, + `content_type_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `wiki_articleforobject_content_type_id_27c4cce189b3bcab_uniq` (`content_type_id`,`object_id`), + KEY `wiki_articleforobj_article_id_6effcfadf020e71_fk_wiki_article_id` (`article_id`), + CONSTRAINT `wiki__content_type_id_6a39c68b7a20c3c4_fk_django_content_type_id` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`), + CONSTRAINT `wiki_articleforobj_article_id_6effcfadf020e71_fk_wiki_article_id` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_articleplugin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_articleplugin` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `deleted` tinyint(1) NOT NULL, + `created` datetime(6) NOT NULL, + `article_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `wiki_articleplugin_a00c1b00` (`article_id`), + CONSTRAINT `wiki_articleplugi_article_id_2d2c794af030d9dd_fk_wiki_article_id` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_articlerevision`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_articlerevision` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `revision_number` int(11) NOT NULL, + `user_message` longtext NOT NULL, + `automatic_log` longtext NOT NULL, + `ip_address` char(15) DEFAULT NULL, + `modified` datetime(6) NOT NULL, + `created` datetime(6) NOT NULL, + `deleted` tinyint(1) NOT NULL, + `locked` tinyint(1) NOT NULL, + `content` longtext NOT NULL, + `title` varchar(512) NOT NULL, + `article_id` int(11) NOT NULL, + `previous_revision_id` int(11) DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `wiki_articlerevision_article_id_4b4e7910c8e7b2d0_uniq` (`article_id`,`revision_number`), + KEY `fae2b1c6e892c699844d5dda69aeb89e` (`previous_revision_id`), + KEY `wiki_articlerevision_user_id_183520686b6ead55_fk_auth_user_id` (`user_id`), + CONSTRAINT `fae2b1c6e892c699844d5dda69aeb89e` FOREIGN KEY (`previous_revision_id`) REFERENCES `wiki_articlerevision` (`id`), + CONSTRAINT `wiki_articlerevis_article_id_1f2c587981af1463_fk_wiki_article_id` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`), + CONSTRAINT `wiki_articlerevision_user_id_183520686b6ead55_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_articlesubscription`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_articlesubscription` ( + `articleplugin_ptr_id` int(11) NOT NULL, + `subscription_ptr_id` int(11) NOT NULL, + PRIMARY KEY (`articleplugin_ptr_id`), + UNIQUE KEY `subscription_ptr_id` (`subscription_ptr_id`), + CONSTRAINT `D3cd26aee5a69a796bee9c6aeab7e317` FOREIGN KEY (`subscription_ptr_id`) REFERENCES `notify_subscription` (`subscription_id`), + CONSTRAINT `w_articleplugin_ptr_id_489742a9a302c93d_fk_wiki_articleplugin_id` FOREIGN KEY (`articleplugin_ptr_id`) REFERENCES `wiki_articleplugin` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_attachment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_attachment` ( + `reusableplugin_ptr_id` int(11) NOT NULL, + `original_filename` varchar(256) DEFAULT NULL, + `current_revision_id` int(11), + PRIMARY KEY (`reusableplugin_ptr_id`), + UNIQUE KEY `current_revision_id` (`current_revision_id`), + CONSTRAINT `D32d32ecb0471dc863a4e19562842024` FOREIGN KEY (`current_revision_id`) REFERENCES `wiki_attachmentrevision` (`id`), + CONSTRAINT `D7d9a9637c738daa9daff735f9023fbe` FOREIGN KEY (`reusableplugin_ptr_id`) REFERENCES `wiki_reusableplugin` (`articleplugin_ptr_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_attachmentrevision`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_attachmentrevision` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `revision_number` int(11) NOT NULL, + `user_message` longtext NOT NULL, + `automatic_log` longtext NOT NULL, + `ip_address` char(15) DEFAULT NULL, + `modified` datetime(6) NOT NULL, + `created` datetime(6) NOT NULL, + `deleted` tinyint(1) NOT NULL, + `locked` tinyint(1) NOT NULL, + `file` varchar(100) NOT NULL, + `description` longtext NOT NULL, + `attachment_id` int(11) NOT NULL, + `previous_revision_id` int(11), + `user_id` int(11), + PRIMARY KEY (`id`), + KEY `wiki_attachmentrevision_07ba63f5` (`attachment_id`), + KEY `wiki_attachmentrevision_e8680b8a` (`previous_revision_id`), + KEY `wiki_attachmentrevision_e8701ad4` (`user_id`), + CONSTRAINT `D68d5cd540b66f536228137e518081f8` FOREIGN KEY (`attachment_id`) REFERENCES `wiki_attachment` (`reusableplugin_ptr_id`), + CONSTRAINT `D8c1f0a8f0ddceb9c3ebc94379fe22c9` FOREIGN KEY (`previous_revision_id`) REFERENCES `wiki_attachmentrevision` (`id`), + CONSTRAINT `wiki_attachmentrevision_user_id_427e3f452b4bfdcd_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_image`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_image` ( + `revisionplugin_ptr_id` int(11) NOT NULL, + PRIMARY KEY (`revisionplugin_ptr_id`), + CONSTRAINT `D243c0b311b744e834d2b1ee4d22fc5f` FOREIGN KEY (`revisionplugin_ptr_id`) REFERENCES `wiki_revisionplugin` (`articleplugin_ptr_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_imagerevision`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_imagerevision` ( + `revisionpluginrevision_ptr_id` int(11) NOT NULL, + `image` varchar(2000) DEFAULT NULL, + `width` smallint(6) DEFAULT NULL, + `height` smallint(6) DEFAULT NULL, + PRIMARY KEY (`revisionpluginrevision_ptr_id`), + CONSTRAINT `fcc7a25da8b3b9e0494c126ccf17852e` FOREIGN KEY (`revisionpluginrevision_ptr_id`) REFERENCES `wiki_revisionpluginrevision` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_reusableplugin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_reusableplugin` ( + `articleplugin_ptr_id` int(11) NOT NULL, + PRIMARY KEY (`articleplugin_ptr_id`), + CONSTRAINT `w_articleplugin_ptr_id_657a603b3f46a3e3_fk_wiki_articleplugin_id` FOREIGN KEY (`articleplugin_ptr_id`) REFERENCES `wiki_articleplugin` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_reusableplugin_articles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_reusableplugin_articles` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `reusableplugin_id` int(11) NOT NULL, + `article_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `reusableplugin_id` (`reusableplugin_id`,`article_id`), + KEY `wiki_reusableplug_article_id_5e893d3b3fb4f7fa_fk_wiki_article_id` (`article_id`), + CONSTRAINT `a9f9f50fd4e8fdafe7ffc0c1a145fee3` FOREIGN KEY (`reusableplugin_id`) REFERENCES `wiki_reusableplugin` (`articleplugin_ptr_id`), + CONSTRAINT `wiki_reusableplug_article_id_5e893d3b3fb4f7fa_fk_wiki_article_id` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_revisionplugin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_revisionplugin` ( + `articleplugin_ptr_id` int(11) NOT NULL, + `current_revision_id` int(11), + PRIMARY KEY (`articleplugin_ptr_id`), + UNIQUE KEY `current_revision_id` (`current_revision_id`), + CONSTRAINT `D03d76148e98b4bc99e3137189894366` FOREIGN KEY (`current_revision_id`) REFERENCES `wiki_revisionpluginrevision` (`id`), + CONSTRAINT `w_articleplugin_ptr_id_35fa87d70e9722a1_fk_wiki_articleplugin_id` FOREIGN KEY (`articleplugin_ptr_id`) REFERENCES `wiki_articleplugin` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_revisionpluginrevision`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_revisionpluginrevision` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `revision_number` int(11) NOT NULL, + `user_message` longtext NOT NULL, + `automatic_log` longtext NOT NULL, + `ip_address` char(15) DEFAULT NULL, + `modified` datetime(6) NOT NULL, + `created` datetime(6) NOT NULL, + `deleted` tinyint(1) NOT NULL, + `locked` tinyint(1) NOT NULL, + `plugin_id` int(11) NOT NULL, + `previous_revision_id` int(11), + `user_id` int(11), + PRIMARY KEY (`id`), + KEY `wiki_revisionpluginrevision_b25eaab4` (`plugin_id`), + KEY `wiki_revisionpluginrevision_e8680b8a` (`previous_revision_id`), + KEY `wiki_revisionpluginrevision_e8701ad4` (`user_id`), + CONSTRAINT `D9574e2f57b828a85a24838761473871` FOREIGN KEY (`plugin_id`) REFERENCES `wiki_revisionplugin` (`articleplugin_ptr_id`), + CONSTRAINT `e524c4f887e857f93c39356f7cf7d4df` FOREIGN KEY (`previous_revision_id`) REFERENCES `wiki_revisionpluginrevision` (`id`), + CONSTRAINT `wiki_revisionpluginrevi_user_id_55a00bd0e2532762_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_simpleplugin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_simpleplugin` ( + `articleplugin_ptr_id` int(11) NOT NULL, + `article_revision_id` int(11) NOT NULL, + PRIMARY KEY (`articleplugin_ptr_id`), + KEY `w_article_revision_id_8be41c856aa0285_fk_wiki_articlerevision_id` (`article_revision_id`), + CONSTRAINT `w_article_revision_id_8be41c856aa0285_fk_wiki_articlerevision_id` FOREIGN KEY (`article_revision_id`) REFERENCES `wiki_articlerevision` (`id`), + CONSTRAINT `w_articleplugin_ptr_id_36e661324cc27ff2_fk_wiki_articleplugin_id` FOREIGN KEY (`articleplugin_ptr_id`) REFERENCES `wiki_articleplugin` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_urlpath`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_urlpath` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `slug` varchar(50) DEFAULT NULL, + `lft` int(10) unsigned NOT NULL, + `rght` int(10) unsigned NOT NULL, + `tree_id` int(10) unsigned NOT NULL, + `level` int(10) unsigned NOT NULL, + `article_id` int(11) NOT NULL, + `parent_id` int(11) DEFAULT NULL, + `site_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `wiki_urlpath_site_id_124f6aa7b2cc9b82_uniq` (`site_id`,`parent_id`,`slug`), + KEY `wiki_urlpath_article_id_1d1c5eb9a64e1390_fk_wiki_article_id` (`article_id`), + KEY `wiki_urlpath_2dbcba41` (`slug`), + KEY `wiki_urlpath_caf7cc51` (`lft`), + KEY `wiki_urlpath_3cfbd988` (`rght`), + KEY `wiki_urlpath_656442a0` (`tree_id`), + KEY `wiki_urlpath_c9e9a848` (`level`), + KEY `wiki_urlpath_6be37982` (`parent_id`), + CONSTRAINT `wiki_urlpath_article_id_1d1c5eb9a64e1390_fk_wiki_article_id` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`), + CONSTRAINT `wiki_urlpath_parent_id_24eab80cd168595f_fk_wiki_urlpath_id` FOREIGN KEY (`parent_id`) REFERENCES `wiki_urlpath` (`id`), + CONSTRAINT `wiki_urlpath_site_id_4f30e731b0464e80_fk_django_site_id` FOREIGN KEY (`site_id`) REFERENCES `django_site` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `workflow_assessmentworkflow`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `workflow_assessmentworkflow` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime(6) NOT NULL, + `modified` datetime(6) NOT NULL, + `status` varchar(100) NOT NULL, + `status_changed` datetime(6) NOT NULL, + `submission_uuid` varchar(36) NOT NULL, + `uuid` varchar(36) NOT NULL, + `course_id` varchar(255) NOT NULL, + `item_id` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `submission_uuid` (`submission_uuid`), + UNIQUE KEY `uuid` (`uuid`), + KEY `workflow_assessmentworkflow_ea134da7` (`course_id`), + KEY `workflow_assessmentworkflow_82bfda79` (`item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `workflow_assessmentworkflowcancellation`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `workflow_assessmentworkflowcancellation` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `comments` longtext NOT NULL, + `cancelled_by_id` varchar(40) NOT NULL, + `created_at` datetime(6) NOT NULL, + `workflow_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `w_workflow_id_581d7b320743ff70_fk_workflow_assessmentworkflow_id` (`workflow_id`), + KEY `workflow_assessmentworkflowcancellation_195d4285` (`cancelled_by_id`), + KEY `workflow_assessmentworkflowcancellation_fde81f11` (`created_at`), + CONSTRAINT `w_workflow_id_581d7b320743ff70_fk_workflow_assessmentworkflow_id` FOREIGN KEY (`workflow_id`) REFERENCES `workflow_assessmentworkflow` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `workflow_assessmentworkflowstep`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `workflow_assessmentworkflowstep` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(20) NOT NULL, + `submitter_completed_at` datetime(6) DEFAULT NULL, + `assessment_completed_at` datetime(6) DEFAULT NULL, + `order_num` int(10) unsigned NOT NULL, + `workflow_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `w_workflow_id_4939c36cf6220ba3_fk_workflow_assessmentworkflow_id` (`workflow_id`), + CONSTRAINT `w_workflow_id_4939c36cf6220ba3_fk_workflow_assessmentworkflow_id` FOREIGN KEY (`workflow_id`) REFERENCES `workflow_assessmentworkflow` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `xblock_config_studioconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `xblock_config_studioconfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `disabled_blocks` longtext NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `xblock_config_stu_changed_by_id_58f0a899052499fd_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `xblock_config_stu_changed_by_id_58f0a899052499fd_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `xblock_django_xblockdisableconfig`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `xblock_django_xblockdisableconfig` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `change_date` datetime(6) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `disabled_blocks` longtext NOT NULL, + `changed_by_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `xblock_django_xbl_changed_by_id_429bdccb9201831c_fk_auth_user_id` (`changed_by_id`), + CONSTRAINT `xblock_django_xbl_changed_by_id_429bdccb9201831c_fk_auth_user_id` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + diff --git a/common/test/db_cache/lettuce.db b/common/test/db_cache/lettuce.db index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..391bb8064e121d866eb2a14367476cde93500a71 100644 GIT binary patch literal 1199104 zcmeFa3z#HFbtambHR?iu03k#QgrL=8kcyF*u6{S8VHk#C7>#B|^FoYuL0D--MKEhXwXHZM0kDs~t z@Z^--=}b*tmrZ3wHXoXqpRWYfP+?ncY3Ze?YE#!xhpKF8mfq5Ws+A{%3Gu)I{<14s z_gWKqP^GSRt*5mWE%viSNfj%62y^f-s#$RsN@d*S#shAfiq_Q3HOZ2@t1ZovV?Xy% zZBE5X2f_*WBw=)!SWR9!bMoA!;|Q{@C0o62NH#xBA!=&fUelVIw6vR+J2(7FMc*SBcmPoSB4a>y#O z?;SJ)2#g>CWc~jl$9<9eOa3dR+e<$@v_c%4m=K?=7WmYA-(l)&?>#Hq=gVdB$PwO| z_0$q?MZj8xd0lRHl@(3xVSOc~;CA}+pGr5-Dxh6Q%YIVDK_B;yX6iEG{qewoYS6fY%kQAt9yJdn>4?FHgab zA|mK%ZKNG_TXM6BUbsN7iK?&&l&0LZq+SPWOAMWCk`CQ#9qUc0atH{$=Z@l!CZV={+M`+E;4Y{E7 zs^H0MQnadoU?82!RpLSoI2LMx+os|(XBWa4oKWA2DP`^+!&7@v`z;iY9IC^iP9N3i z2{oumyPXH`EQ?2v^6OrRwi~r9HJU~ZMR>VC zT3WX&H#G8tRq|T;4NE5+=uIR083_+%bU?%R!Q1diwY6-FQLOWd)az;}tjP_J$Gb)? zZByn6?QfFMD1-jr#|IBc0fBKt0QCQH8&Qx45GalS`2UMz1(blmxFG=Zf80hC_id|dsbs)x{Jt8frWmAl2s~a zUo#;phtq8CX@iPR!n*HV@@;uNtpD5eC4*)Gfe}Ce?0+LLNWdZ>uuTZS`oB%ULbHIt z2p~ZA|DWNw&j_z7edF*j?DXy~i>FTU8zg;T+Wuul?^=ermQ#FhvAwU?*g#ugfBzQQ z=EkFDC`&;a$B{4&lnbcqhP3;ePO@Jnu{oJrPHcuiyV?OZx)tZS*OtXASNM%{aVx`3 zA{vf0aog|qS}oaJLtERX8j&W8?7q}-$f`Bac(`mybSzdZo(pAr!p9}zrz9d0mI;F7QAFGQfD-NRBdk^`ZLuuc{FMSb{4B_*4SyEl8)5w)o^Kv-0toCh0l@t-#yUwSlQV8jqmfVXU|)lanjC0+2_ISU11Pa% z;-mo?r7n6|+bTO(OWWH-FiJuH-{KD!GzSQb5(1$AkJ4xXuYkbTA^`sXt;G{s0|Z71 z0hs@zG+MwbAh5Lvfd0R=ctUG{z$hU=;(xx2kMm)Qw z8_-~&<8r31GV`B9ohL=wpFl7n=zgA&1ez z6zK63J?sFNz~CS9?*|u6p+5qa(ccl~DwV5~1swsbv7sCREP{%2|NUk0(4jC3xSJ+P zlG{dmt!4DO*gc`EK1Z>~2j~|ig=(M|#CMDI9ndos@aU%eraT4FbW33}`fxykkR@tJ z!Tvv#pFCg+5ZD<6K>yzvoS_#$U>Feq``<8*3h)F7>)9i0i(9nX7Mt5VyJgN%$|+evX0*12@~q2N4+YWshS%9Dodw*zVO>pJ*~dy0&p54z zOrr!F$-S}LzW|WFvfFE`a^lTdcW<)L4TmcV=-WX5-}c!B9RLDDivZ~VLpwCU7$C6i z2oV4OX^uNB{Br4)o9u4mBm2wZBaiSOKjD}3?d-BI@Fl(Cev z6uGZk8oq%$kuo;8T_scw<29RdyU|1GVKXRlJ^O2#Y)VF5s_CY+61kR}906-+Z57`G z?W?Ewc5+hE)UInyTv1bd@#uk&swL~_&|^cARTbSFj`ZAU{$NG7)?!bvPHduwet-DB zACD6QU9(M7%gv^7LsB%;LYLtn9uN*S!$4P!hj9xv-3S|-osL|b?!7;f-op8Hd!43% zZtYPeS~W&pSB|`8LcH)u+D0b+f=Si*ld9c*(7j~IF_K#sz0vMg z$n#nHjZP!m;x{{Q|I*bl+`%wKubKk?|0X|qP#q8$WdvaVKgy#AyaNK8LjceJecZQl z+_&anyikKwxVSfcd{QI6^Ccz$hYs_5a&A zl=l1A`PcH7g%1nAGKx}AJRf~{LcDY^%{ZK}(RxuJQM2yy(MS4gVkXh*+nvd`mBk}R z`1P}t)xU#+bWo5D_9c)AZ{Jv*D0q~%EvM4$j*Ypk-H6?;9S?Z&Oy9TnAD8Jrdp|0T&CnoHXl6Pd{9wFR4;9VwCB6^UY zL{`B5Pkj;K2Ot0lFcAR#p9u>*1O)a30$~5&6T=Kb0s>3~VEt#p0uKR!J%Iqs|2;9x zAS58bL;&=ECM@s}5ZDt4;Q7CgKg98e_;2LDCj8Bw5PEBbyilDG8%GPeuOfb0==z0Kqi0DdU4!17nhfE<853ar- zA_6e~M{(4EXFyH3_yV5D%&DO!vE2Jr8NJ-4Q9to2qZ}TEauJo?t23j#PS)oh5sHnGTN;6F! zjwcOzYB>Ao_Y>z&o<4g1^5m)GmnV;2x_I{F83e=W<7X}+7X6A?vy19?p$h0zFuR`2 zQ?~uu)>LsmI&Mr=f%Hg~{XB@b2#~Cj<0qcL{YXyG-0(%Sr@c-?x0S9pbfd~Sy{zt%oKLLR~ zh5*_Be}Ut^AbgngR!Y{~7O+zbr}a!=I*D+06dz3km4lXjpj zXUGh_mq*)tYSZc4I^vr$uTz{zk2HmHUDwvK+j0*e;=L}ba?W`%;wrP`RwrsbAVvv% z=Zz+z{C91XMOru7p~Ee4-cOUexID-jUUA;F>|Wfy{wy_OadF+$;977GcS`YN>`_ah z9&Ft3@xXKeNmuSLFmq|6;XKG8=m2kk!1f{l>;LxR3#|hJ!;Ap2|Dmw| zzY#79-!sgdZXs{Z2M&>Nl~WAE6uRvhMSr7sq~Mk}V)zN4Kb~cZ3dshtK@A?RVwjE4 zcC`@6vqc${*w?@z5-f09{lG%ybBE}0cT~%M8z@NS(c(cWAzX1=RakP`dH>xr9%! zHM!h+Bc#+RMyn&YvF9Htbm-n}?A@pC7DPICpt)ivy|Rig@K)U82XR8nT$MVqX|>VS zeDqa@)yVmT%KGg`%Hr9x{4JguH^cyn0Z=sUrrctVS1Q4I_Bf@|4>Ugh#w5^m{d>i! zfD2ZTL;k{i z0f8+Ja&v>Ar5y;drh z-ZdfW$MOtS45>pC6{GNy^Pyv|Epmg-(??8X;VCQGvP`|!vtj`o41y=w!;#wHK!XzY zn?EFeutJ=J$k1S0ZMP#Uk?4&0(JR`V8!x>sH+yN7A^+d*d|aScKwu~kfc^ha3W9ApK;uu3Fmf&ft~Esk>6bwpL~+vxSvw#Lxs)M>b*8QoHUc@{cOE5v(7-e z9>cSErv?K<+NOI@R9Mpbeq5uGq` zzDoDuHk1tLKzqx!74|+ePi@AgI;cD>C2f*a4LIPJ9g47GbR#WBW5YrJ-^uR}^aThE z83LgH57~eKJAl9rBH-%({3kg66T)}zV7Jf}0|Dpm_YjW*xu&Owu4|FdnKrGdw{(jN zy3HuMLaWmmlmjW&yRZSNIG0ZlHvrkTDVm9cp%sKoSBm_&v7%$Fx>n>Fo8T&qQ7-*J zNNsCKav*CWrkItmKHT`U4FsCM=Rn&A(El0p5FP;ndj$c||M$vBgPeds5&?++OJV{~ z0D--NfV=+Q7@cvqjJdOO>l~@EH%-B1! z=!b9bcwIB~`kK`1q3fm6oLtDy*KQiJT9nF+-;-JAe{)||shUp$`v1^;s(=wdV8;<4>;E@% z+&A<8e8)Rycj(;pn0sgF`kl!o8|OIaG*Paz&;+c}_Fg81oUv##D-5)1XNH{kYX&<) z!^`?Wt%lUPRN1(A%DqhEV{a;gN)#YB_XG`^(ia{(4Td)&u5DlHYF2(2eU7-O4NnGq z)DvxvP|FFY?3l7ocl3$^IYh zQ<1^D5uu>s*HXx}jLm$csg&9~y}8e|bf8VE)@Eh7uQ=z<5L8J$%IyFs0@iIh_cCX;xjn7+uYJ1W{DQq3uV{DUOk z`4V(c=Lz=!(+0Wofx@pQs|^$lgAU$f$6H3x(-}b0jSK{vA8NBLHwDm9N7d=b#R}LL zC*!-gV)rrxF+kqN2nGHiQlCror`skS;VP{ETlleorT~EvLje4L zBQ{{bE+DXl2*CQkgUkURXMK8KgR!X>7V2_?Y#DU zS-fuNpyt{Z^cKocNSTR}#)%|NGtcUitTK@KCuX6UiJV3YN69%MadY}R+XT3?JMDI#6 zI<l{o(-uATYKF zfc`(WLkofd0=Wpl`kxCC5C8&WivXVg0{874_wD>|51)|E()-*CJJ!z@+Unx)5;_|I zW6R?bUF&bt>(<%nop0{m*5k@gE<+s(uWY>e$+CFzB>&`WLP6J-3M$q@b_xNQ z|2u^=^aBVC9|B?>Ph-(jN>WbFx;tPb(MV{#Yjk<+}OnH2R9-S1bfrceJzM(+&z+N)3 zU%2hhGn>Hq|1tR#ff#_mAPB(ze-PB54j?cd2;liIaKFZJzb1@_K+eNg%HsSyzy2(( z=V333r?&;_Tjbfz6b&yzGLU-bE0+1bo`5S_BaJB9m>0Soq&4UIi%=z9j$F?{`LinP z&wZdQE-&*h-tEFw>or#;ttF$IM+qD5-|VN)(2%i-1_MoNs{@JJ>@^~B+cQhlRU^m+ z_Ozx%Tz~P4N^oul3GGR`D1hBRr%zmKIChv_vWdv%Jl!0-G!4m!B`ROQj>J&G_rtQ8 zDaHx&b<=1`vZ^8{BJC$5#)e00ag?0QCQXV1r74z*ryv{=cypMi2rJ7zhEp z{@=zu&2dljEBqIQe^GkbK+P1WWIubgEFL__ukVlVG|?6Z1x!ZvkL1C#sryS(KG4>3 zuswACRxL>5=64XD=yb1gJo>>2@zTLG-&R6)shW87VTY4kZ=*vj8xexYR^8tZW|w{> z69 zTEoG(hUuLc&MxIXngcM^)<6K~y^`T+c4E#+$*B(de}PXIkN^T>iU8>UV>+-P79dan z0a*VFfCMCfz?dQc>;ISzEQkdN6hHv4|0Vt+$6w@sNcfWi6@Vlcfe+NMl}g}r6vcA0 zd#$NknuH8KhWlH}wj436RFtiVvz>VbU$P;r8^n%k%54>08YtDgKlFCpAn6zVCyXL) zJ!YUvZ)Gs+)XraJ=Neq8EBL64e--C0wJaVzDy$!5<0f}-+Q+)yNWd19a2q+O1(c%# z8pQwP&SoG01jZKu*#D33*n(t$Kpp}x|ML)nazJ2w5diz&_>L_|1_Vgjiu=Lqh_|{CN^WQNd7PUqa}CzpUgt; z7Hu-kBp%3W8nl>|v^5}74Rp9Qa=8z68Wx$5144ALQ`OoQIyxKVs0mM922^frW&B(v zgN_x~8j|@j!(pnNFy=M)d@oL~f6Q~XN}Ux|t<2M^s@2sS?OrF5 zSvH7m4#XyxR0lsjP%D+E>Jwt?M4IO#pl7{BQZ=)fd*P|Z;BC)jxBa4hW2Gz}J}fxT zyRW|650j~ z>wnHU-94POac`Q2hO}Qp(cSAD8TwbGl>53|Z7o8*X`PLVLP0wW6d9v7BX>u{cOYF2 zY3WE^i`Ub;-5$Q(fuY|u^}2>NKxUyUi$pHhpxUfB_dM-x^41?o!xV2!h!)I%G%Vyk zk&9?ZJP@GC9g??u%H19*=(J%=Q{B8tl=x^URK1H1Bd#UODt3LfK$#LPnO8)#@Ui3fs)FhS>qVu9oJOvt^SDxm)l>jw|`0t9vd z0nq<<0A%O_5ExPfVEzy3zyMo-zz!gQ=RePXkwgFBzu`t;<9riehAMoFclV^$if*b> zM>efB;-VrOJb#Z$&axCD;{Fl6M=exou)XT891FtddL(2A=ps+9?*wyi>gq}h!OYXw;>(8ahGIwcnOWyAh|xaT}@2MBB{0`B_HJ;&jHJO1B` zT&pZzxFCFjL>VR4ovz$!=B#H)67CywR;H~_*Puf{U_=nW>%YK#jpM#1d}%~j?w`%|6Ya8i z?woMz27Bj>H3G6p*O|!5UFBf_Af`o9Hr9x}03!Qvg#G`4W#0rgf;)F@ybo|6dcR0SJr@ z0^t7}o1p|j0D-;{Ao~9Wj=LcIM&Fg$6*fN7akcG_rC9ZvmhLN5MA1tqX$cDMQ#o2% zqQ*dKngZ@ADce1Ta7Gt{w!6I+vZ1-#1K*(*4`arZD@NC%4OlFypgrG%mDOZRz9|KV z-6Z#-&Uip{#i?8?i&w4)>kqOw3I5xMvh`szAPTJ3kw}TRkWI#YI_FhnR~zhobmNN$ z4DCgxQ=b*e#z_qU=>P0*7(4|8_5=c;|L=)m1|b0fCIWc=m$;8}+{gLv5^N^P&OCHP zvni~g-ODmi92TwO&dyLd7XrOCrUx%jRI$Q& zsxZ)G!;^cxHqOGKseyU8VqfXH$T&~3km)MufL=^$_ZjzXnaH>_10j>G(Ytvn;%0rl zi-P22)o3^4F?1E@!&X^5bV#^$2TM91m`QvAf9ltO+Fu-B5hL9vh#iQ3h|_ zi8B`O=6#=Nl@9Dv(6$~Q84L+#rk7@sjfueP7h|7oT{lr4B-sCt*dzyb0fB8q0P_ED zBe>8sATZo~A0sepO;?4y2@Xs>?7h$ferH@{`5D4_#Ztyo7pj2mqfDu++6 z261X}C6MK`X_!W@Q=pnl7vYrD!_KytriZjiQg*{c_Yo%x$;lgbMN-D9SXsI;A)eZw zmhnFdt5l8t;{M5c>1J76Toi7R-Al9(<1=iS3KOL5OOB{xj~o)0I=7W+2_vuPn8Dts1rn2iu9z9`446 zwX|;6Jr@%X!b95(bom+DfJsfGkqlZxiR@%mMW@hF@EJM?Wj<8Jv5LfwJXqja_Qoi4 zPu0QV8a*5~n6``SWBaCRO%0{%PbkS#O#@}yV?5uYjX)A)l*%Z2_rrXZ3Mmbg_DKIo zUk@uFG0Rn))9z+22|2;V9ATl7}Apq+? zyb6H8-bDb`|Ghi*AUPm_*Z+Oo*Kyp}2^+#sm40CN5Lv(RVG=KJFf_QK!=xRQ!_hUg zd4F^Nlwn}=$_6s5MQkkzn;LbtGHULNIBMzS)$UCV#Awzqo9qt$JQyOdM$x zUF(4z$(dmTQB)#Tn|0(3_Kkxqm$BJc$)T`Jjpm%yOjEnAH8Xn(%vnAX$d(lfhJLuv zRVqu*<;DbHn1x`h#*x{3b-$T{=a))Jm?t^*lh$r|KIHqfc^o2-9rG@|J}nLdIkh`8v#83OWYZb zJHx+4_}0yGV_&qnvUuQt;9QMv$o$I(y;y;_h3%9kzj zi2HuFd=U~XV>j}f-tqgaX9?`1#jY6@+UGF13G$&SWM9C?Ox+T1!yE>$)0f|Ud*)ij$!&viRQ@k)2?1{Vhs!R9&Dim}?MX*;K#TH!1H&&yNNBi;wiaz501rzcp z$w04F`WVGG?;cap3amlK*rY~kA^S#XLztPyM}CP(2}S!~*R^CCFVq++a)D%pGo^=G zLH@7Je)6C`ATYuRfc`(ig9oew0-Hnt=Km%EgzA962qQrD|KGxK-y-ZQ{qS%I;xz4& z8wzmib?(-$ZZuWhl2CFaQ;Yu1eTm-eMau@-59o|HJXk11QAO)~9{do+yh)j|$E)*GdqiQ){(w=)6MiPBo3D zmR`dBFui|GryOV#OW%|=8%y16^vo`?1^Cti`f66^f?Y0)r%wwTVvc~W-JzS#JSpdX zw5YIzejt%C-ua;j>8yI4V)wYeJ5C0GL}L&bp&Y@v1D}~lW0lH>?3YZ4-P36y^y#b- zRHSMi1@~q9LHl-hk()S`}`ytsrJX|+) zX$FqTuqW&*jr38eH0_s9h|gc{&pjDw&mExrq4$R9CqVz-rpXJ<0s!5gnsRqVBL9an zS=RLi;}Q2$^t-?y8R(@z_ZMNfF`Eo#(by3JRjRGg!AkLL9*pRsDXlHnP*7PcVF_;3 zFjjRLzMS zV&oI?-Z_Z>+5ATjS^xw_76H)zM|S9daX?^85Wq@LR*JbzsMtLd<*`@RLOqq%cac79 z^^oS`E5x(Zb%^M=yonSw6eMryElQCi>L|(v&}*wmQ(_m_^k!4C45_Z0-H6idrk@K{ zZl4ONtNBD-oEhJ$h741=;E@XGw?+tO@(C5)ilCFi8-@wV@1sOx=y%yM5Lr_()CgsD zf!bd9q-f{Uw#@u~6$RZmnb)r(n<~lr=kpgIMbl8wt)hmBF7xa(*Ce&q>M%APD9?c0 zM#=k;#v67?_FQDRaV7#xf%D?aNUJSQ=_bZwH;VLQy`$p;Bk9eBG#L#ky)L?5Rl`Eo zHT=?}jevJktB=dVY>>#$FjYjF4qIhQCU${F-2Fda=J+yyy#V>RlDzn={mQaftqPxf z6WPA57@dyZZlIUjlH9@SCZ2FV9oxJnD42U!1mVBBHDSN1EG{n#AK#zS9l8#rmFyBf z<$flwTTI35I`2cz*!YJZ%Iw>G$qS8*@BY;zzFC7ZyeCES7~Rx?pQ)U6~O=KiM-+>mLa;2%GbSxcHSMbu~7n4s>Q*R^dg4R{Sk4klV2In;m@gf;p z($~IvuUSVcRO<3YRyXuHL5XF$*dD-M<&cr!I$}|(Yf&~sHqbZMK<_a6c;aJmaVr7r z|Ht)<266!c1rUJ!e*uty1P~Zg1n~Ulxvz5g-#GpE!kg_o%i{dJ@b!99!`9o^4Wu(s z%Bc5@`!^ZdwMVnly0yRYW$jQyMbD?o+8(D^L@_lJrr%!Mqo$?d5ALCpTPm&93VIG{*1n60oMO<`s#r!fIxo;xb{D;#&I>_ z>-(!&lzL;o{pzxK>Xh&zNru8&buARp(nU61l)N^lnEOip`W$I(rHFm=^x>fH)rWG@8r!4rsfc>xNXAI~7fiXk?^#3s& zR1gUeD2RZo|MTC+@!u!>PQfZbwo3>&2kh6BMO_!xUzt>p$!P{tYap++DdU|K4h4#+ z$CNsqOU?aUhBBR7+ue2%BP-UprH*B?w?xsfvuIXNirI(|k!S(JgxhRjqMM0?Mpc~q z?Yqn3v17vei6mTJn=1${!(3x^=M{0kkO2hU%0Qby#RxeVO`0>gj+=>Nko3cv#(usaAq{-52!9eM=>h5-Sx|KG>) z`%0f427Y#fhg+|-Ut1P0To689N^TU{dtGY7$R^=_F=OM%t}@UDl0NYhJ$o}r^39-K zBxA2kLP;WSB6Q;@jxvv*h%f2^^gW0&4yH#f;eBm19G-DN03Sz4-NL%`kqsbcovDasByWQEo!YI$I-o&~GR(J;gw4qqK2N_ue#${lw~K^;GwAH8+ektmX4tS%1WSotp;e7URW0opoXXUgQz? zs~H1MNCq0*bkzvy1^D=$sk`rGs8Ub?w)wHTDDR$v@Q`t?AsyYp?#BEw4jTH((RL|U zNc+LjbJx)kKq|Z!iK*S}=)@nCNQZ<*7wrGVKYBn32#g&9p#P8Ekb*#fKw$)k{qJ=g z|2pBt!j<*{q4Tu;`m%W9gs^cgxy2zmY0AbXUda7gu67%?G?1Rl*u>;+JmU7XO(c18 z)%yPTJ!mfw>>He(eXnbR-8h>>yCdr=0u|ks9NleE+bA{(_v;zRv#Vf^Txhl+ZYgNT z7n5y?jpvZUmdwf37MVO*l#F{Cr=9N_a}9@K!0q)r_IYtGp}Y z0qg%JzIad-5EyX;ApUp62N2i?1U7*HtpA$;52^wJBaQ&9|06ztz&;?b2?X%^U*i6h z09o4?SEFM2DY@AFQp%l%u^t!H~ zb2HfQOxc`bW!&#%n3!U;Ltq#6?1gFmYG#;1PLMJ3qNlsaD=10IR9QTCPFQE8n^cXq zml_3MNZKQDu@u@&3hs9^FlW{n%$B$Fx0XWu@9=-OfI~oF+Yo^L|F%I34Fdv0j{wa7 zp&ue(5D?fl1jzpXQyljx{kr_$k@3)xSHtzo_uv6RaZL!Z` z#{I7BNN_4AM`hzx_M6M%p+mxp^RC6f+e+iTZxf@6kx4kPWs`%|987 zIb){l@OJ#(CLSM~?KEZfwZ9Qkz3tz`$vRz|bIWw>2rT;^%@`3$V&Z2P>Gm28atWuK zXFqadH8o^NDC$&k5cY%$x~sh~s6TSdnB-_drw+UULg%l2Y}{-o=tpqlL#1-Y-ajGA zhtf<~DT6FkQwq4>hxNa|PZLlB0^@`L`2WUfG(i?Xpg#m){qGMipaulS2?4VIe}Lm2 z;QzdY{*UqB`U(3j?gf4?ko1@-dx@@WDk~@jQBE=U9}4YD{no}|e_DL^80_?dTW2E| zTA-a^<|Z{($k^sqoT~kxd&S;5xnfV1%~h!>w;L!ol(~xkK(_}Y&v@E%?hoj}OQRcX z)OOzejUY9(rY3h$el;w84`uQ~n|u0-4EwVEkZXr=$UP!jt0tQbL-PJ#^KuiUJm&t8 zhAf3_FvN1~FyUdWfY(@pF!28~K6vm55ZEgSfd0Q%MjGS<1d<4V{V$0LJOKpu3Icfj zzm0p0L;pU@|6-|JdTLO~&)AhL*JR4RN2;b2a9?vCw%=M7mzRb0Yp(x0L5T0PN4c?M zyD|4E_n&fhT`tvNo335irg~zceJZlAv@KIl?o*v5`+&Q--{2{{Oys#Xbp>7SK}<6~ zV)5tPe`aGAryC44vQ=Hx*5Y1p{|G>ESqV8SAho&;DV-ec++{`4y4`#_6k;IPni|TG z?b0hNnz9<-20vjxJRvHF)BNgbkcDq=93<|K?J4__vUuQtV6RcbLB?;*Z_@k8{Rta< zuXs?*(VG$l99@?}!wviYK|gm;4-gmw1YrL^27?G900ILd0Q>&|frDy*z!)F^>;D)G zB8UJ842S@%{{sRC)c}DpKmf1*`?#-i+*i>JK;J3+?HGvUitrBmZ4=_T19=8r&%7Gi zaeZ^_pRV6#A1sSUjtI9zmid+#lg(Z;a6ou9!vgNlGEKT6;XuY++;!}LVf-vwXp{Di z3(|MR_?F=472Lj6I;@JsLI({!7AyEPn(Kd9E8dn@A#5Tz@)q_IVUX^kQaNu=Pl(!) zf+HECni$iti2HNrHoNM^v^wOTQeSQ&ZAiJIcP+z=8tV}liDK?AQb(FaKG1mMa8Bg3 zYIWGxs}shv9VXqj+(D;i(FN_n!9=kCkIM%S>|ppgyY^=L3z5H$T;NNQo>wSwWh4BGKwm_FhNLp-{XwlGlyLudbGR z){2D5Lc`&d-~M2=i`d8r(qW8pb(+3^+lw3b?>>y(&W)^Vy{76XHH!rqBf};#;dRjw zW2*UB`^em?Xudf#Gyb_y>a@Vt8WG-&oyITSR0ZsR{eJX-9uOEK1i=0`MuQ2W00Mm? z;QIgh`#AnS{$s*Vm;Pm+)yJEB#h#lGpS_gkdM=`92dP)HRrvqn%-Zv1@#s-u9o_zo zPOG(ynvTz`b##gRiT)zFdD2U`zo9n*>6C-1|GTo&x~{95fs+3kXiu3u^Jw3+7s}$n zgTnfKE^OVNd0ktR$p6(1vz2(j{Z|^K1i@g~kZldyH;-~5qsyH%m0jAFTagU`6~htc z@4=$Pwwjf9*^3k6rGsg2XF@P^WmOyT+L z@dfDsfh+`I{m()N$^e1!MgY(M68Aoid!JAeet4^7U9Z?nWpQ>^xOF3GmXX`t8=6Vk zBFH1|zh#(a2+2+xXOfO))~Okms~THu^3TXnC=eshLsRGqD16WcnT(JxIm0{@&|H_B zy@(B|Iz2NNW_m(Y5#Mi+SUk9bs$xHEFT1y`**$l#6vOPUXtIjN2>GGSF22gE$$ZHD zcY45>M1u_(>NoU~Q%13hbJBi$S-fyTSSK$R?p0E{W?j0e8ZB9GBV*ysHDWCFuJ|rM z!u?%RmYh}xlWbS4sA=&k;Q!yMPad=b2#g>Cp#P8HpaIK(z!o6@^M8wggk}JN5kvsb z|J%3)j$7c@g?ogn#qIz{Td+fA@$6Y)oup5=S!)`~s-!-R?ocu$^2p1&_mUzJZPa3QQ0S1ST z9gl{wPd;(}N@JnI2{>D9aJ!&$*4i5{hD;t}@`&Kdh1?#)>nRnH7m zYw6uCiahV4^A0^#Yg_0T1&YyOKIS=E$`rDJUIedq*FfXP@>5oZ&}xFLF)^b_c-{eX zpV@{>V6Am1>kJj~9}mzc_kTzDL!9{C;QPOiWF^^8fe1(bup#DQ{U5=PHn0o`Y!L$B z|KB1Yp&3A61QCGse*^~&SOx^P2mx6Cw+KjR1`rrQ1YrFi!9fF-0f8+-0MCDc`&o|r zS>gN^HMtATtiQy5r+ZcCtxD3+9GX7Ezt9O$-yq5h8D{2yY9K3fuNO5Q&n{3wd4Y-7 zw;}6oOKWImctvA0F?Yx>WjgoR!r_9lg&OKuQX6>>aMB#VIh09AZ?rWvXcy7Cts#0< zl2HaDoU;e#^odgVd3w^yP5Fl8hh);8gY~!CM_qTu3*;J7igOf*rzIZn`!YrV*BA)= zt;RQGn-1%Y=Pe59&`8DKA3RVU0}V}A(qt2jO7=K;q#Xk}P0*q6Y~tJ@)4CcO?V4dU zgOP^#zg_rRL6?BQupj{X|FDb%@Bs+yJOW_<+j-2PM?hd$5WwsIZQNTp?k)Ux@c*yy zdEs|ioH;k_ca_D%hlLFi?-%ZC&>n~E=~^w>TuXb---OCG+qBX1VyybxPp{~W z6?Eegz1d@({!0iQ*_1cY)_PNIRGzSpO^C|j^ej)l9fKZ;SjbmojQ9zAzy0pASg8mO zNkpuvH&G0rpJR*u#lM6eIl6S9@$zzc#ZERxGwFJHuPTq)$0x+Il{DFDUeJAClpOr+ z&ZPaGvbcZ0ut6*lUb&l5Ec!S9Ql^Y9-9Qq0J8`yU1@$bEq-Ig$5S3>*%=@J@brdAY zppOSDs@_S*sY#THEZpB?TaP7Mz0|{$p#QVJckm1l*c%9d{=YZI8KeXRSO~!S&q4*B z0Rnpi0a*X{#yEqNfB*{ty#DXweuhK;{)ce8@C1uyxSuWACnm&G`*Vy$#Ny(ch}>WN z%bb_k?=6efs<6K7h7EZ}A(Af3rAa>F?_e5>B6S8c8KHZhx?1L0($Hw+hxVLdnIof? zt4V#)t||U$f@a;i44HmVLQG#6k7v}46H{V4((Jh ziiPUC)P8M<{~7L&8*m2*Y%2nw|8Fb2&^RD4)Chq6Z>Wa{m;(g16#=$EMTi70WSg<{X*w@$8e_Ty!7eqOkBzl&xI zU(0D3ZLKQ>e+GXFYykcBP)X?~tUA^Z9Tl-aS5_jj2+QbTYUorfz5`+f*+kIQ2t{c4*W_D|;_dE+H7ROH z3hhYYc}}%&Q&45aK06^kd#N8|PaFxh@h48j-@R_wPn5-@M}-#}aoZjV@(YG4_yb=N ziX#_;2fUa%QZdS%9v{+uW{71VMgFPpfHY#`^d!PbzJg*Y3bTaY_rcnZHbX8H2`-Aw zGa-h8Q;ea2!wSUzZR&Fel>vd#Mga8x(H=kG9uU|J0$Al2c!T2&9wh;W|F#){i}tw* zv2nD3G9OcxDHT3e#^1BCV4rvIV|?*4TXFZC`GHm%{Nd~GaRUDJIcj{o!Vqfn9*cWj zgzV;BwNB>cVW584;q-0ruexb3jl)y%+B z82r(dsOS6}QZ0oP-A)?_apz1|d)x??oi!&ScJOD!&)-GS5BU5Lbq5;iK{1+5O+h!T zMU#M|tHMxGp1a;>JkDnY<$}MIl?y)LFE&EdYe0<&e;?@oo1LUk9}pN_1VH~E-LV7C z0fEgTfY*P4|1`&c8npk-V!4I&H(qVO&sEA_oOhLSl=M-t3{!76@HIX7PfgWs%B{5L z{F`W{JdJLrmGUqYHTA@O#9f_AqusPLvyJX7ie8~Zj@=U-8)M_0%8zU2_@-m2skd|s zB`j#8i*e#fH<8}0_B09Kikwv5^=>!-i9`ESZYkF96-~k{Fe&o%{}3a0AK_+Uz=C4^ z|H&-+5EwB8-1VQk#&Oq#H|_}Q>lOR`?g^n=vzaTKsa@B# z8y%ymD{E<=uP6;aRcytJ*4gRR58b~m)z)0|8PhT~8NH!U?pZ4?X~f#(0imhx>XP3^ z8gP*&2_6ywI%dbJtbfqHTox5Yc!AuYm)2es)D<1212PMZnMcaMx&NW_s_yg%A{DHm z`-%rcaTvJ~hV_3(zIxCJATX2&!2BP|VF9K9fgM2r?EgCgGjsw73?%|&|NnN5dwc1d z`eX2g3-(iG@$zNi>z~iu$ak%tit@Wc6u}D2WliN$h)zR zN7uZYDBMJnQN~_uy2fVi$uqFS`i zKYzILt$#ixe*o-%d+7rMvH}7$0^1lLkxs)Zq5lq}OlLM%ICK6tMs8tvL_U0s<5QWc~j^j{iaG zG5i=-1U63DA1aHQCcOA$_Nr~vtsAnbbv31DYTf~zlvBiA1}%TE;CjudyVLf9EKgy$ zVtWxf@u;Ermfn?{=8rIWkZduB6PMA}AiOXzr4+*_9$4dw?J^kS&+RZdZ6w>wBrs+oUsAZGWR) z9em;6t<8Ey+%c^Gth_O>{`WN#ffx`NPXzG#FL229{|VuncU!`Zl3jBneP1}1z1~qL ziqPSf7CK*)w$t%_;ADyLi22!qYaFYmo!;Gg`&Me7=dEhg)-n|V##--x|Ix124bXMZ z+b~mMp=2JN^is8Fx_3D1*9rT0wVc#$;6dFA{<(TyBwZ>P6&VY24bWYtj-Y3DF&7aygj_q35c zdtWJ}qb=h8E0qt~+Jx9Wofc;vtw6KjNn6dM;1@q^*HQlR1A=|8-bR_q6|Je6Yv_WZ z?rIA;Go*!unfl`Nq8fY7FMFeX^31!BzaQPAlTvMJ^6Z&JDaL0-S5dN=sfzs)yHOU8 zRR#OOc>gFxXBrD$5&!m7F5;CFjCceTFR!y#%HqjI!9MKrqCV}3)zM7dP;~{PB2`sI zU7VhqW|s1YXpWdfK@)^2CXM?Jp^V}tI=JAz3$Xrg?t2Hd0fA9Q0OtQFj~?(22y6}k znE#u@4{8Gfql^H||4|-2;2jXy90J(>H^F^|<37XB@xLlu5x!PJmjUhmfA&4LPK+jp zGK?nm+4{7)I3qJ{9sHw3j3#~)IYtx3G*AxXnrkybyggkOPs|JU5t_FfhPkSlIJ!lX z>eZR$<>_k3TBMMFM+#>VnxKIgV-XT;%yIL;t!OCsZ%sp~e=By`UL}UF{WNdb$V50> z*3{W$ZAJ?~3ySz7DSQPKl3zK-RX~7wa=SsSOxR7r$^&Vv)TS4fmS?L9gOzvYvf@|H zV#STN!PdZ5)Eb!VPFh-+t<`2U7AQw^Iq@rJabh7tMEhTfWWRIK>UCB{!i{_`8DAl;Ri~Wi!p?pDn^b| z#gFo4I5LjqIx_sqS&ob#-20&2DT^153ic(}se(OFy{^<~8a25|exREzyK+O5<}~DS zl4lmuN%-S5Z|RglV}!?aLhKb&R^)ag$Pibt@3pTHC*tua%Ot|yXSOEKDXLnldo5Fi z{Ck*eQZ$m^0L36hf>|RtNq(>RjDY|HW_uDnMWy5rFwWj-v`P0RqJkfcakxC!hiZ#t{LS|Km8SAQK=^3<2W* zyPxCk=YF2=2zLoTT6&7AX}{U-5kJO>Y=_J2w7gWU))&$o9sFYj{TO~j`F@PZ#Yx!T za=nnhMU$(ubE>?U%ID(+`Scsg=aY0r&JMoGzCqX|$)M7>kW_6!o|%^AGy?u~K{ow{ z^4V;dvWh)dZ?ta`7Rk}eG!CSN+Kj5H^VKv0{!Bp@{f6>cRE;*~@P2!ZaCkKPoz!OP z^8D=5QYwdM3v%c;l+U4JqH~xU_MlGL&k!b$Wiz=fYm2i=h6C`4f=v1iyK)k_P@ zHFWFBqLSty^62<;#auA)X0tsp9yLjs*+ci%Sdw>y%sqj3*#0mP z$w2kGUb@$Auho*xHRMxks?y?YeRgKK9`%c6(esy51U6FGvF8y*eV2I{%;kM&<-FldI%8v--{ggBEKR$ zR(g1sB(SgA&%34;`?)b%+%s{)3>Q5v?YDe;fR3G_a&eo(_K`+ z_YWqZ-%Z~FhLPm<2OWM838&|0mbBVT^q@oL5MCZkLcg27CG5Fr<6MjE6OK?8wF`pX zO&LS)KuX8d>fJnBV1kx^Do?URm0TNOq6XOicIgWT-2wtbhydvSLpUhF5+JZc2*CW` zA)uifKwtE90HH=kx*N_2wlFrjhqjI)mjWE2+2x7ZaC=xYB0`OWtwP{bH`&bf_9)GI6z zBV)g32uz^If3Sav{O0?W2wx`PrSyNondsO4=O?o%GE7qcLix@2C6osz-2dIzR|kjz zf$>8C^#Ac2Q;-M{D2f2g|Ds3%9Uw4%2*CUwzcB@g0D+UoT(=5ZE;YK>y!0=%HgkVAm0V`M>K!01N;EyM_SF|6PL~ItB!G z9RY0ryNx@*p@07m|0SVQs;07JA9h}rlF!Yk*PD7!{wfUZ{$1(`XcZj}R&UbYEgb8!sdYs^HpYT`(d3FZELg1%SZb zKmhdry)n)pB_O~;0Omgn6?g^+>KwxhmK0%&z7VC_Gfrc>=xYCV(SA(SzFjo1QXg^dOz{+W!IN$jv4QTo zF?CgAS$J7=d@EH97J1NY!nVtzjv03CcQ~&mB1my(2dlQE&R3U~RgH0d5G5+#?oR~2 z*}@_;4Mn!d{Xy?^?jjN>g(UDpVI!^rmZZGVp9Frhg(dJhCH|WGoY$1a(}x86uq%UK zCby0DTFdBlv2#jS1E*F>Ip3jqP9Y1LA-twgQ9dzP{|EfuK{Y^N3=n|%KL&#cA^-vd zA^`J$K;WPnATS09!2BPBK?D&1fdLVK`9C0VPz?|m0|c=Bzs$XbL;rrBSNX3AtHNKE zJ{%X!ev@-IF=HOhHe-6B?J1T={#rpZCKVx{(pcQyEjq6)iznvemR9eI_O`0G8`7M% zv^*=%Eci`E3;8aaxhPH00BvB6lDKTG$nA!vO0_lD2>cO8EQ?1T5$t z6D1=-*=1|f3y7_%5-;E_nxlAmP?2yGFUFjZOWtk4xrcD@0GorQ`Ra_UEvoS*_+AbN ze#LYSnh1)X+|Z^fh>O={a^d?55?ox*;li(&!A0m*C_AqwTs)G3#q#X3I=7s};zkY^ zXbjzo>0GR7vWbo_NHyKGRuCYZb1z}#O>9;aWqG<@U9KhoxtYU?UooAPhSpX!bE*RC zfBahqzX5^0g80Oo%j5%>)V>>UJP{_mZ!21x;dI07*L$N9j>z9=)93IdB_DVt&+67q-u3_K}#dxKU|PW zzoC34ySjya@~?K@R2EMz3iiPShZbU|VH&+o5N8l&FDT`oOXn>h3YthV7SKfE6&9Sy zvUus3V3V_p%zoVvimo)T&dba5OLG}C{6~s#=)O5Ya~XV+j{SiS*eB=x9&zp`oS)9X zlXS&;GsD(g8vgm>ocqlc<{a|>u|9P03=r5u2!Q^-hXxx&1q5OU!2FK^0zUzPJ%j+v z|2;I=ASxgbLjdM~3=sGU2<#yQVE*r+!3I$QffxcL|K~?J?xXxc{#OM(3F=zJnNv8%OYy{WjzX(f41UYJ+Zs_*GZlJFm8yGxRkL1VPHBuVHx zrL-H8%Lww9-RC^O%IDaTyWJaxsjlc<%P`jhXJNoAUCuixjM8L5Gchh{D&G@D98h;V zZzc}CdCCEWGMwt|Is&t2YTck+pFOISUuQE%5d}@qtWh*HWAAqMll-u>Pmds`D{_ zYd$G|t8Y2{OX~WOBXXe}tp8i{9fMW?fl)*N=Km;;8t@DVYz+c1|F;H5Xax`$MFe2} zkK(8S&w#+zAOQ1!YjA{C0D)0NfY|?!bKG(M)%@=XKT^6pfE4KNuLq-df8`rGCC$5@ zE1#5qp?{kwb@x|(7udF|1b2U(bROzgnAjPkbXze0vHpee8t=!ziw}lt9jrSuA;dRYDc0+`^-+3$R>{r5p;2(+cMTryeU&j_8 zPM6~Bh?CL&jt86rgvsL+^6^Ru??9Y@|N5d#GPCB!n{(fFbTqE3!TFy7K6Ow95Ev%} zK>r`7(F9olf&LJH`QIO2Kn)0t69O>*$7wV{7C@js1YrL6hZj%-0^@`LvHxG?xU0Ot z|7*c69o<6d?E9UEiy3NT-hjB#lK(_e8z|HAA8(Gf_aAZ|DT|j+2)0ZaYFl!VI__G{JIMP+Ge zIh*}Y_QSs4WMAxum!sK_ItPpMuV~BK;!Ga@-`EfTev|$3@1F=cI6d*8i2!Q@S zazh3T0|Hxy0L=d_gAy771V#=4nExX;WWX>Wuw@9q{NFMtp&>wE0#`qLNW^VAbXLaTOaevlSc2boTCSnoQ_F-p+h;X%#K{$RA zBBdApTly5CkSD~$hjxhE@64uqZDd8!x?Pl`Cwa9B;XEYZKb6IDNS7I2ACh4v!-Ea? zIdg=`Wd_P&C23xso10e`gRD^rCjXa$O!^J6EbL)_m`THIpgchjIP>Z8|6zrcS2!f# zKV6W)td}-yF7~#<`oDD_FK7u67&Qc7{*T&-0l$F2)*%4%f9tS>mH>fKLjdOgsEru# z3kYl-0x|vZ*RYyRJ8Srflg(Tbk3B zmS^Re1wZbZO~!v4n_D(@&?wC_o7gqHx;Gi9Qf-aI?yovaW$~IMICoMaH1+nXhOR%5 zRn;;&rcu|MTDCN~HTci614~;MbmD|En3WY0-sb$ z{&Q^cQY)nR98&4AIHB|5g!6VHh)#`LYVCxPKb4aIeBXjF)BdD(0QUb;`$Pl3fWWpP z0QK?@B70z;1g%>SVuB47{@*fs=U{%;$!&@dn{^a#NGANnBz1_6O>Ljc?V_i=y3 zaeu^rNw~SwxBqUNSh0rfv{@eRD*fJyYQ#)`Cw!!5D$DK#}6J)x+ zR8{9^G~e%$+7JJ~_A7|rH0}LJ?Z7pmcU0NZ@HM*g&f&6n>6l>CrzDzkyU~*yn(OsY zbgiwdNz)6{vx^JWz{SL%;lG2;JcBf7j%J%d8QAV+K7X^fIx@< z%>NJz_zMu&YY4#n-)kcd@&W=O0>u9JRgU{A|6@YCv>29*_FwiD=SW%9pA;OPGSh_S z4^yl6+BreOnbiDuvCTD^l~TfKGwZk(z*yw)tn*G{J|kJDdzRjmP^7cg)LXhm2hsYG z&lxoQ_t2tbkj4bapk%Rq+&LOGUn-hu>2+N}jCZBTj~gpG7Nu(iVY-n*HYNX0X%TWO z1Wgm;SuTBG4b-vu^0@P^R6!bATf<|aM%oN|i#+Q}EK2^LWeCEm5H!sYghfvY0_*>1 zf9HUEKwvWn!2I6~dQcY-7;OY#{*U(f0r!BwW)Oh+zZvwPE+8=42oU?|{RD8sMq*;=(G&4KDw6qX?EHO#>@6E8XFlz*j zGt4Z^3ayhW|oek_62b5(CTN3Fq49 zq%K0)HGsX-IZlKj*AC_|DJ@qQmeAda%Q&Z?>>7BoQtd5QlT#Qx>0F6`Ti> z0}^4>Goqm^5+t$?VPNU)M({#JNGaQ7N;Dja@qiUT zV22Ta`M<+}LwA6{5Fr5be~1PHSOElf7y+37I}A8<2M7!i0>u9JVUGJSzb-hX*_~v~ zDLE&I{iRaa{=!P>8L@h#+Fv5|`0wxE{t~Gk3xMmhbJzY7i{*RPd2d-$%IyTOj`OXGuCi~mwF2$+=%0>G@x68{nBBnf3aofN+&s|`)=cCnckC2{rhfl|WK zH2e=_h(?nJ%`q%#G$m#`%>H@Od8{l-rv;mw0H&CU{IE1+p+;eV(#%3_W_E6#GFC^U z9eqOn2QygDYM8-4gB%Nit|pV)`ZFXYF1F*s`oEK3Jm?D$7%l{0{twr905^cZP9gyF ze<#s~z5s#YLICFfaE%9W0|@LS0@(g{8+U}`j__svXN6m(V}12*zuP%QY$1)L@rGf8 z2!fX)Wt7b>u!a0kpSBP`^sl%rgamVWv3ZA_$H`?vBpsdJ?pkI~u?$nPm6iLoum<-}U+;Jc6xIj8$z-@hq7yAS?H`(od3 zv?%)?{BAJe+nqCn{VVQUl+BkU&n!>RqF};oGXBebvF|rplzkU{64$xxoF&|ov)I{e zN%M<~a|?>HlugF}SYO=xjrPSo*#G+a)&VgfFm?!l{y%m@3IYKFg%N=HUl=MN1O&zo z0hs?|H>4mCAW#?qnE!>L0zyDw>=3~A{|Qdy(7)f}zg3tK{%xs_9@&pNPY|0XGJUJs z&1_?(w79UmG%YXZ*~5RlFPo;{XkRwXu7x5lkwN?&&N;$AIi8-w|NP=?eQ9B7Hk*w9 ziN5&v8!gJesa@-#YkD-39I(IJIbRk}%nSCiI|5Bz(b`>}lv4b?b&~YJ{;noePAqYC2~^{!!A>`UUOB_S~ALt>fMIp{=GaiSF0|~EwGFE|D9%xO(pq_5Z2g4E@~Q@Io@Et z*11I3L$4T`PV7q3j9OD_@?4c&%>Ps&_WVY2*=zP15dS-NA9N515aMOG8L8Gr5e&)!8|e4?KgB zC?>Pc<>(E8HB)Y@IBT{4hu*FmB$ZH*(8n)g(D45z#$JKuJVw(gF?LEU8PY-Lsj_(C zs9;|rLm96vcl1220}}rK$YDC53?NA1IUr=QyzE>liFl`3LwxY0x|2_c&azJ2=5Fq*g z9_P5n`8)Vu5@9xk>~erv@`wleFcznfbahpGn34Tt5Q%P4+8*d(zEK1NcG0KN1HWGt1-* zT?9NoKfk=3!~f6s!@u8Tzx=o57Cy8&??{Aw;`>vdmfH6(r({H=R<^Xk^#`bFZ_(uF^%gwJ_3kRNuqO|s?yZ8wk6Hf>e{lp zIFm`m|02zJCUMXt!9A1Kbzl-k!2dV+w+?Co0^@)H=>Ov|iXa0ZFc<Ow63Vku`QGq!2a#?`R`yp-Qo%B8BR(PK`X})LilG=lc*(t|{t5 zRhcf-EC0)bi05}fY{`W>!s69rWfdj7lRQ)Y1xG21+6BR0V@ubSTg{?Fm!#!?B}cMk zmAqj~)?f|V8Al~z8HL4~US3*QoU2z8NG5yaf3<(H{N_`JE7=JaOIJHm7xMoN&&Lip z0R(mh0nq<<1$O8Z5Eu#sVEzxqFaQ&Pz^)(w^M6-hhfV>3p+JDx|9*kveu4kIpqJ){ zf~kR+u+KVLSyavmb}!vFL#%{7Q?_)Y9hiierWuNq|Fr^^8LCFmc!ptys=zWgz1OLi zMft2?ucnLSThUb6k|h=D^JV$>{mP9+tQI09pZln`p`fnKwxYT0R4Y#h7tq;1o}n*=6~OiK?OiyY!HC?KQ==Nf&c=2 zBS6mozmwzM$=}6)P58Nz)L#?G>ZWH}-I|u}n}vwED=>^DY#|9!{x@@sA&DA6<0;mV zLe`Yj&o9jt5b3LZi{v-nk4T6`X~pPTUNoNMtd_;rmDEs5 ze}qt)>yBo&^llfKN4vqX@`PAydj7X_WMfwgx=9g`UCSM~@Ep5+m(wJ-63@GX<_3p` zC-B=wThSzSQCm>w=WDD&{{N(zXVC-=5KdVnm@P|hp?jR=RtH%H^8)}x+Ih-)xO&?2vf`HOjXs|yu4Ihj2U_f zQ~!4Xru+u7neuJDZj7h>YNtaOn@wkId2W7YdO;>xX+y&~VeIz`Fy=Rq%~)4K>3dzS zOy^ozT--0%ceza6&{uT{C3n!3rY6m6i?!_YS*|NAr((XyZd={#D5hse0mMmBaF z?rJ(_YNylM^6auaSC7`_|3gNneg$@?4b$j#2>$mt-LiOcQLqmsM6Da9QF~fbEJ>c8 zR;sn>>1g*sDgPhS`3Q)DCXx&VG#CyaWr+VB{x2PH2ncK^0-*nIC%Vu!ATZnr!2BQX z@d54tf$c;9=Kpr03vB}e!;JvU|KT1V;0_SjP6S~7ZzsCYHXtzE2w?wTnVaL#zkkm^ zExcU#?$W)bPh|6q4mDWBpK(0HpD|ZmtXFGQh3(JygChP6zlj`w26A>;_+mwC&2udw z_h2vT9*nYJYS(pqx+QQAvI_aHrL&i4AjzFiLc0gw=v*gEol2nQS3pcHEKS#zWF}L8 zRER0kKsHky+@aCyNfg zYtA#I!#k55B4_Blx}Ysm9sWs1hkk{W4t0xoVPXBx{?ApUi}K}UYm7vEl%5cF4f6AtJG`i^3oC|<)3Ht z=T~6&XEs()hu55sq&k@w<`?GXW@K^%)pw@sWk#QhSApGUQ@gG;Q7FUyb&llSJneSbHY~lqCb|EoEAH)2ZnTIWVUkkL{}s(h z3Yp|LLwHJ|!tn)(P?hJ_`LcNUfMDMj<+H04BtB70T9?71YrK}4(`w^ATSIF!2BPEQ2-tQf!#p>=Kt>C4!r^b!+-$H|6v#f z-~kZW9Ry(h?+)(JD0D;{>fcXC}a@cuPnW=IbQ5L z*M+ipd{(f@U5vi-vRCUWrrxpe>HGP5y*97b=NV=Ee_=Z}S=DI=XM_SfIemvGNy7a4 z^%7y~1m$Us)RAh)6}_lU&#;*Kn|!AH>X}TrZF?^0NXCM@*Y^?b4oA78h_(9M%);Vq z-QzA=#{X9)cTp0_uTF6nrEnpO!hz!l(TvlmIzZxv~Bd(k+Psi1r}O&ZrCZrRk;UL;k;K zbn91OcdPVFH`v7;!l??Z|C{^PL2W=_lo5dWKgy#AyaNK8LjdOg=J12sfWRmt0P}y8 zM-O-h1U82N%>T{d2eko#QAPmf|0s_h@D2!U4gr||o5K%k0|KLr0J;DB9*(<*`$7I3 z|7XG{N{6sK_TB5ZlN|rVhwphGJH2O~X=;km>NGW!L0nr}oUY319J7@FJEoH|r3uPg zNz+iyVfzj1FC~l}i+YFY8gVxjTn5rt$lIA`v%ko-Y%d#xVvLxH`)$W<;*&Se9EJ)SFhgtR#$h|d#_#v4^0u7ZQ9R2BbH|>0^DtLN_vJ|si^#? zT7d(?B{33<=f#ve3E`}Qx>Fj=n6&PM%5di@jcSc$HIS!T=LdqqJ|c@Mn(htN_=1{{ zjwh1IbS&17knp}mR{|HhjQc6Td2woh`{M1fb;+KF+>iCz^EdC^M6!F4&_D!P9FiB|EG^3azF$|6#?e|%WzzV`yu~# z8#pei++5WubLpAb9L3X|D5d;mk|bxnfN{ zG+gnUfWIY{ie)3Ih_fnoax&pZA$u#M6EC&wjTG08>6&_|_tDlxs*3W$Kq`9rs!V;T zh>&%|si<`_sEUU7s@S?X5R7dkGRxKuyP08hl+y4_cQ29kRvEiB1~HSPTcP@Q!NaC* zAV1c+g!RRen0KiR|6%tM3Ap#Ac`lv$GC3Ee*2`FLygF)K)VTbH`ITcQOq5lg2{ zPKmQ!of48p?BtZlRVA@5LE_nB>oS+V!i97spNLAPzRq>+ODA^ft1+KveaV-!f-L)P zM)kJT=1XF2R$%{uBU=l_86hsEGchrmbf_ceS-W>2F`6?u94OSyWwWs1P09<|1(ve- z?AGOh;I0UfLrkpM%KSVW3!4+Gb)iztgJVkfeb#!a$OfBGJrqV`O{N|Ki~CEyvUNou zxHm)O?JmL;>(ZQ%%;XEXY&g{`kWx*~?wks=(!K=pE7(YlgJr;T8bGAd(t zxK!yb@Fktjq@Q$MFZ1QCtC(;pFX%F2E*p<0;x5o#=u0@ANk8Fgb+O*4q5se2Nr#sa zfi-~ue*dqDVMZkp0Y?OI{yV~g7ZHIqfdJ0`H8ISnBqHF50M36$SnwhuuqF_|`M)NH z8I?o?91+0z?+6QCLFew`6=K;; zG?mLloU6%2zWk~>lYV~HLZehDmP+8nuNUVeNV$7c>l!BG5ij3wDk=;1Gxk5`I0NytUQ;gpny@CZ{Zf>udh z<{_q?frF45i5dw38K%YZf>0J!5HD$6$0TFPsGT}DcHufzl1qI^rsovyCs{WE@LjFR zK=8@EM9%e&t)@)9Dwbj= zTAP>}4PR=c3Sv5uNc1(%UNM*&I$Pgrz|OxIf{zKjGWt5xR9$l=+OS&tFqM<*Jap*8 z-a!}V7IsVcq1MezC3fnV4>1MZ z?^~yo7*9o#iL@V`ZWvrAo&9h+DQA1A2W>pnx-Af#dz{EG_9|wN?X60AX>MN4eW9DF zEXujllg%Cqx;Hb9A8}C9y_I6S>{`U+XIfiS4V%G%G>m27030~L!>@)n4yU2s&A=L( z^%s=LYjr&F{lDVRJM0hWX)d9eN-j=UZEuCFD>%riONgT zoGH7(Gp%jISlqG&$UG4ity}2LW-i6b)wMyA&~SR{-3+WJ3-S}Ba{dzW+TYAXXs)V~zmM z|1lq6R1XpGKmg~z2RK-T2#h%bIRD3dfKfd}zykrC{~q9A6(TU^2(bLWvmF2LoTHDPI>%7O^nU+L6tfJ0M4E7FIQs)--J?^Pi zJPG z4+$k_kqzWx5+qlXjpRmhD+!YXxt;7J_mKO^gXCfI1j&+FQYLls9C;;KB(EWFAa5Z* zMczw3M1G$9GWitwEcspXN951QUy-koe<0r`|4ROY{E$x2bLfTiGI}-LL~o{BX`J3p z@1pn82k1leQTi0k(`V>BJx*UioAf36I{HTXHu^65e)?hhi}VxpGxT%x3-nLum*`*9 zuhV~|-=W{5|Ft|%xB(@;FI8;Ym*K#|=GMPWY_#e-0k zk3dm<1d8L2L9y@z6wixLH1klrq&)v$eGG~pEkW`6IVgU-0>zu3h2pJsD1Nd5#k)>I z@t&7M@iQ+%@nM-j`SY@(*vI9wq5L)ZJSaacpAY44$`?ZUIa$&3cjQZ;{5|E=vZDY0 zm3ML+Pvt2n1M z8_Ewh6RfOYfyf(smS*2 z77yk3T4zD|gBFYhp)HVyoYMk%$i=Nmu^?8POMAn!BNg2?QVCLu7|kpkR|>=0^1lDrI+jB#}=>Qjw_LoMa^*8arlxpj3271MJ zHmwSJkgY`rXIc{XP{g^3!QMd|=N6`W$sWIZe=Er>*)zVibG)~lJ0{V=wbR)Tq#e7} z@crNOxWfyGz?wk-=l_}+YE%>v=s^JIe-9*h0TEa;2;lr*GeeDvA_6@K;Qa4_1TP>0 zYX$*k|9?40?32}%|Fyz<*HZ@bi! z9ae*>3z@-&8A)BJOlDs-PBz%OGZ5U9BC9obt*$#x$?TUrP@a|au=qco~I zvtoJ1lm}#M>kj5;+S{v=&DZ1NuCY3V$n73#xG{84z(%Twt~qM%Y;9)}AL}o%ql?4F znxqGiSZC-@V(pH%c{A|+zhcij>=fb)OFpvI06fmMe9v;V)AqdUkOU^jn;d+iw%QNFo#Pat@3Cy|)}Sena< z)tQRo3@F#D3t}!O)oRs7NfI)#Y(dJUMOO;4%W6nmpmL$&|CaRw{#uRah&LlNaEo)>I&PUM@}NjsijXrTk!y z2ZO&G0lCX6rW>8XhzaUO<|OLQ)?I<%lY5CQs-n6$m1<%&H(Na3*OR5wkvpw|`(?}I z??bKK$KYI3Z)1G_pTXxHc8v&}VFYmgpWy+(?h%1Ahyc$2GYCF*jR>4!1aSVJ;Q_$z z5rH#^0M7q22tIa=2%KRAnEgMl*#8&!@9-CK@%{qIM_YRW!I>kZ$(zldVor^QXBK2; zg{(@|MwwkmhtuImJ|=1ANl#+3$I$@l*+$SiuvkGon<%Ex#(W+O-g&`Dhz!czH@I@5 zlqe)}VPDGKH;i&x2ZJe>)6#2ql?$|X2ZB4d5P6Hm{9l|e6ianT39U!*>xO^5g6y^m zZLc>PG6C(?PPX&ATK6*BdCnpVgRtxBnJw1p74W&_($QEVoi=+>z=qvJNA7hNv>#im z+%D86+xanR0rE8MY)zZ(|GL^P&4qkQO6C)ZY#%yu&tN*}Y<=rcFV2B?NSvF;^FRAP z?T`Wy7+(bN`+t1L7Bxcz`XPYxzaK(aj|hw}0yzK2cWhBJM4%r6IRE=0g!PEP_#(jU z{}GPf4Eg^X+-EuEgf*`}c|&VIJ35k?kZXk`NYs>*^gRa5EdF3? zud1G0@vmMylFlU(;f$Yt$pb^Er*|-zdJJYT^&f8C&vZKBUnkvX;Y+9chtNsyU@)CD zan!NG_rKS}4(kws@kRjW|9FotYKI7TA%OGW3mvRO1jZWyod4rJzNj4{;DrFre=l^f z4iOk{1epE*-5jluuaMpRJooNZrmwuWbtn)N4-olT)$n>UTdL%a3HfIr5lls3|H>C@ zVzvZZ3zTg4hGD)hB{^a>x%O>fux9qwzVuF}|3j^Z*y*tgnjN_chaJ?a1>t1AG6!j7 z=Bt&H3(l$abCtfdxs$YzGpfIm6z8 zLKRCrHbP)-hznZ}_LC_UE5xFiLd1a`d8ofkdUH>i3Pq`u7s}$Ca`{l}AOb6m0Dk|kG~(DFBCvW8!1=#=#sVcl1XdaW zoc}A0IQEAKtR4h#{;!^~KuHjRl}13Z|F7p#9DRa(l3dQe!2KosqyL|LZR;q@Bfm?t z_h#pcwOX-KuEACS{kIT}X0ypcA=ABNt|m{|t(kg5GnK(aH)uK$sgdYPzjY;&DijOu{{05{9Gsgp`g+E)qWOOG2GVUkU4tyi~3W#k$0-ukvNBN0^Yh+1yDvK`Nwj z=~S}dBIIMfgw&bz6SC1z4+^-Z^)Ne}c}FjNObu0wbTnJYiz({}ck9Vf581k8g3iW4 zxGt44$X)2JYaKD49&N#<+r~Iq*`=O5>Q6xZjOV@rYQgm?hLf$sOhkuCViGYH7SoYP zA?YUK!~R6n+4L2$#`;G4fB)wkQXm3jjR1cCkM;1Pa)^K@0yzIY;lWBoV5||q`9Idf zi^?Gao(SOl_k;&45rMHr0O$W$4=*Z*2zVmE{C^ThpC*4y?&3erpT|j_4Th0 z;4-|S^%N6xcdyUO)Jzbwk#H_jNV(}jvOdMs8TA))wm36u$az-l$v|*w8? z$kOG?hHyjcaVAc}MI7B%+ieKWW)&KtpE!C`FL89&n&IKSy7d_I@b2st$QT_1b&FI+ zHF?rQG=s`u;vk}z!wLk=hK>+9fFsNZ0L|{A+!1+HO zdDH^M4rBuni(G9thz4ACGZFEf9fW5K#Po0q$vzw&_Kr#s3TcB=^_w&n5d? zXcYp%9k&wsQq}z-eJ+Gxf+9kyD<#Zj1p zEr2hyB-ZzJj(ukn>1-;Vl5EY%Gv0mc&0PCFUd&4s=8ZbPm1o)BwwWc6%DGBj$}>8h zohF63juagwF_Q>-bBi=)3Iz?5L>IPl=A3vAy$b1=7?!fJfP1p;6u{cRf`wY8bXu#6^+s(|Xrc8q>vCgnm+5>mmWvlsmM-%iUFr>-yUdk} z$_7*>odQ0-|Cj7hhl~(`kwXCI|Hus)3XBLW83H)}mkdf|gb0ir0yzIiZpctzL}1Af z!1=#qP$DBlVB`?M`9E?)h5{o3ONIc>|0RPG86g5AhXC9E8{z1SK=9BMkx!`J$~kc3*6NkA1jpE^hp!nIgnTxcP9~+8aixcZRIQ#&cS?g9^J}^j zDvnj7R;Ws_zgNjhJX@R>>I?Il$9Ze(7}McUe;u-kTs|ThEPHi$b^sk1v%z#wedM>c zo?#O2>nE|Esn$c{dEXN2%=}2qhF=eSCo5iuV(uG9nz0Xb>)RJhR@ zjCwpL7Iup7Lb<@4Oi#4t13~csX5 zzcalrFXjEMimIPn@vWbWv$99OAJLcVAW6cVBXg%Gi{Ff)JBTL3*o4k?>}0N zLAB9Y4=`GqhV0JU-I`;%6#eQVMq+U|C$+yWwSjffSP!I2qgrFGaD4xJJ|3|W5g2O( zaQ=_=@S<{vfF}Yt|2^TsNfgdQbXqIm1?m(BWORRymV5Wt4ha<(uw&>shC?3BC%8~ zAIoO^5R(_JCRIOej1HJp)lU<}{vU*D=RIoU~) zZej@f#w9lb@(RClTFmQi>=Z!F`=4%XRhgK3?G6HqKMOokJsuki0a>t$Y4RUf=nO_Z zUH}VOuUlpvO!q2(7|MwsR~-$>s^-$ma~KTLm- zeu936evW>D{t5jO{cHMl`j7NG^n3Kb_^0{DR7F?d0XOmLQ-=W2EvFuY^5#?fIF4M~ z3PE{&YYUV&x57|vZ6%J~%D8JQy z7|Q?CejLjG+kTqkC~bpm^qlrFC@*Z!LwQ-d4&_zt1t_m=gKTuNL!i8&6M$CV?ZD?J z`Pa@yxN>9X1}L|6KoWXON0H>8I$B#zjDhzI72$qVHN%WP9)815p0V zB8)iwxkW{)k1r}x{nFxNP=0bzk?PZnc_@EtaTdzoUQ|%}y+sA3KV57<`Q^n|K>3wZ zid0`cbsm)8ICUYE-#T?Elz)HfawxxhN|ERLr>=(b|D1vmq(3;Np!dU5Fpd-4shgl& zcj^`>&prhhPHZ>@7*1S#Dh}mkr(hf>t~_-&lvkaahVq6}d+_@o;Kn~hV2vVx^M8#F zJgSWd00KDw@issN)-D1#|JUx=qvnVJ&VRfI5P`Lezy?r#g3EApBe{)_!w5nH8}{XxJ$H-q`aUw zA(^wR-dbR)U*+l5bKq$B6$g-?w1!t*_md8#dXG2r+15#>H#^L603C!xG@cD-^5Fs6 zkmm4u>)j2dH#nbXiiT(O@zx2|J>6XAd$0$(!O1HJSJUXgzkV+FGQR))KJbtZ5g0!N zaQ=_qn4(6AfL{b~{`*A==@5bOLjdRh_>C!Qgb4UWfZ6{RIC?#~gMW;JIL#IMlb>w8 z5C|SSN}9Z-OY|r>_7!VL{Zp;y znSyi>1+%fVl*oo9p9;P-l!AIEgDR+xLavgBvm@kO>lIAH4TEUd&-!b{m7E$%L%owh zHPm3Yn0t@5UaqPsFASolo*K*NKz4>wQ}1L@HI-cfsx2Ge|10#o!)_3PRfqu2|5Z3B zC=w#DLI~jeUm>8e8$@6gB7pOM6%GoDgb1t<0*d{Q^6NPoAQSMPHTow%*X9Gkg&ESk zZU7UH9?qy+)BIU_^nk|K4rB1KcR7gNM{BDXDs6VW7uy`uJ~V{(x}|L}?O$^`+Us2o zslAhpuhDvuLEs(QXtho1qoG^j27};7P6qfW`l8h1_lAT7DY`xy`)(S5xk>)kNR*I!k<%C$yNrNtw zZ0*P!23soGn%fQ+>$gg?wN}>4#&StM)}9CiD^HT9zjdO{%h<5xw{!CP;Z!y{^0zS5 z<#X8`CW~##)b$snrL!{-_pR=a4XN&6>tJ0z>zFRI30wR7yQx_untn_7%iQW{F(9uS zOkL+L{SC3Dt)jRkN)6xtUe7zMLj=Yf0i6HiJ-(XLUwLPo4xlywfk{|b}zjN~;O}kp>E*4&V|F5-2 z9_ot-bP>S$-^BudAp&a+0i6G9ZNyPuM4*cRTmS!nqi2yzxF2+{uZ3UDOWNn26_nT2 zNHgWV4s=+|>hT}?y3}o8E5Z)@YS4Y4R81EH!o^$(13{z4UE3d9Asgu1M`!o4~*XZ zX#rzi?KaPEpRa+kWoS@_F>&ai{M6}#qIZ8GsG(eC zZVnC}5)#>bRLrDZ4=cAOc+gsrcluoDd3M=niRaX|8|cqs{BLYu7ziGkBJwU(^-6U{ zEEk^>>%~gBCYb*vWW&jHCKkz=FIq{+yRAyOQyR>e2JVE4xMgupIZWub_C-w61N|h8 zCo}1+m`k~{B|q(3Qk|I}No%u}YF*Ie-POK05ES+iS?VKiuF|O1Bta4*v3OqekeU&a z_xP3F#<-sbj9funYp84j!T0}CJ!Oy&A~1Rg;QSxGF++(Ffu%wK=l@b6iF^=&(L(^| z|LBbwN{k3B6#@hpt*4)Yazdv6PXC#Hjs6+^UG>6Jb%A^k0YqR~5SVBLC?VYMkRvdE zpHY8*fd3Ep{iOQ)CI0R3d;faMlUe?D_<5J|^FHoN@N?%n%JVnQZ=k==t>fO$aqs7A z}cTcg--!EifSEZ3zOsXDp;z~RaL zM;>@!^1+Ap?3;S%=;Yq%qmxrd4jUzfJ!E zz5_=gA}0wasSL|r}r^Lj>(KzUTY7|Mqhpt$c*C^FljNN*zaX6`KV3D9w(K>m(= zf_{UZPw$`~qiy=w$SRJ4k1GOnKX%~GbC)TA}R?N>x#W`_C%2mpR;!LBeMnt56_{T4uxaJx@|4dFQN!5kA zSUWZ+)x`k)S?*=MpiUgRV&aMrU#OJw#rk~Xx#vp2aBjXN!M7RkdTjH=mMwgJwph&z z^J2BWpngZy#JLh|s5oBCOVzws7as=76PqTk%J5n!NnWhYW-DSfZxQZh`WM_;OoWN@ zqQ1n~X8w#FN^MFh+U;QQZ<2L46_ z))oTF`+tHDaD0GFk{tcu+S1<87Sae^7YJ_ILRyb^{n+ZM->L(bd9Y3YCcog|yEfGi z<+avN8Ta9|R!FHk@f}~wkny)x2?trs2A-u;E-3qU3A~+f*@bnz9A6Yn;|kglFvE)ix8GFv5XjpJ;_FH znQk;yjr@uh@wI3FJ=2exbG4YWo)}D6J|1UQN=R5Yq)ooAy_rcjt>(6IZX={)saQ6W zGG)6l_e(zMOFErNKk2%9vkXCe`^G?U=N2Mw?24$yZn0=YK}x5>5iuWEWj9rjUv&`6 zRBtpi31q5PfKvadWQLbX`z9vD_0B?A#?Qos{8}F&^oH(2m_{qqzL^~hu*W8a+G7{E znxR`46gvs|l$&IBN`skQMmwPuvTf}U6ZS|yVf8!1L)cII7FK8GN7yc6>aB+F|I>Zi zVS7YibP>S$Ke}Uwk|P4AivZ65(?t;5BLbs~0M7r>9Xpg95jb50aQ>ezg4iAr7+nM~ z{%>^04kbqfP8Wd02!fJkFrD2X$hCTnwIsRUXb%~1$#<$8c);)5f}skeE$!E7SbXDFEfB`&I`vrq`X z|9w3rkO&bNO9b%ye=LU;l|lr3A%O3HUoasNA~2Q+;QN0phZU7V1biW|f&VV#|B7(% z{}1pl@!uui@6)W-P6dMUI>FC&B*U;_7$LfLiCP~UlF4RLBY!ME*-pdBDu+n(y8ia0 z%Dj@ztJ{@{l`aS)A%8M}4T&`w%6i1iZ~CURXd=P^dD=`rxT) z{HL(p^MXD@yauZIbJu{9epJNwzaNy41`!xf1aSV3=eVL)h=3mi(EjHKC8R+F#uEWG z{)ek@T!sH1`q5?Av2|YijzDl~igY&G*YP<>tRhum;m%g7rscb>hWxqfs@+C8)MC9- z%|qgra$|1Oq@K0KDOdM=1!^If#EYgZD*43qb$`T`7rZ29rILHKbaK8VmPN&sVGG@X zFb+deYZ`DZRk$S;xD$|i#7L-hTYEQFx2Xe zyppQOoEK=&bU(RDzl=eHMpWgh5@d(BCkHZTXrG%eNxc*-eb7u*%tOv4!8^%NPAuo7 zQg4zX;1Sy2zH@z0-0s6nWF7#EX~Wq(Pd zK3k~{WR);uY2u_xditC~@{#skf#9}nr1^+_fUAvcwU{%h&MuIzxDF;G7-|Uh1I%W{ z+HBYAV>W4YH*VGH)kdz~s7iu6b?EN))cW9&Z9Z%POlpf2K-2WE@%_Jij~3*N2&{Gl zaQ(m9M+oIZ1eOm0eE%;Ww#XR~SnUYl`+v2M5Xy%LEFS_J$d};!uSt%dBo+9He>Mb~ zd)s#hf(H+h){A!Qkrtuiagvq`1^F9S`;tqGp$txg#;-C+kl?xIU zBbEyd`6|cZA#t`F+2x=3{&xWeFCzkL00CV8uYo~E6%hd!1n~Xu0t{Y81l9loYWxrP zd5-%$|2?vIWEF0P+SBU3qSoW~WxBpTmrjbx-V9T;hpmSEo$IpPMmf}Syegg$#B%L~ zRCU z1HoL5bZ+W11_ImSRfFTPOHvNPmD~rVhm?HN?sOK4xlhdhJF-ta6dVy)0tE2;e+fWD7Kp%zB7pOML9M4npOL6 zIn_QA2p-){T6m(C5a%3kyt!0raY<0_cUw4p8fYsKWaH^$Ajgj z$picQ&?>9$ZhDcBoM=DHL_gv~^mH^^0Le4nqJMu7(RG$SMOQYWDQ1BXzW-P4bU?un zfn`Sk=l`-pj2$2Xs}=#p|2M(O94GVtLf%OauDGDhXF6L|&t3aTyVpo8=1TC1R4f#w zYE7zJzLqRCG~((Lvhf(o1=KI;n^>BuK=Q&_^^2;T?k}3|rukRgFMX5I=^tgTEKc9` zC*RiD2InYD5&1yxcd7+bp^%r-kwPTm4m;;~%DOWv>fmRD!yM_$YDhvZv35hn4zeiA#bU@UNufAlS}&diU*-CGgA|5yBh zhaDmUs|Nx6{$D*~fs!BsD~$lo|CL4@`$Gg)4+1#(iN{^Rt8mF|5N_a_HCX9a?LQbf-5_;I>%Y3WQloK1=5 zU4>nL8Tp~R_okOcuj9s`QM_VZ-(RS8Z|Cel@YpfZnd)_!_Qc8Q7X)nsWUVWpQ&?RO zIlW2K;_%en4@~z7ixYa959M)nh|L>hhg@%SO$ue}oi3pU$I@)*Gq&FKcCGEcbLch{ zda-j31cqL8%tv6T17n?~F|wB6P(Kam%^T_YzPFOKSr9p z4};#wREKd%=fE=^^^R5Tojc^W-5(%>bldxA@zGkDG7k5U5;WR8t8+esBi8e5^ubxk zM$^$$EMs|U`e;Xf=k(yvyB!)1ePB(Gju6~0zwUU?jK)R${vVBTLMah}Kmh0eXp9p|i3ltQ0yzJd16AaS2#f{->i!>|a`bM}=6?r%WS2qicP|6arDG}Y zY(K{KZWn!6vogtOA)L$IRBRlN#uhFj2;3T$QL-meUsz=7Zl3>68?1f zs6Vn*K_wq+3xVLX0%=~b2r}wo{{Y4GQKAsI{MB>TVoR-FP+@&1b?EX%ybz15gA}K-1aOQ7v zRorflLcHDa>Y2ZY@BcGD1}Fg{aHbHz`G2O6$9@rkGmiky|1&=ZC;=jHrVzmSf2NSf zei4B)j{wg9Gd~6>0U~gw5K!X(*K=2MbU*nJIh!wVpM`&DfAXewArRcRoyfcGhU9rk zsv0M;>EY8|%ei2#r)RkuiOpn!&ZfsCY^G8J;H~l3lWmDfxyw^Zhx07VjA_81lscRK zQksvkxUQXNGERBQs2}3shU9vGGU{yl%V?ZQ5|XcJ=a`5)JVn$GnsXCzoj(zEHho3Z z4@C*dlkKdZafaOi=}4rIbQ5sGpMW}>z5>?jjl5LW_F-&oi!R5NLpLY0PL}2Y9fb)OtjX7$J2}B}= zKO>Jj>=Y4L6$s$`UlqfELLdTX1Oc4?X9RZa6cJbz2;lr*6~ll+AOdFu0i6G51a|Bc z5m*%nF#G=;NB5Dpk#qRlxw&N&OWxC-4+L`uiQIG2hPI1BKVj9_Tcqz3FKgEF%Iq|CbS5WQ_={as+Vx zukryx@eqM!L;&aiGJ=b&5rI{XfMWlj;C_VTeuO_t&Y}}%PF#6!`&njBpR?P0-R$Xl zo-32t*M*c`>S{`LX(8y$dn~Fh4b(_*Q$DR*+f|kdYM)&l-N_-H6qSRdg>)tz&Zb1k zq=t=z23^IsQ5wv8#I_MC;%dfuHMag_yA}vGa-?~EKXF+Cs~Q|WUXpUkrh;rV9ZkhD z9`XzJHuQ4e3fY?)-SyM3r&C2`8w$*9f3jU4R`;ZsjVeRuK6X7~&?|=5UGHuv-EGOh zF#p$?d)Q&mh`_2q0KflN#W0`{h`<>^0O$W1fgL+V1XcwCZ2kXMj(aPAFaLddWK{^I z2qA|$QMP{GV_%Sp#as#2Tg5_As@9~s5yod)gV{*P|L3~ovQZk$dRACALS-@8jRm~5 z6LVSY+nO2ca}Qzv*}t%w<-m`yrp12qiB2*Q+`gT(_tnL0$-Hnki|ZmHjcM{7p1S*i z>B&tlWGX=UO_RlPU7C@qllu=Gp4@-rfd?iZd}zQg7bwD+(A7W- zDf6Evzrc}SfCB%<0fE082PIr}Xzpz<1cHeKX{YSZE@L8^o=C{3@-f~0J`J@lX}=H%?%YW_G5dFW_j7$7vJ`gz zC3Jr(6?CKP7rd2lsL%L@M@c%nU~MK~0_|v@n3JLOVvxV)#(3D=tP4 zV^~-_T_pVeAHydAs)PvmMS$7=BODjuzQ(_fWcs#~Z*9LA2p-%?%2Ta-g~fK=(&3o62kdXdE~P52!-0%e3d;KxS7+rz zT;sXSq`j%bGiiIB9#(Lp>3kuUiYB@u+TWJf`IS~@xV%$)o9nMtct7`6cER&)taD@1?dQn; zJqM3WTkdnbxGHpT+`(t%zzuq`S`X zAfwkePj)5(!BmQLHn^`j9eL5sKGu{&ts!f+Q);>qYtghNVy&j+iOUNjgmFMN6gun*+c8+qla@^PH`;`B9{K>J- z4Pfz|Ci0P<2W(M0UChYatM8ugKEVXhPDFms{h4N`b>EKP!&Z4a6;^`jSu&xien=v1IqvKFO@SN`$(hmqBRzO3?Qt81<2! z?~qw3-_TC0bNm#soDgTC0Qa(DPcF?=AWnXEPW6Tx@%i>%{C*ZmwVJpfD1oiLUoBdu z1xrUZbxk8?G2MH(!n;khVNxCQ#*PxmYhc??;Kj?j6~)Bx^uM@ZDypk(Ec~(1B~h+0v-q`?|;gDhvUA(zmdM)gK#XW zMBhqa;bw4lg%Ru+@m3&r8sg zsaaM5eFAv&##&p`*SoQf9fX|=fL*pmu#TBMsMtj+6e@LYUmtw&sE==bm+sUBpxL7C zK}VCy{GZ^19KDacmj5F@$X_xR6a6%mm;hVH7T>lGhx~m#MhUvrAHTn`j(&pW8&CTLutYXXx;_v$0jgHa#cx&FFHfb1M`7$^PPt@o*|r z$XP7;J?q=s1`uCo=udpp;})I~AvxZ;g^B)1f6?`$noK-;Mwa~B0HW&*{fVwU5Y&iM zT>qcuqXL^F0wat7uK!1P@KAI_;4~4y`G1-KVsk`bgb~2`Kf;5Dq9X#QiGZ^HU&lSo z(Y@sL{FnJ_;OCP5$(c@w*+s+bfkZXDIUQ8wbs~~DKQHt-L}ad# z_c&w32s-X^f{e0lpIlnd=CC{MPdP}bU;pscoGEj=;cdLGKT);yG@*3(cHTL++=ZEc4#-?|0L zTm7@@<5Y7xldLk*(*N@ z<^A$LDDRbbKshbn2IVgKIwfek%UThMl2Vf6YIrFndQnMKLM(}GBQB~!u>g{lVB&Q z0LLlj>Pj{~W#gx|3Ki=R5;0$&E!LoBfwZ92^EXeBeT4f%jrUx!Btd0as!AobgW7Cy zUP;GCo&nt{aRHHbST!V(zA_XRhom#H){O%f%Mol6C_2rpVV|_XjG0% z)#F9!1pgJFkQlQ!SSZ9?4pQ<|AwiG^1^=r+nvG5nk#MilNQ)Y{RSEdPIm|f?@N%Iz z)2OQd;NJ<&o(@isTL~v?&GMBpt2+gCPh2#?ZzKz1J`YRl#(bsB&%xD4E}!7Hk&32Y zqb5~hNbBMZ{~%NzzHEZOmE^Qa*fm%$mS<|bawk8yae|*Bk1E_?bdML|SWR)hI4@P_ zif~eNrCj3!K=pvieV->)U8uh2`U!rT z+^)(iRqIS^xSL>iGNf}<;&|%Zhko|2BSLKy^xnl^rfF0u6iUUiq(oFTV8^tw>r%QK zs3M?ugx{daq*y!Pwe6{7f_4nF<7Ny_K{tW!VNA^;w}iaUhqg`JXgpHFMdjhca=QEo*A7ubv~r%?EHe zD53SL=J5hsnD>di*4k(y(ap1Vo0e!zO(55`_9-%{i3l{-q0pV3yVnN~!jnz4fc9p+ zwPFT2xU3gwT3*-L6$tLQmB?F|5!Ff{#3QLfBnyF!*6ZYbHnXU;+GwWPKdrS2N_ME# z^FJoI8IGGFmyr7?JW`hBuXS_hzCiH0>&W6Y-J48#{;CQpKgb6iZY-r@s9S1Yds3QC zUbZEuE7pWs18#HHMYd8YnX~aKSFJZn%#@6`n~$$hgy*Q>P6@XSB$n$#0l7PhrZb|W ziMaWe+@wfa7Yl_=lXfYgM$FZV#~~rGy-G1ie+;>B-IE- zJA2j#r?2z8xfOi0+gkZaez|#RXKx^w$&l7Ab%1lZlR~ZmA1?4hYgB7eLHXP|>3o&^ zymjcEsfM}_Sm)|PMbA`doAI0S#TvZ97i@!Qr^;2t+-(1clW{xikED=%RcBuyxHm)O z9qLSXR?bLo>0C`dYMuAaR0b0^{hf)}Q$QIKMH_YgujAgrac|+17F<)Ns{ z3%{9Uq0oJuht>xlPq;mIobVJPPFLw&^2MD)>=nfxJ=?uK3QrIi=AMO7GKbo)sA}}@x z;QSw(p+rRxfq@ag`9CmZ*Z>h28w3>lKc4?PHp7XEAOZs+fbai-;6h?VV5|^O-v5N$ z#gV({PbmLewaW2tUA3YOC)n=|*KC!wY98u55(pkTMB3*vzaKlGY^Dk!JvAk;2OLc- zh(-yJQR8(qpPUy7-DUHW^yfO1+XNh_OgP0$YImXb^Bs1*z&Z~Be2L)nRO5|wUkW>> zKrEdQ7xd1AVp)mOu~J)l4;4C(t`9C8a`lDu#{*m={fX#3`2JsI6AHya1Xd6MT>q~i z*w_^!u*wj?_x~yz5EKUySV08v{l9`>V^@g4Dno$T|E}f8wX53tw}Png=dWOAtGugb zqw^TE?j3No?kVyAsx41Ye$||;PBs#{yT5hM)?_H_9uuX@sed4|gT>5f-i>G8q+IJC z7TvQKz#Iv!_GIu@m_a18&Nl@1zsCo)|8v(PoAr z$$*AQ<`{M6LQL;(-qd+25S*GKtw&t%78YFRqzS8`5A?qm80Any4~b-oGi4>Wnwt6B zltICi5JnkfW;%;%t9)x-K4e8^~2wQz*7Tyxc}$B!D*-!fHk|LJ+GQ3 zoU-(D%P`1RMoOk=6OCo{V4TsT_SIcYC{TqS>lD`q=XMYBnL{PAy8(=_X_(+J@FKhqp^y{6X?%YCB%%Oi3rFI?n`x zM|TtXsE_roBt~NKyqNM{C*D2C8dqoOV|CkIv#SY}TcmR=5Ztqew4Zle*(&GB%t>=u z2+@Y)gX|((Yw5K2+SW=v)Z*61@>L^I7L9_3`*C2uBP?@Op32hM^TZFYKzf~nZO!~d zr?fs;fs>Nd+o$J%4sY0d7tL0n>BI89ow-2p@jXPYIo_XEdLb#rV`)i>d3Q_i^u9w~ zm^$C0R$|jVY8^&3|3BvcJ5$d&>=zL@vk0L7|IFf#y(0o=5&>NQpGowwZ$#kCB7pP% z%;Jx|BLZg<0cQXECdYk~e>a&SaM1Di{mGe5nOSR`t%+7!i6FTI&REIl!GWwbI#a*a z8r`lHde!Zn3LJ#Em%P4cwkPTbdF!D^`oA?3lm1V8H9h2LQFJ3$?M7_(g7emexk?@m z!gf1j6iz~fT(}%Zk3Q9zUmtvSZy$S{n;3>c&W(UR+KhLe4FnG!B&~yfU;>&xNC5?X zY#^|p#ZV?#Xs2!~(Zh!lme3%5V}Y)^h13#^H0fZ0)mz!`15MBnp8q#~k2}-|5f}&o zI04%3e*t%jYeeJZgAeW5H}%lb$-UD@fle?EICTwxv>vg{&X{Fe-;A1u;t>;06ydP> zyi^byCDX3xWGs$Q(Y20X2qSwQVAQJfQJ zB%x7-W4i596~vqb$=i>aYZ>QSC07(nLTy&87Rxie^&pN=DQHRZ;WYBLPI>TWML1@>yr3O5E}W3Ef=MQay!i@WC6E;~2WO`)Vt2oz+ObMdf~}vu^`*)Q z3C>Jc&Tv<7o2iOgpzBR&P&nR?CJy-uoD6St!t^edkHd$cvT4>u+&S?isME+RI~KdVU(*Lb2fh`=BSDE7Z~+yRa|z~4lgqY0;O~+HL9=qNT(JE9ymbS zSAonWIMPZv*b2V0s*PN|QH3va?Xyt7(3gNd>1bSX=QxyYNlQI4jPXv>z4QcZ>I@mJN5O!#(_SjL8Ffzqz&VsI|+SCexTC`1YoH0pNlEFiqKS%Oxt<#;CW|aHGQRo?{ZMHgv0>)s$yo>%1xp-P<|7K6o_d3R^gP4x0wSf41w>%YAfSBz^ZaW${T==d047-qTy`S!-xOs{d$C~8g_0mS1%rSh|$plp1hOrF)O*CMzK}Z;F#Vp9zz;6 zipwy&hpo}J1{Fl_)EhMxj@6eqFV%9@;=B@-(;E_0Xp{;?EheZ~W?l*)tm%}@Q6iO! zGewA4D%KYS3BrC#!kkpALDZQ}){UR4N;wHS>ql0fg`m2!!pW*}A`zP0uW`fppF!s+ z(jx+6gaCg3kI`VFDu}><2yEaNIKtn?@wf4x<3BfG<26Qpe`jHR@X3^~pbO(W(i(Q5 zU#5A$ZtoJ|*G_j{P*aYb(zXb)K#$pCtzN0Z#(@%BGAJSJ5Ld6QA6#nbF~^033$@#d zLfKs~{JNphFb5sQqTSC`;Hzwm^j-|WiA1pZpbmQvdq17oSG`Nr4RB|AE~qOO`<@u{ zzL&|VBZm*{*$-Ilo8Eue)KEFe$vN6eXKl>`9w;QSxOQA3## zfu%tJ=l{~+h+GhXQA7aa|3`7uP-aA6X%N8o|I*-yTo8d#L;&Caqd00PGa|4w2q^QP za5r(>P2@fgj_qqYF9w27K1oiUYmQ8J3JWP#B_;hKi?r|vHnGsrIp1L?mUhb&fYLX{ z#2!at3sQmD7su?7dK8D_k$0xFs>>8!qIW-B5Q&-slMQZf97!v_$f+?%9npM)bR&-} z!=~L9F157ccr&@tfu7Ws6MOdGGySN#GeODy=|XKV)l$ZKN}zvj%gM#FncRo`$SoC8 zxpXR7=p*;SKyvF${mQNGvcT{ECAxEw4I(g#2;lesD2^J+j0h|Z0_gu+8XS=eA~1>w zDD!_Ew}*rOf1Nx{K1PoYsfB#$;?;rR?gWuD<|PnY;wURp7Vo?z5bHc-u5nC(3cM+z0TCH^rrVe+W$sx!l1;6 zz)~TA^M9$3L_UbX=plgffAq!-B}N363IUw|ONAuzK?Ft*0i6G%H)bd?BCu2lDE9ve z?&BQyaejf^POn@lzRSr+o?1MQnOuv$Os=VXLMkNFeN3*e7|i6VG4*S5Wrp4bLEm~C zl6Nd_U`mL7l(0okxY>qjxm8DW=yjIJID}v+8IcCovB~xO=zhjfbajIpGw#e5g2&{aQ=_{5TXKzz|aWb{2v-R zY={VqJOa4?f8>V{6+i@rMgZUcLqmrR5rL6MKzaXDo^m{;>xa($HQFe&UR->cnjq}d z1-%KvO!iVYyDeSREVhTI?tWm}$S>Vv-_-(3CyV8}G$U0f_v_iVybk^WF2f#FQx@l> z+Ps*9{9nh#YHn7n-W*LNLPo!E9E?KZUYjr0=1by&;7wJj=B4T;L#sx)R-7qId2=_p zYOyX=i{hrqx^%K`t`T$f;&BimTd9=H*Si@i48{gr4^7`Y{m}IOUDJnbShGfY{H`fE zSr-XiXZUZo3nfe0rM|P2neGT%mNHWfJq7u{E_2QQWug@HfWgSy6`;Ul zQXSv_qy6wg=@Eg`L0|)Y81jE!&GCEa)AX0PkHJslPrhXFDwfhS;q2d3QhK^RzLb=n zGkqRiW(F>gEg-QyvgC^wuViAy+{M!OM)W*Y6|o9F#L^jfi`Cso(LQ@I7zid3i1Szz)Di-{$1-C1Gf7`GA0b=xtP|dWilkr@mM@?!Lv#*9RX@_{x8( zd=JL5`*zaa zuFlk2C07(ng4n3f3Sv$DSG`y%yIiJK>wI+~)9#(#yUy!lAC4V8E>(p_wdDR$J}Z{< zC6ABxngjz4k4(2u{$j1xP!7JduR`D+E)@$>y{N1R94b|0g!;m~sqbXGyP61b9RJJX zd(*gRw#()E0GH(fXqTQ8zyFsWQ{;#Uj0yti{~MK&LOBtErAGkg|I%ZM91($0L4f)H zj&l4_@(lUts7O5mayBH1O)Q!02}z3w@yPx?2aimHOUY!q082ubA^bya9}3;QxMh9t$Tl}iSPvXRq~{WS zb93L~)K#R-9o-W-bxOWi}^p|U(G+xZ{)toy`QTAf%9MV!gbtLo2T+pL2Q)j;cz%26wAdr z*wdroNMcJQvL%w9j3jPP#BNVSwkD$COgtR9U>$eG<|*cn@NN>`nn_3E;nW@Huj95s zlS-pnlZ0Bm+Q`)#RjKCLI-c1YPNt%X)bwq_EsSR#4fdSLR1&LpZanU|__;K2a*j2e~Hhf_L|Nk^mity{-!-VHZT z7e)m|z;_Pr1sz`1wV^U~k|_!3hU1Beb==0yQ{W1bYPC5S6Yqgdz^K64e(^9}#|5ET zey&*dZUIvy8IC1V+XyHRE!eH#KBwZ5t+7lhlTN32&{4TdEjoHOj3g70SQOX)&JQ-c ziU_O)1aSVZg;7Qw5dmiel=;7opXT^!{vBiwy<<&8069Z3{MEyY+tvqXru>+;luzic zk;-c0vewa`kVA{%K=9BMk@u*9j_xKcK}x5>5iuWkC!s&4S-tk`zi0YUu*#XDo~#`k z%vk87JE3A=Qkt?i zU$IbBVxR204b)YM*(PU-Ycg#kU}RuAQ@aU;?plnl4<6d$XV{e%*1=Y;(6_v>7z+e< zZXxnjJtM3($wgwZWGZ7BSGDD9+(*;Wuy+iVY6V>NzaeG*Z{TAb{Vn=Rx`$p!{)YSv zd6wKk&f))pe-A$kRrqH`Aa>0 zoep22wy42Yojxs6TO;9kJROc*t_r3shLw0p55d6tliC`N#-g!QBB-vRYf`BoD4Ub= z-p!I*GqGem6N_D@_5}v)8Hg(G(^qn9Jd*;OO5{@2(o|8_(NXVy5?jOZSU8bPy-Zz5 zm+D19HE2?3n{YiYDm zS46;y0M36a9{4XrU@alAfqaG|+-ErMGyMO+&k_4;?pTb&R^Z*FbwUjX>#n}EMVMGC zg6Rp|qJ`p&XC?h{t2xS(csSb>?A)7?l+Z3PzbK^=BxlZfA(h2!$;mtgc{tP>L0wlm z?52g>9>6*;WEZUAVMiW#z&kW7ByV3#1cFC*6PcYt=&804mte^%Mw6aY^lettlqa#l zlG&*|X;q_@MN?(Z;oT#4%dRqU@%_Kb1_Z@H1Xd6Moc}8bHg<&wtTF^J{%4g92#SLU ztRMpT{$D|`u`5Jil_7xhf0Ydgih~HOAObl5R}gIM3K3Xk2q^3S3I3BD|4AC4kI|2; zGVxFxHw2pZFQ(K}3)-8R>(dmmDnR%u_&jTkIjL%nWHn!>@31*MUD^-l>(n~;Iy#`6 zN>~?FI3_K0qwvkq`wq1BJg3g&#WLhIfn+Pfj6>E9#XZUrn7{!5X|DqS+&~l}ZZ-5L zA6(1~#WL#3@~0kLynQH^F;|xF#P`431jFly!1yD8_W$u8W7H54a6U` zk*OpO%Sjd{)++iwk43eWbf|T8saO*<2JsKDqkmje~^v{qFz@UP1)c2m<*1zeWZc)kFjw5WxBG z019401l9-w%>Vx=$3IH`kX}x6Yeem3SF`!-;y(2_;12DzC&2Pi$>wEQ-D=n9FL+oG zG@9W|2e4$-ll8fuK9N7!C9)p^s+kkKcN9Z*JVh<@;@JDR3OfjTOWoLD%D-o4to5a9 z6$;(AxZmqsTzgk)!yXU5a+Ut#eTxSMX4T`lS6O{bzGCq~c3$;VuTcYJQpM2C4^A@D zw|kf|>9Z1=j%POZX+wJCHrnblI4HklDja2Iz#*M>wdb;dqqc@K2b`VUl zsypc)3O%;?(E8xqZeL-4_TjVz{@JVPd*t-uA(n~s@m?#rom|MJqp?Ifo%FunKHyLtwhqLUL;HFq8eL582~lCRPaB0vGLF&<_nFyUx<5?A*+XYi6iXQAD5z0i6Fmkl+PGV9g+~fo|j| z_f?MjD*s+G3;!6aKl$#(Bg`;c@nM)vMpEHqCT`6V&|{eW*+C4mI!m91S!ct$eAnW` zOp9Yaw1|uOw3rjEIp2D;_{bny=q!C|;owvV!Os3im<~sL=pdz2;fR>;GZG&iLiuTc)=#w?3-a7N&9u?h$KRd4QbU{*_}%5XSjK18qz zzRIeUt3z6lqB|ASLOm?dtrv~No@Uc7j7C;pmelr?l(0Fw_*fvgc{Ax; zWQHD|VFvQ*Z~DuQz^ipb;hwAHJ#d#!&I7b?{G!w0jV`#`e9v$ar3+4`5wW9aappSR zTp@7T_Tqft@Z|pfSfl-KjX&p5{WXmM&i^$%{HXjIM*!`AYy1X4_18248~C#z|L2t) zxrzP?_hazmN*#{cq7VqCHWT?$)nKD7Jk-UN5X}~(OgLsQ@eD*?Q%eRMrN?e2M;w;{x4GGSoUF>|Hs~U07iA33D3OuKrVCxix5I92_Y6C#Ht{K5JCunMU!d97~AWWw2~Gi zt=L@wa(^ourN`;LTzb1)E>3mwJLS^LIlW%$IhW>3@8$A;-<0>}y?whYnq%M*=Z$v0 zGT(gDznS?a!pNENBWtNG4o2_q+TOLlYj0=Q0n41jX+_GbD$q0t%WhH23ZCb7)L4<{ z^I5iUKXc2>z>$VrN3lK1A`=`x*5$kfi~?{b#Af zkMK2c#b^NS|GG9r^k-;))`sX__}|VeCi53MqXt+JEc?lYW`1t`o_=m*7o5tReWtf4 z(AA)swW>KuH3dXm<{cHLf5_9wqoP>k4pWbc;V}4^bI(M%K;fJMxy)QDFa43i0!i|` z0@)UX(1|m*bBo)2RU&S2bLobkfB2xM3{C<^;tb?agFpUX@T%@J^fhqFXuxm(mrPOl zg8CY`;2QAT{{>g6&(PPvC8Ghq{a-RgXH%s0tuQqbS7352#2-%52y#*l+#|~*pw2Zf7J6>n}Q)uc-fcUkt=Wo_A}x*4 zbsPGl@?e?*(jWG;Y%3TRvBSQtAYc)2jfTu?&kS-=9D5H6vUNVyqp&|*P!vx)zrr0w zQOx}2)n|sdIH6pcaasEnUiwE0iX(~hX~sJD>W}{ys3Y;&_!_tbHNf`&Nj)L;^jF$z zr;~xnjc4LTfsPLCfxFp=IhIVow&F-CBL9ev#o-ahf%u?|$cE@26TO(YGM^jsoJLZ( zHa`kJzVV*6_igRiXtZ}Y=5azC4}>R2qr(w+1oC9OF9z4>^IWzc8}A*C_e~EMv=W(y zr*JM=B$XcT2R{Rlh15`QBAT>Bg&W;??3`t=KhitlJjP!5zPDL-=2%hSK!;{>KODI= zA8CwjXlaPnug{I5f5JH!<;Jv_@j)p!A{#3mxeH~EoH*~u9C*oP^g`(nen z*9YJJH=RDu$MH3Ad1}C)|6iWv>gUSWz;ra=kN?xrl8@tS;PTV}j{h_0OhRYUuWAo! zkLo>_XFl`i%G`BkxF`_q(aaOfBwKJnXsu@pV(OoAu8|88SgiR{xgfsBiW%Oc8Yv2d zLRzMpt(g0dfjuMvt7UknEivl+rGLh`7Is3Bxgc{snbxSd9SkbF8ep7|_+WmCRs_?r z(`oe%KEIrw%Qh3*bY^sBpeK~;V!KniNZ9#X|Lomo5=DX5kY<*%a&&?t{jsLTf#~{r zXSDt~X9+o>77;HFClJ-6W+-IVo*63&R90#kZmW>!@pMf2Q~$iT&H?M3EDimMk!XC> zc8CymIfZoklWbCoF67Vu^Y;us)Yrh}tO0-ie>s<~pEq9v`8D9T|NQ##p}qz#XAR)| zpX!eh_|O06YrxmQWvGFr)F73WvD49!vEkU-J~&Qb|LKqamtleXS@Jb7O%3?%f0~N& z(R>YDh8pnO|7BRHewKUzumv}uQ+$B-SBhTvPLGk-yaNeKm2f*pg*4K8)wHBz->QVESV0CbGtk1 z#lpmRG6e_f;YvlWw+{=Xgkr(fl1N`N1_AK#dJwQbmg-B!$M8Oaolt{oV;+<~nodsG z2=$J~9Eai9#&~p4d6O`_-i44#N1}b{_{n&BA`(q|i^6oBir)cz+z%dv{PF+tZRmc^ zd<_)RfZzTLX~>8B8n}El;Gh4ye9P9)nXiFD8t}*eLK^bnz6LH|4fyT<@-16GXTAms zX#nT{Mda&*e4Q?(x6O@wk>-Y5g#1pL8;k~dW&;nI`k4tX z0e8aZ#*D1~APq_f5NLIE)( zVQw)jTYkvA=FFX3iUw~fnqtwWhJn89;`nj_DI{TTDTbpiLp>JFU3rTpydm7bp&^=G zGrv(l8cCR28Z7My+Ys>W|4;g^%oottz{S&mZ~wb^y7f8x8hEm6z+eAA*-OZm&)2}k z(*TbD2KhW8pVxY{H|Pg0UP?~@=gd84?&hwEXLz1$8;Ond#*(QaIF{u)^JYWzZ;IuW za7~;W^PJATv4dmB67kVo=f<*Dik_#-*a{Ahu(=O(1^0Jt@7mwBx3lX2yeQzxrI0uT z2iT+o`1}l_QwdLINZT-d&Fev7o5vab1IGkghG3#X3PvkTXRjrbL2P@&H>PW2u@-)op-TaR0glO zsNBzoxmi3lt0=IiRWqB|;w6WYBMp7)W9xc1M03FPpE*|oInXRNd>N1f3oAFPD*pI? zK1J)(`Wm>jHQ=}ZOS}Ah>3t2Hj|Tkx|MStFPwQ*o($;`K{$JYV=S%Nv;CwW|_W$W3 zLKo5Z=&SYA`S7}IXwA~8+1z5&me*nYR+8dHvvwB>Lk6@m!}J^4d#5B*in%Kf#!a0>JSG zZd2VpHFsvni4%~ z6vy!Gf0s>XyJhIhv6{ZSt08`agL*BMVxDdg>mLQ#!+$E zF7I$E^Xly+j_YTF`NhjRRH!`g7wkB6u%~-3Xkbs*-h&{uB*c@A`B|qY##C2!j=fRI zg$;O)&Co-;cRLO>W^IIqV1q4C6xh|GnJwAVHR0DVIvA1DEXSB?f%V7o467EF#l&M| zwUDrgWj;b?$<$&loX1?!BC#%F<`C}t(-ThI<}4%}PZo>XKmYen?za5oeGU9GH85Ly zfXpDTBzj8wA#K*42Y)_^{+WxW7V*wAoUdn>%bgsZ=Xa*nc}gaQI#0G5%4Eq|e zG~l;?OBMbfz6P#14fyT zdk*Jx;IMB9o~VySa-aQ=jYfNi@%CSDA~77?+jB6u7Y_8}Wd}ytAL(^nIVgPGKhr%` zToj1Kw8;aW>g`LOOr@h~IBz!+jSr{tDmEXk{;T{d%}0C5DAOPRFX^tv7v9&vd1=63 z|DTuod}3b%m$U}_@&A%8K3{lW1LvgyZ2y!D5&Z9B{+n7jwX7%*k896}dM(;giGlQ~ zXfl?H^^GTEV?&8_f~{c1;@GvCEr6~6F7Lvv0QEU7-S~pj_Er;Kx6X0Box>wy(d&Ip zo;}%{^J?Bev@aHkk3?a$J)Ru4Q>u6Q#bLUGtKHMVO~(3S@D>ug^M5j$1nH8i-28-7 zf=D#&E%o>qF8=#-!u#W?vEe9qMRywjQsccN@pLvRHxGbuBpy2zA03Q zTf$f}nMg)PQs6Ae?OL6K`V##Ld6TnbEPb)NlWqomi7~WKL^#$!GBLuGWjRQ2TPx14 zqKc}9?=ji=mG=bgmzms&WO+aU`fMs;YAN75!Jq$M%wEsu?Q7u4tpPUv)2|cyb@*Jm z|LB5CSN4k``TbQ>%Zmbc->scF>NVX`=T?0~vA*MD@FHPajB+Z_HJ+)Uymb1X@=n2~ z&F7pZV>!4xyb5`Zj?>DlGG-T;NIGW<(@3xYKRadX4aVF#g(*P+b|_xRzyE(RTA$C; z*T5yB0e}8~i4>GCrmumEpaI|he-V`Gv-CA^iDRjfql*v5qD72@sXHyJ~}ioRX#H?ao`+^RC3K* zdJ;+ht3Ut0n2pot?Q7u4tpT?Gr|lu|-!GrslAfz{bi_ePZ*%w&p(wZCg`XV-yXMIO!AZ0sFD|NPGdtj0boUjtW) z25|g0$U>se(&o{*@CW=ePfb-91y04ZOeuRY!POVV^Id$5G{!cxG(_vypAC_ri(bBa z@3yX+vO2%%CCJ}8IGbd#`*dDI4ViaOtt<*m3~CwvHlvGO{zt?jvF84!*ueS?XGLXb zc{4xFBt3JVpBA(4es(Klo}Q}W3Mla^`}`aueH-c1!Zc1AhC@ z)`=hEYv4-JfZzVFl#=%I>1!Zc1AhC@)`=hEYv4-J0NVd_@;K2Rr;kH$S^qQdnp#~H zxHGP0%Dn75h3-oY^v5=Y2g2@CF$KtsqP!NK0@M+isHcgi05P*~CS&q?ehBg(I-mTn zALwgX7j_%C3J77$Jiq*lM9($~`kC`JkXHk2{ZA>_ z05lzfEAO9q&r~g66jyq!2@9-lBlY#Yz3T@CT3n|-3XmDs=3NUGptchATn82)#xLi1iLMZ|H40TeHYD=cNIe=(%b@dL=}gNX>cJM4|)z;b=JOKJitc z42-MJEAukZbIrWsve7^PbLI7TevW+&SQ_x>|CTEJKYR^baT@U3{}or{eujMwSQ_B_ z|Gy^M@98hdugPKy@NMg_%j*wV?XEkY)$WGob>V3L*=~Z*J+B2{OeA{F3qJ6n&)mIc z^resJZ*Vr6u>OV_k$DH%ZyiD|5GoS5QKa?q&TFceoc@Ch!>OIoixUQwK zasAoad}f`O8f2p9ss`_u4E*)~<<-0Sx$!k{RvPf<|7WExAKBNyWu*a}|APYn|DUe` zUjtX52K@2=3M_O#%f1GL2Dtt2Lqz)&ogyE)ifctv2$f$TsQ4(Pfw77+Q`d>DJlQsu-vlQI8`qc z7&|`&wybY%Y3Xn7J!b{Zzd#CfxqR^60EdG0A1NHqa z8=`sEb{x}KH0?#4i*>=(8pr3Z7_67KaVchYO|9qIDY$|aY07g!g|ibl+w4fzXOW$8 z>y%OJR9jKt@L_H8K%r*>XAgjrK(NCR^N&7WGcosk0+a^ zwiE>p9m?@;UFvvzY%JCf7fE8t_<%T0;L4CEjxjIqa@CXOqODeKN1(y1_hy}IQP0Kl zKjCq@HR7#YSiei#0t#xETWDyiV`kvaL(^O;d+Iyuom@{Wqs%-owY4ZPct|tHy{f+_ zRU}94_e9qJk+<@D(pU+2)_qSBSJmg|e_lw)3+V}Md+yf%#6qC2>Ez13d-}@GVchf7 zg0bWrlr0lDOJxr^t$h2Yw(+ca8ZAAgjYw2tehs-(`8?^po(b2&~q%Sd=#(Qq*iLn^@pHPE- zn7V9Ts_or2k?1pnYRk#uyB1nTq#CoGX1L_o<}z10aAOU4Fb$=GOL zj4ZF!J7_u<9Z7*yxJ7_}kHkiLW69J|e2gqyqt|A^$>JJ4OcT-Z^iX{y+Sdn0uXN&g zY?PFT^c{3K9gmD96DQ;S;D>848SRhtgJCQ_IEscbvSgLscx8$f8QU&H*1yV7`_G^)}jbm_MX*q^&`}_SIVoG>0~rM8Xp~$#z?fMk&-!3ffU?myl)sw6p~Gn<+DJ}96+c| zBzUdf<%DCEP?8|USLw|T49kj2N{jS%Z_rpY33X`(=s-!kFA4G{!Q@C5X;3RfYa59} zig;czRf_Fj(?3r1uffOv=WD>%z@?{wxlMYdY}+Yl@N`w9e#kw5dhRR{fBt{z6}K<3 zuYn7t0l)oUC{6l&d<|TB8o>F#LE4GFSAQe@3jA?)|0d^8br%J8?b03y6gv2kO2@|J zBFf|N2ZD{2(>?%#=;w3@WHdSwQw~G8j&a}-jWn#7V1YU^HVjMu{zx>f9_Ki;dpDdx zQ&(7d5fe#V@{f*>R0QK-;TVi1gX5#P@{jcg_x2nN?&bU}y%aopXJOhR$S9$XP$+Y9 z>iVL<(WBb^9fb;|FAAoC;bFEIlzco2M@2KLrd>!X**O&!lmc2AQWe2;>~vbym|zX% z(>vif-qPqSQ7~!9_s=~K_E?#|Aez5%YWvJUyffE%L@TlE!i$9S0F8s(=pBG;PXQu&w{eO1)^09plTuvI`>;FfIzDIjGeTY1I ziRaC{eQHlpVC1Nl(b>hJJZm3yaT*!uk8KDKg!3)JRD7exdB^5#li}BFrb&e>XJr{1 zGGkM_c^+qtg-ss@+gxz`#f@6gtep(nYB~9;96#fmsZfYkNcwa$*<<-D^0#{F8V99P;0*gZwVDj+a z|GLCGJYRfY1LvawfBt_y+Vg3B4P4q9@Z0~TU4Fjwz6Q=m1AhBIAMN?Hz6LIB4WRu` zr}KzjqTNX6(OH*vZq8eJBeQkthN3`sw>EhC5N@Jxs%N2Kgp=6FC6{q-n_vLc=?*>W|?$*+@E?Iu5rRM`Gz{XLK~k zV}mJpYNJ2M?r#Q@vDEl*x+%cP_`u{QC!3BU-Su<0lj+e4jt-#OVe2yW~ zlo(P0fU$HQV3bzP#FQkMg(H$+zn2++Q&z2E8WsX3!hWpL0b18gMJo1XWF;v(a*f8ZMS3;>u|=YG0P0n=a zMO(ERXlrZc2%WNC37fd0QjDt#aWo;M15JpAab>Fjt-5LsO5(u5^f4k-4G7`7*&;cd zTESg>SAsk?w34HWBweT?Q65`a1*kQl*_f;g4-@85;T3??&^F7iJ#lbh*@sdonT3*O z(M;NKB_|OgNSGuMGRSB~Qd0pWwav3o6bX>{D2t3^$PMLy+|+)phe)YhGNl@VoXA5c zM&u<`s>RPUKi^V9iC_dgU+QDw25w`H_{<`4}B4R2mL7hI(?k}RhzAq zY4zIm+HG1|d#3gV?IYUvw7=^Cy;0w%$MyU5SLyH3zo7rDUqXa37nmNayrPLZYisl=%lIns8 zhmWgxjG)1os}~uxhPsEgYnB)=r!oYkGUi>&0fK=7n8i4&!}M&XhZ%wgdfSDGz#JYa z=tbmQCbl)5n8#Snl!P#;n9pM*6~ruHnRm=}u46eV5@gsF;0$OXj}@dcb`gtp&)F8U z%w45$5c9?W2PjMgV98Pg>ZE6VE-p1_E4^AUleJpb_N5#uIJ%)F#RhGlUX6CyGK03z zYXnzUi!S9r!PEs@&T3kAzf{JuaIN4ddreeSD#$^Cp956B*r2sEtMjd3g3t0`R>>hA zyjHNXa1SX}*#1k%zY+NFQ{c9yb?Xk34({vrLl7pN&upAD-a9;0pbbq1}b&T)DbQ{Eh*C8lZ|m_s~TsK|<5&8kYS zIY&*NoMsJ25L^edXDzj?V$5SB1apNWCOd0c>Ccl@O$F6)kl@J=Z3(J%jN5$V zmP(KJ!yP&BUkyW9n32pE+#H~K4ielPpoZlJZKDgaxDA16FOi&REH`K;UEsx3U^Ha@zSZfQxJcb=bJPviOwXyxrAuU9Ir#`F) zwXbL|)b?w0=%-=s-vHkI{+)~f(Cc4)HzeKAUW|QD6gBJ^kiJtS>9PZT*dC>v1vQ-XzN~rvWrx*7+{a% zEkSn|P{K#hjRUg45s8lgJ2!J)A~$(>i45i8wXF>`b0FW;KxQltm))Cy3k<-XxwEG< z`Ld@Bz&QV3PF_pkzmJoj!Rmi4y@4j_Gw7RP{QnO9qc&fw2JfFoV9ozr?H$^uwEx!r zPhX_h>D_t^*8H#4KdgV>t9!VBacmNkw_dZUQXo%-gQm8PBju^tfYin2Q#t#E?M##< zA|bDyV+Y3&sd!;r&sJz&-DWpiR~8HIR_Dq4)SVnC7`uSG*pg-`Hhsi~S@kITlibac zS}GW-kUbnCxT%o6Y?)XhS&5zg9=7f(Q8)>}4IH2_5`cYdwXsa{L6;}s_Y+n(eX;#) zrL|09ra}*JsKQZ&9%SpDQpq+A4oaCx<`7G+RN-lXZsZ_^p#?h3^tK$iC1ZoI*x_C= zZ(`b6E|{s1BOD@lsgRpX4BAY~kkwd>X&)WUa27{dttu1zvcR`+uwa@6zLk|cc6X9< zY$O^V=G<;8Gr&48I#UmLgu|V@75dw;{g;y06Zr3ae}h zl^l7mo7w^m#A5xu(Z1v4;Z;U?n_0OAy-Buv)Jhi-Xm65tk}?GM(O_qVGhN+fMrk+;j57ibzaC1rf%c9MACK^c#7s7LekzfS-@!a7 z?SQ&bnT5izw|P=C5a@LbJTb+#F9O{v)KFlF@pMk4H)`lU(lD|%hK;H{xzZU*j|`uT$4)s?S---l zYRE+)OTHy!RDq9frL>g4B@&ih8Vpud;OyEP(>j*7uF|LqJFrBfQ3xAW8dc2&a3I0@ ztOSKRWBm%V@G7IK1&W9{b7yBJ$Hr4bqX|*_pu%ybkjFr>ItOCb*-G-?%Z#c@aQMxb z;fVq$Z0m1hl~L9X43gkWJe3?c-JgI#aTF#Wrzdz4qIAi>EHx_27~)V2R$W+Qk}0r! z#D>YMLq-EMDb{|$X*;$DSPnu9C_R`&{xH@(uDK@-HMq2FUIu6$UA(7JWX9)X-og6*kQU^zgm1XP`mEhzNO==4oKsOy1Gj%VObt~5z-hH{ zaxC2|7CTvap;aw%vdXbmUAYj@+UyjaX!Zhf^>u*Pm4zoV59(CR_7w}9;)$Gc1EVPC zlKFsBZS!;B1m+o}7>X;J9+%aVpA{*c3xEa=@Gx&Jnq!dCvi@V>#4wheur_l7vmv@t zMk_}smdpY`l?14JZN=9Dq}mITD!B$gH4^07@LP5@0Ba@Cy~P-~3ZRxCOg?@_ZebAs zN+lTra2s{@OoId#;bAY>#!bhrn*m5AV*8d&BB4>27zU}TRJuY?nAI)L(hag`5l%+1 zoMvnAD}cXPPq2W(&vN`}PmQqs7n2)^{!RUZu%~xYKLW3RTm@tPM`7$wYPV>cw8ivS zU=MsfJpp?}*OH%;kCIoA6p(oSD{nPOO(+iiW^%j_255F{#{P*JU9}N1(58$UDdlg+ zC|B76m<E>ffs;m#p02le_UpxCEi zsq*ERZqzqUlSY|tR5SohSWPE;9IvVeoaX#EFvzS316q@c<~5G5Sm(x4D6Hwl@;azb zE#v9l{lZoMB^zjLMapR-n zT7?+9SF8cdc7e$|4jVt3PAB8Nu+_D^2C$%qV0%l$a2;YC3Z8Y_eQ|iuWn#r@g$pKx zZbndl4q4ZP0INrGiH{zKcTz@S&7Dq&5x{|6z6!8g1U9_oGSr)hCY{2UR0E0}X1MVD zT^Pu4tYReqTXW@X7?xnM{$Lg0Gz*-O=;(NKSjqi3JmXTbA}a|SqpA{s9fF*9!SHhZ zuv?AT{uhv&iT(-w88GUv(f+Lcr}heMSX)p3LLY(Ez)iG*{DFLoJQtA8>fidKV5e;E z^frk|JEyRA1aU+cR*ZEw16@Pwat|YmV$)Q|`gKP*g@?fgDR?v-KejDAt8W5|+NLba zj}%MAZ9ELPO&z5|9_&}Gxr8DR#=|X`RGOddY`l?E37N8}gitQ3wTFPJt~J}fB?WWg zZ#)S2tvi+}vZ=Efw|E>D9U=Og~Zu%|9A+6S~6(TKnhoWeL zgMxOS)Nl+)o7z{PEz^q*;$f2v2R?;pZybnvj#dh-yNqH}?U0OJ}(d%(Z}1M3WGa&57n-PAG(vV6KD-rK(7XBn(G^u%WFS z1(Yy_3PqIBl4SGkK+?WT+&uBHg{yM%WoD4AGeyJQ9O3j*)~uDNDy|3phTAZ&T{#T( zNX(@6pxksTP_}iKN%e9Rdy(rQxH4XDx`k6a<#tkwO5ictqWy0vd62+=|4KeXen|dK zm%uzfMxROF1UrC_X$I{7?S%QjbKpkM7qwsNv-P$5epn~GM*pJSCtSF{*k(t$%!|`f z(93~RO-^7R+ZoEP(fw@ur$TUaRQ4DLc{R5Iwp&=BO%GNZw1-v-)^^KwxBVfGC(_A{ z7iaQ#_KwHcu2`-<_c(`&1l-9Fvpt|HY)YQf$Psovu1aLX6J?a6hy*-Q5^U#lC8pvQ zAj&7SV@#(jMLIcA%qwt%ueA>i{^Ne@7;u8#)}HUZ!Mk$mN5}2&`{RC*Wux zyIBrnBW}frbzs+NV7+7Cs=PW?I!R0EE;gq)o4mz`Y&Zfu7a`VlPB!f)flbG*Jk>OQp6A+0^76D=}ZXd5LcaIQbWIXPsv(G*Ui0E93$isZC)3^;Z6+uN+EOj3t<=`Q?Z6G%W^Eg+7jDpQguR1aZAcr1lY@6?_i1O~R>5<%7i+K7UZ=eU zP7=OH`ylKwdor|^$`HTKoS1)4UtJwEy{2JG=@3rhZ3%@gFv+o@C zor~X@^VoMj`!2w5(RJ**kbM{7_o~J08(?2}C7RN!i`jQ6`tf)YW&Vw#l9i-U5($lHSD{FeQWVMZ!P=QvF|$k&JVM1 zJ^MD`cR?fjHnHz|{9f10z8l!L1-}b7vTrN7k-!SX5T&RyBEJDJ?wh}`|iWRzPI8xcpLjh*!On)mPgsQmwo&2ThY(HG4>t6Z{;BS z4zX_>zblTh?{W4W#&6XK`;M}20^5I#?k03MjQBUv+h{-B{Trhv>0NLG@F`&be?EOF zeKmap{a5G*J^*)tKMi*RzYe{?kKj)5Z{d6(g+5@ewpc6GR%kWQ1GK>)=n%C3 zJ~%aS0!|U#3$6c|+Vi!SX|K`V3~m3t+9TS>wa;l^hL-;W?I&=`;16(<*wC-l7wE-$ z5Y8H{)tmH9dM8*U_d%PF=mYwQp4RV#7XMWJLH$MgEA`hydw)oOSpSIrDLA+AH8{QS znErG9H~OE?uce+3HEML_3HD9mw>rhXY4#n*@2ZpRdy0Ke<2N+HzIU+io%mgS7yI7L zzW3m_=H8h))oRFnJTNg>Loz&=gF_p2LIZ^5A(G)RX7)-~~K*AqEZPMLc*h4_<;nBY7zgUdDr$W6(ri z!Gl-w;8hr`C$HwgzwqES7&MdD^5Atmcs&Li$QyX@MjpHggBJ2;9=wGIZ^d9Ec^eP@ zl?QLfpq2a^58lCpf5%`Gc_$AZ;=#KxXe00D!Fzb{UJN#q_wnHUJa`y`cJcupe2@qK z4}&e_5gvSq2Oq|ugM5SsALYS+V6c^Zj0Yd*!6z{2B%kELr+Dyb47QQa@ZhsN_#6gZ z+hF-y z2W>b7E%%Mur?p>*bH5Y%OW>ry_s*xCoIfqQOuD+zT<~s=R%ilx4>Jnon&RFIcC8Mr zMoz%8=fLDXjv?oO9vCJVwRULv7X%~&R>D2n8j%oR7kDfj$Rx)T$>qkoe-&6KwZe-o z@&H()4r#TPHuLPrlQSIGQfWTiDL7qUqpig`wzB97!aQ1L>JyE^X7+VOm~?9>}x67TT$;ljUR|!L-grkY{rg zSwvna53*Fkn2Of{4DuYtA}mtzM0qYp5vh2hJP$0I?OHvil6_(XPJ@u=bNgSE=x>JE z^-Aq`Fekqk_Wu7D?0?5;HTfyr3y7Xqd+jjMVOHm!a2`38Ws#MQprZT^6WwV6k38y7 z7Ji;QT1|Ag)wUz2%H?v;le)u1XI!0o*5xTvB^Qe9L91GHm~%OgJXJ@@g(r_z6CHZB z?Z{a@WiC9ax0|zpddGn}kqhq@pyUG)g6v?Ab2Yx*oW&W5tmJ0I5rVlGZ86bHSjV0` zO41oHK!&Omy>fB-Z5W>+^62OtoXm$vR@9N2th1V}9i*XZ)t49Ck87 zoD`3k=t&Av$gdq&3Zhcv)Q+0M5pyZ3XRtAkdR*-Dsz>GBW}=U(_U;DRNcd$QMJ`1j zV(3y8-)5rsNuU?G&mP^By5K?IYzBb7rLzI^=1q)w@u1vhE(Xf3ef2pdhXTqkd=N0U zndqMq*yPNBU?WP*LlR`O*+kcs?YnXh@hD1;tRMrN|Fio)Zv+2+zkvI{>%a!^Y_RwJ z0=#|Qpxvdt71rp#)91sAe4l;_ZU=nupWyXJbV0DQ+NI^yJ9#0@&`$jg~L)9k>=D;WFf_ow8QoFKnE z%1$kL6h!qa^G+xOL2%ycUj; zG;7TwT^I0m94Jz80bkE%+#4*O*=Nkj8^A|Ux3)oL?t%42j-{sJf%PW17~HD0xRfbR z$dfm-MNvz({w$2QaExq~Sr~7{@qacMBKn*3onV1~7(9RO)MkLiKLP$fehps1hH{Pn zXBWTCT*LaijX83I#lyNyfU6xn9I55EB7+R0-9+D@9lKg`=Sk^%l{#hdX*bbBC~(NF zH)ZJX;?QEE^U&6=Tm>V0Trb+|P4p<*eP~1eqF3_3s$h`S4(Igfdb66d%3s%%%;aRX z)m#azI(zcfY?-T^Oq$FpVA9;ttY*z>by+#GAWbGZG6gy{9~LxAd<#-%RsvnP)uV|! zWwj`dn&`~*XncKkltf9S~btBnytoLve)tMWC zDBQYPh>DU7$NOTVDb@8WlTSp~ndnapD1?MA3L%|J5i-$LSWVMr6wHN=LaDe-W;5V6 zceFWFmr4wz@s?n=<|L%aT+itodXrG3bE-{3>P&R)6>e>_l_o(}P2oC|(JdxA@@nnc zBqSV5P4o>V;D#Dp@`txZR1fbe2#!ppqb(-7@d8>QrHUYFg`6sg(KeXeo7X0kRE0`H zRHYivsG3Z4=hfWNDx`H@H&gU!1DLzwCKLU70iBT42IDm~MV~f+(bbuCKo@RpMJa8V zBtjYOSVpnaM896U4sVntZkq(<_=dfdx^7V0uEgPE;7+raGZSJfm=e)qCKRopSOXzv zhV%c0v=e%N@b~*5c>4b~?CP)7I<-OQ2i^ns0RIX*a*g_4@DBE%{x1E8XE*9!5!fq? z+K{|ojb6%dXb_iJoe6u+Q+i4!n3J_~Iyl1E#Hji8bKf~U0b4-C28 zj64I!|5CjF{~g##f0KSj?*s2X*TPERi`oa^w9Yu}%Aq1)+Z zx{y3hK2BamP6Mg+Z}m+EsclIQ#glkxBblCvu)D@WZ{T3XzIL3dIt;jVZrtH?T&kH1 zxZ*}Yt97HLq9el+4@ZWoLte}f%V8c|c@WUT`IvF^RR;jC$&Hu5%+$+dIc9J_+;*j4~=(K57M z=#=jOR{#xpUFei=_d;>_$ywM1D8)7x?kA^s8^l)HvAj27gr%L3uPPqFpW_f6D|gYc zaw~wFbAl}w9cw!PZ-)mSmH?aJIvsG7Zvp&T7d|)(g12%;dZEV}ijM``0j0);f@6in zGO!s`S}CTd%+IFyduba0LK47P$Z1^pCQMnKFQwEU*mQ9GFCp(F@ZUEnp-aIB&_Ou= z^K3Zx_bK`#m5 ztjN2Vv>wxV@@^(jo74&$;bbi!;OYwuUf!z>@?N$}?_RbLa4ZJ9^d9RU@_r5xGGYZ4 zm5)3O*K!&(ucaCJ0JF>HSn!b#a;PjUCcRbj$^T>e+=7#Bx6>W+2vgV=E8os$MLxvA z7GoFq!|aGe2j}c)Zq61=KElkJ9ab{=a6ig%tu*uD{s*%+Z?y&B8ML|@@-b%f-s(u$ zjq`Di<4Dkr^9i^eSF3fp6C$6)@qZp^CU9oxPvD8Sk$6HOx8_uRjBYBeNC- zj|Gzp>XTE1OuY77)3nXbmW2*c4&1QG{1vx#I^^MM$`**nhfVZX+|btPkjSQSip1k< z%pE{e+nl9psUDF5j=jy?4%l7$wt7fqRf1gNrEvd-IgQ$8c5yZyf;!lENo=#(Y@$2j z_FcK_qh}^;1~;0Wz~E4BZGMuJ2RS_ z@eL+=EAELD?gLy|&&{&M+yX3HyS7+LaP~Tmd?N@PhRb*ogbKkoo9K}Q7`Oy?GH^?-FxX(;2n<@fu2)5OQafZHP|~q$hgG?; zJI0c-oL?%^i@weQZa2|q32+e7a~uZ>auDKsacD7_=aQ}+D1Hudl;4YXi;12~I`(XL z$j?R%X*bfqG z1$*@65kVfY!bArrfF{JW(S&3?0_Xo_dNe;$FGfdA0S zwRY`x&4imfk7(c3{tPdEHNkD1oApus0k}2ze*KI3k3IW?iyO)2nqH$h`81o+x+ewX zGi=`KF}on2<&f+uK|TjBVwG#kB!_$+Ue>DCoJuAC$s-*FLLOyv&s;@JzQFco^Hd`8 zMUIgzmaM7dODu_8?SOolG04-<$X7UqBMC=SBwuAy^Bg?|`5K$Q=I)5d*ExbnK=y`q zUqimZ)+XMaDETHkB-<@&u%xy+S@JCocX7Aj-)5D>YfvHo#qyP7s3PCtP{CM^Jg6BM ztjKrg!K-oFE^NHaUP8VHuTNEJyM&xP?)yAWu;6h&U^R0$5-PSB@;8l~t_{4#k2!U~25%795JEg1xcWXi!$UwdNoY)wS*sGTOCE zk&{iAu`mY=2trM+T8->cb`^E4iJpzZExTn+u}z+eG)hBS zYoc!>AP~YRAS4jdD6y+d^l4Pn;BLiI8U?k&L@!2FwY!8ctP@bgV81KO+c}aDz(Nv9 zv){{1bWT)OZTC4cIR@Tfa^FKcMMAC)OG#2ftVuME|9x~9Y)-=czawDVAEcx3?$=#( z5^e!MhrXD;%D?;P?Cx^@!W&iBldtpO8yIwxZ}Q+MJh+wzvoN@s&gQ`!9?a#zJRZ#F z!2%49((8DzkOzw}xP>m}L4XHKFu08t^I$0tN_eo02cD&0qnixzN``7*#tIb(BVbv zjvGY}=H8vd?niWH2Riob4&ER(1cTdP|DiF1PA-}{Zp1OkixPYIY_ir20kXCoheVH; zwb!Tgd5pSKbtu$oqFW1~RwQ=p6uL!rP&b+A*`m4QkQ6zK)RNgjx64Ey7VWWvip+A) zkh4&Pwv^;x5nRPG)7^hVXqSmTEP$Jmhiq;_?*+Mandr%)C2~;aDVr5$svw`8<{iMN zGjc%Wk#AgPGvnZ#{CYZIsvX*CqE9JcCbF1|S%FM)X4_2kBGq=}0Ol|kr+j(jY#L1T zBGuHsUu4j+*{hVFh!+#92J zJ+Br@cTBBu{KrQ=;lFRf`G1`*g!g|p!5ge2bPC4)hv`@8FSKjmM9_A40r(lJ8Ap9Dk1p;hY5a;+D87!*4a5*4*3&17oV@0l0S14!QQL=k-xA-ca9#2 z{FPY}a`$%RZyZ6SpbjOxb0vRgrUvg`oBSWkV$K19{DZ?4?wqT*+C~XepXVqB4nOc5 zf3D$?Y8eHiC7KPN!Qp~;Hhdb@| zgV&pC8jgyTL0Rx#L@cTFkTPmj2Cpyys>pLtU8}oR7$nCm(laJovO{(3xHHA@2r`!Z;9Vkw_pl|p+yc+ng!~_=k|1F+?CnbtgLy565cn6{n_IJT@IhGh* zeH!9B)OgkTeqRDkT*mt04iLU)wDJ_-wy3y#kH<~1{3PIoRJ{1;$poDE=f@={!s7t% zQQ_Wv1Qk9*SCR&jN|i(bR-^zJ_5i}Y@X-{1St^hOoDvV5;u8QUQvvWc5}0!#(M4kb z3S@y6C*a6eIhws9&<>gTEIF8t4i=9>e6tF0P%RwyTReeV>Ix1S1g5}%3}s;mgf%PDPug-3Z3xCNMh9P3QFUEv`CyQbRwbq z()mNc5?(h@UUFPA2&sn#62ovlcWnHQJBH!W7JSz)9h*CVXCXNRdc9<j2 zKAs#Ni>8MHw?jk?M&MC}K6rj8b~27#-I53ZY83!H#h2(k7VAsTy-o5EBuj5KNT`%e zhOEv^jwOLx0LD*(S} zp8OT=01rY7|CTmO>w*)&Z-YBQ-_d>zMw%shEqLKO0Vjpt0`LBQH-Ced&?QD`B~>3f z0G`rjgRcr95A*utP7J_a>`~@8Z+#e@jtTjUI`7p4E zVyDIuaA0kMe5uh0?U^pN=s3ui*BhaI`H1A9yHu)BfZh&AiVntTWrY*^5Al#q|Oz|S8>U4;PRXmMoFsz#)A=k zxKV{rnTh8vGfHYClHd<##o4Jg^2`#WB$NeYR~pE(78xZVIF~3s2AP55+2nbpMoF!V zg{}iHXyMs&&hOdmF+pkb_d3YE6Wjj^c)}0!dNe_XcuCn#hNo$^mA z=~Wyl?+lh+&8z_SESO%yR{TfA?2h%7^jaP#IPthyEY7hkpz|0rd+ttWGgE<_@yjlr z&gZlu4c1Z9IUH4_VWBSIsB(&j3kf=x#W@y3^g2fFUQ5x1JX(;;;esw=g4%01x|p%N zMM%WP8yetof|kcESzypg?KYf+i?NIr&o*c=M8SN2aFmv^edyZ+BZ;$=#|l<5wq%w; z1KMrOszR5~HE5}J8@^779)IXEwy=&UDOuwwEn_R^h%*rz9OPhUYBso>Sx|0QILjfN zRxne{OcT;f= zLRYa2^$I>&;1CB3hFM^E&=F24^dVe-|w$e}s9#>&Q6S?%l4}WLD!6q^37V+R73HGqNVbZqV1{$_b+LOa>8sWd<+J zH&uBmMXrz#u{u)?h#_$Q0nb6EV^aT0>WB94hO?#Vq3X;^j_E8DC1HtKo~Z)N%38HR zWttMFIfGZ&TRLwS>57UitAvuifWYwvK3Qze;3amT6mob_3Prdn!x_BH-q7Y%f2DkG znvEH}qTaeA;*`^B5{jT5d{P?(Sdh&D>~dI)f|g+Q4}6nXF% z$zf#%-6;X0Q-6wpLY`m-eIr%YsJ$yS;0 zgU$dNT49C8%32+il=Rf-bs6*l03;$=6^0}tbv1f*1|0y@HpNf~6@d6CiyF5sgSY-0 zTKi?*6&ryfl4?3wm#O07K|eZxDn(IHr5GZrB2xpXRke;0-%4H};rzdne1yP%-ypxD*V2`6yY~oq{&;}C z1blvf5?%nK+9L4n->DtY2DAz7+3-flM_`8VnD$3~uD)9D0`J^+f!*+(U_bnsch7K9 zW7)*ktvFiCHq^3|PuH?JU%ynIQZBTPgJcn?pmmH}R_&r;M&eabX*~ydRD0UMCf#;} zp^a=}=4fWLiN{H4(ELT$v;9MlR!*DQ9+7vyK{s%qVCC!|XbVfn(Vx+cOsDStkhbz@ z!AJIfbQ7DfTiq~iWAk6N=cb!^l%T{8nzpmauWPKJTiDL!F;P7BkU={*K<2^PSD;&2 z>c>UHkI_z+)N#Q9+I@^}<57Z^MRl|VdpMaQl7mc@$|hTz!P}R0t=aX*A)8Im zl-UIY%^f3(cy>K@%V$HHGCMh)BA*RKI#oa$QkTK&nBi8BM&ppsrU+;FWz1nAq1pl! z`FOOrDHYD_fK(dVyc)D3n}en%gI6+Zo3lCxDVGB~nCSxS%9`UsD(qbpY4B$-gSRRH zMW{%k2*u#fr5U_8Sz2XvV=^rSuF2rt$GYZYA_==!R1&fy*JSWUBcO}qYzU%@MD0jy z|Hat;zsuJD-~&v*PW!p`1-J$HEO-m7n*JaCGV=tsl`et1fZu_6!fVO1NFuu*s4y46 zi{q`f&D6{Oxy+moNOd+6&cJOe=>l^efJ>a<5_2v@){02Ck+ayG1JICw%AlVaO_!Rp z0aha;x$RV1M@!6E1}O{W@QhMzUJE-W&Fql-L_|2eNga=mjm7$5@y@PW^f6Z&;C~u0 zcQ`TQeaVyDr3<^f1#@A=OJqvNvDd!Q(R>h0a{CL zw7#KO-|?|Td^Ek%oC&B+xl#LJ(gP1k#nzcK0I}PN$ZgvAs=O+MBng`aknD1jIJZZ} zh7xIXh6GnvxGpP99d}Z>CL(A91kIsV*q_m4-%$KyY^kXMQn@$M5|aY3RNXV}PmHpH zsxk?Hn!P{{HJ9BBXf-OD;yw#UuyywU!X6c2EE*R!cXcZ|ItuNVC0%njP;{ykvarDs zPk#)V+Q{X10dielvq7i4Z81)C826VSROD+DkXqVblGlP32cVds`0pWFh0i5Yb{f`ArbU$ zqy4byyHw3P0^oo`n)%%+WjleX@#M+a1pmVEi&L;o_OiuBF;*5E0A|Y(^3p{{pj=DG zq9dZ4!9U4c%8WphJJ!CVPu{u`e7RA#d#J4QKZip`ZBrJS*U85NHAZbq7ADjU=5Ne- z)aoYB#IugS9|C`K;VhQw$sk^b590VgkK9J|FX^v?6M#4Ab=vRY4d8LDTMNJ&Ur(bU z@+q+T-F9y6yeWe>x0*Xniphxc7>+U_5dis?dtIg<=)$chab}-Q1hL>@k)7y~6t`vY z9@niS<6@R%^{;W*6J>oc>u5O<_5;e~iQ|Gze$YaO31olFN(1q4%iz5)NI+y|S_z2h z*0d71DTBAg4iAoFo~Okf)i5pAb(!0lI@3ZqLU%4TNR482T?Q|lg?Un)f? zgLlwsn$k*1;e9iDbVH&dX8x6 zOewM|U?f&WRzNE==rke}h7($BO(}%S7I$R^-9rGPQ$!EBGUyJXvL>m>;u4@HgAN~R zn@@;D+2U8~mdEi0FwFrJ zdu@8X6^+)xEB4y7`%c=+@kO!)dqdjC#Pk?0Xg{;Ec@ID|#(~bgC8tC~%Yih+k@9AR#@T}ar!g&c7{XD=o~zSi%wO4QkzO9e;~Y_>nFnzg+yCu! z2b|5Od+8y13+;n7zzOj3c`rRfp9!yjz6@RgelvXscm{q1d;xq8tO4JmKY%kqzl6QP zzr!1W*J=yEM_^E^*4Ap^^$zw4c53^yn_&NNKpTO#fA54B1)i!ssJ#fz6uchJ5+!ft~R&ur>S!e2NggNS~uGf}W)k_7uYU27QZuy?z7CM{d`L;I-e=`hC#f zJgC1I{0_beb}HWo=MO&xul#;P|319&`z!rV7otZw4<2}%a)`F_U=s#$+Qx&;JZQ(@ z7~R5y4jyd9;5hB%!8RUrVK7X$^I!)LuE$`6cJp8-4|ZWNN_X>M4-fWYkf1$0xPb@z zFc_ozd2oOS2QfH75Aone9vsFXNpIr85gy!(L5d#b!7V(v6@xUrjRz4P+>XIGjq;$E z2Yncvr2RaI@n8UhQ*@9ALp+FMaGD=YK@x*IX^IDF z9*kpf7d^>?Q#?40!QFI%2Y2w`P7Lm$ck$qE9^8Y$z4Trl+{Xj6NY^xSAI*qxQiS)j z(4-HD@QetjSO_obitwo-d>RWU>C;8{3=uw)h4<5EiSXGXe2|3?(C3KoxgvZX3(wH! zi|_>^d?5>`=!-=7ViCTCg-@X`#rgkSaw~z>^nkue`z`G59oA;T%>NO%{R4NE;RV1q z0QlVgZO`C^#2p9j6g`%=kwTdhA%fSGc1s3bjCAa|6FbPcF0eSDBC4>G)fY$EmvuHU8g?G|6WY7~yQ~Moa9LXX?p|hw~WD-DC zT{q#7HcQ488FWMfXb!;?g>uHrGb4aj9-6RaKpZ>ey%}^v(sT55!4X3dK^;~g2e4kU zHMTc%oHG=HskqKTO%YZ_ax=U>a|{@EA1W|J%53FhwLODwP<9+RW$TvNUG3E$N~mNM zln4mf>%;9Cbe95*Z0+Y@WLFMPMq4t2z^G$Sp1Fq1ST0$bGU!wVR@x#{VnQkAGD>FT za!Nq3{m&-X6aBq#^QTSwyY_ZC<7G_8NllX#E6rSo2?RQrVk*Gfe( zrm_`C^CaPvQj6J?QhhdrQHC>kjlZGoURJGbpiGd}Z#$aN9L?b6{iE@Fgq+@;iEWHk zG?%Mqfs#kfGFOc1~3_1e<`doQL`aC&n&Y)X>=B~RuvxCIBGO;~_t^r_V&0CEX@pDxJ zoc|Y-M+p4)W%3gWr@G<%e?NUHto%Pqe-5+zdUyl;jP_3L2l_m{25$Wi>Q9Ar|Cj$c zzQ5gF5nHi42R}N>BkdxE5tk;|$q3Ien2xby)49fWdV+%;{Oo~_CfO=6&%}hL*a9&B z9EhelQr_aE<7~O=U0di$cGWv)Rivjl+|CCdt8lDi>-p2nV|t;MMJGZA-KR~XRnt2- zX08P7UX$L*TxL(JTcdZeX8@<$!P2`qdS1OMlH9{i`FIT|^j>C~xmPxIdt71KyN^R< zW?fLT+<@aWJ$X zv8QMF{Qr=6{}*2V_#Uj#p8{)umGo!yO>}_Hg_i*ix!YZV-#1UfWqIw$Ah};iT438( z>8B(n__oFibV0U7EPT!JJ>r`u=L+T`Gm?Z;WbG*{eXzvL&HUgbT+Y`HM9KZAK8c@) zGj`AtEjQct$=SfReHWRO6@(2;>aMn;12M8PD4h6ao8Ik{aO0nGkQLCA0|&y`$!4q$ z4lR@54nS+^B9oXkj^P#nbK^z3cJdmat!p8fEcw0VUONeX0~kS;xJr2_Nv)a$2LW2B zfn=Q0A+}4Z&}0#y)-({))eaOMG6^JISDuVwW?ZY(~$y5tZkD9 zV0HD7`&_9z+Ovl!pjhP$$hJwiw9nYM1an|{NabcEzOBvF8ns?+QhOu#0r&;%`ft>a=y$>!z@IPB{x2+ev7v=D zcfFubDK_AQ0?B06FZxsg$*QXKY0C|*Ma$Iy=+k*GJ(TZDBmK#(;y; z)9OCxv(_50*dq6f^kg@Zqqm{Y7U&}JLg){!Hoy=|9>Dg*7kjx*>d@!Z8qnjD2ZSI6 zu%9cig&YO2pBFT=HjSJ?G1Q|z@|X~Pex(6MV{%3$?uqjPfg_Ui#Cc(bp>=3v%AJsX z+KIlX%FuQIibqlk){6y}M`8-rOL$#+iaR-e28+Iw*OaGtBqcCjCNMmb5g0G8Gqj@` zc`7CmFMK?VzM|gHqJS^boDRt=`TBn|(ccEIfBZ>%KUnPR!0Yd8!Q*ck`7U_{*_^L2 z-!ci8t+b=@Y0D@(qd2UKGnyu#-;7pN2WZ4w=0s80jDCYLwegMmk354nQ$`V z2#)CztUu*xzb%t+Ax!Jom9LG+4CRnz>m;~+(mMB$Gai|eO*&VWBz)^6IEP|PJTfGa zkcn4zBz)8VZ|^$5>ng7F%)CoUqZuO?WIsukWw}ePLKq`#V}!AdZH#fi7?o#GEL+Bs z!6pge<=z)U@4cDcOz(k&-g^r*p@xLbCQEj+q-=Jx|Cu@W-nr#HDfzN&_&)jLs zlUwBs3DYGna^bE@En3l+G2JhGZ!%5)hyCwGnW^d{b)u@1pW(i*RgM?G$BLkkwDT=C z9!z&fLpyYpQ@Gr|*)3Z}S_KU-JP6dgcn_>5%@C*1P#0j$2;r9`NM@#KE?xzzX|u%1 z`~{<-4T;Sl5F>W|>MWVu@#r$mtzk~qG|9;=FV0!#;@PmOn;}jnMU!kuP2@J)#RFnm z>7B%SrdknO>M|bZ&31d4?T%nEtaMQ^tb4kcJzP9ErXlqtDnU^hRFHH52fBE7td_Qk z6S+7gO`WY`5na~IY$kkDcXY5n(8c3qEtm_~t6(l@Z-V!Cvk<&+g*cIl+^bY7dT%0I zT|8%2EnVUSzY=<%p6#mW)9lyk;_U81}lM4uU+U4!-hwv&=0rrpp@`&4Pn5+6>+DMx*el)bRowjR85i#i(>D zD;&e##Mro8!+Z0t4s1=tX(TrO9z@0`gz$-ryvuBe&WOsg2<~Qrs8oyK9&`pE)sv0W5s*_3_ZV(W6W@;rdn-mC5H|8m~{R^hW{OK=|q2vPsTds&5E3it?KML z8m?>Lt%>~F`6+E=@!#30?T5t^Bb@Sv62u7lyG}fwb;|2X5Q)cjafT072-mx&buCQx zSL2xw-u8-HV2WNPVXD`*TK^Ar?s#E~=gQ?Zl5E_4Pk*Lk;bq|3GN-&Ef-+APann&= z8%Yn}(5)Hn3~Z1adOAAEwN7Wp8id5Q52Ys5JGIS9uR4M^PvHX6UXA#xS5eSz#-c1G zr&w{~G^ch+ER#NLRmBOlPVKZ9U+P#YPMYM@&Wlrat?Hpj=|v7#gg4r$ZHV#M1rB#n z;`mWc?UWLvLEZddq*Gg0g3v66#1D6H1`d^$!$4SL4jgAE1U^<)4sr&Lu`#|MnZp7Z z>_@0&q*F7=Z~4Zvq3H(g9o;RhyK%)h{*ZZmrNk+8YjJ2N4(3v7X2 zKs3`KpWTx=j$9%Rbjv337+E&$xj5X z%EpDyadys6z$?6=@%}I(KOSM68@h9yt8mlZmTRZK^dFH1Tb>^Wzm^m5R07VU)^z(Y zhyXPrKNg-HC-DGKv>M9uW8jx^O6(y>_~c_iel+kEF??CR77i+FQUbwOgWuKpVHDxrq^_hVgXGAOsr;WkEv=RLa?sV5 zrpxAcMcbK*h_?xFH3ok{fsaTYB>d{MN)!S5`> znH%qf`?~O!qnekAGsC4!+A74_85yPhU|Zxk(SP8xuM4L-T3G2N4GA+8d`^%iY_>Zc z!e%WJrPfe>d5Y^a!-eA=HKSRa5f(7|pgCGJ!rAJ~aN&kW^M_?h@`t5~^G|c(p@)t@ z(wCZ60pgrBF5LF0+Pe7KHK}in3lBb;GO8m{Mm4K&;kZXtjfpIsV>;~S)`6yRjyR2L zEWZ4<6bMoLC3kb-xkodzDj|jWMwU(?ikT<7@ZqDT%uL@k_-ZEDrn>Osqoy^9Q(58Y zM#WM$K)Yo|pRn&SEzKi=Jx`(Q_iK@gGpfso81=`2M&Ualj6QH(&?;|2M-H@K6v2 z|0-NKzo5^30cT3Xo>d?8v%-bf3r!O=9zzqfoc7#M7cMSTd9}E}>}L!C4J0ICf(uU; zs;)tt&$(Dbsg;?PI>Ci23(diKS~#oLt<+j~UvS_;`FzsALip8fB~`g_TtSz_=dnI| z1h+KNzpGq0tI$-eLqNp^*T2i%xu6;w2$&(z zq@g3bO>^OvLUVHdNlsQI&ROTq1}9E9&n2CbY@}SAr@@8$3bHIXhxLrjQI?_xV?{%5 zaN*rT^RlKXysT=1caqx#-bpjXIiza}BPpBUYIOGmSL0l9HfwA8NH|ei>hjR9ai(`R zx^P~nxmn*dZdN$SJ;jAzJ2jj*{|}K_A+w14Gf_^Ld&+&}{_-G10z5*l!#kkk+;`Pt@YBOFI z+^X(X58>_4OX^MazWSB=O#Klrf3}5X;h;Np( z;iDR!D<5O{IKwA2JWoE!@F|8*Yk0nVhT*depVROH`8>lH7`~|Ch4LkaFEe~a!;9pr z3}0jTx`r3apE7)d;hP#>BHv>8Hp6!`yi~r+@MjEvuHj|!J%;Zy{6NFa@3&!~f9m8u@#M z|H<%k4X>4dp#GnQi68!ZQoJYrfcRgN;qP;uJPj7W<`$p~-v63lsL})9f1A~v=)dpb z#omC-SiI0{&$yYZGf!qdgqSbrpD}NY>^$WC#=P;Y*nlS=;Plw2DSvDZkW)ut`4e+M zd^QV&j zTRzTMmK(!9v7Aw7?!>D7pYPkf!oLQLY*riSAyC;5y~^?a6Kt)S$y zjAA)9>bV^pRj$I7pnTpO#$UiTO)FNz3b+-r=Bh-2LA=A&Lr0+UA#@~7qk>0%a}Lh%Mu zu<#U$H%*mZLRpyh>K}^8x6G%%B&b2M3=ObvoBcoD|GWJoVVDw7|} z8*wWzUHnnpE8O1R0Zn%g!=eMX|CdEF3QllnQDrdx@+LslyYMwZxBr)g>IX>TLvn&? zh6{HSv~|8TXa;t{a2AwY#`&d&W4+cHE?iJ({)oOl3G+ua_L0Ot%{>JCSesuOD(&N$ z*;3ob5a(3)VB%~Nm!xW5T7%AGIPGT zxM-uZ6y2EBH!N9mgobZLXJ~u6@LHiou)4{1YpI+nVmBAAEL6i>QKawq%BM2dyYNRz z&FUg9g6ZR?Q(DTKWV~D=PeJuAoKtEhRyxkaEh54+)`hc5HEvpR%y&PQ4l+qKFL1S#oJiwE?4OunwGWhp&DW5TkqnvEVY3vBWjy*HL0;luXpi+ zRx?GE4Vj{Pn)Iy=1L^&Uw ztVSO*(Zvf_8ab{A74&h$WvS>VFK`bB%lw1I<*a1UYXM8&jahSdkcE_un|J`>(3%U} zRV(US9~CMy4wOmntTH_XfljUq6U+gN6q@bU5I1F zY1jk2Abu&oD#wX-IZt-Vv*aD}dHDzU|DJ*q!Gqz?<5+br_VBN%-@r1UGSdhzfcebj zna47}E;T$1cB+Re_(u!knBi|)f{G7!K-?v1MR;3P>5QqB9k{Tdi=eLcD|=dS#T)#j zUyb^H8xg#6Yf(beF?>__89H{DkE1O3?>#D=iaJ&5#z$OS=~R!4Xo)LDgp$JY6i(^L zC_sEr?o?MrNKg<=b~^N$crWWz*G8~i8*ml023O9wt!m4O_eVMv4QdVUad73o*4G{U zJrEuwix-DG6=M=)A^wHIPQ`EwA7Y-Xbt-12Vb+)xAr{+Bp-kW*V0!|Bb+@)RZ<_`?ppEw>_t39V~g z?wctHUA{xKZ3&DnTGnC}vq z>$>sC6-|l4dv)7CD8A?Jx?S~lRW5Gc*(o0?$-)Ie3bmyR;8xWC2a9I}{`(c;e~p%V z%bfJ&h3NUu$$v-0&)Kj5{4V(b#i`xDX1?lkiRk? zC4Jc;KV__661@`h*AenxOgR%vBl&CdC9d>qMzfjjB>$Ch5s{4hjma*3IVgW?8o*T% zsn%Lk{u>iSMB44fjhZnS$xjvc;rnuPp zkZKC4&F*)=(7aS!SE3xuZ7A3PfF7@9tyR93^=+0_q7qq_p(rkEmJ4?kYSuz=U9r!{ zf`BeAWp{TIq+rK$ZKRc0hCTMW(Cj=cC|nm7a;keY*s;vNHvAYC zI`%;|5OKG_e?LRy-(3;wqXjp9x8Usm6O~az@B(-N?19cw_oz42pEKoH z^B)3FL7OvAeBrS^t#Qa0H}}$7<>zL=Pwx%#4`w{SHquP3P9guu1d%>r6a2{xu%$)} z`Ddf*btPH`1{V2WOje?W64_tOsdaL&mH%ySG_H@7hWY}r{SPA}CGnAeHAm++=rKdT z$s{{RB}`T~_yR+WWQ;E@#3)l^H%3K;c9be(YV5{@P>aT4nuK_ZW-D_AvxPD;$BGfN zR<*Tx3%rH%Nh8^YNjRG{l5I``k0UlHjXMz&RudzGhUondGP2 zx2mt3HQmjeNfD}VFcs%iglao;Z*mJ|$7bhhdvpFbN@Sjf{omo4shO=1{qK9KLH=3Z zgu>QLnQGZ6w^~i(8+$Ey4Dm3&MUEvI)a}~T#!FD%#p3~%!CyS=}qC~m<5v-Vu z86Nqv!0G=@#VXet!u^W3tWIWlUuFJcU(YH?3jZ{Z+*{!EKfP`E>Zfq-<&mF@riEfl z@rGyV?w@RP^X8h|%iD&9u=**j*D64|klnqlA*8Wc6zfHPDbm?zdE_kvbMuW{5VOjr zu_NrLR!IyxOZcos;5jUXOHxbz|gGdyypf#y(jWk-1e3^GpB~h{-M-+i5mmr8t|f zm05Q3@K61Jpjadj{pSqC@ovm)r{003&as&FhavXQoAP$)VlOZl5rAJ5*NX3fwDi9* zUM2JxH$~hP=m7^w>v7g#*UWlOtM)2DT{A)4MWa%ipBz++pHS^(4c(nwDeE`1;w*&d zxHe2ewMP##A@5GkJ*4B}n}p#Wy{)XM6?am;ArXFM&98coTpQpP;113ar$IO@GC@hK ze06e`)9bxmnTfNHGqDm8rm@~oFyRpS4$>vgK^jHKt2}Z^01L$1ZN=gmRe6J%%GQLa zY!%AAL7;*K;_X4!L=xmV&MO0c!ZdN4pI7jz!_F{B9OsdH0HXJE4N!L0L1K+Zo&aEm ze4EZcNDq_P7QZ4ameJl$V1b?8ty-Tb zy{;9Dc$BvzDL+Zv!Yc8kYN@lDUOc1OjPl4K7Ll?l7AdRYlU91<-l}Sxu;*#NK769N z9=WNa+1Rg*)aNmlCdFn_>i@&UfgI367M}fa$<3e%4){U!Wg1#E!%R zwwnBW;AaNEyMw>tC)#EC{XjW9z=xDO<>%qWMtQD%<54Z0c!Si_(bI|78T-=v4wIO} zvuYglQ?Qk;f%#@2stm#?t<$&9?}PL*lde;C%+E#2P?Lg*9#0-}qw{;?Ia0I#dJtC! zCEgQO=I4O8p*S(UCmfca4Whc@M8os5Q1A(1RxKTLZ-M87K2J8k7bxm%3cN7vSZk3C z$v1(d+9ql1#4p6<%B?TY?+N6XbR+`F*XCyeKP$v@Xr*{2pFA8^1A~+E|jw_ms{@_m@*oYZv=r=BAXza-wjB+MuHEuDwk_-#T(3#`38{8 z2r~%(@=3bZ^T<1YT%koozA09FU z_?`2Uff*cP%#1ZOKMBvQ@Mx(uEsoaC`Fdc>;#k`M_uKy_2CyK3?Ii!C;dS!Q4F8Ma zUo^a4{x`$_Vfa@KZ%~4vWT-T}QDqo947bv7i`tsuHVn7b@Fw*YhF@j)H4Sf8UuXCY zhTCa)i`t&y4h(nH@K&`G!vPF;*6=npkl`*2%QU=Q4PrQ$;Sde)P(vB+%CKC+JJm3T z!x?5Zyh~LutYlcF;oWKk!)k^jHM~dFFdW6OR>OPMXoh1Lj@9r!HICtUh7&aWk($V` zj$yrq_p3<^Co`O);R9+a!)XksYxrZ;z;HK)jT-($?apup!#y;7P|akxC&MNUA5wcU zoW*dqh7YSb4EJU@SHnltJ`9@~?yKRWY97P=7|z%5F|~l`{zLNuYF7|du4Kw$S(VdbS&Z#WKOf4#FQlq;xRbjMD?DSM6BUnf< zbEzt$;@z~o4pPm0r$(4-(!056adb7K<1(3hr1^07kmPV?R5j-F+`~dG%qYgNJPT86 zn#a9SQ8b;a(dJ0--h?=f9mCj!NR1t9T)f;D6&qbnsBtw89^Z=l5*ftk#xq?as~Ft` zQ)@p;&s0q`=l|CV?Cl>EAHe^2om?(Yme(Tg*RSxhry5Q~4nqu|E8z=7;+@W@OjG8t z%y%*u;Jo1N|HG~x7hUF550=R|rkg5Yw3CvKBaYk}y*@hzW<7{lc|_N`by)DW;TxJ& zJpx3~s-M=1-x=#v&nit4dWimRjZ@u_P89pK9vg-@)#b`& z@qNw;_zI|=mWslb3bwXvDkqK`1XHU>t}K83a2O}0ADtgu=2ji;gYD?2rd6^ZpRUeaO%fT#k{way z3~lt|rW(!=+0qGDHo5kZcJSH+O%E)IS~noLxH&Y! zRz7EuC^?OkC>+a~>d`B6*b3a6C?ic)=_Mn~RFB@86Jw${K4Y>Fgqi4#1|v@JQs&hZ zeTik9M}8r3oOn+{$y5c$dE^q3=o7jTeL}AquLkruevGXelIl$NMuHNp>2B5}wmPxY z2{2sK(>?P4NUW?>K#=(C0ft%YJ@Wa8Gw8JSlCNZ(X^cl69_au+u4~^bt3aJ z?Eeo(^xxmX|NpUY$h@t5L>?taV^8n{pu>NQy(WlXv{F3C;!7O&SQ#=^)<4L}`lmJe zsCKcpCky2|>P0Aj$snlAw}BobEM33R>xpxpe-A;uANkR6ZulsOcWL zc_CIVj89;(av^+-&sy&_fE5k=$E3TDwfIP9KiOw$^rnLe5BMKoRqeAqT3J}S5-Qr% z8og=E&Dy4Mv${#{DIR%j!2|vWNZ~YA(m2Ui?~$h#6!iWSor~#P?@eZ=6jg~SP0g|1 zBrxGN>HfHe#F5a>tp9cV-*?4-V)s8z?u!VZC(3IO?ek;o04AsdF&=GMmu*Q)*RBW?af=Qd5i>P3ost zQ;kW=11UnOO{!^(PZ6x~(@n-{9YHmiOUn5y6|rblc~vvsQtHegcljOt5AEH zs(OfXjH72UnsbSxXPXxFa9pyQW3qfWMXcJJaVav@T$A4;Mxg)U{HamxW7_y5f!G8^ zGgAb@6BPTJGl@q{7O}e_HP5X7;s5`c%&D2hnJV>L!~poNYLtJH47Gbb~Ezjdxe6R}lOF&mx{;*>$w0$&Y+}yf7JbJ8%t-@n|ArfM&0Ww9(9v(R& zA_0Cqr3x@ed#m89G2J6CMVP=IOD{!<63p<(c@Zp69`%)vU%%P9cVxN#gDGi-NA8V? z-`72j-&Z}!Kg}a&M=(T6|Gt6dNzR$xzTiYiqDKPF<83FZx{nQXpXre+B$5#5?$h`+ zOAR*5rjPZ= znG$ByM8CK63&|Ti@}Pu5J(Qvt#-L)l!CdcX+VlV_=?__yi4 zaQ}C`*Gihq5YKQ8*f;D}@i{rG@6+qO7G~m46KCRf6k!_c9R?0Tt)3f0ujYAOO}pPf^AJ31z8&)Oh3v0NdRsIWIO_u!_zpH6A_x zCrZxGqU0PorNUbVN_c^LlJd03C|CZu%%f-gh_&$q=Nk^<{y@=YIa;>V2?>KSBWsf` z^XQE~NoGAmhGLRg{g5zS@*?j5NJgxUC#YN@buqD2+>k0==3H+HWWs9a@uKzMPnd=v zRU(nh^~i+)Nh(@yUs8$k5(%yU%Z>g28@T-&BzKc5aPxP)d`&6%^P*S3>y@W2KwRJ_ zaO?LM-1^mJ=HsOB7}yJ6mwEULy#)vs|HiVq=$xzOn{`!@`CKh9tES@X1+|bVihd}y zzcJn}vG7rgj9GT+Z=@D8Rne^IGpQwJ{o9Aus17ji(E8RT)KaD{n!VlM)Pcr^-0tjZ znYnq34HfDjPG-S87O3UsRx})<)Hlrq=u_O3^-!e_=0xT;iHDf0-uSqxR+tOBr&)qE zM%U+9N{Bd|5iBM|9ATQ(^AS05vpLma*8dAd<~8)@4oLDwt&$7GM*TETevCDt_ZvYbYClWu%S2HKAI=mixFuwNo| z6FfAyQerk>nCsDtC=7rvMm}uZz|fjXc+zDGTM{`bAxW&UAxx9Rsuz>g zLKGK6r70$3x<^h+uoZbBQm&xf$pQta=^nW)A=XGi0=!lEoO^((_t<&K3!&x#lK3o@ zgY@|xIWL*NTs$9dd+}CgDIIXb;Y#R}AWKdO=6mGbgygaQ0j*6+lvYUsnxwqB9yvY1 zhb`R&{Nk06G{z$@C^%7nE?&~Kl8x~WXX(LIM(5luWrzP-F`z-6= z4;YpTep0PRUP*|SHSiIZ0)7(p|1z;$WIn`+-kFH?F;0E19#bbFTFxN(fqYnAgj0Z= zoGVAljQCVME-n_EK;HYm^86~e-mf+e@`r(>)+UKM_ZXUA34$t{0DmKA*x%&Vm*o$2#DH;a zZ5#0)Y-&5($+G~ifOCWMD}bpZ%m(Pa##9F!Gr_L7Dt`!Su&x&m66N`Wsh*2cP0oMQ z5w(jTk5=d8R0Vbr{1>bwU{C9NPcfk};IV|9o$Quh4z?A2W}`q9xue;dU{d}dFfaTY znWyHLfoo|gE^|SnZ@6j0z}Zd69|*>|e*@#>{8Dg~tQ5|w2WPkIdN`wT`2)Znuw7yQ(0;!MWm7lUbLADM>d7lFE_1ohDT{;(FV3C1^VeGvSj_5UCo z@ZrB3VbA}G+zR%83uKQx72f}zg4O?D)vkB}uv(q19#+50RAibnJ(UD3XujVoY4Rh4o0u>yuL$8WCj8o~CG+LZqP}fnkv-mP z31#@QqQ&%db*$N+y_Tj&jP!d7TZL{zTo)@GgdTYWNFv2gBPL z-lpNl>Q;ugFuYmAkJL>Jw=ld>!w=OB46kQ+orX`S12ue7En|2P!{r)2rM}7VV1|ci z__SKV@KA;;HGD=L#;}E9tA@|2HiqpCa~eLURxv!B;Sm}>uR0ihi{WYwUr?P4*DzeG z;ftz^;W~y#YWR{`&#;?ekA^R+4GfQBc(jJEsErIaF+4`YSJk%}euv?AHGEAS%kX;) zkJIpVm1p>UhOUM`RUX3v!yjn)hB}_%4;h}I;hXA2h9@yRS;M!~DGX0#c$$W9tJ4{t z!SGBC-%)2VJe%P;8osN}Wq2OL^ELdLx`5$@3@_5~=jvjHmoU6k!}ru>3^y~pT*LR( z6%4Orc$J19sH+)X!|+;K|9?a5MeqO5&$MJl!?*XTYKHs>XMk1WUHAmttG8~oZ-JgR zFIp&G>wQ48HY>qgqs=<9JdW<`(c@X^69Cz2`?ZTH%pPB$A(2<|6V9Xmio|ye#Z$NLlk9^EsMnUnAI_`W^hB0{Q$P(Ww=azNxk9riAFlg>9(Lmxwo#HBww|bgWD0 z+g#WhLYFp+pZ29HO4mVif!u_UtiF`JbfISz$XUq3S>mU?7M27RDdqA4ISX02QoLTO zbdi03Y7y-z!vE6C3yNizDs4ixA&w8`JSF(vj855_)sHg)_YN42THspG33GEZML^7nBkm|MKQjf?6;Q;a^3)9NHNxT`%VeIQ<<-?+WGmNW_H(a_o5`9h^o`g?)vTC z)$=*dV2<7u^Eu8m*Lm-dO7@YiI?J4Xy~CMDaAz})vx(r&F-KqT#s!*#W_2#j|6ix` z|4TEo)Q2jssxbQ>3=iOc!dd^BeLCq+@32z~Om)D_5~4DqDsXK7~hj46;u8C(PVlYsoC@lDn+^Q@0c?>)Vd#I4XB&VLQ&C_bN(cU|8ZSNJEz83=S%g zYrNdDziqVhYpJB}D+}Z+kCxPZtsJWb#U#gDkSPT9{~gKy?~|DmGIKIgJ&n7+`6?@a zBYz~1$4$UM#QDBlv={LMTv?zOSMXN!Aq_CN@}k{^Uo`yG*Y>*=YCzODM|{Agh+nT+ zN*fdzKC##R-3lX_nLl3|Gk>N8^W*}(y~3XD15z)I6Y1J07kmCN/^cZD}@@3X?u z%RWn8Mqrzwef&=?(Az6wWMz|#tZIyLVxba@uuObk57d#s0e*ERSSk$5d#t2&;b>_{ zAHlzeoLC?)YRKh1RxifFy4ftF3*=A@#*FXr2li$8TG_;ng<&AZ%bcIHO7ZJXOD~`h zCK^|vS^qAyu|OWzh?})b<7O3;+*1nVdJQjgeol&}vC^kb@--EPf^X(R@iSlN#6_&F zwMP2p8@Q*Kt{KdR={rSe<2= zDVYN^N5fCpLzz#+Yp@Nv6gP)pFa6IfP(ESZXfy4b0jRqf$2Awh-DOropHPiN5Ou%MhN&%8 zU2Gl-73&1*62|-DV-^MKQe#*a@2~1IV+ohi_0?uZu}EuFP?sB2%CMxaFfU8ehdOm7 zV_9Z&AXHbG8b}?M)zzkiAMgi^58LV*#Zk#_R`ROJt>SlBM`Y~rxgz6Ti;+%?5 z-D+-!e?i%q!GP^;)NM5XZztZT_!HNYLV}0=@w-hUm$l1I8IKs0bjc)!`uS7Pk{B@ z$0eJVr6;vL#4QhPv$$U77ACNyl1zJa{3pPN=!dL1k71U+ zv=*cBYgB>!CJ-qrX_1_1AN7K)LVV9>zVrq9#~0xHdmq1eo3gocmG>0{0_=nrbMj>#JXwhDs7fN8lV>fS z({#X`>;X-C?KdY|S(3OiJF2pyy)xT@M-7ML?bCvV2V@s4-EY6_{)?OEH!WVCoi}HB zwrS}B3!4`}>ijti4j7xQq}AWbRIa59ninmdlU+P#?>UR-ESNQCNw%_OL(dWVu@z@k z3jyT44rM!{W$ocPWRCcfxt@+Sxgd9+q%wOH9e=m1A5}lO*2Yp;&=5JLu0F)pe)ISx zTbHewt3=0IygcYWvJ?I~Rziy|{hKSYNX4$KD_L94DfsZt_s1Wme=GpquND&g}#Q10HRqEgM@p!RLb)H`H{8?7EZi;?mY8AbG*xXubyZEH7U0t2Q z2dnL$|Nrp=M!&@V8u+r*0Gi>@T zwop&OjSNGMzj!pU{We2L9P!M`!3j)t+0`vY``U6x(y+f}Nb9Wqt~x+qLDyd5Cyd z>nD*pLU&hNM@uK!8i;d8IMXU*`?p|R(1qK6?PyTLuC?oO>p5!mw}v^>2Bs6OM_{~; zVNOl8kJjeKn{1=wT%}Vpt~i?9hqexJYRaP|aD?9jw}{ $DB_CACHE_DIR/bok_choy_data.json - # mysqldump -u root --no-data --skip-comments --skip-dump-date edxtest > $DB_CACHE_DIR/bok_choy_schema.sql + ./manage.py lms --settings bok_choy dumpdata > $DB_CACHE_DIR/bok_choy_data.json + # dump_data does not dump the django_migrations table so we do it separately. + mysqldump -u root --no-create-info edxtest django_migrations > $DB_CACHE_DIR/bok_choy_migrations_data.sql + mysqldump -u root --no-data --skip-comments --skip-dump-date edxtest > $DB_CACHE_DIR/bok_choy_schema.sql fi From ceaff54fcb7c88cf1e754c5a9f2bab7a7a49b997 Mon Sep 17 00:00:00 2001 From: Brian Beggs Date: Wed, 18 Nov 2015 13:53:53 -0500 Subject: [PATCH 19/87] updated edx-organizations with django 1.8 release tag --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 851cbfb875ca..920675110b76 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -57,7 +57,7 @@ git+https://github.com/edx/edx-lint.git@v0.3.2#egg=edx_lint==0.3.2 -e git+https://github.com/edx-solutions/xblock-google-drive.git@138e6fa0bf3a2013e904a085b9fed77dab7f3f21#egg=xblock-google-drive -e git+https://github.com/edx/edx-reverification-block.git@ned/upgrade-django-1.8#egg=edx-reverification-block==0.0.5 -e git+https://github.com/edx/edx-user-state-client.git@30c0ad4b9f57f8d48d6943eb585ec8a9205f4469#egg=edx-user-state-client -git+https://github.com/edx/edx-organizations.git@ned/django-18#egg=edx-organizations==0.1.7 +git+https://github.com/edx/edx-organizations.git@release-2015-11-17#egg=edx-organizations==0.1.7 git+https://github.com/edx/edx-proctoring.git@django1.8-upgrade#egg=edx-proctoring==0.11.2 # Third Party XBlocks From e3bb5137ea4ae1dce2f5b3cd8565cfde54d455b5 Mon Sep 17 00:00:00 2001 From: John Eskew Date: Wed, 18 Nov 2015 13:57:00 -0500 Subject: [PATCH 20/87] django-oauth2-provider --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 920675110b76..6f34a64f06d7 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -10,7 +10,7 @@ # Third-party: -e git+https://github.com/cyberdelia/django-pipeline.git@1.5.3#egg=django-pipeline git+https://github.com/edx/django-wiki.git@ned/dj18#egg=django-wiki==0.0.4 --e git+https://github.com/edx/django-oauth2-provider.git@will/django-1.8-upgrade#egg=django-oauth2-provider==0.2.7-fork-edx-6 +-e git+https://github.com/edx/django-oauth2-provider.git@0.2.7-fork-edx-6#egg=django-oauth2-provider git+https://github.com/edx/django-openid-auth.git@django1.8-upgrade#egg=django-openid-auth==0.8 -e git+https://github.com/edx/django-rest-framework-oauth.git@f0b503fda8c254a38f97fef802ded4f5fe367f7a#egg=djangorestframework-oauth==1.0.1 git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=MongoDBProxy==0.1.0 From 8594896621b2065e52dc4b7bd0e4cabaed84d53c Mon Sep 17 00:00:00 2001 From: Brian Beggs Date: Wed, 18 Nov 2015 14:12:25 -0500 Subject: [PATCH 21/87] updated edx-reverification tag --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 6f34a64f06d7..e3d57be26b16 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -55,7 +55,7 @@ git+https://github.com/edx/edx-val.git@ammar/upgrade-django-1.8#egg=edxval==0.0. git+https://github.com/edx/edx-lint.git@v0.3.2#egg=edx_lint==0.3.2 -e git+https://github.com/edx/xblock-utils.git@213a97a50276d6a2504d8133650b2930ead357a0#egg=xblock-utils -e git+https://github.com/edx-solutions/xblock-google-drive.git@138e6fa0bf3a2013e904a085b9fed77dab7f3f21#egg=xblock-google-drive --e git+https://github.com/edx/edx-reverification-block.git@ned/upgrade-django-1.8#egg=edx-reverification-block==0.0.5 +-e git+https://github.com/edx/edx-reverification-block.git@0.0.5#egg=edx-reverification-block==0.0.5 -e git+https://github.com/edx/edx-user-state-client.git@30c0ad4b9f57f8d48d6943eb585ec8a9205f4469#egg=edx-user-state-client git+https://github.com/edx/edx-organizations.git@release-2015-11-17#egg=edx-organizations==0.1.7 git+https://github.com/edx/edx-proctoring.git@django1.8-upgrade#egg=edx-proctoring==0.11.2 From 41e9fd187b3afe65110d43d748d9c92ea0c0aef0 Mon Sep 17 00:00:00 2001 From: John Eskew Date: Wed, 18 Nov 2015 14:16:52 -0500 Subject: [PATCH 22/87] django-oauth-provider take 2 --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index e3d57be26b16..b3918d305852 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -10,7 +10,7 @@ # Third-party: -e git+https://github.com/cyberdelia/django-pipeline.git@1.5.3#egg=django-pipeline git+https://github.com/edx/django-wiki.git@ned/dj18#egg=django-wiki==0.0.4 --e git+https://github.com/edx/django-oauth2-provider.git@0.2.7-fork-edx-6#egg=django-oauth2-provider +-e git+https://github.com/edx/django-oauth2-provider.git@0.2.7-fork-edx-7#egg=django-oauth2-provider git+https://github.com/edx/django-openid-auth.git@django1.8-upgrade#egg=django-openid-auth==0.8 -e git+https://github.com/edx/django-rest-framework-oauth.git@f0b503fda8c254a38f97fef802ded4f5fe367f7a#egg=djangorestframework-oauth==1.0.1 git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=MongoDBProxy==0.1.0 From 647c1257dd36be7052e75ba889449f600b654042 Mon Sep 17 00:00:00 2001 From: Brian Beggs Date: Wed, 18 Nov 2015 14:31:25 -0500 Subject: [PATCH 23/87] updated edx-milestones to tag release-2015-11-17 --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index b3918d305852..44957772eeed 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -51,7 +51,7 @@ git+https://github.com/edx/edx-val.git@ammar/upgrade-django-1.8#egg=edxval==0.0. -e git+https://github.com/pmitros/RecommenderXBlock.git@518234bc354edbfc2651b9e534ddb54f96080779#egg=recommender-xblock -e git+https://github.com/pmitros/RateXBlock.git@367e19c0f6eac8a5f002fd0f1559555f8e74bfff#egg=rate-xblock -e git+https://github.com/edx/edx-search.git@ammar/upgrade-django-1.8#egg=edx-search==0.1.1 --e git+https://github.com/edx/edx-milestones.git@django1.8-upgrade#egg=edx-milestones==0.1.5 +-e git+https://github.com/edx/edx-milestones.git@release-2015-11-17#egg=edx-milestones==0.1.5 git+https://github.com/edx/edx-lint.git@v0.3.2#egg=edx_lint==0.3.2 -e git+https://github.com/edx/xblock-utils.git@213a97a50276d6a2504d8133650b2930ead357a0#egg=xblock-utils -e git+https://github.com/edx-solutions/xblock-google-drive.git@138e6fa0bf3a2013e904a085b9fed77dab7f3f21#egg=xblock-google-drive From ecd0b5f24467bfb27f71f8e392609211ca210053 Mon Sep 17 00:00:00 2001 From: Brian Beggs Date: Wed, 18 Nov 2015 14:41:32 -0500 Subject: [PATCH 24/87] set tag for edx-search --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 44957772eeed..31fcb9800b93 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -50,7 +50,7 @@ git+https://github.com/edx/edx-oauth2-provider.git@django1.8-upgrade#egg=edx-oau git+https://github.com/edx/edx-val.git@ammar/upgrade-django-1.8#egg=edxval==0.0.8 -e git+https://github.com/pmitros/RecommenderXBlock.git@518234bc354edbfc2651b9e534ddb54f96080779#egg=recommender-xblock -e git+https://github.com/pmitros/RateXBlock.git@367e19c0f6eac8a5f002fd0f1559555f8e74bfff#egg=rate-xblock --e git+https://github.com/edx/edx-search.git@ammar/upgrade-django-1.8#egg=edx-search==0.1.1 +-e git+https://github.com/edx/edx-search.git@release-2015-11-17#egg=edx-search==0.1.1 -e git+https://github.com/edx/edx-milestones.git@release-2015-11-17#egg=edx-milestones==0.1.5 git+https://github.com/edx/edx-lint.git@v0.3.2#egg=edx_lint==0.3.2 -e git+https://github.com/edx/xblock-utils.git@213a97a50276d6a2504d8133650b2930ead357a0#egg=xblock-utils From ece43db41133bd3c4e6b2a4ca4fd16836cf264bd Mon Sep 17 00:00:00 2001 From: Brian Beggs Date: Wed, 18 Nov 2015 14:55:43 -0500 Subject: [PATCH 25/87] Updated edx-oauth2-provider tag --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 31fcb9800b93..fd928f1b3b64 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -46,7 +46,7 @@ git+https://github.com/edx/lettuce.git@django1.8/upgrade#egg=lettuce==0.2.20.002 -e git+https://github.com/edx/opaque-keys.git@27dc382ea587483b1e3889a3d19cbd90b9023a06#egg=opaque-keys git+https://github.com/edx/ease.git@release-2015-07-14#egg=ease==0.1.3 git+https://github.com/edx/i18n-tools.git@v0.1.3#egg=i18n-tools==v0.1.3 -git+https://github.com/edx/edx-oauth2-provider.git@django1.8-upgrade#egg=edx-oauth2-provider==0.5.8 +git+https://github.com/edx/edx-oauth2-provider.git@0.5.8#egg=edx-oauth2-provider==0.5.8 git+https://github.com/edx/edx-val.git@ammar/upgrade-django-1.8#egg=edxval==0.0.8 -e git+https://github.com/pmitros/RecommenderXBlock.git@518234bc354edbfc2651b9e534ddb54f96080779#egg=recommender-xblock -e git+https://github.com/pmitros/RateXBlock.git@367e19c0f6eac8a5f002fd0f1559555f8e74bfff#egg=rate-xblock From 2977419fa6d5d66aa4e3d5cd673ce1e3c717e32e Mon Sep 17 00:00:00 2001 From: Brian Beggs Date: Wed, 18 Nov 2015 14:57:35 -0500 Subject: [PATCH 26/87] Updated edx-val tag --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index fd928f1b3b64..bab09b12acd4 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -47,7 +47,7 @@ git+https://github.com/edx/lettuce.git@django1.8/upgrade#egg=lettuce==0.2.20.002 git+https://github.com/edx/ease.git@release-2015-07-14#egg=ease==0.1.3 git+https://github.com/edx/i18n-tools.git@v0.1.3#egg=i18n-tools==v0.1.3 git+https://github.com/edx/edx-oauth2-provider.git@0.5.8#egg=edx-oauth2-provider==0.5.8 -git+https://github.com/edx/edx-val.git@ammar/upgrade-django-1.8#egg=edxval==0.0.8 +git+https://github.com/edx/edx-val.git@0.0.8#egg=edxval==0.0.8 -e git+https://github.com/pmitros/RecommenderXBlock.git@518234bc354edbfc2651b9e534ddb54f96080779#egg=recommender-xblock -e git+https://github.com/pmitros/RateXBlock.git@367e19c0f6eac8a5f002fd0f1559555f8e74bfff#egg=rate-xblock -e git+https://github.com/edx/edx-search.git@release-2015-11-17#egg=edx-search==0.1.1 From 73bf93eefd33c72818505dab2e96f58bfc0fc18c Mon Sep 17 00:00:00 2001 From: John Eskew Date: Wed, 18 Nov 2015 15:26:50 -0500 Subject: [PATCH 27/87] django-openid-auth --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index bab09b12acd4..f9619142c13d 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -11,7 +11,7 @@ -e git+https://github.com/cyberdelia/django-pipeline.git@1.5.3#egg=django-pipeline git+https://github.com/edx/django-wiki.git@ned/dj18#egg=django-wiki==0.0.4 -e git+https://github.com/edx/django-oauth2-provider.git@0.2.7-fork-edx-7#egg=django-oauth2-provider -git+https://github.com/edx/django-openid-auth.git@django1.8-upgrade#egg=django-openid-auth==0.8 +git+https://github.com/edx/django-openid-auth.git@0.8#egg=django-openid-auth==0.8 -e git+https://github.com/edx/django-rest-framework-oauth.git@f0b503fda8c254a38f97fef802ded4f5fe367f7a#egg=djangorestframework-oauth==1.0.1 git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=MongoDBProxy==0.1.0 git+https://github.com/edx/nltk.git@2.0.6#egg=nltk==2.0.6 From 2408c0f0c7d7ac944930c3f69215136dc3ebac9e Mon Sep 17 00:00:00 2001 From: John Eskew Date: Wed, 18 Nov 2015 15:50:01 -0500 Subject: [PATCH 28/87] django-pyfs --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index f9619142c13d..7f4c6ff32d20 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -19,7 +19,7 @@ git+https://github.com/edx/nltk.git@2.0.6#egg=nltk==2.0.6 -e git+https://github.com/eventbrite/zendesk.git@d53fe0e81b623f084e91776bcf6369f8b7b63879#egg=zendesk -e git+https://github.com/appliedsec/pygeoip.git@95e69341cebf5a6a9fbf7c4f5439d458898bdc3b#egg=pygeoip -e git+https://github.com/jazkarta/edx-jsme.git@c5bfa5d361d6685d8c643838fc0055c25f8b7999#egg=edx-jsme -git+https://github.com/edx/django-pyfs.git@ned/update-django-18#egg=django-pyfs==1.0.3 +git+https://github.com/edx/django-pyfs.git@1.0.3#egg=django-pyfs==1.0.3 git+https://github.com/mitocw/django-cas.git@60a5b8e5a62e63e0d5d224a87f0b489201a0c695#egg=django-cas -e git+https://github.com/dgrtwo/ParsePy.git@7949b9f754d1445eff8e8f20d0e967b9a6420639#egg=parse_rest # Master pyfs has a bug working with VPC auth. This is a fix. We should switch From a160f107979a55d6964abd5488cfcd84a03eb8d8 Mon Sep 17 00:00:00 2001 From: John Eskew Date: Wed, 18 Nov 2015 15:54:31 -0500 Subject: [PATCH 29/87] Add version back to django-oauth2-provider --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 7f4c6ff32d20..6c81d9e1ac8a 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -10,7 +10,7 @@ # Third-party: -e git+https://github.com/cyberdelia/django-pipeline.git@1.5.3#egg=django-pipeline git+https://github.com/edx/django-wiki.git@ned/dj18#egg=django-wiki==0.0.4 --e git+https://github.com/edx/django-oauth2-provider.git@0.2.7-fork-edx-7#egg=django-oauth2-provider +-e git+https://github.com/edx/django-oauth2-provider.git@0.2.7-fork-edx-7#egg=django-oauth2-provider==0.2.7-fork-edx-6 git+https://github.com/edx/django-openid-auth.git@0.8#egg=django-openid-auth==0.8 -e git+https://github.com/edx/django-rest-framework-oauth.git@f0b503fda8c254a38f97fef802ded4f5fe367f7a#egg=djangorestframework-oauth==1.0.1 git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=MongoDBProxy==0.1.0 From e662e869d62fcc62b161aa228574c9d5b9321b70 Mon Sep 17 00:00:00 2001 From: wajeeha-khalid Date: Fri, 13 Nov 2015 11:00:47 +0500 Subject: [PATCH 30/87] MA-1190; patch 'read' attribute for thread --- lms/djangoapps/discussion_api/api.py | 5 +-- lms/djangoapps/discussion_api/forms.py | 1 - lms/djangoapps/discussion_api/permissions.py | 13 +++++--- lms/djangoapps/discussion_api/serializers.py | 2 +- .../discussion_api/tests/test_api.py | 13 ++++---- .../discussion_api/tests/test_forms.py | 3 +- .../discussion_api/tests/test_permissions.py | 4 +-- .../discussion_api/tests/test_serializers.py | 8 +++-- .../discussion_api/tests/test_views.py | 25 ++++++++------- lms/djangoapps/discussion_api/views.py | 31 ++++++++++++------- lms/lib/comment_client/thread.py | 2 +- 11 files changed, 61 insertions(+), 46 deletions(-) diff --git a/lms/djangoapps/discussion_api/api.py b/lms/djangoapps/discussion_api/api.py index 2b3dc814058f..46213b53127c 100644 --- a/lms/djangoapps/discussion_api/api.py +++ b/lms/djangoapps/discussion_api/api.py @@ -342,7 +342,7 @@ def get_thread_list( return ret -def get_comment_list(request, thread_id, endorsed, page, page_size, mark_as_read=False): +def get_comment_list(request, thread_id, endorsed, page, page_size): """ Return the list of comments in the given thread. @@ -361,8 +361,6 @@ def get_comment_list(request, thread_id, endorsed, page, page_size, mark_as_read page_size: The number of comments to retrieve per page - mark_as_read: Marks the thread of the comment list as read. - Returns: A paginated result containing a list of comments; see @@ -375,7 +373,6 @@ def get_comment_list(request, thread_id, endorsed, page, page_size, mark_as_read retrieve_kwargs={ "recursive": False, "user_id": request.user.id, - "mark_as_read": mark_as_read, "response_skip": response_skip, "response_limit": page_size, } diff --git a/lms/djangoapps/discussion_api/forms.py b/lms/djangoapps/discussion_api/forms.py index c986663a3e4c..2bf779651ce4 100644 --- a/lms/djangoapps/discussion_api/forms.py +++ b/lms/djangoapps/discussion_api/forms.py @@ -109,7 +109,6 @@ class CommentListGetForm(_PaginationForm): # TODO: should we use something better here? This only accepts "True", # "False", "1", and "0" endorsed = NullBooleanField(required=False) - mark_as_read = BooleanField(required=False) class CommentActionsForm(Form): diff --git a/lms/djangoapps/discussion_api/permissions.py b/lms/djangoapps/discussion_api/permissions.py index 4385c070a39f..5d3fa7990eac 100644 --- a/lms/djangoapps/discussion_api/permissions.py +++ b/lms/djangoapps/discussion_api/permissions.py @@ -57,11 +57,14 @@ def get_editable_fields(cc_content, context): Return the set of fields that the requester can edit on the given content """ - # no edits, except 'abuse_flagged' are allowed on closed threads + # For closed thread: + # no edits, except 'abuse_flagged' and 'read' are allowed for thread + # no edits, except 'abuse_flagged' is allowed for comment ret = {"abuse_flagged"} - if (cc_content["type"] == "thread" and cc_content["closed"]) or ( - cc_content["type"] == "comment" and context["thread"]["closed"] - ): + if cc_content["type"] == "thread" and cc_content["closed"]: + ret |= {"read"} + return ret + if cc_content["type"] == "comment" and context["thread"]["closed"]: return ret # Shared fields @@ -71,7 +74,7 @@ def get_editable_fields(cc_content, context): # Thread fields if cc_content["type"] == "thread": - ret |= {"following"} + ret |= {"following", "read"} if _is_author_or_privileged(cc_content, context): ret |= {"topic_id", "type", "title"} if context["is_requester_privileged"] and context["course"].is_cohorted: diff --git a/lms/djangoapps/discussion_api/serializers.py b/lms/djangoapps/discussion_api/serializers.py index 8cb2d5b479fe..7a53d1a713b3 100644 --- a/lms/djangoapps/discussion_api/serializers.py +++ b/lms/djangoapps/discussion_api/serializers.py @@ -195,7 +195,7 @@ class ThreadSerializer(_ContentSerializer): comment_list_url = serializers.SerializerMethodField() endorsed_comment_list_url = serializers.SerializerMethodField() non_endorsed_comment_list_url = serializers.SerializerMethodField() - read = serializers.BooleanField(read_only=True) + read = serializers.BooleanField(required=False) has_endorsed = serializers.BooleanField(read_only=True, source="endorsed") response_count = serializers.IntegerField(source="resp_total", read_only=True, required=False) diff --git a/lms/djangoapps/discussion_api/tests/test_api.py b/lms/djangoapps/discussion_api/tests/test_api.py index 0bd5968657c2..85b8a43f4399 100644 --- a/lms/djangoapps/discussion_api/tests/test_api.py +++ b/lms/djangoapps/discussion_api/tests/test_api.py @@ -649,7 +649,7 @@ def test_thread_content(self): "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_thread_id_0", "endorsed_comment_list_url": None, "non_endorsed_comment_list_url": None, - "editable_fields": ["abuse_flagged", "following", "voted"], + "editable_fields": ["abuse_flagged", "following", "read", "voted"], "has_endorsed": True, "read": True, }, @@ -682,7 +682,7 @@ def test_thread_content(self): "non_endorsed_comment_list_url": ( "http://testserver/api/discussion/v1/comments/?thread_id=test_thread_id_1&endorsed=False" ), - "editable_fields": ["abuse_flagged", "following", "voted"], + "editable_fields": ["abuse_flagged", "following", "read", "voted"], "has_endorsed": False, "read": False, }, @@ -1402,7 +1402,7 @@ def test_basic(self, mock_emit): "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_id", "endorsed_comment_list_url": None, "non_endorsed_comment_list_url": None, - "editable_fields": ["abuse_flagged", "following", "raw_body", "title", "topic_id", "type", "voted"], + "editable_fields": ["abuse_flagged", "following", "raw_body", "read", "title", "topic_id", "type", "voted"], 'read': False, 'has_endorsed': False, 'response_count': 0, @@ -1948,7 +1948,7 @@ def test_basic(self): "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_thread", "endorsed_comment_list_url": None, "non_endorsed_comment_list_url": None, - "editable_fields": ["abuse_flagged", "following", "raw_body", "title", "topic_id", "type", "voted"], + "editable_fields": ["abuse_flagged", "following", "raw_body", "read", "title", "topic_id", "type", "voted"], 'read': False, 'has_endorsed': False, 'response_count': 0 @@ -1967,6 +1967,7 @@ def test_basic(self): "anonymous_to_peers": ["False"], "closed": ["False"], "pinned": ["False"], + "read": ["False"], } ) @@ -2989,7 +2990,7 @@ def test_basic(self): "abuse_flagged": False, "voted": False, "vote_count": 0, - "editable_fields": ["abuse_flagged", "following", "raw_body", "title", "topic_id", "type", "voted"], + "editable_fields": ["abuse_flagged", "following", "raw_body", "read", "title", "topic_id", "type", "voted"], "course_id": unicode(self.course.id), "topic_id": "test_topic", "group_id": None, @@ -3029,7 +3030,7 @@ def test_nonauthor_enrolled_in_course(self): "abuse_flagged": False, "voted": False, "vote_count": 0, - "editable_fields": ["abuse_flagged", "following", "voted"], + "editable_fields": ["abuse_flagged", "following", "read", "voted"], "course_id": unicode(self.course.id), "topic_id": "test_topic", "group_id": None, diff --git a/lms/djangoapps/discussion_api/tests/test_forms.py b/lms/djangoapps/discussion_api/tests/test_forms.py index 28db7d9a9a94..ab09f0b9696d 100644 --- a/lms/djangoapps/discussion_api/tests/test_forms.py +++ b/lms/djangoapps/discussion_api/tests/test_forms.py @@ -156,8 +156,7 @@ def test_basic(self): "thread_id": "deadbeef", "endorsed": False, "page": 2, - "page_size": 13, - "mark_as_read": False + "page_size": 13 } ) diff --git a/lms/djangoapps/discussion_api/tests/test_permissions.py b/lms/djangoapps/discussion_api/tests/test_permissions.py index 78f0df9606bb..c272e763278a 100644 --- a/lms/djangoapps/discussion_api/tests/test_permissions.py +++ b/lms/djangoapps/discussion_api/tests/test_permissions.py @@ -41,7 +41,7 @@ def test_thread(self, is_privileged, is_cohorted): ) actual = get_initializable_thread_fields(context) expected = { - "abuse_flagged", "course_id", "following", "raw_body", "title", "topic_id", "type", "voted" + "abuse_flagged", "course_id", "following", "raw_body", "read", "title", "topic_id", "type", "voted" } if is_privileged and is_cohorted: expected |= {"group_id"} @@ -77,7 +77,7 @@ def test_thread(self, is_author, is_privileged, is_cohorted): is_cohorted=is_cohorted ) actual = get_editable_fields(thread, context) - expected = {"abuse_flagged", "following", "voted"} + expected = {"abuse_flagged", "following", "read", "voted"} if is_author or is_privileged: expected |= {"topic_id", "type", "title", "raw_body"} if is_privileged and is_cohorted: diff --git a/lms/djangoapps/discussion_api/tests/test_serializers.py b/lms/djangoapps/discussion_api/tests/test_serializers.py index b299d8981466..ae2c53e7b47b 100644 --- a/lms/djangoapps/discussion_api/tests/test_serializers.py +++ b/lms/djangoapps/discussion_api/tests/test_serializers.py @@ -208,7 +208,7 @@ def test_basic(self): "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_thread", "endorsed_comment_list_url": None, "non_endorsed_comment_list_url": None, - "editable_fields": ["abuse_flagged", "following", "voted"], + "editable_fields": ["abuse_flagged", "following", "read", "voted"], "read": False, "has_endorsed": False, } @@ -561,16 +561,19 @@ def test_update_empty(self): "closed": ["False"], "pinned": ["False"], "user_id": [str(self.user.id)], + "read": ["False"], } ) - def test_update_all(self): + @ddt.data(True, False) + def test_update_all(self, read): self.register_put_thread_response(self.existing_thread.attributes) data = { "topic_id": "edited_topic", "type": "question", "title": "Edited Title", "raw_body": "Edited body", + "read": read, } saved = self.save_and_reserialize(data, self.existing_thread) self.assertEqual( @@ -586,6 +589,7 @@ def test_update_all(self): "closed": ["False"], "pinned": ["False"], "user_id": [str(self.user.id)], + "read": [str(read)], } ) for key in data: diff --git a/lms/djangoapps/discussion_api/tests/test_views.py b/lms/djangoapps/discussion_api/tests/test_views.py index 35ab1925771c..536d86ad2cbc 100644 --- a/lms/djangoapps/discussion_api/tests/test_views.py +++ b/lms/djangoapps/discussion_api/tests/test_views.py @@ -301,7 +301,7 @@ def test_basic(self): "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_thread", "endorsed_comment_list_url": None, "non_endorsed_comment_list_url": None, - "editable_fields": ["abuse_flagged", "following", "voted"], + "editable_fields": ["abuse_flagged", "following", "read", "voted"], "read": False, "has_endorsed": False, }] @@ -524,7 +524,7 @@ def test_basic(self): "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_thread", "endorsed_comment_list_url": None, "non_endorsed_comment_list_url": None, - "editable_fields": ["abuse_flagged", "following", "raw_body", "title", "topic_id", "type", "voted"], + "editable_fields": ["abuse_flagged", "following", "raw_body", "read", "title", "topic_id", "type", "voted"], "read": False, "has_endorsed": False, "response_count": 0, @@ -619,7 +619,7 @@ def expected_response_data(self, overrides=None): def test_basic(self): self.register_get_user_response(self.user) - self.register_thread({"created_at": "Test Date", "updated_at": "Test Date"}) + self.register_thread({"created_at": "Test Created Date", "updated_at": "Test Updated Date"}) request_data = {"raw_body": "Edited body"} response = self.request_patch(request_data) self.assertEqual(response.status_code, 200) @@ -629,9 +629,11 @@ def test_basic(self): self.expected_response_data({ "raw_body": "Edited body", "rendered_body": "

Edited body

", - "editable_fields": ["abuse_flagged", "following", "raw_body", "title", "topic_id", "type", "voted"], - "created_at": "Test Date", - "updated_at": "Test Date", + "editable_fields": [ + "abuse_flagged", "following", "raw_body", "read", "title", "topic_id", "type", "voted" + ], + "created_at": "Test Created Date", + "updated_at": "Test Updated Date", }) ) self.assertEqual( @@ -647,6 +649,7 @@ def test_basic(self): "anonymous_to_peers": ["False"], "closed": ["False"], "pinned": ["False"], + "read": ["False"], } ) @@ -680,7 +683,7 @@ def test_closed_thread(self, field, value): self.expected_response_data({ "closed": True, "abuse_flagged": value, - "editable_fields": ["abuse_flagged"], + "editable_fields": ["abuse_flagged", "read"], }) ) @@ -1036,7 +1039,7 @@ def expected_response_data(self, overrides=None): def test_basic(self): self.register_thread() - self.register_comment({"created_at": "Test Date", "updated_at": "Test Date"}) + self.register_comment({"created_at": "Test Created Date", "updated_at": "Test Updated Date"}) request_data = {"raw_body": "Edited body"} response = self.request_patch(request_data) self.assertEqual(response.status_code, 200) @@ -1047,8 +1050,8 @@ def test_basic(self): "raw_body": "Edited body", "rendered_body": "

Edited body

", "editable_fields": ["abuse_flagged", "raw_body", "voted"], - "created_at": "Test Date", - "updated_at": "Test Date", + "created_at": "Test Created Date", + "updated_at": "Test Updated Date", }) ) self.assertEqual( @@ -1142,7 +1145,7 @@ def test_basic(self): "abuse_flagged": False, "voted": False, "vote_count": 0, - "editable_fields": ["abuse_flagged", "following", "raw_body", "title", "topic_id", "type", "voted"], + "editable_fields": ["abuse_flagged", "following", "raw_body", "read", "title", "topic_id", "type", "voted"], "course_id": unicode(self.course.id), "topic_id": "test_topic", "group_id": None, diff --git a/lms/djangoapps/discussion_api/views.py b/lms/djangoapps/discussion_api/views.py index 516f57686f4b..83ab5cac0f43 100644 --- a/lms/djangoapps/discussion_api/views.py +++ b/lms/djangoapps/discussion_api/views.py @@ -104,13 +104,15 @@ class ThreadViewSet(DeveloperErrorViewMixin, ViewSet): """ **Use Cases** - Retrieve the list of threads for a course, post a new thread, or modify - or delete an existing thread. + Retrieve the list of threads for a course, retrieve thread details, + post a new thread, or modify or delete an existing thread. **Example Requests**: GET /api/discussion/v1/threads/?course_id=ExampleX/Demo/2015 + GET /api/discussion/v1/threads/thread_id + POST /api/discussion/v1/threads { "course_id": "foo/bar/baz", @@ -126,7 +128,7 @@ class ThreadViewSet(DeveloperErrorViewMixin, ViewSet): DELETE /api/discussion/v1/threads/thread_id - **GET Parameters**: + **GET Thread List Parameters**: * course_id (required): The course to retrieve threads for @@ -176,13 +178,19 @@ class ThreadViewSet(DeveloperErrorViewMixin, ViewSet): **PATCH Parameters**: - topic_id, type, title, and raw_body are accepted with the same meaning + * abuse_flagged (optional): A boolean to mark thread as abusive + + * voted (optional): A boolean to vote for thread + + * read (optional): A boolean to mark thread as read + + * topic_id, type, title, and raw_body are accepted with the same meaning as in a POST request If "application/merge-patch+json" is not the specified content type, a 415 error is returned. - **GET Response Values**: + **GET Thread List Response Values**: * results: The list of threads; each item in the list has the same fields as the POST/PATCH response below @@ -195,6 +203,10 @@ class ThreadViewSet(DeveloperErrorViewMixin, ViewSet): parameter was rewritten in order to match threads (e.g. for spelling correction) + **GET Thread Details Response Values**: + + Same response fields as the POST/PATCH response below + **POST/PATCH response values**: * id: The id of the thread @@ -300,7 +312,8 @@ class CommentViewSet(DeveloperErrorViewMixin, ViewSet): """ **Use Cases** - Retrieve the list of comments in a thread, create a comment, or modify + Retrieve the list of comments in a thread, retrieve the list of + child comments for a response comment, create a comment, or modify or delete an existing comment. **Example Requests**: @@ -333,9 +346,6 @@ class CommentViewSet(DeveloperErrorViewMixin, ViewSet): * page_size: The number of items per page (default is 10, max is 100) - * mark_as_read: Will mark the thread of the comments as read. (default - is False) - **GET Child Comment List Parameters**: * comment_id (required): The comment to retrieve child comments for @@ -439,8 +449,7 @@ class docstring. form.cleaned_data["thread_id"], form.cleaned_data["endorsed"], form.cleaned_data["page"], - form.cleaned_data["page_size"], - form.cleaned_data["mark_as_read"] + form.cleaned_data["page_size"] ) ) diff --git a/lms/lib/comment_client/thread.py b/lms/lib/comment_client/thread.py index 2811f8975ad4..559ba35a3b6a 100644 --- a/lms/lib/comment_client/thread.py +++ b/lms/lib/comment_client/thread.py @@ -25,7 +25,7 @@ class Thread(models.Model): # updateable_fields are sent in PUT requests updatable_fields = [ - 'title', 'body', 'anonymous', 'anonymous_to_peers', 'course_id', + 'title', 'body', 'anonymous', 'anonymous_to_peers', 'course_id', 'read', 'closed', 'user_id', 'commentable_id', 'group_id', 'group_name', 'pinned', 'thread_type' ] From 2ab255a304afed06c14e9e894371ee6881b0000c Mon Sep 17 00:00:00 2001 From: Usman Khalid <2200617@gmail.com> Date: Thu, 19 Nov 2015 18:07:06 +0500 Subject: [PATCH 31/87] Tag event-tracking. --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 6c81d9e1ac8a..49f2a96b1bfe 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -38,7 +38,7 @@ git+https://github.com/edx/lettuce.git@django1.8/upgrade#egg=lettuce==0.2.20.002 -e git+https://github.com/edx/XBlock.git@django1.8-upgrade#egg=XBlock -e git+https://github.com/edx/codejail.git@6b17c33a89bef0ac510926b1d7fea2748b73aadd#egg=codejail -e git+https://github.com/edx/js-test-tool.git@v0.1.6#egg=js_test_tool --e git+https://github.com/edx/event-tracking.git@django1.8-upgrade#egg=event-tracking==0.2.1 +-e git+https://github.com/edx/event-tracking.git@0.2.1#egg=event-tracking==0.2.1 -e git+https://github.com/edx/django-splash.git@ammar/upgrade-to-django1.8#egg=django-splash==0.2 -e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock -e git+https://github.com/edx/edx-ora2.git@mzfr/django18-from-release#egg=ora2==0.2.2 From 6eda0f34107852d9d2710505ab9720278d2a3764 Mon Sep 17 00:00:00 2001 From: John Eskew Date: Thu, 19 Nov 2015 09:29:30 -0500 Subject: [PATCH 32/87] Change django-oauth2-provider to match version --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 49f2a96b1bfe..0972f0fe4b1f 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -10,7 +10,7 @@ # Third-party: -e git+https://github.com/cyberdelia/django-pipeline.git@1.5.3#egg=django-pipeline git+https://github.com/edx/django-wiki.git@ned/dj18#egg=django-wiki==0.0.4 --e git+https://github.com/edx/django-oauth2-provider.git@0.2.7-fork-edx-7#egg=django-oauth2-provider==0.2.7-fork-edx-6 +-e git+https://github.com/edx/django-oauth2-provider.git@0.2.7-fork-edx-6a#egg=django-oauth2-provider==0.2.7-fork-edx-6 git+https://github.com/edx/django-openid-auth.git@0.8#egg=django-openid-auth==0.8 -e git+https://github.com/edx/django-rest-framework-oauth.git@f0b503fda8c254a38f97fef802ded4f5fe367f7a#egg=djangorestframework-oauth==1.0.1 git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=MongoDBProxy==0.1.0 From 705bdaaace1b6e0a977b9be090aa38bd330b07df Mon Sep 17 00:00:00 2001 From: Brian Beggs Date: Thu, 19 Nov 2015 09:31:39 -0500 Subject: [PATCH 33/87] updated edx-proctoring tag --- requirements/edx/github.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 0972f0fe4b1f..a70f19844c1f 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -41,7 +41,7 @@ git+https://github.com/edx/lettuce.git@django1.8/upgrade#egg=lettuce==0.2.20.002 -e git+https://github.com/edx/event-tracking.git@0.2.1#egg=event-tracking==0.2.1 -e git+https://github.com/edx/django-splash.git@ammar/upgrade-to-django1.8#egg=django-splash==0.2 -e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock --e git+https://github.com/edx/edx-ora2.git@mzfr/django18-from-release#egg=ora2==0.2.2 +-e git+https://github.com/edx/edx-ora2.git@release-2015-11-17#egg=ora2==0.2.2 -e git+https://github.com/edx/edx-submissions.git@django-upgrade/1.8#egg=edx-submissions==0.1.2 -e git+https://github.com/edx/opaque-keys.git@27dc382ea587483b1e3889a3d19cbd90b9023a06#egg=opaque-keys git+https://github.com/edx/ease.git@release-2015-07-14#egg=ease==0.1.3 @@ -58,7 +58,7 @@ git+https://github.com/edx/edx-lint.git@v0.3.2#egg=edx_lint==0.3.2 -e git+https://github.com/edx/edx-reverification-block.git@0.0.5#egg=edx-reverification-block==0.0.5 -e git+https://github.com/edx/edx-user-state-client.git@30c0ad4b9f57f8d48d6943eb585ec8a9205f4469#egg=edx-user-state-client git+https://github.com/edx/edx-organizations.git@release-2015-11-17#egg=edx-organizations==0.1.7 -git+https://github.com/edx/edx-proctoring.git@django1.8-upgrade#egg=edx-proctoring==0.11.2 +git+https://github.com/edx/edx-proctoring.git@0.11.2#egg=edx-proctoring==0.11.2 # Third Party XBlocks -e git+https://github.com/mitodl/edx-sga@172a90fd2738f8142c10478356b2d9ed3e55334a#egg=edx-sga From 219a2083ad456ea4d0e730477af8a586f2d877b4 Mon Sep 17 00:00:00 2001 From: Usman Khalid <2200617@gmail.com> Date: Thu, 19 Nov 2015 19:32:05 +0500 Subject: [PATCH 34/87] Tag lettuce --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index a70f19844c1f..4df8011de83a 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -32,7 +32,7 @@ git+https://github.com/hmarr/django-debug-toolbar-mongo.git@b0686a76f1ce3532088c -e git+https://github.com/jazkarta/ccx-keys.git@e6b03704b1bb97c1d2f31301ecb4e3a687c536ea#egg=ccx-keys git+https://github.com/edx/rfc6266.git@v0.0.5-edx#egg=rfc6266==0.0.5-edx # Used for testing -git+https://github.com/edx/lettuce.git@django1.8/upgrade#egg=lettuce==0.2.20.002 +git+https://github.com/edx/lettuce.git@0.2.20.002#egg=lettuce==0.2.20.002 # Our libraries: -e git+https://github.com/edx/XBlock.git@django1.8-upgrade#egg=XBlock From 0eabdcbfdeeb4f9ebba1ee1ebfa8d5ce4e1e8826 Mon Sep 17 00:00:00 2001 From: Brian Beggs Date: Thu, 19 Nov 2015 10:24:55 -0500 Subject: [PATCH 35/87] reverting ora2 tag in github.txt --- requirements/edx/github.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 4df8011de83a..539c142949d0 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -25,7 +25,7 @@ git+https://github.com/mitocw/django-cas.git@60a5b8e5a62e63e0d5d224a87f0b489201a # Master pyfs has a bug working with VPC auth. This is a fix. We should switch # back to master when and if this fix is merged back. # fs==0.4.0 -git+https://github.com/pmitros/pyfs.git@96e1922348bfe6d99201b9512a9ed946c87b7e0b +git+https://github.com/pmitros/pyfs.git@96e1922348bfe6d99201b9512a9ed946c87b7e0band is # The officially released version of django-debug-toolbar-mongo doesn't support DJDT 1.x. This commit does. git+https://github.com/hmarr/django-debug-toolbar-mongo.git@b0686a76f1ce3532088c4aee6e76b9abe61cc808 # custom opaque-key implementations for ccx @@ -41,7 +41,7 @@ git+https://github.com/edx/lettuce.git@0.2.20.002#egg=lettuce==0.2.20.002 -e git+https://github.com/edx/event-tracking.git@0.2.1#egg=event-tracking==0.2.1 -e git+https://github.com/edx/django-splash.git@ammar/upgrade-to-django1.8#egg=django-splash==0.2 -e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock --e git+https://github.com/edx/edx-ora2.git@release-2015-11-17#egg=ora2==0.2.2 +-e git+https://github.com/edx/edx-ora2.git@mzfr/django18-from-release#egg=ora2==0.2.2 -e git+https://github.com/edx/edx-submissions.git@django-upgrade/1.8#egg=edx-submissions==0.1.2 -e git+https://github.com/edx/opaque-keys.git@27dc382ea587483b1e3889a3d19cbd90b9023a06#egg=opaque-keys git+https://github.com/edx/ease.git@release-2015-07-14#egg=ease==0.1.3 From 5b5cf7d3b029f59167e8f7ee00e8aa2c57da22db Mon Sep 17 00:00:00 2001 From: Adam Palay Date: Tue, 17 Nov 2015 10:47:50 -0500 Subject: [PATCH 36/87] Fix login redirect when user is logged out while answering a question (TNL-3789) --- .../acceptance/tests/lms/test_lms_problems.py | 94 ++++++++++++++++++- lms/static/js/ajax-error.js | 4 +- 2 files changed, 94 insertions(+), 4 deletions(-) diff --git a/common/test/acceptance/tests/lms/test_lms_problems.py b/common/test/acceptance/tests/lms/test_lms_problems.py index 789d0e63dfe7..5cb41bb0817b 100644 --- a/common/test/acceptance/tests/lms/test_lms_problems.py +++ b/common/test/acceptance/tests/lms/test_lms_problems.py @@ -10,6 +10,7 @@ from ...pages.studio.auto_auth import AutoAuthPage from ...pages.lms.courseware import CoursewarePage from ...pages.lms.problem import ProblemPage +from ...pages.lms.login_and_register import CombinedLoginAndRegisterPage from ...fixtures.course import CourseFixture, XBlockFixtureDesc from ..helpers import EventsTestMixin @@ -20,6 +21,7 @@ class ProblemsTest(UniqueCourseTest): """ USERNAME = "joe_student" EMAIL = "joe@example.com" + PASSWORD = "keep it secret; keep it safe." def setUp(self): super(ProblemsTest, self).setUp() @@ -42,8 +44,14 @@ def setUp(self): ).install() # Auto-auth register for the course. - AutoAuthPage(self.browser, username=self.USERNAME, email=self.EMAIL, - course_id=self.course_id, staff=False).visit() + AutoAuthPage( + self.browser, + username=self.USERNAME, + email=self.EMAIL, + password=self.PASSWORD, + course_id=self.course_id, + staff=False + ).visit() def get_problem(self): """ Subclasses should override this to complete the fixture """ @@ -319,3 +327,85 @@ def test_partial_credit(self): problem_page.fill_answer_numerical('-1') problem_page.click_check() self.assertTrue(problem_page.simpleprob_is_partially_correct()) + + +class LogoutDuringAnswering(ProblemsTest): + """ + Tests for the scenario where a user is logged out (their session expires + or is revoked) just before they click "check" on a problem. + """ + def get_problem(self): + """ + Create a problem. + """ + xml = dedent(""" + +

The answer is 1

+ + + + +
+ """) + return XBlockFixtureDesc('problem', 'TEST PROBLEM', data=xml) + + def log_user_out(self): + """ + Log the user out by deleting their session cookie. + """ + self.browser.delete_cookie('sessionid') + + def test_logout_after_click_redirect(self): + """ + 1) User goes to a problem page. + 2) User fills out an answer to the problem. + 3) User is logged out because their session id is invalidated or removed. + 4) User clicks "check", and sees a confirmation modal asking them to + re-authenticate, since they've just been logged out. + 5) User clicks "ok". + 6) User is redirected to the login page. + 7) User logs in. + 8) User is redirected back to the problem page they started out on. + 9) User is able to submit an answer + """ + self.courseware_page.visit() + problem_page = ProblemPage(self.browser) + self.assertEqual(problem_page.problem_name, 'TEST PROBLEM') + problem_page.fill_answer_numerical('1') + + self.log_user_out() + with problem_page.handle_alert(confirm=True): + problem_page.click_check() + + login_page = CombinedLoginAndRegisterPage(self.browser) + login_page.wait_for_page() + + login_page.login(self.EMAIL, self.PASSWORD) + + problem_page.wait_for_page() + self.assertEqual(problem_page.problem_name, 'TEST PROBLEM') + + problem_page.fill_answer_numerical('1') + problem_page.click_check() + self.assertTrue(problem_page.simpleprob_is_correct()) + + def test_logout_cancel_no_redirect(self): + """ + 1) User goes to a problem page. + 2) User fills out an answer to the problem. + 3) User is logged out because their session id is invalidated or removed. + 4) User clicks "check", and sees a confirmation modal asking them to + re-authenticate, since they've just been logged out. + 5) User clicks "cancel". + 6) User is not redirected to the login page. + """ + self.courseware_page.visit() + problem_page = ProblemPage(self.browser) + self.assertEqual(problem_page.problem_name, 'TEST PROBLEM') + problem_page.fill_answer_numerical('1') + self.log_user_out() + with problem_page.handle_alert(confirm=False): + problem_page.click_check() + + self.assertTrue(problem_page.is_browser_on_page()) + self.assertEqual(problem_page.problem_name, 'TEST PROBLEM') diff --git a/lms/static/js/ajax-error.js b/lms/static/js/ajax-error.js index 460d2511fe6d..6b29d4c24bb1 100644 --- a/lms/static/js/ajax-error.js +++ b/lms/static/js/ajax-error.js @@ -8,8 +8,8 @@ $(document).ajaxError(function (event, jXHR) { ); if (window.confirm(message)) { - var currentLocation = window.location.href; - window.location.href = '/login?next=' + currentLocation; + var currentLocation = window.location.pathname; + window.location.href = '/login?next=' + encodeURIComponent(currentLocation); }; } }); From 11a183855c502f895c751019f2fc70467661cef2 Mon Sep 17 00:00:00 2001 From: Muhammad Ammar Date: Thu, 19 Nov 2015 20:56:52 +0500 Subject: [PATCH 37/87] update submissions and ora2 versions --- requirements/edx/github.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 539c142949d0..f54fae0fcd0a 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -41,8 +41,8 @@ git+https://github.com/edx/lettuce.git@0.2.20.002#egg=lettuce==0.2.20.002 -e git+https://github.com/edx/event-tracking.git@0.2.1#egg=event-tracking==0.2.1 -e git+https://github.com/edx/django-splash.git@ammar/upgrade-to-django1.8#egg=django-splash==0.2 -e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock --e git+https://github.com/edx/edx-ora2.git@mzfr/django18-from-release#egg=ora2==0.2.2 --e git+https://github.com/edx/edx-submissions.git@django-upgrade/1.8#egg=edx-submissions==0.1.2 +-e git+https://github.com/edx/edx-ora2.git@0.2.2#egg=ora2==0.2.2 +-e git+https://github.com/edx/edx-submissions.git@0.1.2#egg=edx-submissions==0.1.2 -e git+https://github.com/edx/opaque-keys.git@27dc382ea587483b1e3889a3d19cbd90b9023a06#egg=opaque-keys git+https://github.com/edx/ease.git@release-2015-07-14#egg=ease==0.1.3 git+https://github.com/edx/i18n-tools.git@v0.1.3#egg=i18n-tools==v0.1.3 @@ -62,4 +62,4 @@ git+https://github.com/edx/edx-proctoring.git@0.11.2#egg=edx-proctoring==0.11.2 # Third Party XBlocks -e git+https://github.com/mitodl/edx-sga@172a90fd2738f8142c10478356b2d9ed3e55334a#egg=edx-sga --e git+https://github.com/open-craft/xblock-poll@e7a6c95c300e95c51e42bfd1eba70489c05a6527#egg=xblock-poll \ No newline at end of file +-e git+https://github.com/open-craft/xblock-poll@e7a6c95c300e95c51e42bfd1eba70489c05a6527#egg=xblock-poll From 66cbc6a6d107ce05d68e12cbe26a9347243d9528 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 19 Nov 2015 11:17:09 -0500 Subject: [PATCH 38/87] Update django-wiki reference --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index f54fae0fcd0a..f1b87937871d 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -9,7 +9,7 @@ # Third-party: -e git+https://github.com/cyberdelia/django-pipeline.git@1.5.3#egg=django-pipeline -git+https://github.com/edx/django-wiki.git@ned/dj18#egg=django-wiki==0.0.4 +git+https://github.com/edx/django-wiki.git@v0.0.4#egg=django-wiki==0.0.4 -e git+https://github.com/edx/django-oauth2-provider.git@0.2.7-fork-edx-6a#egg=django-oauth2-provider==0.2.7-fork-edx-6 git+https://github.com/edx/django-openid-auth.git@0.8#egg=django-openid-auth==0.8 -e git+https://github.com/edx/django-rest-framework-oauth.git@f0b503fda8c254a38f97fef802ded4f5fe367f7a#egg=djangorestframework-oauth==1.0.1 From 6a58a9c120dfe87112a02d30ff5529ce69b49098 Mon Sep 17 00:00:00 2001 From: John Eskew Date: Thu, 19 Nov 2015 11:16:30 -0500 Subject: [PATCH 39/87] edx-organizations --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index f1b87937871d..3cedd6a20af7 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -57,7 +57,7 @@ git+https://github.com/edx/edx-lint.git@v0.3.2#egg=edx_lint==0.3.2 -e git+https://github.com/edx-solutions/xblock-google-drive.git@138e6fa0bf3a2013e904a085b9fed77dab7f3f21#egg=xblock-google-drive -e git+https://github.com/edx/edx-reverification-block.git@0.0.5#egg=edx-reverification-block==0.0.5 -e git+https://github.com/edx/edx-user-state-client.git@30c0ad4b9f57f8d48d6943eb585ec8a9205f4469#egg=edx-user-state-client -git+https://github.com/edx/edx-organizations.git@release-2015-11-17#egg=edx-organizations==0.1.7 +git+https://github.com/edx/edx-organizations.git@release-2015-11-17-plus-django-18#egg=edx-organizations==0.1.7 git+https://github.com/edx/edx-proctoring.git@0.11.2#egg=edx-proctoring==0.11.2 # Third Party XBlocks From 698cea3f87d7a12f297af7723bcbf841c02a59ab Mon Sep 17 00:00:00 2001 From: John Eskew Date: Thu, 19 Nov 2015 11:27:07 -0500 Subject: [PATCH 40/87] Remove errant 'and is' --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 3cedd6a20af7..213bc69ce27b 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -25,7 +25,7 @@ git+https://github.com/mitocw/django-cas.git@60a5b8e5a62e63e0d5d224a87f0b489201a # Master pyfs has a bug working with VPC auth. This is a fix. We should switch # back to master when and if this fix is merged back. # fs==0.4.0 -git+https://github.com/pmitros/pyfs.git@96e1922348bfe6d99201b9512a9ed946c87b7e0band is +git+https://github.com/pmitros/pyfs.git@96e1922348bfe6d99201b9512a9ed946c87b7e0b # The officially released version of django-debug-toolbar-mongo doesn't support DJDT 1.x. This commit does. git+https://github.com/hmarr/django-debug-toolbar-mongo.git@b0686a76f1ce3532088c4aee6e76b9abe61cc808 # custom opaque-key implementations for ccx From a65d599fae323d2e2ae9349660d13230edd8b634 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 19 Nov 2015 11:43:12 -0500 Subject: [PATCH 41/87] Update XBlock version --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 213bc69ce27b..972c35b0fae4 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -35,7 +35,7 @@ git+https://github.com/edx/rfc6266.git@v0.0.5-edx#egg=rfc6266==0.0.5-edx git+https://github.com/edx/lettuce.git@0.2.20.002#egg=lettuce==0.2.20.002 # Our libraries: --e git+https://github.com/edx/XBlock.git@django1.8-upgrade#egg=XBlock +-e git+https://github.com/edx/XBlock.git@xblock-0.4.1#egg=XBlock==0.4.1 -e git+https://github.com/edx/codejail.git@6b17c33a89bef0ac510926b1d7fea2748b73aadd#egg=codejail -e git+https://github.com/edx/js-test-tool.git@v0.1.6#egg=js_test_tool -e git+https://github.com/edx/event-tracking.git@0.2.1#egg=event-tracking==0.2.1 From e4d8b58412ea013cc21d993b82dd8361bc357b47 Mon Sep 17 00:00:00 2001 From: John Eskew Date: Thu, 19 Nov 2015 11:56:06 -0500 Subject: [PATCH 42/87] Bump tag & version of edx-organizations --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 972c35b0fae4..75a3e53fd6f8 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -57,7 +57,7 @@ git+https://github.com/edx/edx-lint.git@v0.3.2#egg=edx_lint==0.3.2 -e git+https://github.com/edx-solutions/xblock-google-drive.git@138e6fa0bf3a2013e904a085b9fed77dab7f3f21#egg=xblock-google-drive -e git+https://github.com/edx/edx-reverification-block.git@0.0.5#egg=edx-reverification-block==0.0.5 -e git+https://github.com/edx/edx-user-state-client.git@30c0ad4b9f57f8d48d6943eb585ec8a9205f4469#egg=edx-user-state-client -git+https://github.com/edx/edx-organizations.git@release-2015-11-17-plus-django-18#egg=edx-organizations==0.1.7 +git+https://github.com/edx/edx-organizations.git@release-2015-11-17-with-django-18#egg=edx-organizations==0.1.8 git+https://github.com/edx/edx-proctoring.git@0.11.2#egg=edx-proctoring==0.11.2 # Third Party XBlocks From 26a4670cea39538238ccaa1983b74ba8683afa6b Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 19 Nov 2015 12:34:42 -0500 Subject: [PATCH 43/87] Update version of django-splash --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 75a3e53fd6f8..5c7f8865aa8f 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -39,7 +39,7 @@ git+https://github.com/edx/lettuce.git@0.2.20.002#egg=lettuce==0.2.20.002 -e git+https://github.com/edx/codejail.git@6b17c33a89bef0ac510926b1d7fea2748b73aadd#egg=codejail -e git+https://github.com/edx/js-test-tool.git@v0.1.6#egg=js_test_tool -e git+https://github.com/edx/event-tracking.git@0.2.1#egg=event-tracking==0.2.1 --e git+https://github.com/edx/django-splash.git@ammar/upgrade-to-django1.8#egg=django-splash==0.2 +-e git+https://github.com/edx/django-splash.git@v0.2#egg=django-splash==0.2 -e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock -e git+https://github.com/edx/edx-ora2.git@0.2.2#egg=ora2==0.2.2 -e git+https://github.com/edx/edx-submissions.git@0.1.2#egg=edx-submissions==0.1.2 From 9d18bd61969a95549e386d7dbd25d92576073b9d Mon Sep 17 00:00:00 2001 From: Chris Rodriguez Date: Thu, 19 Nov 2015 14:27:36 -0500 Subject: [PATCH 44/87] Adding gettext to ignore --- .jshintrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.jshintrc b/.jshintrc index 4ff0d97920f9..d3b62563451f 100644 --- a/.jshintrc +++ b/.jshintrc @@ -140,6 +140,7 @@ "spyOnEvent", // Miscellaneous globals - "JSON" + "JSON", + "gettext" ] } From d1efc3fed15a0fe159c70e32125cea39c2fe7166 Mon Sep 17 00:00:00 2001 From: Chris Rodriguez Date: Thu, 19 Nov 2015 14:58:05 -0500 Subject: [PATCH 45/87] Updating JSHint threshold --- scripts/all-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/all-tests.sh b/scripts/all-tests.sh index 4c7d709d9ea0..b0c49f4c632b 100755 --- a/scripts/all-tests.sh +++ b/scripts/all-tests.sh @@ -12,7 +12,7 @@ set -e # Violations thresholds for failing the build export PYLINT_THRESHOLD=5650 -export JSHINT_THRESHOLD=9390 +export JSHINT_THRESHOLD=9080 doCheckVars() { if [ -n "$CIRCLECI" ] ; then From daf4db8647f0009dca2ce88742666f224a2ea2e6 Mon Sep 17 00:00:00 2001 From: Kevin Falcone Date: Tue, 17 Nov 2015 14:10:12 -0500 Subject: [PATCH 46/87] Update --commit flag so you don't have to say --commit=commit With the 1.8 upgrade, we stopped using 'manage.py cms command commit' and switched to --commit because we no longer directly access args[] https://docs.djangoproject.com/en/1.8/howto/custom-management-commands/ When this command was updated, it was switched to --commit=commit, but using store_true allows a much more natural --commit syntax. --- .../management/commands/delete_orphans.py | 12 ++++-------- .../management/commands/tests/test_delete_orphans.py | 8 ++++---- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/cms/djangoapps/contentstore/management/commands/delete_orphans.py b/cms/djangoapps/contentstore/management/commands/delete_orphans.py index c0971bbc0839..48e2689e9f60 100644 --- a/cms/djangoapps/contentstore/management/commands/delete_orphans.py +++ b/cms/djangoapps/contentstore/management/commands/delete_orphans.py @@ -11,12 +11,12 @@ class Command(BaseCommand): help = ''' Delete orphans from a MongoDB backed course. Takes two arguments: : the course id of the course whose orphans you want to delete - |commit|: optional argument. If not provided, will not run task. + |--commit|: optional argument. If not provided, will dry run delete ''' def add_arguments(self, parser): parser.add_argument('course_id') - parser.add_argument('--commit', action='store') + parser.add_argument('--commit', action='store_true', help='Commit to deleting the orphans') def handle(self, *args, **options): try: @@ -24,20 +24,16 @@ def handle(self, *args, **options): except InvalidKeyError: raise CommandError("Invalid course key.") - commit = False if options['commit']: - commit = options['commit'] == 'commit' - - if commit: print 'Deleting orphans from the course:' deleted_items = _delete_orphans( - course_key, ModuleStoreEnum.UserID.mgmt_command, commit + course_key, ModuleStoreEnum.UserID.mgmt_command, options['commit'] ) print "Success! Deleted the following orphans from the course:" print "\n".join(deleted_items) else: print 'Dry run. The following orphans would have been deleted from the course:' deleted_items = _delete_orphans( - course_key, ModuleStoreEnum.UserID.mgmt_command, commit + course_key, ModuleStoreEnum.UserID.mgmt_command, options['commit'] ) print "\n".join(deleted_items) diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py b/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py index 502cd7b49f71..816d579eb676 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_delete_orphans.py @@ -24,7 +24,7 @@ def test_no_args(self): @ddt.data(ModuleStoreEnum.Type.split, ModuleStoreEnum.Type.mongo) def test_delete_orphans_no_commit(self, default_store): """ - Tests that running the command without a 'commit' argument + Tests that running the command without a '--commit' argument results in no orphans being deleted """ course = self.create_course_with_orphans(default_store) @@ -37,12 +37,12 @@ def test_delete_orphans_no_commit(self, default_store): @ddt.data(ModuleStoreEnum.Type.split, ModuleStoreEnum.Type.mongo) def test_delete_orphans_commit(self, default_store): """ - Tests that running the command WITH the 'commit' argument + Tests that running the command WITH the '--commit' argument results in the orphans being deleted """ course = self.create_course_with_orphans(default_store) - call_command('delete_orphans', unicode(course.id), commit='commit') + call_command('delete_orphans', unicode(course.id), '--commit') # make sure this module wasn't deleted self.assertTrue(self.store.has_item(course.id.make_usage_key('html', 'multi_parent_html'))) @@ -66,7 +66,7 @@ def test_delete_orphans_published_branch_split(self): # call delete orphans, specifying the published branch # of the course - call_command('delete_orphans', unicode(published_branch), commit='commit') + call_command('delete_orphans', unicode(published_branch), '--commit') # now all orphans should be deleted self.assertOrphanCount(course.id, 0) From 256dc5b6f898274a0f24f4ab4f46b5aa856b59c2 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Thu, 19 Nov 2015 13:59:11 -0500 Subject: [PATCH 47/87] Reword default about page questions --- common/lib/xmodule/xmodule/templates/about/overview.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/templates/about/overview.yaml b/common/lib/xmodule/xmodule/templates/about/overview.yaml index 6eba22fb6523..ac12cb6ab224 100644 --- a/common/lib/xmodule/xmodule/templates/about/overview.yaml +++ b/common/lib/xmodule/xmodule/templates/about/overview.yaml @@ -40,8 +40,9 @@ data: |

Frequently Asked Questions

-

Do I need to buy a textbook?

-

No, a free online version of Chemistry: Principles, Patterns, and Applications, First Edition by Bruce Averill and Patricia Eldredge will be available, though you can purchase a printed version (published by FlatWorld Knowledge) if you’d like.

+

What web browser should I use?

+

The Open edX platform works best with current versions of Chrome, Firefox or Safari, or with Internet Explorer version 9 and above.

+

See our list of supported browsers for the most up-to-date information.

From f4c554133953420dfa9df82bfd5c27a83797c3a6 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Wed, 18 Nov 2015 14:02:21 -0500 Subject: [PATCH 48/87] be sure to include the enrollment_id when unenrolling --- lms/djangoapps/instructor/paidcourse_enrollment_report.py | 8 ++++++-- lms/djangoapps/instructor/views/api.py | 1 + lms/djangoapps/instructor_task/tasks_helper.py | 1 + lms/djangoapps/instructor_task/tests/test_tasks_helper.py | 7 ++++++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lms/djangoapps/instructor/paidcourse_enrollment_report.py b/lms/djangoapps/instructor/paidcourse_enrollment_report.py index 67e4e5869117..f011ee67df5b 100644 --- a/lms/djangoapps/instructor/paidcourse_enrollment_report.py +++ b/lms/djangoapps/instructor/paidcourse_enrollment_report.py @@ -25,6 +25,7 @@ def get_enrollment_info(self, user, course_id): """ course = get_course_by_id(course_id, depth=0) is_course_staff = bool(has_access(user, 'staff', course)) + manual_enrollment_reason = 'N/A' # check the user enrollment role if user.is_staff: @@ -59,8 +60,10 @@ def get_enrollment_info(self, user, course_id): manual_enrollment = ManualEnrollmentAudit.get_manual_enrollment(course_enrollment) if manual_enrollment is not None: enrollment_source = _( - 'manually enrolled by {username} - reason: {reason}' - ).format(username=manual_enrollment.enrolled_by.username, reason=manual_enrollment.reason) + 'manually enrolled by username: {username}' + ).format(username=manual_enrollment.enrolled_by.username) + + manual_enrollment_reason = manual_enrollment.reason else: enrollment_source = _('Manually Enrolled') @@ -71,6 +74,7 @@ def get_enrollment_info(self, user, course_id): course_enrollment_data['Enrollment Date'] = enrollment_date course_enrollment_data['Currently Enrolled'] = currently_enrolled course_enrollment_data['Enrollment Source'] = enrollment_source + course_enrollment_data['Manual (Un)Enrollment Reason'] = manual_enrollment_reason course_enrollment_data['Enrollment Role'] = enrollment_role return course_enrollment_data diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index a6fb2113c3c5..c1fa8a89fe29 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -630,6 +630,7 @@ def students_update_enrollment(request, course_id): ) before_enrollment = before.to_dict()['enrollment'] before_allowed = before.to_dict()['allowed'] + enrollment_obj = CourseEnrollment.get_enrollment(user, course_id) if before_enrollment: state_transition = ENROLLED_TO_UNENROLLED diff --git a/lms/djangoapps/instructor_task/tasks_helper.py b/lms/djangoapps/instructor_task/tasks_helper.py index 073f1a535791..ca66ded2e926 100644 --- a/lms/djangoapps/instructor_task/tasks_helper.py +++ b/lms/djangoapps/instructor_task/tasks_helper.py @@ -1091,6 +1091,7 @@ def upload_enrollment_report(_xmodule_instance_args, _entry_id, course_id, _task 'Enrollment Date': _('Enrollment Date'), 'Currently Enrolled': _('Currently Enrolled'), 'Enrollment Source': _('Enrollment Source'), + 'Manual (Un)Enrollment Reason': _('Manual (Un)Enrollment Reason'), 'Enrollment Role': _('Enrollment Role'), 'List Price': _('List Price'), 'Payment Amount': _('Payment Amount'), diff --git a/lms/djangoapps/instructor_task/tests/test_tasks_helper.py b/lms/djangoapps/instructor_task/tests/test_tasks_helper.py index 4561c7e6b790..bf55e5701028 100644 --- a/lms/djangoapps/instructor_task/tests/test_tasks_helper.py +++ b/lms/djangoapps/instructor_task/tests/test_tasks_helper.py @@ -419,10 +419,15 @@ def test_student_manually_enrolled_in_detailed_enrollment_source(self): with patch('instructor_task.tasks_helper._get_current_task'): result = upload_enrollment_report(None, None, self.course.id, task_input, 'generating_enrollment_report') - enrollment_source = u'manually enrolled by {username} - reason: manually enrolling unenrolled user'.format( + enrollment_source = u'manually enrolled by username: {username}'.format( username=self.instructor.username) # pylint: disable=no-member self.assertDictContainsSubset({'attempted': 1, 'succeeded': 1, 'failed': 0}, result) self._verify_cell_data_in_csv(student.username, 'Enrollment Source', enrollment_source) + self._verify_cell_data_in_csv( + student.username, + 'Manual (Un)Enrollment Reason', + 'manually enrolling unenrolled user' + ) self._verify_cell_data_in_csv(student.username, 'Payment Status', 'TBD') def test_student_used_enrollment_code_for_course_enrollment(self): From 57a4df73a5d05315d85dbccc2a9101bf0e15dc61 Mon Sep 17 00:00:00 2001 From: Kevin Falcone Date: Tue, 17 Nov 2015 12:47:01 -0500 Subject: [PATCH 49/87] Management commands should no longer access args[] https://docs.djangoproject.com/en/1.8/howto/custom-management-commands/ Django intercepts the 'pull' argument and says "unrecognized arguments pull" There were no tests for this command, so it wasn't noticed during the upgrade testing, only once our integration monitoring noticed. --- .../third_party_auth/management/commands/saml.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/common/djangoapps/third_party_auth/management/commands/saml.py b/common/djangoapps/third_party_auth/management/commands/saml.py index 01918157ae0a..dd2c6c104915 100644 --- a/common/djangoapps/third_party_auth/management/commands/saml.py +++ b/common/djangoapps/third_party_auth/management/commands/saml.py @@ -12,16 +12,14 @@ class Command(BaseCommand): """ manage.py commands to manage SAML/Shibboleth SSO """ help = '''Configure/maintain/update SAML-based SSO''' - def handle(self, *args, **options): - if len(args) != 1: - raise CommandError("saml requires one argument: pull") + def add_arguments(self, parser): + parser.add_argument('--pull', action='store_true', help="Pull updated metadata from external IDPs") + def handle(self, *args, **options): if not SAMLConfiguration.is_enabled(): raise CommandError("SAML support is disabled via SAMLConfiguration.") - subcommand = args[0] - - if subcommand == "pull": + if options['pull']: log_handler = logging.StreamHandler(self.stdout) log_handler.setLevel(logging.DEBUG) log = logging.getLogger('third_party_auth.tasks') From 84328c13f6545313025c181e2945fcded713a921 Mon Sep 17 00:00:00 2001 From: Kevin Falcone Date: Thu, 19 Nov 2015 17:00:18 -0500 Subject: [PATCH 50/87] Pin to what we have in production This was installing a newer version, with a migration, which we do not want for a hotfix. --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 8a3eef81eccf..dcacfd10049d 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -45,7 +45,7 @@ git+https://github.com/edx/nose.git@99c2aff0ff51bf228bfa5482e97e612c97a23245#egg -e git+https://github.com/edx/django-splash.git@ammar/upgrade-to-django1.8#egg=django-splash==0.2 -e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock -e git+https://github.com/edx/edx-ora2.git@mzfr/django18-from-release#egg=ora2==0.2.2 --e git+https://github.com/edx/edx-submissions.git@django-upgrade/1.8#egg=edx-submissions==0.1.2 +-e git+https://github.com/edx/edx-submissions.git@d6fc357831fb85ee6fdd169d0e36bfd29b490e31#egg=edx-submissions==0.1.2 -e git+https://github.com/edx/opaque-keys.git@27dc382ea587483b1e3889a3d19cbd90b9023a06#egg=opaque-keys git+https://github.com/edx/ease.git@release-2015-07-14#egg=ease==0.1.3 git+https://github.com/edx/i18n-tools.git@v0.1.3#egg=i18n-tools==v0.1.3 From c475f2830ea08a5c7a28fe95e61b15d0bfa506cd Mon Sep 17 00:00:00 2001 From: Ben Patterson Date: Thu, 19 Nov 2015 17:39:39 -0500 Subject: [PATCH 51/87] edxtest needs to be created on naked systems. This is a partial revert from d8fd8ed6784e5ab8aa250e4b02a59c2361c9bbe7 --- scripts/reset-test-db.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/reset-test-db.sh b/scripts/reset-test-db.sh index f1748ca54bac..575c578c9469 100755 --- a/scripts/reset-test-db.sh +++ b/scripts/reset-test-db.sh @@ -24,6 +24,9 @@ DB_CACHE_DIR="common/test/db_cache" +# Ensure the test database exists. +echo "CREATE DATABASE IF NOT EXISTS edxtest;" | mysql -u root + # Clear out the test database ./manage.py lms --settings bok_choy reset_db --traceback --noinput From 149df9b22fed974efdd5f296d662ab14ccf00eed Mon Sep 17 00:00:00 2001 From: Kevin Falcone Date: Tue, 17 Nov 2015 15:12:04 -0500 Subject: [PATCH 52/87] Django 1.8 disallows access to args[] https://docs.djangoproject.com/en/1.8/howto/custom-management-commands/ You need to declare and do proper argument parsing. --commit is also more natural than a bare 'commit' on the end of a command. Switch from calling handle() directly to call_command(). call_command() simulates using the management command so is a better test of the command line interface. --- .../management/commands/force_publish.py | 22 +++++++++---------- .../commands/tests/test_force_publish.py | 18 +++++++-------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/cms/djangoapps/contentstore/management/commands/force_publish.py b/cms/djangoapps/contentstore/management/commands/force_publish.py index 4795e10560d7..96f68334b418 100644 --- a/cms/djangoapps/contentstore/management/commands/force_publish.py +++ b/cms/djangoapps/contentstore/management/commands/force_publish.py @@ -17,39 +17,37 @@ class Command(BaseCommand): help = ''' Force publish a course. Takes two arguments: : the course id of the course you want to publish forcefully - commit: do the force publish + --commit: do the force publish - If you do not specify 'commit', the command will print out what changes would be made. + If you do not specify '--commit', the command will print out what changes would be made. ''' + def add_arguments(self, parser): + parser.add_argument('course_key', help="ID of the Course to force publish") + parser.add_argument('--commit', action='store_true', help="Pull updated metadata from external IDPs") + def handle(self, *args, **options): """Execute the command""" - if len(args) not in {1, 2}: - raise CommandError("force_publish requires 1 or more argument: |commit|") try: - course_key = CourseKey.from_string(args[0]) + course_key = CourseKey.from_string(options['course_key']) except InvalidKeyError: raise CommandError("Invalid course key.") if not modulestore().get_course(course_key): raise CommandError("Course not found.") - commit = False - if len(args) == 2: - commit = args[1] == 'commit' - # for now only support on split mongo owning_store = modulestore()._get_modulestore_for_courselike(course_key) # pylint: disable=protected-access if hasattr(owning_store, 'force_publish_course'): - versions = get_course_versions(args[0]) + versions = get_course_versions(options['course_key']) print "Course versions : {0}".format(versions) - if commit: + if options['commit']: if query_yes_no("Are you sure to publish the {0} course forcefully?".format(course_key), default="no"): # publish course forcefully updated_versions = owning_store.force_publish_course( - course_key, ModuleStoreEnum.UserID.mgmt_command, commit + course_key, ModuleStoreEnum.UserID.mgmt_command, options['commit'] ) if updated_versions: # if publish and draft were different diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_force_publish.py b/cms/djangoapps/contentstore/management/commands/tests/test_force_publish.py index f4766ddfd94c..7358210b317f 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_force_publish.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_force_publish.py @@ -2,7 +2,7 @@ Tests for the force_publish management command """ import mock -from django.core.management.base import CommandError +from django.core.management import call_command, CommandError from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory @@ -25,9 +25,9 @@ def test_no_args(self): """ Test 'force_publish' command with no arguments """ - errstring = "force_publish requires 1 or more argument: |commit" + errstring = "Error: too few arguments" with self.assertRaisesRegexp(CommandError, errstring): - self.command.handle() + call_command('force_publish') def test_invalid_course_key(self): """ @@ -35,15 +35,15 @@ def test_invalid_course_key(self): """ errstring = "Invalid course key." with self.assertRaisesRegexp(CommandError, errstring): - self.command.handle('TestX/TS01') + call_command('force_publish', 'TestX/TS01') def test_too_many_arguments(self): """ Test 'force_publish' command with more than 2 arguments """ - errstring = "force_publish requires 1 or more argument: |commit" + errstring = "Error: unrecognized arguments: invalid-arg" with self.assertRaisesRegexp(CommandError, errstring): - self.command.handle(unicode(self.course.id), 'commit', 'invalid-arg') + call_command('force_publish', unicode(self.course.id), '--commit', 'invalid-arg') def test_course_key_not_found(self): """ @@ -51,7 +51,7 @@ def test_course_key_not_found(self): """ errstring = "Course not found." with self.assertRaisesRegexp(CommandError, errstring): - self.command.handle(unicode('course-v1:org+course+run')) + call_command('force_publish', unicode('course-v1:org+course+run')) def test_force_publish_non_split(self): """ @@ -60,7 +60,7 @@ def test_force_publish_non_split(self): course = CourseFactory.create(default_store=ModuleStoreEnum.Type.mongo) errstring = 'The owning modulestore does not support this command.' with self.assertRaisesRegexp(CommandError, errstring): - self.command.handle(unicode(course.id)) + call_command('force_publish', unicode(course.id)) @SharedModuleStoreTestCase.modifies_courseware def test_force_publish(self): @@ -91,7 +91,7 @@ def test_force_publish(self): patched_yes_no.return_value = True # force publish course - self.command.handle(unicode(self.course.id), 'commit') + call_command('force_publish', unicode(self.course.id), '--commit') # verify that course has no changes self.assertFalse(self.store.has_changes(self.store.get_item(self.course.location))) From 0b93054cbbdfe6b9bca150e52138de69c8bab183 Mon Sep 17 00:00:00 2001 From: zubair-arbi Date: Fri, 20 Nov 2015 14:34:38 +0500 Subject: [PATCH 53/87] Allow user to submit initial verification through reverify flow ECOM-2933 --- lms/djangoapps/verify_student/tests/test_views.py | 6 ++++++ lms/djangoapps/verify_student/views.py | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lms/djangoapps/verify_student/tests/test_views.py b/lms/djangoapps/verify_student/tests/test_views.py index 1638f7c30ca9..ec0b7c7c343b 100644 --- a/lms/djangoapps/verify_student/tests/test_views.py +++ b/lms/djangoapps/verify_student/tests/test_views.py @@ -1875,6 +1875,12 @@ def setUp(self): success = self.client.login(username=self.USERNAME, password=self.PASSWORD) self.assertTrue(success, msg="Could not log in") + def test_reverify_view_can_do_initial_verification(self): + """ + Test that a User can use reverify link for initial verification. + """ + self._assert_can_reverify() + def test_reverify_view_can_reverify_denied(self): # User has a denied attempt, so can reverify attempt = SoftwareSecurePhotoVerification.objects.create(user=self.user) diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index fcd45a52a390..516a52a8e19c 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -1358,10 +1358,12 @@ def get(self, request): """ status, _ = SoftwareSecurePhotoVerification.user_status(request.user) - # If the verification process is still ongoing i.e. the status for photo - # verification is either 'submitted' or 'must_retry' then its marked as - # 'pending' - if status in ["must_reverify", "expired", "pending"]: + # If the user has no initial verification or if the verification + # process is still ongoing 'pending' or expired then allow the user to + # submit the photo verification. + # A photo verification is marked as 'pending' if its status is either + # 'submitted' or 'must_retry'. + if status in ["none", "must_reverify", "expired", "pending"]: context = { "user_full_name": request.user.profile.name, "platform_name": settings.PLATFORM_NAME, From dc7b57f459baa71202e68e83d30f8d482fb3686f Mon Sep 17 00:00:00 2001 From: Usman Khalid <2200617@gmail.com> Date: Fri, 20 Nov 2015 18:18:32 +0500 Subject: [PATCH 54/87] Cleanup some settings. --- cms/envs/aws.py | 2 ++ cms/envs/common.py | 2 +- lms/envs/aws.py | 8 +++----- lms/envs/common.py | 2 +- lms/envs/test_with_mysql.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 44f1861b0522..80f2718b53f6 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -269,6 +269,8 @@ DATABASES = AUTH_TOKENS['DATABASES'] # Enable automatic transaction management on all databases +# https://docs.djangoproject.com/en/1.8/topics/db/transactions/#tying-transactions-to-http-requests +# This needs to be true for all databases for database_name in DATABASES: DATABASES[database_name]['ATOMIC_REQUESTS'] = True diff --git a/cms/envs/common.py b/cms/envs/common.py index 63ae7caaa023..dc39ee2513d8 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -62,7 +62,7 @@ # Dummy secret key for dev/test -SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd' +SECRET_KEY = 'dev key' STUDIO_NAME = "Studio" STUDIO_SHORT_NAME = "Studio" diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 92a629fe2ffc..3b285d5e05ff 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -165,7 +165,7 @@ EDXMKTG_LOGGED_IN_COOKIE_NAME = ENV_TOKENS.get('EDXMKTG_LOGGED_IN_COOKIE_NAME', EDXMKTG_LOGGED_IN_COOKIE_NAME) EDXMKTG_USER_INFO_COOKIE_NAME = ENV_TOKENS.get('EDXMKTG_USER_INFO_COOKIE_NAME', EDXMKTG_USER_INFO_COOKIE_NAME) -ENV_FEATURES = ENV_TOKENS.get('FEATURES', ENV_TOKENS.get('MITX_FEATURES', {})) +ENV_FEATURES = ENV_TOKENS.get('FEATURES', {}) for feature, value in ENV_FEATURES.items(): FEATURES[feature] = value @@ -259,10 +259,6 @@ for app in ENV_TOKENS.get('ADDL_INSTALLED_APPS', []): INSTALLED_APPS += (app,) -ENV_FEATURES = ENV_TOKENS.get('FEATURES', {}) -for feature, value in ENV_FEATURES.items(): - FEATURES[feature] = value - WIKI_ENABLED = ENV_TOKENS.get('WIKI_ENABLED', WIKI_ENABLED) local_loglevel = ENV_TOKENS.get('LOCAL_LOGLEVEL', 'INFO') @@ -438,6 +434,8 @@ DATABASES = AUTH_TOKENS['DATABASES'] # Enable automatic transaction management on all databases +# https://docs.djangoproject.com/en/1.8/topics/db/transactions/#tying-transactions-to-http-requests +# This needs to be true for all databases for database_name in DATABASES: DATABASES[database_name]['ATOMIC_REQUESTS'] = True diff --git a/lms/envs/common.py b/lms/envs/common.py index 69763872c73c..317b50f8d318 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -2676,7 +2676,7 @@ CREDIT_TASK_MAX_RETRIES = 5 # Dummy secret key for dev/test -SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd' +SECRET_KEY = 'dev key' # Secret keys shared with credit providers. # Used to digitally sign credit requests (us --> provider) diff --git a/lms/envs/test_with_mysql.py b/lms/envs/test_with_mysql.py index 36d3d04ec841..d46290466dbd 100644 --- a/lms/envs/test_with_mysql.py +++ b/lms/envs/test_with_mysql.py @@ -5,7 +5,7 @@ from .aws import * # pylint: disable=wildcard-import # Dummy secret key for dev -SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd' +SECRET_KEY = 'dev key' INSTALLED_APPS = ( 'django.contrib.auth', From 7bb4980f05912e29b1f95ff63a7e603f605a46bf Mon Sep 17 00:00:00 2001 From: Amir Qayyum Khan Date: Tue, 17 Nov 2015 19:25:44 +0500 Subject: [PATCH 55/87] Added auto-enrol and email student check boxes to enrolment tab ccx coach dashboard --- .../sass/course/ccx_coach/_dashboard.scss | 4 +++ lms/templates/ccx/enrollment.html | 25 ++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/lms/static/sass/course/ccx_coach/_dashboard.scss b/lms/static/sass/course/ccx_coach/_dashboard.scss index f9a6fba50da2..282f01e4a4ee 100644 --- a/lms/static/sass/course/ccx_coach/_dashboard.scss +++ b/lms/static/sass/course/ccx_coach/_dashboard.scss @@ -74,3 +74,7 @@ button.ccx-button-link { color: brown; } } + +.ccx-manage-student-form input#student-id { + width: 60%; +} diff --git a/lms/templates/ccx/enrollment.html b/lms/templates/ccx/enrollment.html index e09825817fc4..a6c64c413084 100644 --- a/lms/templates/ccx/enrollment.html +++ b/lms/templates/ccx/enrollment.html @@ -47,7 +47,7 @@

${_("Batch Enrollment")}

-
+
@@ -84,6 +84,29 @@

${_("Student List Management")}

+
+ + +
+ +

+ ${_("If this option is checked, users who have not yet registered for {platform_name} will be automatically enrolled.").format(platform_name=settings.PLATFORM_NAME)} + ${_("If this option is left unchecked, users who have not yet registered for {platform_name} will not be enrolled, but will be allowed to enroll once they make an account.").format(platform_name=settings.PLATFORM_NAME)} +

+ ${_("Checking this box has no effect if 'Revoke' is clicked.")} +

+
+
+
+ + + +
From 21c2d3f7bd7d04c6f40a65da933065ca40f896a0 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Fri, 20 Nov 2015 12:05:49 -0500 Subject: [PATCH 56/87] Add in the attempt_code field to the proctoring report --- lms/djangoapps/instructor/views/api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index a6fb2113c3c5..a06879c99d84 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -1404,6 +1404,7 @@ def get_proctored_exam_results(request, course_id): query_features = [ 'user_email', 'exam_name', + 'attempt_code', 'allowed_time_limit_mins', 'is_sample_attempt', 'started_at', From b96cd65a14ebe1f195b81d091f76e28bcf133435 Mon Sep 17 00:00:00 2001 From: Christine Lytwynec Date: Mon, 16 Nov 2015 10:29:37 -0500 Subject: [PATCH 57/87] remove reset style for button outlines in firefox --- lms/static/sass/base/_reset.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/lms/static/sass/base/_reset.scss b/lms/static/sass/base/_reset.scss index c6c770f50682..d181013ef721 100644 --- a/lms/static/sass/base/_reset.scss +++ b/lms/static/sass/base/_reset.scss @@ -50,6 +50,7 @@ input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0 input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; } input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; } button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } +button:-moz-focusring { outline: 1px dotted black; } textarea { overflow: auto; vertical-align: top; resize: vertical; } input:valid, textarea:valid { } From bb434075865ae282f0f6d01180f60316b960ef7d Mon Sep 17 00:00:00 2001 From: Akiva Leffert Date: Wed, 28 Oct 2015 14:37:00 -0400 Subject: [PATCH 58/87] Force wrapping for long content like hyperlinks. Content that doesn't fit on the screen was causing the viewport to be the wrong size on mobile devices resulting. This forces wrapping for long content instead of letting it force the viewport size. JIRA: https://openedx.atlassian.net/browse/MA-1236 --- lms/static/sass/course/courseware/_courseware.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lms/static/sass/course/courseware/_courseware.scss b/lms/static/sass/course/courseware/_courseware.scss index 42803894285a..b0b3b2f4294c 100644 --- a/lms/static/sass/course/courseware/_courseware.scss +++ b/lms/static/sass/course/courseware/_courseware.scss @@ -102,6 +102,13 @@ div.course-wrapper { @extend .content; padding: ($baseline*2); line-height: 1.6; + + .xblock { + overflow-wrap: break-word; + word-wrap: break-word; + word-break: break-word; + } + h1 { margin: 0 0 lh(); } From f5d0f3ff55d264ed4b68a24808b255aef5d8dad2 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 21 Nov 2015 20:39:35 -0500 Subject: [PATCH 59/87] Remove useless pylint suppressions --- .../features/advanced_settings.py | 2 +- .../contentstore/features/checklists.py | 2 +- .../contentstore/features/common.py | 2 +- .../contentstore/features/component.py | 2 +- .../component_settings_editor_helpers.py | 2 +- .../contentstore/features/course-outline.py | 2 +- .../contentstore/features/course-settings.py | 2 +- .../contentstore/features/course-updates.py | 3 +- .../contentstore/features/grading.py | 2 +- .../contentstore/features/html-editor.py | 2 +- cms/djangoapps/contentstore/features/pages.py | 2 +- .../contentstore/features/problem-editor.py | 2 +- .../contentstore/features/signup.py | 2 +- .../contentstore/features/textbooks.py | 1 - .../contentstore/features/upload.py | 2 +- .../contentstore/features/video_editor.py | 2 +- .../contentstore/features/video_handout.py | 2 +- .../commands/tests/test_delete_course.py | 4 +- cms/djangoapps/contentstore/models.py | 1 - .../contentstore/tests/test_libraries.py | 2 +- cms/djangoapps/contentstore/tests/utils.py | 4 +- cms/djangoapps/contentstore/views/__init__.py | 2 +- .../contentstore/views/certificates.py | 2 +- .../contentstore/views/checklist.py | 1 - .../contentstore/views/component.py | 1 - cms/djangoapps/contentstore/views/course.py | 5 +- .../contentstore/views/import_export.py | 3 -- cms/djangoapps/contentstore/views/item.py | 5 -- .../views/tests/test_certificates.py | 2 +- .../contentstore/views/tests/test_videos.py | 1 - cms/djangoapps/contentstore/views/user.py | 1 - cms/envs/bok_choy.py | 5 -- cms/envs/common.py | 7 +-- cms/urls.py | 2 - common/djangoapps/config_models/tests.py | 1 - common/djangoapps/cors_csrf/views.py | 2 +- common/djangoapps/course_modes/models.py | 2 +- common/djangoapps/dark_lang/models.py | 4 +- .../django_comment_common/models.py | 2 +- common/djangoapps/embargo/models.py | 6 +-- common/djangoapps/external_auth/views.py | 2 +- .../management/commands/transfer_students.py | 2 +- common/djangoapps/student/models.py | 4 +- common/djangoapps/student/roles.py | 2 +- common/djangoapps/student/tests/test_login.py | 2 +- .../student/tests/test_recent_enrollments.py | 2 +- .../djangoapps/student/tests/test_refunds.py | 2 +- common/djangoapps/student/tests/test_views.py | 2 +- common/djangoapps/student/views.py | 10 ++-- common/djangoapps/terrain/course_helpers.py | 1 - common/djangoapps/terrain/stubs/lti.py | 2 +- common/djangoapps/terrain/ui_helpers.py | 3 +- common/djangoapps/third_party_auth/admin.py | 2 +- common/djangoapps/third_party_auth/models.py | 4 +- .../djangoapps/third_party_auth/pipeline.py | 2 +- common/djangoapps/third_party_auth/tasks.py | 4 +- .../third_party_auth/tests/test_views.py | 2 +- common/djangoapps/track/backends/__init__.py | 1 - common/djangoapps/track/tests/test_tracker.py | 1 - common/djangoapps/util/db.py | 1 - .../djangoapps/util/organizations_helpers.py | 1 - .../util/password_policy_validators.py | 3 +- common/djangoapps/util/testing.py | 2 +- common/djangoapps/xblock_django/models.py | 4 +- common/lib/capa/capa/customrender.py | 4 +- common/lib/capa/capa/inputtypes.py | 2 +- common/lib/capa/capa/responsetypes.py | 6 +-- .../capa/capa/tests/response_xml_factory.py | 6 +-- .../capa/tests/test_hint_functionality.py | 1 - .../lib/capa/capa/tests/test_html_render.py | 2 +- common/lib/capa/capa/tests/test_util.py | 2 +- common/lib/capa/capa/util.py | 2 +- common/lib/safe_lxml/safe_lxml/etree.py | 4 +- common/lib/symmath/symmath/formula.py | 2 +- common/lib/xmodule/xmodule/capa_base.py | 7 ++- common/lib/xmodule/xmodule/capa_module.py | 4 +- .../lib/xmodule/xmodule/discussion_module.py | 2 +- .../xmodule/xmodule/imageannotation_module.py | 2 +- .../xmodule/xmodule/library_content_module.py | 4 +- common/lib/xmodule/xmodule/lti_2_util.py | 2 +- .../xmodule/xmodule/modulestore/__init__.py | 4 +- .../xmodule/xmodule/modulestore/mongo/base.py | 1 - .../perf_tests/generate_asset_xml.py | 2 - .../xmodule/modulestore/split_mongo/split.py | 3 +- .../xmodule/modulestore/tests/factories.py | 2 - .../modulestore/tests/sample_courses.py | 2 +- .../xmodule/modulestore/tests/utils.py | 4 +- .../xmodule/modulestore/xml_exporter.py | 10 ++-- .../xmodule/xmodule/partitions/partitions.py | 5 +- .../partitions/tests/test_partitions.py | 20 ++++---- .../lib/xmodule/xmodule/split_test_module.py | 2 +- common/lib/xmodule/xmodule/static_content.py | 2 +- common/lib/xmodule/xmodule/tabs.py | 4 +- .../xmodule/xmodule/tests/test_lti_unit.py | 2 +- .../lib/xmodule/xmodule/tests/test_video.py | 2 +- common/lib/xmodule/xmodule/vertical_block.py | 4 +- .../xmodule/video_module/video_module.py | 2 - common/lib/xmodule/xmodule/x_module.py | 16 +++---- common/lib/xmodule/xmodule/xml_module.py | 6 +-- .../pages/studio/settings_certificates.py | 1 - .../tests/lms/test_lms_dashboard.py | 2 +- .../tests/studio/base_studio_test.py | 2 +- .../tests/studio/test_import_export.py | 2 +- .../tests/studio/test_studio_course_team.py | 6 +-- .../tests/studio/test_studio_library.py | 5 +- lms/djangoapps/bulk_email/tasks.py | 2 +- lms/djangoapps/bulk_email/tests/test_email.py | 2 +- .../bulk_email/tests/test_err_handling.py | 32 ++++++------- lms/djangoapps/bulk_email/tests/test_tasks.py | 2 +- lms/djangoapps/ccx/models.py | 2 +- lms/djangoapps/ccx/overrides.py | 2 +- lms/djangoapps/ccx/tests/factories.py | 2 +- .../ccx/tests/test_ccx_modulestore.py | 2 +- .../tests/test_field_override_performance.py | 6 +-- lms/djangoapps/ccx/tests/test_models.py | 4 +- lms/djangoapps/ccx/tests/test_overrides.py | 4 +- lms/djangoapps/ccx/tests/test_tasks.py | 4 +- lms/djangoapps/ccx/tests/test_utils.py | 4 +- lms/djangoapps/ccx/tests/test_views.py | 6 +-- lms/djangoapps/ccx/views.py | 2 +- lms/djangoapps/certificates/models.py | 5 +- lms/djangoapps/certificates/queue.py | 2 +- .../certificates/tests/test_webview_views.py | 1 - lms/djangoapps/commerce/__init__.py | 2 +- lms/djangoapps/commerce/api/v0/views.py | 2 +- lms/djangoapps/commerce/api/v1/models.py | 4 +- lms/djangoapps/commerce/api/v1/views.py | 2 +- lms/djangoapps/commerce/tests/mocks.py | 2 +- .../blocks/transformers/block_counts.py | 2 +- .../blocks/transformers/block_depth.py | 2 +- .../blocks/transformers/navigation.py | 2 +- .../blocks/transformers/student_view.py | 2 +- lms/djangoapps/course_blocks/__init__.py | 2 +- .../course_blocks/transformers/split_test.py | 2 +- .../transformers/tests/test_split_test.py | 2 +- .../course_wiki/tests/test_access.py | 2 +- lms/djangoapps/course_wiki/views.py | 2 +- lms/djangoapps/courseware/access.py | 4 +- .../courseware/features/conditional.py | 3 +- .../courseware/features/problems_setup.py | 1 - .../courseware/features/registration.py | 1 - lms/djangoapps/courseware/models.py | 4 +- lms/djangoapps/courseware/module_render.py | 4 +- lms/djangoapps/courseware/tabs.py | 10 ++-- lms/djangoapps/courseware/tests/factories.py | 2 - .../courseware/tests/test_access.py | 3 +- .../courseware/tests/test_entrance_exam.py | 1 - .../courseware/tests/test_module_render.py | 4 +- .../courseware/tests/test_split_module.py | 2 - .../tests/test_user_state_client.py | 2 +- lms/djangoapps/courseware/tests/test_views.py | 3 +- lms/djangoapps/dashboard/sysadmin.py | 6 +-- .../discussion_api/tests/test_api.py | 2 +- lms/djangoapps/discussion_api/tests/utils.py | 2 +- .../django_comment_client/base/tests.py | 2 +- .../django_comment_client/base/views.py | 2 +- .../django_comment_client/forum/tests.py | 2 +- lms/djangoapps/django_comment_client/tests.py | 2 +- lms/djangoapps/edxnotes/plugins.py | 2 +- .../instructor/features/bulk_email.py | 2 +- lms/djangoapps/instructor/features/common.py | 2 +- .../instructor/features/data_download.py | 2 +- .../instructor/tests/test_ecommerce.py | 2 +- .../instructor/tests/test_enrollment.py | 4 +- lms/djangoapps/instructor/tests/test_tools.py | 4 +- lms/djangoapps/instructor/views/api.py | 16 +++---- lms/djangoapps/instructor/views/api_urls.py | 2 +- lms/djangoapps/instructor/views/coupons.py | 2 +- .../instructor/views/instructor_dashboard.py | 2 +- .../instructor/views/registration_codes.py | 2 +- lms/djangoapps/instructor_task/api.py | 4 +- lms/djangoapps/instructor_task/api_helper.py | 2 +- lms/djangoapps/instructor_task/tasks.py | 30 ++++++------ .../instructor_task/tasks_helper.py | 6 +-- .../instructor_task/tests/test_api.py | 2 +- .../tests/test_tasks_helper.py | 2 +- lms/djangoapps/licenses/tests.py | 2 +- .../management/commands/create_user.py | 2 +- lms/djangoapps/lms_xblock/mixin.py | 2 +- lms/djangoapps/lti_provider/outcomes.py | 2 - .../lti_provider/tests/test_tasks.py | 6 +-- lms/djangoapps/mobile_api/models.py | 2 +- lms/djangoapps/mobile_api/testutils.py | 2 +- lms/djangoapps/mobile_api/users/tests.py | 2 +- lms/djangoapps/open_ended_grading/views.py | 6 +-- lms/djangoapps/shoppingcart/models.py | 47 +++++++++---------- lms/djangoapps/shoppingcart/pdf.py | 2 +- .../shoppingcart/processors/CyberSource2.py | 1 - .../shoppingcart/tests/test_models.py | 4 +- lms/djangoapps/teams/models.py | 4 +- lms/djangoapps/verify_student/models.py | 2 +- .../verify_student/tests/test_views.py | 2 - lms/djangoapps/verify_student/views.py | 4 +- lms/envs/bok_choy.py | 5 -- lms/envs/cms/acceptance.py | 4 +- lms/envs/cms/microsite_test.py | 5 -- lms/envs/common.py | 2 +- lms/envs/dev.py | 5 -- lms/envs/discussionsettings.py | 3 -- lms/envs/sauce.py | 4 -- lms/envs/test.py | 2 +- lms/startup.py | 2 - lms/urls.py | 1 - .../djangoapps/call_stack_manager/core.py | 2 +- .../core/djangoapps/common_views/xblock.py | 2 +- .../content/course_overviews/models.py | 4 +- .../core/djangoapps/course_groups/models.py | 8 ++-- .../djangoapps/course_groups/tests/helpers.py | 4 +- openedx/core/djangoapps/credit/models.py | 2 +- .../profile_images/tests/test_views.py | 2 +- .../core/djangoapps/profile_images/views.py | 2 +- openedx/core/djangoapps/programs/utils.py | 2 +- openedx/core/djangoapps/programs/views.py | 2 +- openedx/core/djangoapps/user_api/views.py | 4 +- openedx/core/lib/api/view_utils.py | 2 +- .../core/lib/block_cache/block_structure.py | 1 - openedx/core/lib/django_test_client_utils.py | 2 - openedx/core/lib/xblock_utils.py | 2 +- pavelib/acceptance_test.py | 2 +- pavelib/bok_choy.py | 2 +- pavelib/i18n.py | 2 +- pavelib/tests.py | 2 +- pavelib/utils/test/bokchoy_utils.py | 2 +- pavelib/utils/test/suites/bokchoy_suite.py | 2 +- pavelib/utils/test/suites/suite.py | 2 +- 225 files changed, 329 insertions(+), 438 deletions(-) diff --git a/cms/djangoapps/contentstore/features/advanced_settings.py b/cms/djangoapps/contentstore/features/advanced_settings.py index f85659bfa958..56cad31ad670 100644 --- a/cms/djangoapps/contentstore/features/advanced_settings.py +++ b/cms/djangoapps/contentstore/features/advanced_settings.py @@ -2,7 +2,7 @@ # pylint: disable=redefined-outer-name from lettuce import world, step -from nose.tools import assert_false, assert_equal, assert_regexp_matches # pylint: disable=no-name-in-module +from nose.tools import assert_false, assert_equal, assert_regexp_matches from common import type_in_codemirror, press_the_notification_button, get_codemirror_value KEY_CSS = '.key h3.title' diff --git a/cms/djangoapps/contentstore/features/checklists.py b/cms/djangoapps/contentstore/features/checklists.py index 43945658fb1a..4e246a751791 100644 --- a/cms/djangoapps/contentstore/features/checklists.py +++ b/cms/djangoapps/contentstore/features/checklists.py @@ -2,7 +2,7 @@ # pylint: disable=redefined-outer-name from lettuce import world, step -from nose.tools import assert_true, assert_equal # pylint: disable=no-name-in-module +from nose.tools import assert_true, assert_equal from selenium.common.exceptions import StaleElementReferenceException diff --git a/cms/djangoapps/contentstore/features/common.py b/cms/djangoapps/contentstore/features/common.py index 98a774fcc229..cb7ad41be013 100644 --- a/cms/djangoapps/contentstore/features/common.py +++ b/cms/djangoapps/contentstore/features/common.py @@ -3,7 +3,7 @@ import os from lettuce import world, step -from nose.tools import assert_true, assert_in # pylint: disable=no-name-in-module +from nose.tools import assert_true, assert_in from django.conf import settings from student.roles import CourseStaffRole, CourseInstructorRole, GlobalStaff diff --git a/cms/djangoapps/contentstore/features/component.py b/cms/djangoapps/contentstore/features/component.py index c2f62e69e479..b5aa8195d1ea 100644 --- a/cms/djangoapps/contentstore/features/component.py +++ b/cms/djangoapps/contentstore/features/component.py @@ -6,7 +6,7 @@ # pylint: disable=unused-argument from lettuce import world, step -from nose.tools import assert_true, assert_in, assert_equal # pylint: disable=no-name-in-module +from nose.tools import assert_true, assert_in, assert_equal DISPLAY_NAME = "Display Name" diff --git a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py index fa6c7a31b38b..aebe907468bd 100644 --- a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py +++ b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py @@ -2,7 +2,7 @@ # pylint: disable=missing-docstring from lettuce import world -from nose.tools import assert_equal, assert_in # pylint: disable=no-name-in-module +from nose.tools import assert_equal, assert_in from terrain.steps import reload_the_page from common import type_in_codemirror from selenium.webdriver.common.keys import Keys diff --git a/cms/djangoapps/contentstore/features/course-outline.py b/cms/djangoapps/contentstore/features/course-outline.py index 702364b1a0a1..650f4d6475ef 100644 --- a/cms/djangoapps/contentstore/features/course-outline.py +++ b/cms/djangoapps/contentstore/features/course-outline.py @@ -3,7 +3,7 @@ from lettuce import world, step from common import * -from nose.tools import assert_true, assert_false # pylint: disable=no-name-in-module +from nose.tools import assert_true, assert_false from logging import getLogger logger = getLogger(__name__) diff --git a/cms/djangoapps/contentstore/features/course-settings.py b/cms/djangoapps/contentstore/features/course-settings.py index 7970a0e1f264..4e11b393d156 100644 --- a/cms/djangoapps/contentstore/features/course-settings.py +++ b/cms/djangoapps/contentstore/features/course-settings.py @@ -6,7 +6,7 @@ from common import type_in_codemirror, upload_file from django.conf import settings -from nose.tools import assert_true, assert_false # pylint: disable=no-name-in-module +from nose.tools import assert_true, assert_false TEST_ROOT = settings.COMMON_TEST_DATA_ROOT diff --git a/cms/djangoapps/contentstore/features/course-updates.py b/cms/djangoapps/contentstore/features/course-updates.py index afc02aa42462..c3fb3e178b18 100644 --- a/cms/djangoapps/contentstore/features/course-updates.py +++ b/cms/djangoapps/contentstore/features/course-updates.py @@ -1,10 +1,9 @@ # pylint: disable=missing-docstring -# pylint: disable=redefined-outer-name from lettuce import world, step from selenium.webdriver.common.keys import Keys from common import type_in_codemirror, get_codemirror_value -from nose.tools import assert_in # pylint: disable=no-name-in-module +from nose.tools import assert_in @step(u'I go to the course updates page') diff --git a/cms/djangoapps/contentstore/features/grading.py b/cms/djangoapps/contentstore/features/grading.py index bd509e6d5e2e..7f9b315ce03f 100644 --- a/cms/djangoapps/contentstore/features/grading.py +++ b/cms/djangoapps/contentstore/features/grading.py @@ -6,7 +6,7 @@ from terrain.steps import reload_the_page from selenium.common.exceptions import InvalidElementStateException from contentstore.utils import reverse_course_url -from nose.tools import assert_in, assert_equal, assert_not_equal # pylint: disable=no-name-in-module +from nose.tools import assert_in, assert_equal, assert_not_equal @step(u'I am viewing the grading settings') diff --git a/cms/djangoapps/contentstore/features/html-editor.py b/cms/djangoapps/contentstore/features/html-editor.py index 193af0cf2e9e..b5a01632983a 100644 --- a/cms/djangoapps/contentstore/features/html-editor.py +++ b/cms/djangoapps/contentstore/features/html-editor.py @@ -4,7 +4,7 @@ from collections import OrderedDict from lettuce import world, step -from nose.tools import assert_in, assert_false, assert_true, assert_equal # pylint: disable=no-name-in-module +from nose.tools import assert_in, assert_false, assert_true, assert_equal from common import type_in_codemirror, get_codemirror_value CODEMIRROR_SELECTOR_PREFIX = "$('iframe').contents().find" diff --git a/cms/djangoapps/contentstore/features/pages.py b/cms/djangoapps/contentstore/features/pages.py index 0bacc737c623..464e76d7f868 100644 --- a/cms/djangoapps/contentstore/features/pages.py +++ b/cms/djangoapps/contentstore/features/pages.py @@ -3,7 +3,7 @@ # pylint: disable=unused-argument from lettuce import world, step -from nose.tools import assert_equal, assert_in # pylint: disable=no-name-in-module +from nose.tools import assert_equal, assert_in CSS_FOR_TAB_ELEMENT = "li[data-tab-id='{0}'] input.toggle-checkbox" diff --git a/cms/djangoapps/contentstore/features/problem-editor.py b/cms/djangoapps/contentstore/features/problem-editor.py index a1135d06c73c..92f9fda6f9de 100644 --- a/cms/djangoapps/contentstore/features/problem-editor.py +++ b/cms/djangoapps/contentstore/features/problem-editor.py @@ -3,7 +3,7 @@ import json from lettuce import world, step -from nose.tools import assert_equal, assert_true # pylint: disable=no-name-in-module +from nose.tools import assert_equal, assert_true from common import type_in_codemirror, open_new_course from advanced_settings import change_value, ADVANCED_MODULES_KEY from course_import import import_file diff --git a/cms/djangoapps/contentstore/features/signup.py b/cms/djangoapps/contentstore/features/signup.py index b1c65edea53a..1a8d9c200259 100644 --- a/cms/djangoapps/contentstore/features/signup.py +++ b/cms/djangoapps/contentstore/features/signup.py @@ -2,7 +2,7 @@ # pylint: disable=redefined-outer-name from lettuce import world, step -from nose.tools import assert_true, assert_false # pylint: disable=no-name-in-module +from nose.tools import assert_true, assert_false @step('I fill in the registration form$') diff --git a/cms/djangoapps/contentstore/features/textbooks.py b/cms/djangoapps/contentstore/features/textbooks.py index 4cfba5dca507..cd756b224222 100644 --- a/cms/djangoapps/contentstore/features/textbooks.py +++ b/cms/djangoapps/contentstore/features/textbooks.py @@ -1,5 +1,4 @@ # pylint: disable=missing-docstring -# pylint: disable=redefined-outer-name from lettuce import world, step from django.conf import settings diff --git a/cms/djangoapps/contentstore/features/upload.py b/cms/djangoapps/contentstore/features/upload.py index a852b8e264c5..d46c29eff9d6 100644 --- a/cms/djangoapps/contentstore/features/upload.py +++ b/cms/djangoapps/contentstore/features/upload.py @@ -10,7 +10,7 @@ import os from django.contrib.auth.models import User from student.models import CourseEnrollment -from nose.tools import assert_equal, assert_not_equal # pylint: disable=no-name-in-module +from nose.tools import assert_equal, assert_not_equal TEST_ROOT = settings.COMMON_TEST_DATA_ROOT ASSET_NAMES_CSS = 'td.name-col > span.title > a.filename' diff --git a/cms/djangoapps/contentstore/features/video_editor.py b/cms/djangoapps/contentstore/features/video_editor.py index 353d71670882..cf96e099c9ed 100644 --- a/cms/djangoapps/contentstore/features/video_editor.py +++ b/cms/djangoapps/contentstore/features/video_editor.py @@ -4,7 +4,7 @@ import requests from lettuce import world, step -from nose.tools import assert_true, assert_equal, assert_in, assert_not_equal # pylint: disable=no-name-in-module +from nose.tools import assert_true, assert_equal, assert_in, assert_not_equal from terrain.steps import reload_the_page from django.conf import settings from common import upload_file, attach_file diff --git a/cms/djangoapps/contentstore/features/video_handout.py b/cms/djangoapps/contentstore/features/video_handout.py index ccf74680d726..233ea30b5660 100644 --- a/cms/djangoapps/contentstore/features/video_handout.py +++ b/cms/djangoapps/contentstore/features/video_handout.py @@ -3,7 +3,7 @@ # pylint: disable=missing-docstring from lettuce import world, step -from nose.tools import assert_true # pylint: disable=no-name-in-module +from nose.tools import assert_true from video_editor import RequestHandlerWithSessionId, success_upload_file diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_delete_course.py b/cms/djangoapps/contentstore/management/commands/tests/test_delete_course.py index d15698719df2..21b4bbb37a1b 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_delete_course.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_delete_course.py @@ -7,8 +7,8 @@ from opaque_keys.edx.locations import SlashSeparatedCourseKey from django.core.management import CommandError -from contentstore.management.commands.delete_course import Command # pylint: disable=import-error -from contentstore.tests.utils import CourseTestCase # pylint: disable=import-error +from contentstore.management.commands.delete_course import Command +from contentstore.tests.utils import CourseTestCase from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.django import modulestore diff --git a/cms/djangoapps/contentstore/models.py b/cms/djangoapps/contentstore/models.py index d2112bd9f1e7..12435dd9c26e 100644 --- a/cms/djangoapps/contentstore/models.py +++ b/cms/djangoapps/contentstore/models.py @@ -1,7 +1,6 @@ """ Models for contentstore """ -# pylint: disable=no-member from django.db.models.fields import TextField diff --git a/cms/djangoapps/contentstore/tests/test_libraries.py b/cms/djangoapps/contentstore/tests/test_libraries.py index c28be47d45b0..969aec132360 100644 --- a/cms/djangoapps/contentstore/tests/test_libraries.py +++ b/cms/djangoapps/contentstore/tests/test_libraries.py @@ -105,7 +105,7 @@ def _bind_module(self, descriptor, user=None): if user not in self.session_data: self.session_data[user] = {} request = Mock(user=user, session=self.session_data[user]) - _load_preview_module(request, descriptor) # pylint: disable=protected-access + _load_preview_module(request, descriptor) def _update_item(self, usage_key, metadata): """ diff --git a/cms/djangoapps/contentstore/tests/utils.py b/cms/djangoapps/contentstore/tests/utils.py index 7f0546f166b5..237d04a756d6 100644 --- a/cms/djangoapps/contentstore/tests/utils.py +++ b/cms/djangoapps/contentstore/tests/utils.py @@ -10,8 +10,8 @@ from django.test.client import Client from opaque_keys.edx.locations import SlashSeparatedCourseKey, AssetLocation -from contentstore.utils import reverse_url # pylint: disable=import-error -from student.models import Registration # pylint: disable=import-error +from contentstore.utils import reverse_url +from student.models import Registration from xmodule.modulestore.split_mongo.split import SplitMongoModuleStore from xmodule.contentstore.django import contentstore from xmodule.modulestore import ModuleStoreEnum diff --git a/cms/djangoapps/contentstore/views/__init__.py b/cms/djangoapps/contentstore/views/__init__.py index 2f582ef49808..2ab62833222b 100644 --- a/cms/djangoapps/contentstore/views/__init__.py +++ b/cms/djangoapps/contentstore/views/__init__.py @@ -1,4 +1,4 @@ -# pylint: disable=wildcard-import, fixme +# pylint: disable=wildcard-import "All view functions for contentstore, broken out into submodules" diff --git a/cms/djangoapps/contentstore/views/certificates.py b/cms/djangoapps/contentstore/views/certificates.py index ca453c9f7da9..2b409ddb298f 100644 --- a/cms/djangoapps/contentstore/views/certificates.py +++ b/cms/djangoapps/contentstore/views/certificates.py @@ -245,7 +245,7 @@ def remove_signatory(request, store, course, certificate_id, signatory_id): """ for cert_index, cert in enumerate(course.certificates['certificates']): # pylint: disable=unused-variable if int(cert['id']) == int(certificate_id): - for sig_index, signatory in enumerate(cert.get('signatories')): # pylint: disable=unused-variable + for sig_index, signatory in enumerate(cert.get('signatories')): if int(signatory_id) == int(signatory['id']): _delete_asset(course.id, signatory['signature_image_path']) del cert['signatories'][sig_index] diff --git a/cms/djangoapps/contentstore/views/checklist.py b/cms/djangoapps/contentstore/views/checklist.py index 9b40a3d88a06..cb315d6b3049 100644 --- a/cms/djangoapps/contentstore/views/checklist.py +++ b/cms/djangoapps/contentstore/views/checklist.py @@ -21,7 +21,6 @@ __all__ = ['checklists_handler'] -# pylint: disable=unused-argument @require_http_methods(("GET", "POST", "PUT")) @login_required @ensure_csrf_cookie diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index 3e131378b16f..0cc601102472 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -82,7 +82,6 @@ def _load_mixed_class(category): return mixologist.mix(component_class) -# pylint: disable=unused-argument @require_GET @login_required def container_handler(request, usage_key_string): diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index 80d65cc3ff04..473fe058d360 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -6,7 +6,7 @@ import json import random import logging -import string # pylint: disable=deprecated-module +import string from django.utils.translation import ugettext as _ import django.utils from django.contrib.auth.decorators import login_required @@ -219,7 +219,6 @@ def _dismiss_notification(request, course_action_state_id): # pylint: disable=u return JsonResponse({'success': True}) -# pylint: disable=unused-argument @login_required def course_handler(request, course_key_string=None): """ @@ -806,7 +805,6 @@ def _rerun_course(request, org, number, run, fields): }) -# pylint: disable=unused-argument @login_required @ensure_csrf_cookie @require_http_methods(["GET"]) @@ -839,7 +837,6 @@ def course_info_handler(request, course_key_string): return HttpResponseBadRequest("Only supports html requests") -# pylint: disable=unused-argument @login_required @ensure_csrf_cookie @require_http_methods(("GET", "POST", "PUT", "DELETE")) diff --git a/cms/djangoapps/contentstore/views/import_export.py b/cms/djangoapps/contentstore/views/import_export.py index 58187d3b5314..f6b56f882994 100644 --- a/cms/djangoapps/contentstore/views/import_export.py +++ b/cms/djangoapps/contentstore/views/import_export.py @@ -59,7 +59,6 @@ CONTENT_RE = re.compile(r"(?P\d{1,11})-(?P\d{1,11})/(?P\d{1,11})") -# pylint: disable=unused-argument @login_required @ensure_csrf_cookie @require_http_methods(("GET", "POST", "PUT")) @@ -359,7 +358,6 @@ def _save_request_status(request, key, status): request.session.save() -# pylint: disable=unused-argument @require_GET @ensure_csrf_cookie @login_required @@ -458,7 +456,6 @@ def send_tarball(tarball): return response -# pylint: disable=unused-argument @ensure_csrf_cookie @login_required @require_http_methods(("GET",)) diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index e0f5537bde2e..824d1bda769a 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -88,7 +88,6 @@ def _filter_entrance_exam_grader(graders): return graders -# pylint: disable=unused-argument @require_http_methods(("DELETE", "GET", "PUT", "POST", "PATCH")) @login_required @expect_json @@ -196,7 +195,6 @@ def xblock_handler(request, usage_key_string): ) -# pylint: disable=unused-argument @require_http_methods(("GET")) @login_required @expect_json @@ -259,7 +257,6 @@ def xblock_view_handler(request, usage_key_string, view_name): 'page_size': int(request.REQUEST.get('page_size', 0)), } except ValueError: - # pylint: disable=too-many-format-args return HttpResponse( content="Couldn't parse paging parameters: enable_paging: " "{0}, page_number: {1}, page_size: {2}".format( @@ -312,7 +309,6 @@ def xblock_view_handler(request, usage_key_string, view_name): return HttpResponse(status=406) -# pylint: disable=unused-argument @require_http_methods(("GET")) @login_required @expect_json @@ -663,7 +659,6 @@ def _delete_item(usage_key, user): store.delete_item(usage_key, user.id) -# pylint: disable=unused-argument @login_required @require_http_methods(("GET", "DELETE")) def orphan_handler(request, course_key_string): diff --git a/cms/djangoapps/contentstore/views/tests/test_certificates.py b/cms/djangoapps/contentstore/views/tests/test_certificates.py index d7bcd1b1be49..404e9a979c20 100644 --- a/cms/djangoapps/contentstore/views/tests/test_certificates.py +++ b/cms/djangoapps/contentstore/views/tests/test_certificates.py @@ -230,7 +230,7 @@ def test_can_create_certificate(self): self.assertEqual(response.status_code, 201) self.assertIn("Location", response) content = json.loads(response.content) - certificate_id = self._remove_ids(content) # pylint: disable=unused-variable + certificate_id = self._remove_ids(content) self.assertEqual(content, expected) self.assert_event_emitted( 'edx.certificate.configuration.created', diff --git a/cms/djangoapps/contentstore/views/tests/test_videos.py b/cms/djangoapps/contentstore/views/tests/test_videos.py index e8bed3c2b2d5..9733433c976f 100644 --- a/cms/djangoapps/contentstore/views/tests/test_videos.py +++ b/cms/djangoapps/contentstore/views/tests/test_videos.py @@ -2,7 +2,6 @@ """ Unit tests for video-related REST APIs. """ -# pylint: disable=attribute-defined-outside-init import csv import json import dateutil.parser diff --git a/cms/djangoapps/contentstore/views/user.py b/cms/djangoapps/contentstore/views/user.py index 7ee92c0ba4a2..e5da0a819413 100644 --- a/cms/djangoapps/contentstore/views/user.py +++ b/cms/djangoapps/contentstore/views/user.py @@ -34,7 +34,6 @@ def request_course_creator(request): return JsonResponse({"Status": "OK"}) -# pylint: disable=unused-argument @login_required @ensure_csrf_cookie @require_http_methods(("GET", "POST", "PUT", "DELETE")) diff --git a/cms/envs/bok_choy.py b/cms/envs/bok_choy.py index c34ae18f45dc..20671f9c7b66 100644 --- a/cms/envs/bok_choy.py +++ b/cms/envs/bok_choy.py @@ -13,11 +13,6 @@ import os from path import Path as path -# Pylint gets confused by path.py instances, which report themselves as class -# objects. As a result, pylint applies the wrong regex in validating names, -# and throws spurious errors. Therefore, we disable invalid-name checking. -# pylint: disable=invalid-name - ########################## Prod-like settings ################################### # These should be as close as possible to the settings we use in production. diff --git a/cms/envs/common.py b/cms/envs/common.py index dc39ee2513d8..5e8c144cc719 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -22,12 +22,7 @@ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, unused-import, unused-wildcard-import - -# Pylint gets confused by path.py instances, which report themselves as class -# objects. As a result, pylint applies the wrong regex in validating names, -# and throws spurious errors. Therefore, we disable invalid-name checking. -# pylint: disable=invalid-name +# pylint: disable=unused-import import imp import os diff --git a/cms/urls.py b/cms/urls.py index f40ef7063536..f282dad6b213 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -5,8 +5,6 @@ from ratelimitbackend import admin admin.autodiscover() -# pylint: disable=bad-continuation - # Pattern to match a course key or a library key COURSELIKE_KEY_PATTERN = r'(?P({}|{}))'.format( r'[^/]+/[^/]+/[^/]+', r'[^/:]+:[^/+]+\+[^/+]+(\+[^/]+)?' diff --git a/common/djangoapps/config_models/tests.py b/common/djangoapps/config_models/tests.py index 1bff0a309618..15f954e33665 100644 --- a/common/djangoapps/config_models/tests.py +++ b/common/djangoapps/config_models/tests.py @@ -344,7 +344,6 @@ def test_get_current(self): request = self.factory.get('/config/ExampleConfig') request.user = self.user response = self.current_view(request) - # pylint: disable=no-member self.assertEquals('', response.data['string_field']) self.assertEquals(10, response.data['int_field']) self.assertEquals(None, response.data['changed_by']) diff --git a/common/djangoapps/cors_csrf/views.py b/common/djangoapps/cors_csrf/views.py index 29a7a294ffe1..c0d7d221c764 100644 --- a/common/djangoapps/cors_csrf/views.py +++ b/common/djangoapps/cors_csrf/views.py @@ -51,7 +51,7 @@ def xdomain_proxy(request): # pylint: disable=unused-argument return HttpResponseNotFound() allowed_domains = [] - for domain in config.whitelist.split("\n"): # pylint: disable=no-member + for domain in config.whitelist.split("\n"): if domain.strip(): allowed_domains.append(domain.strip()) diff --git a/common/djangoapps/course_modes/models.py b/common/djangoapps/course_modes/models.py index 293f9715fd9f..55d0148edbdf 100644 --- a/common/djangoapps/course_modes/models.py +++ b/common/djangoapps/course_modes/models.py @@ -538,7 +538,7 @@ def is_white_label(cls, course_id, modes_dict=None): return False @classmethod - def min_course_price_for_currency(cls, course_id, currency): # pylint: disable=invalid-name + def min_course_price_for_currency(cls, course_id, currency): """ Returns the minimum price of the course in the appropriate currency over all the course's non-expired modes. diff --git a/common/djangoapps/dark_lang/models.py b/common/djangoapps/dark_lang/models.py index e61ea41fb251..de9194b468d2 100644 --- a/common/djangoapps/dark_lang/models.py +++ b/common/djangoapps/dark_lang/models.py @@ -22,10 +22,10 @@ def released_languages_list(self): Example: ['it', 'de-at', 'es', 'pt-br'] """ - if not self.released_languages.strip(): # pylint: disable=no-member + if not self.released_languages.strip(): return [] - languages = [lang.lower().strip() for lang in self.released_languages.split(',')] # pylint: disable=no-member + languages = [lang.lower().strip() for lang in self.released_languages.split(',')] # Put in alphabetical order languages.sort() return languages diff --git a/common/djangoapps/django_comment_common/models.py b/common/djangoapps/django_comment_common/models.py index 17c518d53e4c..0ec8b96081b8 100644 --- a/common/djangoapps/django_comment_common/models.py +++ b/common/djangoapps/django_comment_common/models.py @@ -92,7 +92,7 @@ def has_permission(self, permission): if permission_blacked_out(course, {self.name}, permission): return False - return self.permissions.filter(name=permission).exists() # pylint: disable=no-member + return self.permissions.filter(name=permission).exists() class Permission(models.Model): diff --git a/common/djangoapps/embargo/models.py b/common/djangoapps/embargo/models.py index 3598bb349d23..3cbcd97f300e 100644 --- a/common/djangoapps/embargo/models.py +++ b/common/djangoapps/embargo/models.py @@ -88,7 +88,7 @@ def embargoed_countries_list(self): """ if self.embargoed_countries == '': return [] - return [country.strip().upper() for country in self.embargoed_countries.split(',')] # pylint: disable=no-member + return [country.strip().upper() for country in self.embargoed_countries.split(',')] class RestrictedCourse(models.Model): @@ -703,7 +703,7 @@ def whitelist_ips(self): """ if self.whitelist == '': return [] - return self.IPFilterList([addr.strip() for addr in self.whitelist.split(',')]) # pylint: disable=no-member + return self.IPFilterList([addr.strip() for addr in self.whitelist.split(',')]) @property def blacklist_ips(self): @@ -712,4 +712,4 @@ def blacklist_ips(self): """ if self.blacklist == '': return [] - return self.IPFilterList([addr.strip() for addr in self.blacklist.split(',')]) # pylint: disable=no-member + return self.IPFilterList([addr.strip() for addr in self.blacklist.split(',')]) diff --git a/common/djangoapps/external_auth/views.py b/common/djangoapps/external_auth/views.py index 4edea0973cb7..b72f536fbf60 100644 --- a/common/djangoapps/external_auth/views.py +++ b/common/djangoapps/external_auth/views.py @@ -3,7 +3,7 @@ import logging import random import re -import string # pylint: disable=deprecated-module +import string import fnmatch import unicodedata import urllib diff --git a/common/djangoapps/student/management/commands/transfer_students.py b/common/djangoapps/student/management/commands/transfer_students.py index 79892cd5a657..555ef1ec3bde 100644 --- a/common/djangoapps/student/management/commands/transfer_students.py +++ b/common/djangoapps/student/management/commands/transfer_students.py @@ -53,7 +53,7 @@ class Command(TrackedCommand): ) @transaction.atomic - def handle(self, *args, **options): # pylint: disable=unused-argument + def handle(self, *args, **options): source_key = CourseKey.from_string(options.get('source_course', '')) dest_keys = [] for course_key in options.get('dest_course_list', '').split(','): diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index 5e0d13d6d846..4696404716d2 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -1085,7 +1085,7 @@ def emit_event(self, event_name): log.exception( u'Unable to emit event %s for user %s and course %s', event_name, - self.user.username, # pylint: disable=no-member + self.user.username, self.course_id, ) @@ -1373,7 +1373,7 @@ def refundable(self): def refund_cutoff_date(self): """ Calculate and return the refund window end date. """ try: - attribute = self.attributes.get(namespace='order', name='order_number') # pylint: disable=no-member + attribute = self.attributes.get(namespace='order', name='order_number') except ObjectDoesNotExist: return None diff --git a/common/djangoapps/student/roles.py b/common/djangoapps/student/roles.py index 50de144dec2f..e60300c191e4 100644 --- a/common/djangoapps/student/roles.py +++ b/common/djangoapps/student/roles.py @@ -62,7 +62,7 @@ class AccessRole(object): __metaclass__ = ABCMeta @abstractmethod - def has_user(self, user): # pylint: disable=unused-argument + def has_user(self, user): """ Return whether the supplied django user has access to this role. """ diff --git a/common/djangoapps/student/tests/test_login.py b/common/djangoapps/student/tests/test_login.py index d293af908a7b..926a7999f30a 100644 --- a/common/djangoapps/student/tests/test_login.py +++ b/common/djangoapps/student/tests/test_login.py @@ -285,7 +285,7 @@ def test_single_session_with_url_not_having_login_required_decorator(self): self._assert_response(response, success=True) # Reload the user from the database - self.user = User.objects.get(pk=self.user.pk) # pylint: disable=no-member + self.user = User.objects.get(pk=self.user.pk) self.assertEqual(self.user.profile.get_meta()['session_id'], client1.session.session_key) diff --git a/common/djangoapps/student/tests/test_recent_enrollments.py b/common/djangoapps/student/tests/test_recent_enrollments.py index 2fd54d87bfed..637203036775 100644 --- a/common/djangoapps/student/tests/test_recent_enrollments.py +++ b/common/djangoapps/student/tests/test_recent_enrollments.py @@ -15,7 +15,7 @@ from xmodule.modulestore.tests.factories import CourseFactory from course_modes.tests.factories import CourseModeFactory from student.models import CourseEnrollment, DashboardConfiguration -from student.views import get_course_enrollments, _get_recently_enrolled_courses # pylint: disable=protected-access +from student.views import get_course_enrollments, _get_recently_enrolled_courses @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') diff --git a/common/djangoapps/student/tests/test_refunds.py b/common/djangoapps/student/tests/test_refunds.py index f495b81bc655..2b31d758fa36 100644 --- a/common/djangoapps/student/tests/test_refunds.py +++ b/common/djangoapps/student/tests/test_refunds.py @@ -148,7 +148,7 @@ def test_refund_cutoff_date(self, order_date_delta, course_start_delta, expected ) self.enrollment.course_overview.start = course_start - self.enrollment.attributes.add(CourseEnrollmentAttribute( # pylint: disable=no-member + self.enrollment.attributes.add(CourseEnrollmentAttribute( enrollment=self.enrollment, namespace='order', name='order_number', diff --git a/common/djangoapps/student/tests/test_views.py b/common/djangoapps/student/tests/test_views.py index 343877085617..a321e3528326 100644 --- a/common/djangoapps/student/tests/test_views.py +++ b/common/djangoapps/student/tests/test_views.py @@ -36,7 +36,7 @@ def setUp(self): self.cert_status = None self.client.login(username=self.USERNAME, password=self.PASSWORD) - def mock_cert(self, _user, _course_overview, _course_mode): # pylint: disable=unused-argument + def mock_cert(self, _user, _course_overview, _course_mode): """ Return a preset certificate status. """ if self.cert_status is not None: return { diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index dcf9aacab6fd..725b9b501e19 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -131,7 +131,7 @@ log = logging.getLogger("edx.student") AUDIT_LOG = logging.getLogger("audit") -ReverifyInfo = namedtuple('ReverifyInfo', 'course_id course_name course_number date status display') # pylint: disable=invalid-name +ReverifyInfo = namedtuple('ReverifyInfo', 'course_id course_name course_number date status display') SETTING_CHANGE_INITIATED = 'edx.user.settings.change_initiated' @@ -1632,7 +1632,7 @@ def create_account_with_params(request, params): if hasattr(settings, 'LMS_SEGMENT_KEY') and settings.LMS_SEGMENT_KEY: tracking_context = tracker.get_tracker().resolve_context() identity_args = [ - user.id, # pylint: disable=no-member + user.id, { 'email': user.email, 'username': user.username, @@ -1895,13 +1895,13 @@ def auto_auth(request): 'username': username, 'email': email, 'password': password, - 'user_id': user.id, # pylint: disable=no-member + 'user_id': user.id, 'anonymous_id': anonymous_id_for_user(user, None), }) else: success_msg = u"{} user {} ({}) with password {} and user_id {}".format( u"Logged in" if login_when_done else "Created", - username, email, password, user.id # pylint: disable=no-member + username, email, password, user.id ) response = HttpResponse(success_msg) response.set_cookie('csrftoken', csrf(request)['csrf_token']) @@ -2285,7 +2285,7 @@ def change_email_settings(request): return JsonResponse({"success": True}) -def _get_course_programs(user, user_enrolled_courses): # pylint: disable=invalid-name +def _get_course_programs(user, user_enrolled_courses): """ Returns a dictionary of programs courses data require for the student dashboard. diff --git a/common/djangoapps/terrain/course_helpers.py b/common/djangoapps/terrain/course_helpers.py index f13f10b0b933..802d5d66cbe1 100644 --- a/common/djangoapps/terrain/course_helpers.py +++ b/common/djangoapps/terrain/course_helpers.py @@ -1,5 +1,4 @@ # pylint: disable=missing-docstring -# pylint: disable=redefined-outer-name import urllib from lettuce import world diff --git a/common/djangoapps/terrain/stubs/lti.py b/common/djangoapps/terrain/stubs/lti.py index 863bb9b3809a..6f62d4e09310 100644 --- a/common/djangoapps/terrain/stubs/lti.py +++ b/common/djangoapps/terrain/stubs/lti.py @@ -255,7 +255,7 @@ def _oauth_sign(self, url, body, content_type=u'application/x-www-form-urlencode # Calculate and encode body hash. See http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html sha1 = hashlib.sha1() sha1.update(body) - oauth_body_hash = unicode(base64.b64encode(sha1.digest())) # pylint: disable=too-many-function-args + oauth_body_hash = unicode(base64.b64encode(sha1.digest())) params = client.get_oauth_params(None) params.append((u'oauth_body_hash', oauth_body_hash)) mock_request = mock.Mock( diff --git a/common/djangoapps/terrain/ui_helpers.py b/common/djangoapps/terrain/ui_helpers.py index cdd9e2fbd602..bff97d5fc9f6 100644 --- a/common/djangoapps/terrain/ui_helpers.py +++ b/common/djangoapps/terrain/ui_helpers.py @@ -1,5 +1,4 @@ # pylint: disable=missing-docstring -# pylint: disable=redefined-outer-name from lettuce import world @@ -22,7 +21,7 @@ from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait -from nose.tools import assert_true # pylint: disable=no-name-in-module +from nose.tools import assert_true GLOBAL_WAIT_FOR_TIMEOUT = 60 diff --git a/common/djangoapps/third_party_auth/admin.py b/common/djangoapps/third_party_auth/admin.py index c42141da1b1b..02cc8653252a 100644 --- a/common/djangoapps/third_party_auth/admin.py +++ b/common/djangoapps/third_party_auth/admin.py @@ -124,7 +124,7 @@ def get_list_display(self, request): class ApiPermissionsAdminForm(forms.ModelForm): """ Django admin form for ApiPermissions model """ - class Meta(object): # pylint: disable=missing-docstring + class Meta(object): model = ProviderApiPermissions fields = ['client', 'provider_id'] diff --git a/common/djangoapps/third_party_auth/models.py b/common/djangoapps/third_party_auth/models.py index 267d9648e323..b699cbe25e20 100644 --- a/common/djangoapps/third_party_auth/models.py +++ b/common/djangoapps/third_party_auth/models.py @@ -60,7 +60,7 @@ def __init__(self, provider_name): self.provider_name = provider_name def __str__(self): - return _('Authentication with {} is currently unavailable.').format( # pylint: disable=no-member + return _('Authentication with {} is currently unavailable.').format( self.provider_name ) @@ -590,7 +590,7 @@ class ProviderApiPermissions(models.Model): ) ) - class Meta(object): # pylint: disable=missing-docstring + class Meta(object): app_label = "third_party_auth" verbose_name = "Provider API Permission" verbose_name_plural = verbose_name + 's' diff --git a/common/djangoapps/third_party_auth/pipeline.py b/common/djangoapps/third_party_auth/pipeline.py index 21a47f92dba9..59865b419b33 100644 --- a/common/djangoapps/third_party_auth/pipeline.py +++ b/common/djangoapps/third_party_auth/pipeline.py @@ -58,7 +58,7 @@ def B(*args, **kwargs): """ import random -import string # pylint: disable=deprecated-module +import string from collections import OrderedDict import urllib import analytics diff --git a/common/djangoapps/third_party_auth/tasks.py b/common/djangoapps/third_party_auth/tasks.py index 16daf4eb8091..71373b2f7599 100644 --- a/common/djangoapps/third_party_auth/tasks.py +++ b/common/djangoapps/third_party_auth/tasks.py @@ -2,8 +2,8 @@ """ Code to manage fetching and storing the metadata of IdPs. """ -#pylint: disable=no-member -from celery.task import task # pylint: disable=import-error,no-name-in-module + +from celery.task import task import datetime import dateutil.parser import logging diff --git a/common/djangoapps/third_party_auth/tests/test_views.py b/common/djangoapps/third_party_auth/tests/test_views.py index 3b9122c1a725..da57c49fc8aa 100644 --- a/common/djangoapps/third_party_auth/tests/test_views.py +++ b/common/djangoapps/third_party_auth/tests/test_views.py @@ -1,7 +1,7 @@ """ Test the views served by third_party_auth. """ -# pylint: disable=no-member + import ddt from lxml import etree from onelogin.saml2.errors import OneLogin_Saml2_Error diff --git a/common/djangoapps/track/backends/__init__.py b/common/djangoapps/track/backends/__init__.py index 999a5c086c42..346d91b73bd2 100644 --- a/common/djangoapps/track/backends/__init__.py +++ b/common/djangoapps/track/backends/__init__.py @@ -11,7 +11,6 @@ import abc -# pylint: disable=unused-argument class BaseBackend(object): """ Abstract Base Class for event tracking backends. diff --git a/common/djangoapps/track/tests/test_tracker.py b/common/djangoapps/track/tests/test_tracker.py index a3daab66826d..230a6b939e45 100644 --- a/common/djangoapps/track/tests/test_tracker.py +++ b/common/djangoapps/track/tests/test_tracker.py @@ -113,6 +113,5 @@ def __init__(self, **options): self.flag = options.get('flag', False) self.count = 0 - # pylint: disable=unused-argument def send(self, event): self.count += 1 diff --git a/common/djangoapps/util/db.py b/common/djangoapps/util/db.py index 75264a66664a..ba8df7ae274f 100644 --- a/common/djangoapps/util/db.py +++ b/common/djangoapps/util/db.py @@ -164,7 +164,6 @@ def __enter__(self): # The inner atomic starts a savepoint around the test. # So, for tests only, there should be exactly one savepoint_id and two atomic_for_testcase_calls. # atomic_for_testcase_calls below is added in a monkey-patch for tests only. - # pylint: disable=no-member if self.ALLOW_NESTED and (self.atomic_for_testcase_calls - len(connection.savepoint_ids)) < 1: raise transaction.TransactionManagementError('Cannot be inside an atomic block.') diff --git a/common/djangoapps/util/organizations_helpers.py b/common/djangoapps/util/organizations_helpers.py index b3a9301cd6ae..65f3673d1070 100644 --- a/common/djangoapps/util/organizations_helpers.py +++ b/common/djangoapps/util/organizations_helpers.py @@ -1,4 +1,3 @@ -# pylint: disable=invalid-name """ Utility library for working with the edx-organizations app """ diff --git a/common/djangoapps/util/password_policy_validators.py b/common/djangoapps/util/password_policy_validators.py index 6541c4b90d0d..f8132832c5df 100644 --- a/common/djangoapps/util/password_policy_validators.py +++ b/common/djangoapps/util/password_policy_validators.py @@ -1,4 +1,3 @@ -# pylint: disable=no-member """ This file exposes a number of password complexity validators which can be optionally added to account creation @@ -7,7 +6,7 @@ authored by dstufft (https://github.com/dstufft) """ from __future__ import division -import string # pylint: disable=deprecated-module +import string from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ diff --git a/common/djangoapps/util/testing.py b/common/djangoapps/util/testing.py index 083034c9674d..347dd597da4e 100644 --- a/common/djangoapps/util/testing.py +++ b/common/djangoapps/util/testing.py @@ -105,7 +105,7 @@ class PatchMediaTypeMixin(object): Generic mixin for verifying unsupported media type in PATCH """ def test_patch_unsupported_media_type(self): - response = self.client.patch( # pylint: disable=no-member + response = self.client.patch( self.url, json.dumps({}), content_type=self.unsupported_media_type diff --git a/common/djangoapps/xblock_django/models.py b/common/djangoapps/xblock_django/models.py index d527287307e0..c406c2573ddf 100644 --- a/common/djangoapps/xblock_django/models.py +++ b/common/djangoapps/xblock_django/models.py @@ -29,7 +29,7 @@ def is_block_type_disabled(cls, block_type): if not config.enabled: return False - return block_type in config.disabled_blocks.split() # pylint: disable=no-member + return block_type in config.disabled_blocks.split() @classmethod def disabled_block_types(cls): @@ -39,4 +39,4 @@ def disabled_block_types(cls): if not config.enabled: return () - return config.disabled_blocks.split() # pylint: disable=no-member + return config.disabled_blocks.split() diff --git a/common/lib/capa/capa/customrender.py b/common/lib/capa/capa/customrender.py index 8b42b76bf5d7..c333fb8f8782 100644 --- a/common/lib/capa/capa/customrender.py +++ b/common/lib/capa/capa/customrender.py @@ -152,7 +152,7 @@ def __init__(self, system, xml): self.system = system # Get any text content found inside this tag prior to the first child tag. It may be a string or None type. initial_text = xml.text if xml.text else '' - self.inner_html = initial_text + ''.join(etree.tostring(element) for element in xml) # pylint: disable=no-member + self.inner_html = initial_text + ''.join(etree.tostring(element) for element in xml) self.tail = xml.tail def get_html(self): @@ -161,7 +161,7 @@ def get_html(self): """ context = {'clarification': self.inner_html} html = self.system.render_template("clarification.html", context) - xml = etree.XML(html) # pylint: disable=no-member + xml = etree.XML(html) # We must include any text that was following our original ... XML node.: xml.tail = self.tail return xml diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index 2445d19b2d64..601aaa601fdb 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -467,7 +467,7 @@ def setup(self): raise Exception(msg) self.choices = self.extract_choices(self.xml, i18n) - self._choices_map = dict(self.choices,) # pylint: disable=attribute-defined-outside-init + self._choices_map = dict(self.choices,) @classmethod def get_attributes(cls): diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index 116dfbe87a45..2609bdd0478a 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -55,7 +55,7 @@ registry = TagRegistry() -CorrectMap = correctmap.CorrectMap # pylint: disable=invalid-name +CorrectMap = correctmap.CorrectMap CORRECTMAP_PY = None # Make '_' a no-op so we can scrape strings. Using lambda instead of @@ -2666,7 +2666,7 @@ def execute_check_function(self, idset, submission): ## score: Points to be assigned (numeric, can be float) ## msg: Message from grader to display to student (string) -ScoreMessage = namedtuple('ScoreMessage', ['valid', 'correct', 'points', 'msg']) # pylint: disable=invalid-name +ScoreMessage = namedtuple('ScoreMessage', ['valid', 'correct', 'points', 'msg']) @registry.register @@ -3055,7 +3055,7 @@ def get_score(self, student_answers): cmap = CorrectMap() try: submission = [student_answers[k] for k in idset] - except Exception as err: # pylint: disable=broad-except + except Exception as err: log.error( 'Error %s: cannot get student answer for %s; student_answers=%s', err, diff --git a/common/lib/capa/capa/tests/response_xml_factory.py b/common/lib/capa/capa/tests/response_xml_factory.py index c0c2a43c6a4e..f780cdaa726a 100644 --- a/common/lib/capa/capa/tests/response_xml_factory.py +++ b/common/lib/capa/capa/tests/response_xml_factory.py @@ -235,7 +235,7 @@ def create_response_element(self, **kwargs): if partial_answers is not None and 'list' in credit_type: # The line below throws a false positive pylint violation, so it's excepted. - responseparam_element = etree.SubElement(response_element, 'responseparam') # pylint: disable=E1101 + responseparam_element = etree.SubElement(response_element, 'responseparam') responseparam_element.set('partial_answers', partial_answers) return response_element @@ -771,11 +771,11 @@ def create_response_element(self, **kwargs): hintgroup_element.set("hintfn", hint_fn) for additional_answer in additional_answers: - additional_node = etree.SubElement(response_element, "additional_answer") # pylint: disable=no-member + additional_node = etree.SubElement(response_element, "additional_answer") additional_node.set("answer", additional_answer) for answer in non_attribute_answers: - additional_node = etree.SubElement(response_element, "additional_answer") # pylint: disable=no-member + additional_node = etree.SubElement(response_element, "additional_answer") additional_node.text = answer return response_element diff --git a/common/lib/capa/capa/tests/test_hint_functionality.py b/common/lib/capa/capa/tests/test_hint_functionality.py index 69d103dc35cc..76333ad22e41 100644 --- a/common/lib/capa/capa/tests/test_hint_functionality.py +++ b/common/lib/capa/capa/tests/test_hint_functionality.py @@ -13,7 +13,6 @@ # in the test code. Therefore: # pylint: disable=line-too-long # For out many ddt data cases, prefer a compact form of { .. } -# pylint: disable=bad-continuation from . import new_loncapa_problem, load_fixture diff --git a/common/lib/capa/capa/tests/test_html_render.py b/common/lib/capa/capa/tests/test_html_render.py index 104326f95249..a83cd55cdba6 100644 --- a/common/lib/capa/capa/tests/test_html_render.py +++ b/common/lib/capa/capa/tests/test_html_render.py @@ -126,7 +126,7 @@ def test_render_javascript(self): # expect the javascript is still present in the rendered html self.assertIn( "", - etree.tostring(rendered_html) # pylint: disable=no-member + etree.tostring(rendered_html) ) def test_render_response_xml(self): diff --git a/common/lib/capa/capa/tests/test_util.py b/common/lib/capa/capa/tests/test_util.py index 5d3479249940..1f470fb7d22f 100644 --- a/common/lib/capa/capa/tests/test_util.py +++ b/common/lib/capa/capa/tests/test_util.py @@ -124,5 +124,5 @@ def test_get_inner_html_from_xpath(self): """ Test for getting inner html as string from xpath node. """ - xpath_node = etree.XML('aabbcc') # pylint: disable=no-member + xpath_node = etree.XML('aabbcc') self.assertEqual(get_inner_html_from_xpath(xpath_node), 'aabbcc') diff --git a/common/lib/capa/capa/util.py b/common/lib/capa/capa/util.py index cebc83c83bf5..47b21259b4a8 100644 --- a/common/lib/capa/capa/util.py +++ b/common/lib/capa/capa/util.py @@ -191,7 +191,7 @@ def get_inner_html_from_xpath(xpath_node): """ # returns string from xpath node - html = etree.tostring(xpath_node).strip() # pylint: disable=no-member + html = etree.tostring(xpath_node).strip() # strips outer tag from html string inner_html = re.sub('(?ms)<%s[^>]*>(.*)' % (xpath_node.tag, xpath_node.tag), '\\1', html) return inner_html.strip() diff --git a/common/lib/safe_lxml/safe_lxml/etree.py b/common/lib/safe_lxml/safe_lxml/etree.py index c087e9905227..1b5b9fad1aa5 100644 --- a/common/lib/safe_lxml/safe_lxml/etree.py +++ b/common/lib/safe_lxml/safe_lxml/etree.py @@ -9,10 +9,10 @@ from lxml.etree import * # pylint: disable=wildcard-import, unused-wildcard-import from lxml.etree import XMLParser as _XMLParser -from lxml.etree import _Element, _ElementTree # pylint: disable=unused-import, no-name-in-module +from lxml.etree import _Element, _ElementTree # pylint: disable=unused-import # This should be imported after lxml.etree so that it overrides the following attributes. -from defusedxml.lxml import parse, fromstring, XML # pylint: disable=unused-import +from defusedxml.lxml import parse, fromstring, XML class XMLParser(_XMLParser): # pylint: disable=function-redefined diff --git a/common/lib/symmath/symmath/formula.py b/common/lib/symmath/symmath/formula.py index d5f3e038eb52..79c4797076dd 100644 --- a/common/lib/symmath/symmath/formula.py +++ b/common/lib/symmath/symmath/formula.py @@ -12,7 +12,7 @@ # import os -import string # pylint: disable=deprecated-module +import string import re import logging import operator diff --git a/common/lib/xmodule/xmodule/capa_base.py b/common/lib/xmodule/xmodule/capa_base.py index 0ebdcea492f2..b5ead18bd7a4 100644 --- a/common/lib/xmodule/xmodule/capa_base.py +++ b/common/lib/xmodule/xmodule/capa_base.py @@ -15,7 +15,6 @@ try: import dogstats_wrapper as dog_stats_api except ImportError: - # pylint: disable=invalid-name dog_stats_api = None from capa.capa_problem import LoncapaProblem, LoncapaSystem @@ -584,7 +583,7 @@ def handle_problem_html_error(self, err): html = warning try: html += self.lcp.get_html() - except Exception: # pylint: disable=broad-except + except Exception: # Couldn't do it. Give up. log.exception("Unable to generate html from LoncapaProblem") raise @@ -604,7 +603,7 @@ def get_demand_hint(self, hint_index): demand_hints = self.lcp.tree.xpath("//problem/demandhint/hint") hint_index = hint_index % len(demand_hints) - _ = self.runtime.service(self, "i18n").ugettext # pylint: disable=redefined-outer-name + _ = self.runtime.service(self, "i18n").ugettext hint_element = demand_hints[hint_index] hint_text = get_inner_html_from_xpath(hint_element) if len(demand_hints) == 1: @@ -938,7 +937,7 @@ def make_dict_of_responses(data): # We only want to consider each key a single time, so we use set(data.keys()) for key in set(data.keys()): # e.g. input_resistor_1 ==> resistor_1 - _, _, name = key.partition('_') # pylint: disable=redefined-outer-name + _, _, name = key.partition('_') # If key has no underscores, then partition # will return (key, '', '') diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index 70eb1bda4f8b..d44a82276c6f 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -93,11 +93,11 @@ def handle_ajax(self, dispatch, data): result = handlers[dispatch](data) except NotFoundError as err: - _, _, traceback_obj = sys.exc_info() # pylint: disable=redefined-outer-name + _, _, traceback_obj = sys.exc_info() raise ProcessingError(not_found_error_message), None, traceback_obj except Exception as err: - _, _, traceback_obj = sys.exc_info() # pylint: disable=redefined-outer-name + _, _, traceback_obj = sys.exc_info() raise ProcessingError(generic_error_message), None, traceback_obj after = self.get_progress() diff --git a/common/lib/xmodule/xmodule/discussion_module.py b/common/lib/xmodule/xmodule/discussion_module.py index 8041d2a8fd0a..86a29dcd497e 100644 --- a/common/lib/xmodule/xmodule/discussion_module.py +++ b/common/lib/xmodule/xmodule/discussion_module.py @@ -78,7 +78,7 @@ def get_html(self): if user_service: user = user_service._django_user # pylint: disable=protected-access if user: - course_key = course.id # pylint: disable=no-member + course_key = course.id can_create_comment = has_permission(user, "create_comment", course_key) can_create_subcomment = has_permission(user, "create_sub_comment", course_key) can_create_thread = has_permission(user, "create_thread", course_key) diff --git a/common/lib/xmodule/xmodule/imageannotation_module.py b/common/lib/xmodule/xmodule/imageannotation_module.py index c99283db357a..da0f563548a5 100644 --- a/common/lib/xmodule/xmodule/imageannotation_module.py +++ b/common/lib/xmodule/xmodule/imageannotation_module.py @@ -148,7 +148,7 @@ def student_view(self, context): return fragment -class ImageAnnotationDescriptor(AnnotatableFields, RawDescriptor): # pylint: disable=abstract-method +class ImageAnnotationDescriptor(AnnotatableFields, RawDescriptor): ''' Image annotation descriptor ''' module_class = ImageAnnotationModule mako_template = "widgets/raw-edit.html" diff --git a/common/lib/xmodule/xmodule/library_content_module.py b/common/lib/xmodule/xmodule/library_content_module.py index 97c84da98099..2173914bc142 100644 --- a/common/lib/xmodule/xmodule/library_content_module.py +++ b/common/lib/xmodule/xmodule/library_content_module.py @@ -20,7 +20,7 @@ from xmodule.x_module import XModule, STUDENT_VIEW from xmodule.studio_editable import StudioEditableModule, StudioEditableDescriptor from .xml_module import XmlDescriptor -from pkg_resources import resource_string # pylint: disable=no-name-in-module +from pkg_resources import resource_string # Make '_' a no-op so we can scrape strings. Using lambda instead of # `django.utils.translation.ugettext_noop` because Django cannot be imported in this file @@ -621,7 +621,6 @@ def get_content_titles(self): @classmethod def definition_from_xml(cls, xml_object, system): children = [ - # pylint: disable=no-member system.process_xml(etree.tostring(child)).scope_ids.usage_id for child in xml_object.getchildren() ] @@ -633,7 +632,6 @@ def definition_from_xml(cls, xml_object, system): def definition_to_xml(self, resource_fs): """ Exports Library Content Module to XML """ - # pylint: disable=no-member xml_object = etree.Element('library_content') for child in self.get_children(): self.runtime.add_block_as_child_node(child, xml_object) diff --git a/common/lib/xmodule/xmodule/lti_2_util.py b/common/lib/xmodule/xmodule/lti_2_util.py index da52ed439266..8b097a9c5a8f 100644 --- a/common/lib/xmodule/xmodule/lti_2_util.py +++ b/common/lib/xmodule/xmodule/lti_2_util.py @@ -105,7 +105,7 @@ def _log_correct_authorization_header(self, request): """ sha1 = hashlib.sha1() sha1.update(request.body) - oauth_body_hash = unicode(base64.b64encode(sha1.digest())) # pylint: disable=too-many-function-args + oauth_body_hash = unicode(base64.b64encode(sha1.digest())) log.debug("[LTI] oauth_body_hash = {}".format(oauth_body_hash)) client_key, client_secret = self.get_client_key_secret() client = Client(client_key, client_secret) diff --git a/common/lib/xmodule/xmodule/modulestore/__init__.py b/common/lib/xmodule/xmodule/modulestore/__init__.py index 35894c3d0f32..7fbde689ff7b 100644 --- a/common/lib/xmodule/xmodule/modulestore/__init__.py +++ b/common/lib/xmodule/xmodule/modulestore/__init__.py @@ -759,7 +759,6 @@ def copy_all_asset_metadata(self, source_course_key, dest_course_key, user_id): pass -# pylint: disable=abstract-method class ModuleStoreRead(ModuleStoreAssetBase): """ An abstract interface for a database backend that stores XModuleDescriptor @@ -1017,7 +1016,6 @@ def ensure_indexes(self): pass -# pylint: disable=abstract-method class ModuleStoreWrite(ModuleStoreRead, ModuleStoreAssetWriteInterface): """ An abstract interface for a database backend that stores XModuleDescriptor @@ -1331,7 +1329,7 @@ def _drop_database(self): """ if self.contentstore: self.contentstore._drop_database() # pylint: disable=protected-access - super(ModuleStoreWriteBase, self)._drop_database() # pylint: disable=protected-access + super(ModuleStoreWriteBase, self)._drop_database() def create_child(self, user_id, parent_usage_key, block_type, block_id=None, fields=None, **kwargs): """ diff --git a/common/lib/xmodule/xmodule/modulestore/mongo/base.py b/common/lib/xmodule/xmodule/modulestore/mongo/base.py index 10f37f923969..df150cb3b6da 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo/base.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo/base.py @@ -1884,7 +1884,6 @@ def delete_asset_metadata(self, asset_key, user_id): ) return 1 - # pylint: disable=unused-argument @contract(course_key='CourseKey', user_id='int|long') def delete_all_asset_metadata(self, course_key, user_id): """ diff --git a/common/lib/xmodule/xmodule/modulestore/perf_tests/generate_asset_xml.py b/common/lib/xmodule/xmodule/modulestore/perf_tests/generate_asset_xml.py index 101544b7c23e..2bf4901dd8b4 100644 --- a/common/lib/xmodule/xmodule/modulestore/perf_tests/generate_asset_xml.py +++ b/common/lib/xmodule/xmodule/modulestore/perf_tests/generate_asset_xml.py @@ -173,8 +173,6 @@ def make_asset_md(amount): all_asset_md.append(generate_random_asset_md()) return all_asset_md -# pylint: disable=no-member - def make_asset_xml(amount, xml_filename): """ diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py index 8018613aafa5..e59e52666bac 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py @@ -1953,7 +1953,6 @@ def _update_item_from_fields( else: return None - # pylint: disable=unused-argument def create_xblock( self, runtime, course_key, block_type, block_id=None, fields=None, definition_id=None, parent_xblock=None, **kwargs @@ -2068,7 +2067,7 @@ def _persist_subdag(self, course_key, xblock, user_id, structure_blocks, new_id) else: block_key = BlockKey(xblock.scope_ids.block_type, block_id) new_usage_id = xblock.scope_ids.usage_id.replace(block_id=block_key.id) - xblock.scope_ids = xblock.scope_ids._replace(usage_id=new_usage_id) # pylint: disable=protected-access + xblock.scope_ids = xblock.scope_ids._replace(usage_id=new_usage_id) else: is_new = False block_key = BlockKey(xblock.scope_ids.block_type, xblock.scope_ids.usage_id.block_id) diff --git a/common/lib/xmodule/xmodule/modulestore/tests/factories.py b/common/lib/xmodule/xmodule/modulestore/tests/factories.py index 85fac57f034c..7350c0364da4 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/factories.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/factories.py @@ -141,7 +141,6 @@ class SampleCourseFactory(CourseFactory): """ Factory for sample courses using block_info_tree definitions. """ - # pylint: disable=unused-argument @classmethod def _create(cls, target_class, **kwargs): """ @@ -181,7 +180,6 @@ class ToyCourseFactory(SampleCourseFactory): run = '2012_Fall' display_name = 'Toy Course' - # pylint: disable=unused-argument @classmethod def _create(cls, target_class, **kwargs): """ diff --git a/common/lib/xmodule/xmodule/modulestore/tests/sample_courses.py b/common/lib/xmodule/xmodule/modulestore/tests/sample_courses.py index b46460b97687..775b79006f67 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/sample_courses.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/sample_courses.py @@ -7,7 +7,7 @@ # fields is a dictionary of keys and values. sub_tree is a collection of BlockInfo from collections import namedtuple import datetime -BlockInfo = namedtuple('BlockInfo', 'block_id, category, fields, sub_tree') # pylint: disable=invalid-name +BlockInfo = namedtuple('BlockInfo', 'block_id, category, fields, sub_tree') default_block_info_tree = [ # pylint: disable=invalid-name BlockInfo( 'chapter_x', 'chapter', {}, [ diff --git a/common/lib/xmodule/xmodule/modulestore/tests/utils.py b/common/lib/xmodule/xmodule/modulestore/tests/utils.py index 3cdd0c36e978..4d47b57f7b00 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/utils.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/utils.py @@ -89,7 +89,7 @@ def location(self): def location(self, value): """ Set the UsageKey of this block. """ assert isinstance(value, UsageKey) - self.scope_ids = self.scope_ids._replace( # pylint: disable=attribute-defined-outside-init,protected-access + self.scope_ids = self.scope_ids._replace( def_id=value, usage_id=value, ) @@ -295,7 +295,6 @@ def build_with_contentstore(self, contentstore): # Set up a temp directory for storing filesystem content created during import fs_root = mkdtemp() - # pylint: disable=attribute-defined-outside-init modulestore = DraftModuleStore( contentstore, doc_store_config, @@ -334,7 +333,6 @@ def build_with_contentstore(self, contentstore): contentstore: The contentstore that this modulestore should use to store all of its assets. """ - # pylint: disable=unreachable doc_store_config = dict( db='modulestore{}'.format(random.randint(0, 10000)), collection='split_module', diff --git a/common/lib/xmodule/xmodule/modulestore/xml_exporter.py b/common/lib/xmodule/xmodule/modulestore/xml_exporter.py index 85a3d838af9c..0217421b2409 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml_exporter.py +++ b/common/lib/xmodule/xmodule/modulestore/xml_exporter.py @@ -97,7 +97,6 @@ def _export_drafts(modulestore, course_key, export_fs, xml_centric_course_key): draft_node.module.runtime.export_fs = draft_course_dir adapt_references(draft_node.module, xml_centric_course_key, draft_course_dir) - # pylint: disable=no-member node = lxml.etree.Element('unknown') draft_node.module.add_xml_to_node(node) @@ -158,7 +157,7 @@ def export(self): with self.modulestore.bulk_operations(self.courselike_key): fsm = OSFS(self.root_dir) - root = lxml.etree.Element('unknown') # pylint: disable=no-member + root = lxml.etree.Element('unknown') # export only the published content with self.modulestore.branch_setting(ModuleStoreEnum.Branch.published_only, self.courselike_key): @@ -200,7 +199,7 @@ def get_courselike(self): def process_root(self, root, export_fs): with export_fs.open('course.xml', 'w') as course_xml: - lxml.etree.ElementTree(root).write(course_xml) # pylint: disable=no-member + lxml.etree.ElementTree(root).write(course_xml) def process_extra(self, root, courselike, root_courselike_dir, xml_centric_courselike_key, export_fs): # Export the modulestore's asset metadata. @@ -211,10 +210,10 @@ def process_extra(self, root, courselike, root_courselike_dir, xml_centric_cours course_assets = self.modulestore.get_all_asset_metadata(self.courselike_key, None) for asset_md in course_assets: # All asset types are exported using the "asset" tag - but their asset type is specified in each asset key. - asset = lxml.etree.SubElement(asset_root, AssetMetadata.ASSET_XML_TAG) # pylint: disable=no-member + asset = lxml.etree.SubElement(asset_root, AssetMetadata.ASSET_XML_TAG) asset_md.to_xml(asset) with OSFS(asset_dir).open(AssetMetadata.EXPORTED_ASSET_FILENAME, 'w') as asset_xml_file: - lxml.etree.ElementTree(asset_root).write(asset_xml_file) # pylint: disable=no-member + lxml.etree.ElementTree(asset_root).write(asset_xml_file) # export the static assets policies_dir = export_fs.makeopendir('policies') @@ -338,7 +337,6 @@ def post_process(self, root, export_fs): """ # Create the Library.xml file, which acts as the index of all library contents. xml_file = export_fs.open(LIBRARY_ROOT, 'w') - # pylint: disable=no-member xml_file.write(lxml.etree.tostring(root, pretty_print=True, encoding='utf-8')) xml_file.close() diff --git a/common/lib/xmodule/xmodule/partitions/partitions.py b/common/lib/xmodule/xmodule/partitions/partitions.py index 190e11062ef0..559dcf81def5 100644 --- a/common/lib/xmodule/xmodule/partitions/partitions.py +++ b/common/lib/xmodule/xmodule/partitions/partitions.py @@ -5,7 +5,7 @@ # We use ``id`` in this file as the IDs of our Groups and UserPartitions, # which Pylint disapproves of. -# pylint: disable=invalid-name, redefined-builtin +# pylint: disable=redefined-builtin class UserPartitionError(Exception): @@ -39,7 +39,6 @@ class Group(namedtuple("Group", "id name")): VERSION = 1 def __new__(cls, id, name): - # pylint: disable=super-on-old-class return super(Group, cls).__new__(cls, int(id), name) def to_json(self): @@ -109,7 +108,6 @@ class UserPartition(namedtuple("UserPartition", "id name description groups sche VERSION_1_SCHEME = "random" def __new__(cls, id, name, description, groups, scheme=None, parameters=None, active=True, scheme_id=VERSION_1_SCHEME): # pylint: disable=line-too-long - # pylint: disable=super-on-old-class if not scheme: scheme = UserPartition.get_scheme(scheme_id) if parameters is None: @@ -211,7 +209,6 @@ def get_group(self, group_id): NoSuchUserPartitionGroupError: The specified group could not be found. """ - # pylint: disable=no-member for group in self.groups: if group.id == group_id: return group diff --git a/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py b/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py index af2bf9691977..a152c1d93842 100644 --- a/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py +++ b/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py @@ -160,10 +160,10 @@ def test_construct(self): ) self.assertEqual(user_partition.id, self.TEST_ID) self.assertEqual(user_partition.name, self.TEST_NAME) - self.assertEqual(user_partition.description, self.TEST_DESCRIPTION) # pylint: disable=no-member - self.assertEqual(user_partition.groups, self.TEST_GROUPS) # pylint: disable=no-member - self.assertEquals(user_partition.scheme.name, self.TEST_SCHEME_NAME) # pylint: disable=no-member - self.assertEquals(user_partition.parameters, self.TEST_PARAMETERS) # pylint: disable=no-member + self.assertEqual(user_partition.description, self.TEST_DESCRIPTION) + self.assertEqual(user_partition.groups, self.TEST_GROUPS) + self.assertEquals(user_partition.scheme.name, self.TEST_SCHEME_NAME) + self.assertEquals(user_partition.parameters, self.TEST_PARAMETERS) def test_string_id(self): user_partition = UserPartition( @@ -201,12 +201,12 @@ def test_from_json(self): "scheme": "mock", } user_partition = UserPartition.from_json(jsonified) - self.assertEqual(user_partition.id, self.TEST_ID) # pylint: disable=no-member - self.assertEqual(user_partition.name, self.TEST_NAME) # pylint: disable=no-member - self.assertEqual(user_partition.description, self.TEST_DESCRIPTION) # pylint: disable=no-member - self.assertEqual(user_partition.parameters, self.TEST_PARAMETERS) # pylint: disable=no-member + self.assertEqual(user_partition.id, self.TEST_ID) + self.assertEqual(user_partition.name, self.TEST_NAME) + self.assertEqual(user_partition.description, self.TEST_DESCRIPTION) + self.assertEqual(user_partition.parameters, self.TEST_PARAMETERS) - for act_group in user_partition.groups: # pylint: disable=no-member + for act_group in user_partition.groups: self.assertIn(act_group.id, [0, 1]) exp_group = self.TEST_GROUPS[act_group.id] self.assertEqual(exp_group.id, act_group.id) @@ -223,7 +223,7 @@ def test_version_upgrade(self): "version": 1, } user_partition = UserPartition.from_json(jsonified) - self.assertEqual(user_partition.scheme.name, "random") # pylint: disable=no-member + self.assertEqual(user_partition.scheme.name, "random") self.assertEqual(user_partition.parameters, {}) self.assertTrue(user_partition.active) diff --git a/common/lib/xmodule/xmodule/split_test_module.py b/common/lib/xmodule/xmodule/split_test_module.py index efd1a023c233..076a79265ab1 100644 --- a/common/lib/xmodule/xmodule/split_test_module.py +++ b/common/lib/xmodule/xmodule/split_test_module.py @@ -559,7 +559,7 @@ def validate_split_test(self): Returns a StudioValidation object describing the current state of the split_test_module (not including superclass validation messages). """ - _ = self.runtime.service(self, "i18n").ugettext # pylint: disable=redefined-outer-name + _ = self.runtime.service(self, "i18n").ugettext split_validation = StudioValidation(self.location) if self.user_partition_id < 0: split_validation.add( diff --git a/common/lib/xmodule/xmodule/static_content.py b/common/lib/xmodule/xmodule/static_content.py index dd4fbecbc6d1..cad0fabb6b67 100755 --- a/common/lib/xmodule/xmodule/static_content.py +++ b/common/lib/xmodule/xmodule/static_content.py @@ -173,7 +173,7 @@ def _write_files(output_root, contents, generated_suffix_map=None): # not_file is included to short-circuit this check, because # read_md5 depends on the file already existing - write_file = not_file or output_file.read_md5() != hashlib.md5(file_content).digest() # pylint: disable=too-many-function-args + write_file = not_file or output_file.read_md5() != hashlib.md5(file_content).digest() if write_file: LOG.debug("Writing %s", output_file) output_file.write_bytes(file_content) diff --git a/common/lib/xmodule/xmodule/tabs.py b/common/lib/xmodule/xmodule/tabs.py index e54e8f0aabf0..833e63f2a24f 100644 --- a/common/lib/xmodule/xmodule/tabs.py +++ b/common/lib/xmodule/xmodule/tabs.py @@ -73,7 +73,7 @@ def __init__(self, tab_dict): self.is_hidden = tab_dict.get('is_hidden', False) @classmethod - def is_enabled(cls, course, user=None): # pylint: disable=unused-argument + def is_enabled(cls, course, user=None): """Returns true if this course tab is enabled in the course. Args: @@ -249,7 +249,7 @@ def link_func(course, reverse_func): super(StaticTab, self).__init__(tab_dict) @classmethod - def is_enabled(cls, course, user=None): # pylint: disable=unused-argument + def is_enabled(cls, course, user=None): """ Static tabs are viewable to everyone, even anonymous users. """ diff --git a/common/lib/xmodule/xmodule/tests/test_lti_unit.py b/common/lib/xmodule/xmodule/tests/test_lti_unit.py index fc77ca7c1e20..6c2cdb71b9f4 100644 --- a/common/lib/xmodule/xmodule/tests/test_lti_unit.py +++ b/common/lib/xmodule/xmodule/tests/test_lti_unit.py @@ -459,7 +459,7 @@ def get_signed_grade_mock_request(self, namespace_lti_v1p1=True): LTI 1.1 will be used. Otherwise fake namespace will be added to XML. """ mock_request = Mock() - mock_request.headers = { # pylint: disable=no-space-before-operator + mock_request.headers = { 'X-Requested-With': 'XMLHttpRequest', 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': u'OAuth oauth_nonce="135685044251684026041377608307", \ diff --git a/common/lib/xmodule/xmodule/tests/test_video.py b/common/lib/xmodule/xmodule/tests/test_video.py index 5b0ae3b2fe8c..58193ebf7a5b 100644 --- a/common/lib/xmodule/xmodule/tests/test_video.py +++ b/common/lib/xmodule/xmodule/tests/test_video.py @@ -603,7 +603,7 @@ def test_export_to_xml(self, mock_val_api): """ def mock_val_export(edx_video_id): """Mock edxval.api.export_to_xml""" - return etree.Element( # pylint:disable=no-member + return etree.Element( 'video_asset', attrib={'export_edx_video_id': edx_video_id} ) diff --git a/common/lib/xmodule/xmodule/vertical_block.py b/common/lib/xmodule/xmodule/vertical_block.py index 0a01de6ac2fb..edeccd9b75fd 100644 --- a/common/lib/xmodule/xmodule/vertical_block.py +++ b/common/lib/xmodule/xmodule/vertical_block.py @@ -98,7 +98,7 @@ def definition_from_xml(cls, xml_object, system): children = [] for child in xml_object: try: - child_block = system.process_xml(etree.tostring(child, encoding='unicode')) # pylint: disable=no-member + child_block = system.process_xml(etree.tostring(child, encoding='unicode')) children.append(child_block.scope_ids.usage_id) except Exception as exc: # pylint: disable=broad-except log.exception("Unable to load child when parsing Vertical. Continuing...") @@ -108,7 +108,7 @@ def definition_from_xml(cls, xml_object, system): return {}, children def definition_to_xml(self, resource_fs): - xml_object = etree.Element('vertical') # pylint: disable=no-member + xml_object = etree.Element('vertical') for child in self.get_children(): self.runtime.add_block_as_child_node(child, xml_object) return xml_object diff --git a/common/lib/xmodule/xmodule/video_module/video_module.py b/common/lib/xmodule/xmodule/video_module/video_module.py index 2ebbbe31d531..c23540324140 100644 --- a/common/lib/xmodule/xmodule/video_module/video_module.py +++ b/common/lib/xmodule/xmodule/video_module/video_module.py @@ -1,6 +1,4 @@ - # -*- coding: utf-8 -*- -# pylint: disable=abstract-method """Video is ungraded Xmodule for support video content. It's new improved video module, which support additional feature: - Can play non-YouTube video sources via in-browser HTML5 video player. diff --git a/common/lib/xmodule/xmodule/x_module.py b/common/lib/xmodule/xmodule/x_module.py index b9c6ef297fa3..0f926053b912 100644 --- a/common/lib/xmodule/xmodule/x_module.py +++ b/common/lib/xmodule/xmodule/x_module.py @@ -142,7 +142,7 @@ def get_aside_type_from_definition(self, aside_id): return aside_id.aside_type -class AsideKeyGenerator(IdGenerator): # pylint: disable=abstract-method +class AsideKeyGenerator(IdGenerator): """ An :class:`.IdGenerator` that only provides facilities for constructing new XBlockAsides. """ @@ -593,7 +593,6 @@ def bind_for_student(self, xmodule_runtime, user_id, wrappers=None): # not the most elegant way of doing this, but if we're removing # a field from the module's field_data_cache, we should also # remove it from its _dirty_fields - # pylint: disable=protected-access if field in self._dirty_fields: del self._dirty_fields[field] @@ -751,7 +750,7 @@ def __delete__(self, instance): @XBlock.needs("i18n") -class XModule(HTMLSnippet, XModuleMixin): # pylint: disable=abstract-method +class XModule(HTMLSnippet, XModuleMixin): """ Implements a generic learning module. Subclasses must at a minimum provide a definition for get_html in order @@ -1176,7 +1175,7 @@ def studio_view(self, _context): return Fragment(self.get_html()) -class ConfigurableFragmentWrapper(object): # pylint: disable=abstract-method +class ConfigurableFragmentWrapper(object): """ Runtime mixin that allows for composition of many `wrap_xblock` wrappers """ @@ -1210,7 +1209,7 @@ def wrap_xblock(self, block, view, frag, context): # Runtime.handler_url interface. # # The monkey-patching happens in (lms|cms)/startup.py -def descriptor_global_handler_url(block, handler_name, suffix='', query='', thirdparty=False): # pylint: disable=invalid-name, unused-argument +def descriptor_global_handler_url(block, handler_name, suffix='', query='', thirdparty=False): # pylint: disable=unused-argument """ See :meth:`xblock.runtime.Runtime.handler_url`. """ @@ -1309,7 +1308,7 @@ def handle(self, block, handler_name, request, suffix=''): ) -class DescriptorSystem(MetricsMixin, ConfigurableFragmentWrapper, Runtime): # pylint: disable=abstract-method +class DescriptorSystem(MetricsMixin, ConfigurableFragmentWrapper, Runtime): """ Base class for :class:`Runtime`s to be used with :class:`XModuleDescriptor`s """ @@ -1543,7 +1542,7 @@ def _make_usage_key(self, course_key, value): return value return course_key.make_usage_key_from_deprecated_string(value) - def _convert_reference_fields_to_keys(self, xblock): # pylint: disable=invalid-name + def _convert_reference_fields_to_keys(self, xblock): """ Find all fields of type reference and convert the payload into UsageKeys """ @@ -1565,7 +1564,7 @@ def _convert_reference_fields_to_keys(self, xblock): # pylint: disable=invalid- setattr(xblock, field.name, field_value) -class ModuleSystem(MetricsMixin, ConfigurableFragmentWrapper, Runtime): # pylint: disable=abstract-method +class ModuleSystem(MetricsMixin, ConfigurableFragmentWrapper, Runtime): """ This is an abstraction such that x_modules can function independent of the courseware (e.g. import into other types of courseware, LMS, @@ -1748,7 +1747,6 @@ class CombinedSystem(object): # # At runtime, the ModuleSystem and/or DescriptorSystem will define those methods # - # pylint: disable=abstract-method def __init__(self, module_system, descriptor_system): # These attributes are set directly to __dict__ below to avoid a recursion in getattr/setattr. self._module_system = module_system diff --git a/common/lib/xmodule/xmodule/xml_module.py b/common/lib/xmodule/xmodule/xml_module.py index 8be8f48143e5..f2009d486c3d 100644 --- a/common/lib/xmodule/xmodule/xml_module.py +++ b/common/lib/xmodule/xmodule/xml_module.py @@ -13,7 +13,7 @@ import dogstats_wrapper as dog_stats_api -from lxml.etree import ( # pylint: disable=no-name-in-module +from lxml.etree import ( Element, ElementTree, XMLParser, ) @@ -517,7 +517,7 @@ def parse_xml(cls, node, runtime, keys, id_generator): else: return super(XmlDescriptor, cls).parse_xml(node, runtime, keys, id_generator) - def export_to_xml(self, resource_fs): # pylint: disable=unused-argument + def export_to_xml(self, resource_fs): """ Returns an xml string representing this module, and all modules underneath it. May also write required resources out to resource_fs. @@ -536,7 +536,7 @@ def export_to_xml(self, resource_fs): # pylint: disable=unused-argument # b) call super(..).export_to_xml(..) node = Element(self.category) super(XmlDescriptor, self).add_xml_to_node(node) - return etree.tostring(node) # pylint: disable=no-member + return etree.tostring(node) def add_xml_to_node(self, node): """ diff --git a/common/test/acceptance/pages/studio/settings_certificates.py b/common/test/acceptance/pages/studio/settings_certificates.py index 51a14439ca48..663f99eebc34 100644 --- a/common/test/acceptance/pages/studio/settings_certificates.py +++ b/common/test/acceptance/pages/studio/settings_certificates.py @@ -509,7 +509,6 @@ def delete_signatory(self): """ Delete the signatory """ - # pylint: disable=pointless-statement self.wait_for_signatory_delete_icon() self.click_signatory_delete_icon() self.wait_for_signatory_delete_prompt() diff --git a/common/test/acceptance/tests/lms/test_lms_dashboard.py b/common/test/acceptance/tests/lms/test_lms_dashboard.py index ec13ddfc4151..6b3cc3e5e622 100644 --- a/common/test/acceptance/tests/lms/test_lms_dashboard.py +++ b/common/test/acceptance/tests/lms/test_lms_dashboard.py @@ -75,7 +75,7 @@ def test_dashboard_social_sharing_feature(self): Validate the behavior of the social sharing feature """ twitter_widget = self.dashboard_page.get_course_social_sharing_widget('twitter') - twitter_url = "https://twitter.com/intent/tweet?text=Testing+feature%3A%20http%3A%2F%2Fcustom%2Fcourse%2Furl" # pylint: disable=line-too-long + twitter_url = "https://twitter.com/intent/tweet?text=Testing+feature%3A%20http%3A%2F%2Fcustom%2Fcourse%2Furl" self.assertEqual(twitter_widget.attrs('title')[0], 'Share on Twitter') self.assertEqual(twitter_widget.attrs('data-tooltip')[0], 'Share on Twitter') self.assertEqual(twitter_widget.attrs('aria-haspopup')[0], 'true') diff --git a/common/test/acceptance/tests/studio/base_studio_test.py b/common/test/acceptance/tests/studio/base_studio_test.py index d12b6166080f..82acb817f126 100644 --- a/common/test/acceptance/tests/studio/base_studio_test.py +++ b/common/test/acceptance/tests/studio/base_studio_test.py @@ -115,7 +115,7 @@ class StudioLibraryTest(WebAppTest): """ as_staff = True - def setUp(self): # pylint: disable=arguments-differ + def setUp(self): """ Install a library with no content using a fixture. """ diff --git a/common/test/acceptance/tests/studio/test_import_export.py b/common/test/acceptance/tests/studio/test_import_export.py index 64e0db3980ac..0d77c76805b2 100644 --- a/common/test/acceptance/tests/studio/test_import_export.py +++ b/common/test/acceptance/tests/studio/test_import_export.py @@ -62,7 +62,7 @@ class TestLibraryExport(ExportTestMixin, StudioLibraryTest): """ Export tests for libraries. """ - def setUp(self): # pylint: disable=arguments-differ + def setUp(self): """ Ensure a library exists and navigate to the library edit page. """ diff --git a/common/test/acceptance/tests/studio/test_studio_course_team.py b/common/test/acceptance/tests/studio/test_studio_course_team.py index abeae9b04332..fcc1d657bd23 100644 --- a/common/test/acceptance/tests/studio/test_studio_course_team.py +++ b/common/test/acceptance/tests/studio/test_studio_course_team.py @@ -32,9 +32,9 @@ def setUp(self, is_staff=False): """ super(CourseTeamPageTest, self).setUp(is_staff) - self.other_user = self._make_user('other') # pylint:disable=attribute-defined-outside-init - self.dashboard_page = DashboardPage(self.browser) # pylint:disable=attribute-defined-outside-init - self.page = CourseTeamPage( # pylint:disable=attribute-defined-outside-init + self.other_user = self._make_user('other') + self.dashboard_page = DashboardPage(self.browser) + self.page = CourseTeamPage( self.browser, self.course_info['org'], self.course_info['number'], self.course_info['run'] ) self._go_to_course_team_page() diff --git a/common/test/acceptance/tests/studio/test_studio_library.py b/common/test/acceptance/tests/studio/test_studio_library.py index facd11b6d662..1eefd30573a0 100644 --- a/common/test/acceptance/tests/studio/test_studio_library.py +++ b/common/test/acceptance/tests/studio/test_studio_library.py @@ -19,7 +19,7 @@ class LibraryEditPageTest(StudioLibraryTest): """ Test the functionality of the library edit page. """ - def setUp(self): # pylint: disable=arguments-differ + def setUp(self): """ Ensure a library exists and navigate to the library edit page. """ @@ -192,7 +192,7 @@ class LibraryNavigationTest(StudioLibraryTest): """ Test common Navigation actions """ - def setUp(self): # pylint: disable=arguments-differ + def setUp(self): """ Ensure a library exists and navigate to the library edit page. """ @@ -206,7 +206,6 @@ def populate_library_fixture(self, library_fixture): Create four pages worth of XBlocks, and offset by one so each is named after the number they should be in line by the user's perception. """ - # pylint: disable=attribute-defined-outside-init self.blocks = [XBlockFixtureDesc('html', str(i)) for i in xrange(1, 41)] library_fixture.add_children(*self.blocks) diff --git a/lms/djangoapps/bulk_email/tasks.py b/lms/djangoapps/bulk_email/tasks.py index 5fa816f5234e..9c92d2178580 100644 --- a/lms/djangoapps/bulk_email/tasks.py +++ b/lms/djangoapps/bulk_email/tasks.py @@ -272,7 +272,7 @@ def _create_send_email_subtask(to_list, initial_subtask_status): return progress -@task(default_retry_delay=settings.BULK_EMAIL_DEFAULT_RETRY_DELAY, max_retries=settings.BULK_EMAIL_MAX_RETRIES) # pylint: disable=not-callable +@task(default_retry_delay=settings.BULK_EMAIL_DEFAULT_RETRY_DELAY, max_retries=settings.BULK_EMAIL_MAX_RETRIES) def send_course_email(entry_id, email_id, to_list, global_email_context, subtask_status_dict): """ Sends an email to a list of recipients. diff --git a/lms/djangoapps/bulk_email/tests/test_email.py b/lms/djangoapps/bulk_email/tests/test_email.py index 9a85bd2ba507..e5f0acc01be2 100644 --- a/lms/djangoapps/bulk_email/tests/test_email.py +++ b/lms/djangoapps/bulk_email/tests/test_email.py @@ -37,7 +37,7 @@ class MockCourseEmailResult(object): def get_mock_update_subtask_status(self): """Wrapper for mock email function.""" - def mock_update_subtask_status(entry_id, current_task_id, new_subtask_status): # pylint: disable=unused-argument + def mock_update_subtask_status(entry_id, current_task_id, new_subtask_status): """Increments count of number of emails sent.""" self.emails_sent += new_subtask_status.succeeded return update_subtask_status(entry_id, current_task_id, new_subtask_status) diff --git a/lms/djangoapps/bulk_email/tests/test_err_handling.py b/lms/djangoapps/bulk_email/tests/test_err_handling.py index 89f1195aea62..b2615199fd20 100644 --- a/lms/djangoapps/bulk_email/tests/test_err_handling.py +++ b/lms/djangoapps/bulk_email/tests/test_err_handling.py @@ -168,7 +168,7 @@ def test_nonexistent_email(self, mock_log, result): entry = InstructorTask.create(course_id, "task_type", "task_key", "task_input", self.instructor) task_input = {"email_id": -1} with self.assertRaises(CourseEmail.DoesNotExist): - perform_delegate_email_batches(entry.id, course_id, task_input, "action_name") # pylint: disable=no-member + perform_delegate_email_batches(entry.id, course_id, task_input, "action_name") ((log_str, __, email_id), __) = mock_log.warning.call_args self.assertTrue(mock_log.warning.called) self.assertIn('Failed to get CourseEmail with id', log_str) @@ -183,10 +183,10 @@ def test_nonexistent_course(self): email = CourseEmail(course_id=course_id) email.save() entry = InstructorTask.create(course_id, "task_type", "task_key", "task_input", self.instructor) - task_input = {"email_id": email.id} # pylint: disable=no-member + task_input = {"email_id": email.id} # (?i) is a regex for ignore case with self.assertRaisesRegexp(ValueError, r"(?i)course not found"): - perform_delegate_email_batches(entry.id, course_id, task_input, "action_name") # pylint: disable=no-member + perform_delegate_email_batches(entry.id, course_id, task_input, "action_name") def test_nonexistent_to_option(self): """ @@ -195,9 +195,9 @@ def test_nonexistent_to_option(self): email = CourseEmail(course_id=self.course.id, to_option="IDONTEXIST") email.save() entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - task_input = {"email_id": email.id} # pylint: disable=no-member + task_input = {"email_id": email.id} with self.assertRaisesRegexp(Exception, 'Unexpected bulk email TO_OPTION found: IDONTEXIST'): - perform_delegate_email_batches(entry.id, self.course.id, task_input, "action_name") # pylint: disable=no-member + perform_delegate_email_batches(entry.id, self.course.id, task_input, "action_name") def test_wrong_course_id_in_task(self): """ @@ -206,9 +206,9 @@ def test_wrong_course_id_in_task(self): email = CourseEmail(course_id=self.course.id, to_option=SEND_TO_ALL) email.save() entry = InstructorTask.create("bogus/task/id", "task_type", "task_key", "task_input", self.instructor) - task_input = {"email_id": email.id} # pylint: disable=no-member + task_input = {"email_id": email.id} with self.assertRaisesRegexp(ValueError, 'does not match task value'): - perform_delegate_email_batches(entry.id, self.course.id, task_input, "action_name") # pylint: disable=no-member + perform_delegate_email_batches(entry.id, self.course.id, task_input, "action_name") def test_wrong_course_id_in_email(self): """ @@ -217,14 +217,14 @@ def test_wrong_course_id_in_email(self): email = CourseEmail(course_id=SlashSeparatedCourseKey("bogus", "course", "id"), to_option=SEND_TO_ALL) email.save() entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - task_input = {"email_id": email.id} # pylint: disable=no-member + task_input = {"email_id": email.id} with self.assertRaisesRegexp(ValueError, 'does not match email value'): - perform_delegate_email_batches(entry.id, self.course.id, task_input, "action_name") # pylint: disable=no-member + perform_delegate_email_batches(entry.id, self.course.id, task_input, "action_name") def test_send_email_undefined_subtask(self): # test at a lower level, to ensure that the course gets checked down below too. entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - entry_id = entry.id # pylint: disable=no-member + entry_id = entry.id to_list = ['test@test.com'] global_email_context = {'course_title': 'dummy course'} subtask_id = "subtask-id-value" @@ -236,7 +236,7 @@ def test_send_email_undefined_subtask(self): def test_send_email_missing_subtask(self): # test at a lower level, to ensure that the course gets checked down below too. entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - entry_id = entry.id # pylint: disable=no-member + entry_id = entry.id to_list = ['test@test.com'] global_email_context = {'course_title': 'dummy course'} subtask_id = "subtask-id-value" @@ -250,7 +250,7 @@ def test_send_email_missing_subtask(self): def test_send_email_completed_subtask(self): # test at a lower level, to ensure that the course gets checked down below too. entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - entry_id = entry.id # pylint: disable=no-member + entry_id = entry.id subtask_id = "subtask-id-value" initialize_subtask_info(entry, "emailed", 100, [subtask_id]) subtask_status = SubtaskStatus.create(subtask_id, state=SUCCESS) @@ -265,7 +265,7 @@ def test_send_email_completed_subtask(self): def test_send_email_running_subtask(self): # test at a lower level, to ensure that the course gets checked down below too. entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - entry_id = entry.id # pylint: disable=no-member + entry_id = entry.id subtask_id = "subtask-id-value" initialize_subtask_info(entry, "emailed", 100, [subtask_id]) subtask_status = SubtaskStatus.create(subtask_id) @@ -280,7 +280,7 @@ def test_send_email_running_subtask(self): def test_send_email_retried_subtask(self): # test at a lower level, to ensure that the course gets checked down below too. entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - entry_id = entry.id # pylint: disable=no-member + entry_id = entry.id subtask_id = "subtask-id-value" initialize_subtask_info(entry, "emailed", 100, [subtask_id]) subtask_status = SubtaskStatus.create(subtask_id, state=RETRY, retried_nomax=2) @@ -300,7 +300,7 @@ def test_send_email_retried_subtask(self): def test_send_email_with_locked_instructor_task(self): # test at a lower level, to ensure that the course gets checked down below too. entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - entry_id = entry.id # pylint: disable=no-member + entry_id = entry.id subtask_id = "subtask-id-locked-model" initialize_subtask_info(entry, "emailed", 100, [subtask_id]) subtask_status = SubtaskStatus.create(subtask_id) @@ -316,7 +316,7 @@ def test_send_email_with_locked_instructor_task(self): def test_send_email_undefined_email(self): # test at a lower level, to ensure that the course gets checked down below too. entry = InstructorTask.create(self.course.id, "task_type", "task_key", "task_input", self.instructor) - entry_id = entry.id # pylint: disable=no-member + entry_id = entry.id to_list = ['test@test.com'] global_email_context = {'course_title': 'dummy course'} subtask_id = "subtask-id-undefined-email" diff --git a/lms/djangoapps/bulk_email/tests/test_tasks.py b/lms/djangoapps/bulk_email/tests/test_tasks.py index f732d5d5a86c..ca0ed3437270 100644 --- a/lms/djangoapps/bulk_email/tests/test_tasks.py +++ b/lms/djangoapps/bulk_email/tests/test_tasks.py @@ -99,7 +99,7 @@ def _create_input_entry(self, course_id=None): course_email = CourseEmail.create( course_id, self.instructor, to_option, "Test Subject", "

This is a test message

" ) - task_input = {'email_id': course_email.id} # pylint: disable=no-member + task_input = {'email_id': course_email.id} task_id = str(uuid4()) instructor_task = InstructorTaskFactory.create( course_id=course_id, diff --git a/lms/djangoapps/ccx/models.py b/lms/djangoapps/ccx/models.py index 2bb03f204ce9..2baf72ee886c 100644 --- a/lms/djangoapps/ccx/models.py +++ b/lms/djangoapps/ccx/models.py @@ -9,7 +9,7 @@ from django.utils.timezone import UTC from lazy import lazy -from xmodule_django.models import CourseKeyField, LocationKeyField # pylint: disable=import-error +from xmodule_django.models import CourseKeyField, LocationKeyField from xmodule.error_module import ErrorDescriptor from xmodule.modulestore.django import modulestore diff --git a/lms/djangoapps/ccx/overrides.py b/lms/djangoapps/ccx/overrides.py index 44838ecf081e..79caed1a5ca4 100644 --- a/lms/djangoapps/ccx/overrides.py +++ b/lms/djangoapps/ccx/overrides.py @@ -9,7 +9,7 @@ import request_cache -from courseware.field_overrides import FieldOverrideProvider # pylint: disable=import-error +from courseware.field_overrides import FieldOverrideProvider from opaque_keys.edx.keys import CourseKey, UsageKey from ccx_keys.locator import CCXLocator, CCXBlockUsageLocator diff --git a/lms/djangoapps/ccx/tests/factories.py b/lms/djangoapps/ccx/tests/factories.py index 4d2d55445724..43e16ed58997 100644 --- a/lms/djangoapps/ccx/tests/factories.py +++ b/lms/djangoapps/ccx/tests/factories.py @@ -12,5 +12,5 @@ class Meta(object): model = CustomCourseForEdX display_name = "Test CCX" - id = None # pylint: disable=redefined-builtin, invalid-name + id = None # pylint: disable=invalid-name coach = SubFactory(UserFactory) diff --git a/lms/djangoapps/ccx/tests/test_ccx_modulestore.py b/lms/djangoapps/ccx/tests/test_ccx_modulestore.py index 98ca36138d12..6f0ddbe14d62 100644 --- a/lms/djangoapps/ccx/tests/test_ccx_modulestore.py +++ b/lms/djangoapps/ccx/tests/test_ccx_modulestore.py @@ -65,7 +65,7 @@ def setUp(self): ) ccx.save() - self.ccx_locator = CCXLocator.from_course_locator(self.course.id, ccx.id) # pylint: disable=no-member + self.ccx_locator = CCXLocator.from_course_locator(self.course.id, ccx.id) def get_all_children_bf(self, block): """traverse the children of block in a breadth-first order""" diff --git a/lms/djangoapps/ccx/tests/test_field_override_performance.py b/lms/djangoapps/ccx/tests/test_field_override_performance.py index 6a63c9825ad7..d6a88b300b77 100644 --- a/lms/djangoapps/ccx/tests/test_field_override_performance.py +++ b/lms/djangoapps/ccx/tests/test_field_override_performance.py @@ -7,19 +7,19 @@ import mock from nose.plugins.skip import SkipTest -from courseware.views import progress # pylint: disable=import-error +from courseware.views import progress from courseware.field_overrides import OverrideFieldData from datetime import datetime from django.conf import settings from django.core.cache import caches from django.test.client import RequestFactory from django.test.utils import override_settings -from edxmako.middleware import MakoMiddleware # pylint: disable=import-error +from edxmako.middleware import MakoMiddleware from nose.plugins.attrib import attr from pytz import UTC from request_cache.middleware import RequestCache from student.models import CourseEnrollment -from student.tests.factories import UserFactory # pylint: disable=import-error +from student.tests.factories import UserFactory from xblock.core import XBlock from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, \ diff --git a/lms/djangoapps/ccx/tests/test_models.py b/lms/djangoapps/ccx/tests/test_models.py index f3e918310ce3..2a1c9750928d 100644 --- a/lms/djangoapps/ccx/tests/test_models.py +++ b/lms/djangoapps/ccx/tests/test_models.py @@ -5,8 +5,8 @@ from django.utils.timezone import UTC from mock import patch from nose.plugins.attrib import attr -from student.roles import CourseCcxCoachRole # pylint: disable=import-error -from student.tests.factories import ( # pylint: disable=import-error +from student.roles import CourseCcxCoachRole +from student.tests.factories import ( AdminFactory, ) from util.tests.test_date_utils import fake_ugettext diff --git a/lms/djangoapps/ccx/tests/test_overrides.py b/lms/djangoapps/ccx/tests/test_overrides.py index 4b1be35e3937..5f221ebef02f 100644 --- a/lms/djangoapps/ccx/tests/test_overrides.py +++ b/lms/djangoapps/ccx/tests/test_overrides.py @@ -7,11 +7,11 @@ import pytz from nose.plugins.attrib import attr -from courseware.field_overrides import OverrideFieldData # pylint: disable=import-error +from courseware.field_overrides import OverrideFieldData from django.test.utils import override_settings from lms.djangoapps.courseware.tests.test_field_overrides import inject_field_overrides from request_cache.middleware import RequestCache -from student.tests.factories import AdminFactory # pylint: disable=import-error +from student.tests.factories import AdminFactory from xmodule.modulestore.tests.django_utils import ( ModuleStoreTestCase, TEST_DATA_SPLIT_MODULESTORE) diff --git a/lms/djangoapps/ccx/tests/test_tasks.py b/lms/djangoapps/ccx/tests/test_tasks.py index be8d0097ef92..b3a45387c0a3 100644 --- a/lms/djangoapps/ccx/tests/test_tasks.py +++ b/lms/djangoapps/ccx/tests/test_tasks.py @@ -5,8 +5,8 @@ from mock_django import mock_signal_receiver from lms.djangoapps.ccx.tests.factories import CcxFactory -from student.roles import CourseCcxCoachRole # pylint: disable=import-error -from student.tests.factories import ( # pylint: disable=import-error +from student.roles import CourseCcxCoachRole +from student.tests.factories import ( AdminFactory, ) from xmodule.modulestore.django import SignalHandler diff --git a/lms/djangoapps/ccx/tests/test_utils.py b/lms/djangoapps/ccx/tests/test_utils.py index cd592185e74a..837913ab6eb1 100644 --- a/lms/djangoapps/ccx/tests/test_utils.py +++ b/lms/djangoapps/ccx/tests/test_utils.py @@ -4,8 +4,8 @@ from nose.plugins.attrib import attr from lms.djangoapps.ccx.tests.factories import CcxFactory -from student.roles import CourseCcxCoachRole # pylint: disable=import-error -from student.tests.factories import ( # pylint: disable=import-error +from student.roles import CourseCcxCoachRole +from student.tests.factories import ( AdminFactory, ) from xmodule.modulestore.tests.django_utils import ( diff --git a/lms/djangoapps/ccx/tests/test_views.py b/lms/djangoapps/ccx/tests/test_views.py index 3d1dfa2d4961..cb215a82d936 100644 --- a/lms/djangoapps/ccx/tests/test_views.py +++ b/lms/djangoapps/ccx/tests/test_views.py @@ -512,7 +512,7 @@ def test_ccx_invite_enroll_up_to_limit(self): ) data = { 'enrollment-button': 'Enroll', - 'student-ids': u','.join([student.email for student in students]), # pylint: disable=no-member + 'student-ids': u','.join([student.email for student in students]), } response = self.client.post(url, data=data, follow=True) self.assertEqual(response.status_code, 200) @@ -548,7 +548,7 @@ def test_manage_student_enrollment_limit(self): # enroll the first student data = { 'student-action': 'add', - 'student-id': u','.join([students[0].email, ]), # pylint: disable=no-member + 'student-id': u','.join([students[0].email, ]), } response = self.client.post(url, data=data, follow=True) self.assertEqual(response.status_code, 200) @@ -560,7 +560,7 @@ def test_manage_student_enrollment_limit(self): # enroll the first student data = { 'student-action': 'add', - 'student-id': u','.join([students[1].email, ]), # pylint: disable=no-member + 'student-id': u','.join([students[1].email, ]), } response = self.client.post(url, data=data, follow=True) self.assertEqual(response.status_code, 200) diff --git a/lms/djangoapps/ccx/views.py b/lms/djangoapps/ccx/views.py index 9fbfd3e8ff35..0fdf8cb80dea 100644 --- a/lms/djangoapps/ccx/views.py +++ b/lms/djangoapps/ccx/views.py @@ -194,7 +194,7 @@ def create_ccx(request, course, ccx=None): for vertical in sequential.get_children(): override_field_for_ccx(ccx, vertical, hidden, True) - ccx_id = CCXLocator.from_course_locator(course.id, ccx.id) # pylint: disable=no-member + ccx_id = CCXLocator.from_course_locator(course.id, ccx.id) url = reverse('ccx_coach_dashboard', kwargs={'course_id': ccx_id}) diff --git a/lms/djangoapps/certificates/models.py b/lms/djangoapps/certificates/models.py index 7bc60957420c..e4ec4e1592f7 100644 --- a/lms/djangoapps/certificates/models.py +++ b/lms/djangoapps/certificates/models.py @@ -216,7 +216,7 @@ def get_unique_statuses(cls, course_key=None, flat=False): @receiver(post_save, sender=GeneratedCertificate) -def handle_post_cert_generated(sender, instance, **kwargs): # pylint: disable=no-self-argument, unused-argument +def handle_post_cert_generated(sender, instance, **kwargs): # pylint: disable=unused-argument """ Handles post_save signal of GeneratedCertificate, and mark user collected course milestone entry if user has passed the course. @@ -742,7 +742,6 @@ def clean(self): """ Make sure there's not more than one default. """ - # pylint: disable=no-member if self.default and BadgeImageConfiguration.objects.filter(default=True).exclude(id=self.id): raise ValidationError(_(u"There can be only one default image.")) @@ -860,7 +859,7 @@ def save(self, *args, **kwargs): super(CertificateTemplateAsset, self).save(*args, **kwargs) def __unicode__(self): - return u'%s' % (self.asset.url, ) # pylint: disable=no-member + return u'%s' % (self.asset.url, ) class Meta(object): get_latest_by = 'created' diff --git a/lms/djangoapps/certificates/queue.py b/lms/djangoapps/certificates/queue.py index f8db3a4bd813..966572c2be96 100644 --- a/lms/djangoapps/certificates/queue.py +++ b/lms/djangoapps/certificates/queue.py @@ -3,7 +3,7 @@ import random import logging import lxml.html -from lxml.etree import XMLSyntaxError, ParserError # pylint:disable=no-name-in-module +from lxml.etree import XMLSyntaxError, ParserError from uuid import uuid4 from django.test.client import RequestFactory diff --git a/lms/djangoapps/certificates/tests/test_webview_views.py b/lms/djangoapps/certificates/tests/test_webview_views.py index 76d799cbecd8..e728d80385f0 100644 --- a/lms/djangoapps/certificates/tests/test_webview_views.py +++ b/lms/djangoapps/certificates/tests/test_webview_views.py @@ -603,7 +603,6 @@ def test_evidence_event_sent(self): 'name': 'edx.badge.assertion.evidence_visited', 'data': { 'course_id': 'testorg/run1/refundable_course', - # pylint: disable=no-member 'assertion_id': assertion.id, 'assertion_json_url': 'http://www.example.com/assertion.json', 'assertion_image_url': 'http://www.example.com/image.png', diff --git a/lms/djangoapps/commerce/__init__.py b/lms/djangoapps/commerce/__init__.py index 342bfb65c96b..a02aabc65614 100644 --- a/lms/djangoapps/commerce/__init__.py +++ b/lms/djangoapps/commerce/__init__.py @@ -1,3 +1,3 @@ """ Commerce app. """ # this is here to support registering the signals in signals.py -from commerce import signals # pylint: disable=unused-import +from commerce import signals diff --git a/lms/djangoapps/commerce/api/v0/views.py b/lms/djangoapps/commerce/api/v0/views.py index 65feeb27af82..ba548ddf0d5f 100644 --- a/lms/djangoapps/commerce/api/v0/views.py +++ b/lms/djangoapps/commerce/api/v0/views.py @@ -79,7 +79,7 @@ def _handle_marketing_opt_in(self, request, course_key, user): 'Failed to handle marketing opt-in flag: user="%s", course="%s"', user.username, course_key ) - def post(self, request, *args, **kwargs): # pylint: disable=unused-argument + def post(self, request, *args, **kwargs): """ Attempt to create the basket and enroll the user. """ diff --git a/lms/djangoapps/commerce/api/v1/models.py b/lms/djangoapps/commerce/api/v1/models.py index 38fdefad48ec..6440dc308395 100644 --- a/lms/djangoapps/commerce/api/v1/models.py +++ b/lms/djangoapps/commerce/api/v1/models.py @@ -18,7 +18,7 @@ class Course(object): modes = None _deleted_modes = None - def __init__(self, id, modes, verification_deadline=None): # pylint: disable=invalid-name,redefined-builtin + def __init__(self, id, modes, verification_deadline=None): # pylint: disable=redefined-builtin self.id = CourseKey.from_string(unicode(id)) # pylint: disable=invalid-name self.modes = list(modes) self.verification_deadline = verification_deadline @@ -27,7 +27,7 @@ def __init__(self, id, modes, verification_deadline=None): # pylint: disable=in @property def name(self): """ Return course name. """ - course_id = CourseKey.from_string(unicode(self.id)) # pylint: disable=invalid-name + course_id = CourseKey.from_string(unicode(self.id)) try: return CourseOverview.get_from_id(course_id).display_name diff --git a/lms/djangoapps/commerce/api/v1/views.py b/lms/djangoapps/commerce/api/v1/views.py index 3f47631305cb..fce30ca96c53 100644 --- a/lms/djangoapps/commerce/api/v1/views.py +++ b/lms/djangoapps/commerce/api/v1/views.py @@ -66,7 +66,7 @@ class OrderView(APIView): authentication_classes = (SessionAuthentication,) permission_classes = (IsAuthenticated,) - def get(self, request, number): # pylint:disable=unused-argument + def get(self, request, number): """ HTTP handler. """ try: order = ecommerce_api_client(request.user).orders(number).get() diff --git a/lms/djangoapps/commerce/tests/mocks.py b/lms/djangoapps/commerce/tests/mocks.py index 983bff21fd32..4d6fcfdd354d 100644 --- a/lms/djangoapps/commerce/tests/mocks.py +++ b/lms/djangoapps/commerce/tests/mocks.py @@ -58,7 +58,7 @@ def __enter__(self): adding_headers={'Content-Type': 'application/json'}, ) - def __exit__(self, exc_type, exc_val, exc_tb): # pylint: disable=unused-argument + def __exit__(self, exc_type, exc_val, exc_tb): assert self.expect_called == (httpretty.last_request().headers != {}) httpretty.disable() diff --git a/lms/djangoapps/course_api/blocks/transformers/block_counts.py b/lms/djangoapps/course_api/blocks/transformers/block_counts.py index 0f8c76d411e1..35fecf8ed542 100644 --- a/lms/djangoapps/course_api/blocks/transformers/block_counts.py +++ b/lms/djangoapps/course_api/blocks/transformers/block_counts.py @@ -27,7 +27,7 @@ def collect(cls, block_structure): # collect basic xblock fields block_structure.request_xblock_fields('category') - def transform(self, usage_info, block_structure): # pylint: disable=unused-argument + def transform(self, usage_info, block_structure): """ Mutates block_structure based on the given usage_info. """ diff --git a/lms/djangoapps/course_api/blocks/transformers/block_depth.py b/lms/djangoapps/course_api/blocks/transformers/block_depth.py index 9314451ae105..88b021b46675 100644 --- a/lms/djangoapps/course_api/blocks/transformers/block_depth.py +++ b/lms/djangoapps/course_api/blocks/transformers/block_depth.py @@ -37,7 +37,7 @@ def get_block_depth(cls, block_structure, block_key): cls.BLOCK_DEPTH, ) - def transform(self, usage_info, block_structure): # pylint: disable=unused-argument + def transform(self, usage_info, block_structure): """ Mutates block_structure based on the given usage_info. """ diff --git a/lms/djangoapps/course_api/blocks/transformers/navigation.py b/lms/djangoapps/course_api/blocks/transformers/navigation.py index 3f9906a5fa2b..6dd34df5db3a 100644 --- a/lms/djangoapps/course_api/blocks/transformers/navigation.py +++ b/lms/djangoapps/course_api/blocks/transformers/navigation.py @@ -40,7 +40,7 @@ def collect(cls, block_structure): # collect basic xblock fields block_structure.request_xblock_fields('hide_from_toc') - def transform(self, usage_info, block_structure): # pylint: disable=unused-argument + def transform(self, usage_info, block_structure): """ Mutates block_structure based on the given usage_info. """ diff --git a/lms/djangoapps/course_api/blocks/transformers/student_view.py b/lms/djangoapps/course_api/blocks/transformers/student_view.py index df54e14cce32..820be4d4b91e 100644 --- a/lms/djangoapps/course_api/blocks/transformers/student_view.py +++ b/lms/djangoapps/course_api/blocks/transformers/student_view.py @@ -67,7 +67,7 @@ def collect(cls, block_structure): student_view_data, ) - def transform(self, usage_info, block_structure): # pylint: disable=unused-argument + def transform(self, usage_info, block_structure): """ Mutates block_structure based on the given usage_info. """ diff --git a/lms/djangoapps/course_blocks/__init__.py b/lms/djangoapps/course_blocks/__init__.py index 6357a4636120..70663b7dfcec 100644 --- a/lms/djangoapps/course_blocks/__init__.py +++ b/lms/djangoapps/course_blocks/__init__.py @@ -24,4 +24,4 @@ """ # Importing signals is necessary to activate the course publish/delete signal handlers. -from . import signals # pylint: disable=unused-import +from . import signals diff --git a/lms/djangoapps/course_blocks/transformers/split_test.py b/lms/djangoapps/course_blocks/transformers/split_test.py index 85e0a1556135..306c20893fb4 100644 --- a/lms/djangoapps/course_blocks/transformers/split_test.py +++ b/lms/djangoapps/course_blocks/transformers/split_test.py @@ -68,7 +68,7 @@ def collect(cls, block_structure): group = child_to_group.get(child_location, None) child.group_access[partition_for_this_block.id] = [group] if group else [] - def transform(self, usage_info, block_structure): # pylint: disable=unused-argument + def transform(self, usage_info, block_structure): """ Mutates block_structure based on the given usage_info. """ diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py b/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py index f211047d1b00..861fbf2e419a 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py @@ -202,7 +202,7 @@ def test_user(self, group_id, expected_blocks): def test_user_randomly_assigned(self): # user was randomly assigned to one of the groups - user_groups = _get_user_partition_groups( # pylint: disable=protected-access + user_groups = _get_user_partition_groups( self.course.id, [self.split_test_user_partition], self.user ) self.assertEquals(len(user_groups), 1) diff --git a/lms/djangoapps/course_wiki/tests/test_access.py b/lms/djangoapps/course_wiki/tests/test_access.py index c3a4a52d101f..df2fbaae55de 100644 --- a/lms/djangoapps/course_wiki/tests/test_access.py +++ b/lms/djangoapps/course_wiki/tests/test_access.py @@ -143,7 +143,7 @@ def setUp(self): wiki_200_page_page = self.create_urlpath(wiki_200_page, 'Grandchild') self.wiki_200_pages = [wiki_200, wiki_200_page, wiki_200_page_page] - def test_course_staff_is_course_wiki_staff_for_numerical_course_number(self): # pylint: disable=invalid-name + def test_course_staff_is_course_wiki_staff_for_numerical_course_number(self): for page in self.wiki_200_pages: for course_staff in self.course_200_staff: self.assertTrue(user_is_article_course_staff(course_staff, page.article)) diff --git a/lms/djangoapps/course_wiki/views.py b/lms/djangoapps/course_wiki/views.py index 37e5594ab205..e75abca2c9cb 100644 --- a/lms/djangoapps/course_wiki/views.py +++ b/lms/djangoapps/course_wiki/views.py @@ -58,7 +58,7 @@ def course_wiki_redirect(request, course_id): # pylint: disable=unused-argument new_site.domain = settings.SITE_NAME new_site.name = "edX" new_site.save() - site_id = str(new_site.id) # pylint: disable=no-member + site_id = str(new_site.id) if site_id != str(settings.SITE_ID): raise ImproperlyConfigured("No site object was created and the SITE_ID doesn't match the newly created one. {} != {}".format(site_id, settings.SITE_ID)) diff --git a/lms/djangoapps/courseware/access.py b/lms/djangoapps/courseware/access.py index ccaa29827a06..6f049d5ccf88 100644 --- a/lms/djangoapps/courseware/access.py +++ b/lms/djangoapps/courseware/access.py @@ -398,7 +398,7 @@ def _can_load_course_overview(user, course_overview): ), 'view_courseware_with_prerequisites': _can_view_courseware_with_prerequisites } -COURSE_OVERVIEW_SUPPORTED_ACTIONS = _COURSE_OVERVIEW_CHECKERS.keys() # pylint: disable=invalid-name +COURSE_OVERVIEW_SUPPORTED_ACTIONS = _COURSE_OVERVIEW_CHECKERS.keys() def _has_access_course_overview(user, action, course_overview): @@ -669,7 +669,7 @@ def _dispatch(table, action, user, obj): type(obj), action)) -def _adjust_start_date_for_beta_testers(user, descriptor, course_key): # pylint: disable=invalid-name,unused-argument +def _adjust_start_date_for_beta_testers(user, descriptor, course_key): # pylint: disable=invalid-name """ If user is in a beta test group, adjust the start date by the appropriate number of days. diff --git a/lms/djangoapps/courseware/features/conditional.py b/lms/djangoapps/courseware/features/conditional.py index f4fa5ba8da17..d54c652db456 100644 --- a/lms/djangoapps/courseware/features/conditional.py +++ b/lms/djangoapps/courseware/features/conditional.py @@ -1,8 +1,7 @@ # pylint: disable=missing-docstring -# pylint: disable=redefined-outer-name from lettuce import world, steps -from nose.tools import assert_in, assert_true # pylint: disable=no-name-in-module +from nose.tools import assert_in, assert_true from common import i_am_registered_for_the_course, visit_scenario_item from problems_setup import add_problem_to_course, answer_problem diff --git a/lms/djangoapps/courseware/features/problems_setup.py b/lms/djangoapps/courseware/features/problems_setup.py index c3bf2065eba8..ffb0046d1e12 100644 --- a/lms/djangoapps/courseware/features/problems_setup.py +++ b/lms/djangoapps/courseware/features/problems_setup.py @@ -1,5 +1,4 @@ # pylint: disable=missing-docstring -# pylint: disable=redefined-outer-name # EVERY PROBLEM TYPE MUST HAVE THE FOLLOWING: # -Section in Dictionary containing: diff --git a/lms/djangoapps/courseware/features/registration.py b/lms/djangoapps/courseware/features/registration.py index ebe4ec52df23..bf619df483ba 100644 --- a/lms/djangoapps/courseware/features/registration.py +++ b/lms/djangoapps/courseware/features/registration.py @@ -1,5 +1,4 @@ # pylint: disable=missing-docstring -# pylint: disable=redefined-outer-name from lettuce import world, step from lettuce.django import django_url diff --git a/lms/djangoapps/courseware/models.py b/lms/djangoapps/courseware/models.py index 2ea9b0e2573b..8d96d61dc8d4 100644 --- a/lms/djangoapps/courseware/models.py +++ b/lms/djangoapps/courseware/models.py @@ -26,7 +26,7 @@ from submissions.models import score_set, score_reset from openedx.core.djangoapps.call_stack_manager import CallStackManager, CallStackMixin -from xmodule_django.models import CourseKeyField, LocationKeyField, BlockTypeKeyField # pylint: disable=import-error +from xmodule_django.models import CourseKeyField, LocationKeyField, BlockTypeKeyField log = logging.getLogger(__name__) log = logging.getLogger("edx.courseware") @@ -152,7 +152,7 @@ def __repr__(self): # We use the student_id instead of username to avoid a database hop. # This can actually matter in cases where we're logging many of # these (e.g. on a broken progress page). - 'student_id': self.student_id, # pylint: disable=no-member + 'student_id': self.student_id, 'module_state_key': self.module_state_key, 'state': str(self.state)[:20], },) diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index f7cc6c6bd231..e6bcad933dc4 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -601,7 +601,7 @@ def rebind_noauth_module_to_user(module, real_user): ) module.descriptor.scope_ids = ( - module.descriptor.scope_ids._replace(user_id=real_user.id) # pylint: disable=protected-access + module.descriptor.scope_ids._replace(user_id=real_user.id) ) module.scope_ids = module.descriptor.scope_ids # this is needed b/c NamedTuples are immutable # now bind the module to the new ModuleSystem instance and vice-versa @@ -822,7 +822,7 @@ def get_module_for_descriptor_internal(user, descriptor, student_data, course_id ], ) - descriptor.scope_ids = descriptor.scope_ids._replace(user_id=user.id) # pylint: disable=protected-access + descriptor.scope_ids = descriptor.scope_ids._replace(user_id=user.id) # Do not check access when it's a noauth request. # Not that the access check needs to happen after the descriptor is bound diff --git a/lms/djangoapps/courseware/tabs.py b/lms/djangoapps/courseware/tabs.py index 76a46d692c56..c4ddb6787e0e 100644 --- a/lms/djangoapps/courseware/tabs.py +++ b/lms/djangoapps/courseware/tabs.py @@ -82,7 +82,7 @@ class ProgressTab(EnrolledTab): is_default = False @classmethod - def is_enabled(cls, course, user=None): # pylint: disable=unused-argument + def is_enabled(cls, course, user=None): if not super(ProgressTab, cls).is_enabled(course, user=user): return False return not course.hide_progress_tab @@ -98,7 +98,7 @@ class TextbookTabsBase(CourseTab): is_default = False @classmethod - def is_enabled(cls, course, user=None): # pylint: disable=unused-argument + def is_enabled(cls, course, user=None): return user is None or user.is_authenticated() @classmethod @@ -119,7 +119,7 @@ class TextbookTabs(TextbookTabsBase): view_name = 'book' @classmethod - def is_enabled(cls, course, user=None): # pylint: disable=unused-argument + def is_enabled(cls, course, user=None): parent_is_enabled = super(TextbookTabs, cls).is_enabled(course, user) return settings.FEATURES.get('ENABLE_TEXTBOOK') and parent_is_enabled @@ -214,7 +214,7 @@ def __eq__(self, other): return self.link_value == other.get('link') @classmethod - def is_enabled(cls, course, user=None): # pylint: disable=unused-argument + def is_enabled(cls, course, user=None): return True @@ -236,7 +236,7 @@ def validate(cls, tab_dict, raise_error=True): key_checker(['link'])(tab_dict, raise_error)) @classmethod - def is_enabled(cls, course, user=None): # pylint: disable=unused-argument + def is_enabled(cls, course, user=None): if not super(ExternalDiscussionCourseTab, cls).is_enabled(course, user=user): return False return course.discussion_link diff --git a/lms/djangoapps/courseware/tests/factories.py b/lms/djangoapps/courseware/tests/factories.py index d7c75d089f87..67bacec96006 100644 --- a/lms/djangoapps/courseware/tests/factories.py +++ b/lms/djangoapps/courseware/tests/factories.py @@ -6,9 +6,7 @@ from factory.django import DjangoModelFactory # Imported to re-export -# pylint: disable=unused-import from student.tests.factories import UserFactory # Imported to re-export -# pylint: enable=unused-import from student.tests.factories import UserProfileFactory as StudentUserProfileFactory from courseware.models import StudentModule, XModuleUserStateSummaryField diff --git a/lms/djangoapps/courseware/tests/test_access.py b/lms/djangoapps/courseware/tests/test_access.py index d899c734ae3b..b60baaca3cba 100644 --- a/lms/djangoapps/courseware/tests/test_access.py +++ b/lms/djangoapps/courseware/tests/test_access.py @@ -44,7 +44,6 @@ seed_milestone_relationship_types, ) -# pylint: disable=missing-docstring # pylint: disable=protected-access @@ -510,7 +509,7 @@ def setUp(self): self.user_normal = UserFactory.create() self.user_beta_tester = BetaTesterFactory.create(course_key=self.course_not_started.id) - self.user_completed_pre_requisite = UserFactory.create() # pylint: disable=invalid-name + self.user_completed_pre_requisite = UserFactory.create() fulfill_course_milestone(self.user_completed_pre_requisite, self.course_started.id) self.user_staff = UserFactory.create(is_staff=True) self.user_anonymous = AnonymousUserFactory.create() diff --git a/lms/djangoapps/courseware/tests/test_entrance_exam.py b/lms/djangoapps/courseware/tests/test_entrance_exam.py index 2e0b392e00b6..ed7609bead5d 100644 --- a/lms/djangoapps/courseware/tests/test_entrance_exam.py +++ b/lms/djangoapps/courseware/tests/test_entrance_exam.py @@ -609,7 +609,6 @@ def answer_entrance_exam_problem(course, request, problem, user=None): if not user: user = request.user - # pylint: disable=maybe-no-member grade_dict = {'value': 1, 'max_value': 1, 'user_id': user.id} field_data_cache = FieldDataCache.cache_for_descriptor_descendents( course.id, diff --git a/lms/djangoapps/courseware/tests/test_module_render.py b/lms/djangoapps/courseware/tests/test_module_render.py index eb2a21e31151..24462b4a5588 100644 --- a/lms/djangoapps/courseware/tests/test_module_render.py +++ b/lms/djangoapps/courseware/tests/test_module_render.py @@ -716,7 +716,7 @@ def setUp(self): factory = RequestFactory() self.request = factory.get(chapter_url) self.request.user = UserFactory() - self.modulestore = self.store._get_modulestore_for_courselike(self.course_key) # pylint: disable=protected-access, attribute-defined-outside-init + self.modulestore = self.store._get_modulestore_for_courselike(self.course_key) # pylint: disable=protected-access with self.modulestore.bulk_operations(self.course_key): self.toy_course = self.store.get_course(self.course_key, depth=2) self.field_data_cache = FieldDataCache.cache_for_descriptor_descendents( @@ -2058,7 +2058,7 @@ class TestDisabledXBlockTypes(ModuleStoreTestCase): """ Tests that verify disabled XBlock types are not loaded. """ - # pylint: disable=attribute-defined-outside-init, no-member + # pylint: disable=no-member def setUp(self): super(TestDisabledXBlockTypes, self).setUp() diff --git a/lms/djangoapps/courseware/tests/test_split_module.py b/lms/djangoapps/courseware/tests/test_split_module.py index 7e63ea9ad2ba..7821a2c0df5a 100644 --- a/lms/djangoapps/courseware/tests/test_split_module.py +++ b/lms/djangoapps/courseware/tests/test_split_module.py @@ -173,7 +173,6 @@ def setUp(self): category="vertical", display_name="Split test vertical", ) - # pylint: disable=protected-access c0_url = self.course.id.make_usage_key("vertical", "split_test_cond0") c1_url = self.course.id.make_usage_key("vertical", "split_test_cond1") @@ -239,7 +238,6 @@ def setUp(self): # split_test cond 0 = vert <- {video, problem} # split_test cond 1 = vert <- {video, html} - # pylint: disable=protected-access c0_url = self.course.id.make_usage_key("vertical", "split_test_cond0") c1_url = self.course.id.make_usage_key("vertical", "split_test_cond1") diff --git a/lms/djangoapps/courseware/tests/test_user_state_client.py b/lms/djangoapps/courseware/tests/test_user_state_client.py index 11b98f9e2daf..5bb9a0682b2f 100644 --- a/lms/djangoapps/courseware/tests/test_user_state_client.py +++ b/lms/djangoapps/courseware/tests/test_user_state_client.py @@ -22,7 +22,7 @@ class TestDjangoUserStateClient(UserStateClientTestBase, TestCase): def _user(self, user_idx): return self.users[user_idx].username - def _block_type(self, block): # pylint: disable=unused-argument + def _block_type(self, block): # We only record block state history in DjangoUserStateClient # when the block type is 'problem' return 'problem' diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index 4a87ae8887a1..dbfc8a1faf75 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -468,7 +468,7 @@ class BaseDueDateTests(ModuleStoreTestCase): """ __test__ = False - def get_text(self, course): # pylint: disable=unused-argument + def get_text(self, course): """Return the rendered text for the page to be verified""" raise NotImplementedError @@ -660,7 +660,6 @@ def setup_course(self, **options): **options ) - # pylint: disable=attribute-defined-outside-init self.course = modulestore().get_course(course.id) CourseEnrollmentFactory(user=self.user, course_id=self.course.id) diff --git a/lms/djangoapps/dashboard/sysadmin.py b/lms/djangoapps/dashboard/sysadmin.py index f175d513287e..fcbaa9bdc39a 100644 --- a/lms/djangoapps/dashboard/sysadmin.py +++ b/lms/djangoapps/dashboard/sysadmin.py @@ -619,7 +619,7 @@ def get(self, request): raise Http404 data = [] - for course in self.get_courses(): # pylint: disable=unused-variable + for course in self.get_courses(): datum = [course.display_name, course.id] datum += [CourseEnrollment.objects.filter( course_id=course.id).count()] @@ -653,7 +653,7 @@ def post(self, request): data = [] roles = [CourseInstructorRole, CourseStaffRole, ] - for course in self.get_courses(): # pylint: disable=unused-variable + for course in self.get_courses(): for role in roles: for user in role(course.id).users_with_role(): datum = [course.id, role, user.username, user.email, @@ -722,7 +722,7 @@ def get(self, request, *args, **kwargs): else: try: course = get_course_by_id(course_id) - except Exception: # pylint: disable=broad-except + except Exception: log.info('Cannot find course %s', course_id) raise Http404 diff --git a/lms/djangoapps/discussion_api/tests/test_api.py b/lms/djangoapps/discussion_api/tests/test_api.py index 85b8a43f4399..c07e5abfac66 100644 --- a/lms/djangoapps/discussion_api/tests/test_api.py +++ b/lms/djangoapps/discussion_api/tests/test_api.py @@ -3050,7 +3050,7 @@ def test_nonauthor_enrolled_in_course(self): "type": "discussion", "response_count": 0, } - non_author_user = UserFactory.create() # pylint: disable=attribute-defined-outside-init + non_author_user = UserFactory.create() self.register_get_user_response(non_author_user) CourseEnrollmentFactory.create(user=non_author_user, course_id=self.course.id) self.register_thread() diff --git a/lms/djangoapps/discussion_api/tests/utils.py b/lms/djangoapps/discussion_api/tests/utils.py index 322546c619a7..9a400709e55b 100644 --- a/lms/djangoapps/discussion_api/tests/utils.py +++ b/lms/djangoapps/discussion_api/tests/utils.py @@ -305,7 +305,7 @@ def request_patch(self, request_data): """ make a request to PATCH endpoint and return response """ - return self.client.patch( # pylint: disable=no-member + return self.client.patch( self.url, json.dumps(request_data), content_type="application/merge-patch+json" diff --git a/lms/djangoapps/django_comment_client/base/tests.py b/lms/djangoapps/django_comment_client/base/tests.py index 5d87975bf410..776bf7d493a3 100644 --- a/lms/djangoapps/django_comment_client/base/tests.py +++ b/lms/djangoapps/django_comment_client/base/tests.py @@ -12,7 +12,7 @@ from django.core.urlresolvers import reverse from request_cache.middleware import RequestCache from mock import patch, ANY, Mock -from nose.tools import assert_true, assert_equal # pylint: disable=no-name-in-module +from nose.tools import assert_true, assert_equal from opaque_keys.edx.keys import CourseKey from lms.lib.comment_client import Thread diff --git a/lms/djangoapps/django_comment_client/base/views.py b/lms/djangoapps/django_comment_client/base/views.py index d60860f59127..4aff5dfc9469 100644 --- a/lms/djangoapps/django_comment_client/base/views.py +++ b/lms/djangoapps/django_comment_client/base/views.py @@ -379,7 +379,7 @@ def create_comment(request, course_id, thread_id): @require_POST @login_required @permitted -def delete_thread(request, course_id, thread_id): # pylint: disable=unused-argument +def delete_thread(request, course_id, thread_id): """ given a course_id and thread_id, delete this thread this is ajax only diff --git a/lms/djangoapps/django_comment_client/forum/tests.py b/lms/djangoapps/django_comment_client/forum/tests.py index 7d12715ef053..e1c0804e466a 100644 --- a/lms/djangoapps/django_comment_client/forum/tests.py +++ b/lms/djangoapps/django_comment_client/forum/tests.py @@ -30,7 +30,7 @@ from xmodule.modulestore.tests.factories import check_mongo_calls, CourseFactory, ItemFactory from courseware.courses import UserNotEnrolled -from nose.tools import assert_true # pylint: disable=E0611 +from nose.tools import assert_true from mock import patch, Mock, ANY, call from openedx.core.djangoapps.course_groups.models import CourseUserGroup diff --git a/lms/djangoapps/django_comment_client/tests.py b/lms/djangoapps/django_comment_client/tests.py index e4df90b9cb80..5618588062a8 100644 --- a/lms/djangoapps/django_comment_client/tests.py +++ b/lms/djangoapps/django_comment_client/tests.py @@ -1,7 +1,7 @@ """ Tests of various permissions levels for the comment client """ -import string # pylint: disable=deprecated-module +import string import random from django.contrib.auth.models import User diff --git a/lms/djangoapps/edxnotes/plugins.py b/lms/djangoapps/edxnotes/plugins.py index 0c0d3c559af5..e2cdf8a29a42 100644 --- a/lms/djangoapps/edxnotes/plugins.py +++ b/lms/djangoapps/edxnotes/plugins.py @@ -17,7 +17,7 @@ class EdxNotesTab(EnrolledTab): view_name = "edxnotes" @classmethod - def is_enabled(cls, course, user=None): # pylint: disable=unused-argument + def is_enabled(cls, course, user=None): """Returns true if the edX Notes feature is enabled in the course. Args: diff --git a/lms/djangoapps/instructor/features/bulk_email.py b/lms/djangoapps/instructor/features/bulk_email.py index 90eed1ebd903..ebef8a880881 100644 --- a/lms/djangoapps/instructor/features/bulk_email.py +++ b/lms/djangoapps/instructor/features/bulk_email.py @@ -7,7 +7,7 @@ from lettuce import world, step from lettuce.django import mail -from nose.tools import assert_in, assert_equal # pylint: disable=no-name-in-module +from nose.tools import assert_in, assert_equal from django.core.management import call_command from django.conf import settings diff --git a/lms/djangoapps/instructor/features/common.py b/lms/djangoapps/instructor/features/common.py index de016bd175b6..4aa73e3c0041 100644 --- a/lms/djangoapps/instructor/features/common.py +++ b/lms/djangoapps/instructor/features/common.py @@ -9,7 +9,7 @@ from lettuce import world, step from mock import patch -from nose.tools import assert_in # pylint: disable=no-name-in-module +from nose.tools import assert_in from courseware.tests.factories import StaffFactory, InstructorFactory diff --git a/lms/djangoapps/instructor/features/data_download.py b/lms/djangoapps/instructor/features/data_download.py index a48b89c66060..f52c2456482d 100644 --- a/lms/djangoapps/instructor/features/data_download.py +++ b/lms/djangoapps/instructor/features/data_download.py @@ -7,7 +7,7 @@ # pylint: disable=redefined-outer-name from lettuce import world, step -from nose.tools import assert_in, assert_regexp_matches # pylint: disable=no-name-in-module +from nose.tools import assert_in, assert_regexp_matches from terrain.steps import reload_the_page from django.utils import http diff --git a/lms/djangoapps/instructor/tests/test_ecommerce.py b/lms/djangoapps/instructor/tests/test_ecommerce.py index 4297d09cadd4..e7e1f1fd8a30 100644 --- a/lms/djangoapps/instructor/tests/test_ecommerce.py +++ b/lms/djangoapps/instructor/tests/test_ecommerce.py @@ -270,7 +270,7 @@ def test_update_coupon(self): response = self.client.post(self.url) self.assertTrue('AS452' in response.content) data = { - 'coupon_id': coupon.id, 'code': 'AS452', 'discount': '10', 'description': 'updated_description', # pylint: disable=no-member + 'coupon_id': coupon.id, 'code': 'AS452', 'discount': '10', 'description': 'updated_description', 'course_id': coupon.course_id.to_deprecated_string() } # URL for update_coupon diff --git a/lms/djangoapps/instructor/tests/test_enrollment.py b/lms/djangoapps/instructor/tests/test_enrollment.py index 1463d0b4ce63..31c98ca1c6e3 100644 --- a/lms/djangoapps/instructor/tests/test_enrollment.py +++ b/lms/djangoapps/instructor/tests/test_enrollment.py @@ -20,8 +20,8 @@ from lms.djangoapps.ccx.tests.factories import CcxFactory from student.models import CourseEnrollment, CourseEnrollmentAllowed -from student.roles import CourseCcxCoachRole # pylint: disable=import-error -from student.tests.factories import ( # pylint: disable=import-error +from student.roles import CourseCcxCoachRole +from student.tests.factories import ( AdminFactory ) from instructor.enrollment import ( diff --git a/lms/djangoapps/instructor/tests/test_tools.py b/lms/djangoapps/instructor/tests/test_tools.py index 371e7f76a7fc..5c58f53f9ca0 100644 --- a/lms/djangoapps/instructor/tests/test_tools.py +++ b/lms/djangoapps/instructor/tests/test_tools.py @@ -11,9 +11,9 @@ from django.test.utils import override_settings from nose.plugins.attrib import attr -from courseware.field_overrides import OverrideFieldData # pylint: disable=import-error +from courseware.field_overrides import OverrideFieldData from lms.djangoapps.ccx.tests.test_overrides import inject_field_overrides -from student.tests.factories import UserFactory # pylint: disable=import-error +from student.tests.factories import UserFactory from xmodule.fields import Date from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index c1fa8a89fe29..f2df7db524ae 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -26,7 +26,7 @@ from django.utils.html import strip_tags from django.shortcuts import redirect from util.db import outer_atomic -import string # pylint: disable=deprecated-module +import string import random import unicodecsv import urllib @@ -992,7 +992,7 @@ def get_sale_records(request, course_id, csv=False): # pylint: disable=unused-a @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') -def get_sale_order_records(request, course_id): # pylint: disable=unused-argument, redefined-outer-name +def get_sale_order_records(request, course_id): # pylint: disable=unused-argument """ return the summary of all sales records for a particular course """ @@ -1099,7 +1099,7 @@ def re_validate_invoice(obj_invoice): @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') -def get_issued_certificates(request, course_id): # pylint: disable=invalid-name +def get_issued_certificates(request, course_id): """ Responds with JSON if CSV is not required. contains a list of issued certificates. Arguments: @@ -1505,7 +1505,7 @@ def random_code_generator(): @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @require_POST -def get_registration_codes(request, course_id): # pylint: disable=unused-argument +def get_registration_codes(request, course_id): """ Respond with csv which contains a summary of all Registration Codes. """ @@ -1621,7 +1621,7 @@ def generate_registration_codes(request, course_id): course_price = course_mode.min_price registration_codes = [] - for __ in range(course_code_number): # pylint: disable=redefined-outer-name + for __ in range(course_code_number): generated_registration_code = save_registration_code( request.user, course_id, course_mode.slug, invoice=sale_invoice, order=None, invoice_item=invoice_item ) @@ -1708,7 +1708,7 @@ def generate_registration_codes(request, course_id): @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @require_POST -def active_registration_codes(request, course_id): # pylint: disable=unused-argument +def active_registration_codes(request, course_id): """ Respond with csv which contains a summary of all Active Registration Codes. """ @@ -1739,7 +1739,7 @@ def active_registration_codes(request, course_id): # pylint: disable=unused-arg @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @require_POST -def spent_registration_codes(request, course_id): # pylint: disable=unused-argument +def spent_registration_codes(request, course_id): """ Respond with csv which contains a summary of all Spent(used) Registration Codes. """ @@ -2397,7 +2397,7 @@ def send_email(request, course_id): ) # Submit the task, so that the correct InstructorTask object gets created (for monitoring purposes) - instructor_task.api.submit_bulk_course_email(request, course_id, email.id) # pylint: disable=no-member + instructor_task.api.submit_bulk_course_email(request, course_id, email.id) response_payload = { 'course_id': course_id.to_deprecated_string(), diff --git a/lms/djangoapps/instructor/views/api_urls.py b/lms/djangoapps/instructor/views/api_urls.py index 94b2299ea6f8..6bb918d729c6 100644 --- a/lms/djangoapps/instructor/views/api_urls.py +++ b/lms/djangoapps/instructor/views/api_urls.py @@ -41,7 +41,7 @@ 'instructor.views.api.get_student_progress_url', name="get_student_progress_url"), url(r'^reset_student_attempts$', 'instructor.views.api.reset_student_attempts', name="reset_student_attempts"), - url( # pylint: disable=bad-continuation + url( r'^rescore_problem$', 'instructor.views.api.rescore_problem', name="rescore_problem" diff --git a/lms/djangoapps/instructor/views/coupons.py b/lms/djangoapps/instructor/views/coupons.py index 435471e23b24..59d8ee7f42c0 100644 --- a/lms/djangoapps/instructor/views/coupons.py +++ b/lms/djangoapps/instructor/views/coupons.py @@ -47,7 +47,7 @@ def remove_coupon(request, course_id): # pylint: disable=unused-argument @require_POST @login_required -def add_coupon(request, course_id): # pylint: disable=unused-argument +def add_coupon(request, course_id): """ add coupon in the Coupons Table """ diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index c967476f2a1b..57cfa01b806c 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -59,7 +59,7 @@ class InstructorDashboardTab(CourseTab): is_dynamic = True # The "Instructor" tab is instead dynamically added when it is enabled @classmethod - def is_enabled(cls, course, user=None): # pylint: disable=unused-argument,redefined-outer-name + def is_enabled(cls, course, user=None): """ Returns true if the specified user has staff access. """ diff --git a/lms/djangoapps/instructor/views/registration_codes.py b/lms/djangoapps/instructor/views/registration_codes.py index 5d28eda86bc6..e02803459a00 100644 --- a/lms/djangoapps/instructor/views/registration_codes.py +++ b/lms/djangoapps/instructor/views/registration_codes.py @@ -20,7 +20,7 @@ @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_level('staff') @require_GET -def look_up_registration_code(request, course_id): # pylint: disable=unused-argument +def look_up_registration_code(request, course_id): """ Look for the registration_code in the database. and check if it is still valid, allowed to redeem or not. diff --git a/lms/djangoapps/instructor_task/api.py b/lms/djangoapps/instructor_task/api.py index 501ebaae108d..82a80f7a114b 100644 --- a/lms/djangoapps/instructor_task/api.py +++ b/lms/djangoapps/instructor_task/api.py @@ -366,7 +366,7 @@ def submit_calculate_may_enroll_csv(request, course_key, features): return submit_task(request, task_type, task_class, course_key, task_input, task_key) -def submit_executive_summary_report(request, course_key): # pylint: disable=invalid-name +def submit_executive_summary_report(request, course_key): """ Submits a task to generate a HTML File containing the executive summary report. @@ -380,7 +380,7 @@ def submit_executive_summary_report(request, course_key): # pylint: disable=inv return submit_task(request, task_type, task_class, course_key, task_input, task_key) -def submit_course_survey_report(request, course_key): # pylint: disable=invalid-name +def submit_course_survey_report(request, course_key): """ Submits a task to generate a HTML File containing the executive summary report. diff --git a/lms/djangoapps/instructor_task/api_helper.py b/lms/djangoapps/instructor_task/api_helper.py index c5bfbaa50db6..0e1a3a019a6d 100644 --- a/lms/djangoapps/instructor_task/api_helper.py +++ b/lms/djangoapps/instructor_task/api_helper.py @@ -332,7 +332,7 @@ def submit_task(request, task_type, task_class, course_key, task_input, task_key # make sure all data has been committed before handing off task to celery. task_id = instructor_task.task_id - task_args = [instructor_task.id, _get_xmodule_instance_args(request, task_id)] # pylint: disable=no-member + task_args = [instructor_task.id, _get_xmodule_instance_args(request, task_id)] task_class.apply_async(task_args, task_id=task_id) return instructor_task diff --git a/lms/djangoapps/instructor_task/tasks.py b/lms/djangoapps/instructor_task/tasks.py index 2ef4aedb60bb..7898f4b30f16 100644 --- a/lms/djangoapps/instructor_task/tasks.py +++ b/lms/djangoapps/instructor_task/tasks.py @@ -51,7 +51,7 @@ TASK_LOG = logging.getLogger('edx.celery.task') -@task(base=BaseInstructorTask) # pylint: disable=not-callable +@task(base=BaseInstructorTask) def rescore_problem(entry_id, xmodule_instance_args): """Rescores a problem in a course, for all students or one specific student. @@ -82,7 +82,7 @@ def filter_fcn(modules_to_update): return run_main_task(entry_id, visit_fcn, action_name) -@task(base=BaseInstructorTask) # pylint: disable=not-callable +@task(base=BaseInstructorTask) def reset_problem_attempts(entry_id, xmodule_instance_args): """Resets problem attempts to zero for a particular problem for all students in a course. @@ -104,7 +104,7 @@ def reset_problem_attempts(entry_id, xmodule_instance_args): return run_main_task(entry_id, visit_fcn, action_name) -@task(base=BaseInstructorTask) # pylint: disable=not-callable +@task(base=BaseInstructorTask) def delete_problem_state(entry_id, xmodule_instance_args): """Deletes problem state entirely for all students on a particular problem in a course. @@ -126,7 +126,7 @@ def delete_problem_state(entry_id, xmodule_instance_args): return run_main_task(entry_id, visit_fcn, action_name) -@task(base=BaseInstructorTask) # pylint: disable=not-callable +@task(base=BaseInstructorTask) def send_bulk_course_email(entry_id, _xmodule_instance_args): """Sends emails to recipients enrolled in a course. @@ -147,7 +147,7 @@ def send_bulk_course_email(entry_id, _xmodule_instance_args): return run_main_task(entry_id, visit_fcn, action_name) -@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) # pylint: disable=not-callable +@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) def calculate_problem_responses_csv(entry_id, xmodule_instance_args): """ Compute student answers to a given problem and upload the CSV to @@ -159,7 +159,7 @@ def calculate_problem_responses_csv(entry_id, xmodule_instance_args): return run_main_task(entry_id, task_fn, action_name) -@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) # pylint: disable=not-callable +@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) def calculate_grades_csv(entry_id, xmodule_instance_args): """ Grade a course and push the results to an S3 bucket for download. @@ -175,7 +175,7 @@ def calculate_grades_csv(entry_id, xmodule_instance_args): return run_main_task(entry_id, task_fn, action_name) -@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) # pylint: disable=not-callable +@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) def calculate_problem_grade_report(entry_id, xmodule_instance_args): """ Generate a CSV for a course containing all students' problem @@ -192,7 +192,7 @@ def calculate_problem_grade_report(entry_id, xmodule_instance_args): return run_main_task(entry_id, task_fn, action_name) -@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) # pylint: disable=not-callable +@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) def calculate_students_features_csv(entry_id, xmodule_instance_args): """ Compute student profile information for a course and upload the @@ -204,7 +204,7 @@ def calculate_students_features_csv(entry_id, xmodule_instance_args): return run_main_task(entry_id, task_fn, action_name) -@task(base=BaseInstructorTask) # pylint: disable=not-callable +@task(base=BaseInstructorTask) def enrollment_report_features_csv(entry_id, xmodule_instance_args): """ Compute student profile information for a course and upload the @@ -216,7 +216,7 @@ def enrollment_report_features_csv(entry_id, xmodule_instance_args): return run_main_task(entry_id, task_fn, action_name) -@task(base=BaseInstructorTask) # pylint: disable=not-callable +@task(base=BaseInstructorTask) def exec_summary_report_csv(entry_id, xmodule_instance_args): """ Compute executive summary report for a course and upload the @@ -228,7 +228,7 @@ def exec_summary_report_csv(entry_id, xmodule_instance_args): return run_main_task(entry_id, task_fn, action_name) -@task(base=BaseInstructorTask) # pylint: disable=not-callable +@task(base=BaseInstructorTask) def course_survey_report_csv(entry_id, xmodule_instance_args): """ Compute the survey report for a course and upload the @@ -240,7 +240,7 @@ def course_survey_report_csv(entry_id, xmodule_instance_args): return run_main_task(entry_id, task_fn, action_name) -@task(base=BaseInstructorTask) # pylint: disable=not-callable +@task(base=BaseInstructorTask) def proctored_exam_results_csv(entry_id, xmodule_instance_args): """ Compute proctored exam results report for a course and upload the @@ -251,7 +251,7 @@ def proctored_exam_results_csv(entry_id, xmodule_instance_args): return run_main_task(entry_id, task_fn, action_name) -@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) # pylint: disable=not-callable +@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) def calculate_may_enroll_csv(entry_id, xmodule_instance_args): """ Compute information about invited students who have not enrolled @@ -264,7 +264,7 @@ def calculate_may_enroll_csv(entry_id, xmodule_instance_args): return run_main_task(entry_id, task_fn, action_name) -@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) # pylint: disable=not-callable +@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) def generate_certificates(entry_id, xmodule_instance_args): """ Grade students and generate certificates. @@ -280,7 +280,7 @@ def generate_certificates(entry_id, xmodule_instance_args): return run_main_task(entry_id, task_fn, action_name) -@task(base=BaseInstructorTask) # pylint: disable=E1102 +@task(base=BaseInstructorTask) def cohort_students(entry_id, xmodule_instance_args): """ Cohort students in bulk, and upload the results. diff --git a/lms/djangoapps/instructor_task/tasks_helper.py b/lms/djangoapps/instructor_task/tasks_helper.py index ca66ded2e926..f277f28e2c6e 100644 --- a/lms/djangoapps/instructor_task/tasks_helper.py +++ b/lms/djangoapps/instructor_task/tasks_helper.py @@ -1249,7 +1249,7 @@ def get_executive_report(course_id): } -def upload_exec_summary_report(_xmodule_instance_args, _entry_id, course_id, _task_input, action_name): # pylint: disable=invalid-name +def upload_exec_summary_report(_xmodule_instance_args, _entry_id, course_id, _task_input, action_name): """ For a given `course_id`, generate a html report containing information, which provides a snapshot of how the course is doing. @@ -1312,7 +1312,7 @@ def upload_exec_summary_report(_xmodule_instance_args, _entry_id, course_id, _ta return task_progress.update_task_state(extra_meta=current_step) -def upload_course_survey_report(_xmodule_instance_args, _entry_id, course_id, _task_input, action_name): # pylint: disable=invalid-name +def upload_course_survey_report(_xmodule_instance_args, _entry_id, course_id, _task_input, action_name): """ For a given `course_id`, generate a html report containing the survey results for a course. """ @@ -1402,7 +1402,7 @@ def upload_proctored_exam_results_report(_xmodule_instance_args, _entry_id, cour def generate_students_certificates( - _xmodule_instance_args, _entry_id, course_id, task_input, action_name): # pylint: disable=unused-argument + _xmodule_instance_args, _entry_id, course_id, task_input, action_name): """ For a given `course_id`, generate certificates for only students present in 'students' key in task_input json column, otherwise generate certificates for all enrolled students. diff --git a/lms/djangoapps/instructor_task/tests/test_api.py b/lms/djangoapps/instructor_task/tests/test_api.py index 712b30cc0b5f..5a7ce849a36f 100644 --- a/lms/djangoapps/instructor_task/tests/test_api.py +++ b/lms/djangoapps/instructor_task/tests/test_api.py @@ -181,7 +181,7 @@ def setUp(self): def _define_course_email(self): """Create CourseEmail object for testing.""" course_email = CourseEmail.create(self.course.id, self.instructor, SEND_TO_ALL, "Test Subject", "

This is a test message

") - return course_email.id # pylint: disable=no-member + return course_email.id def _test_resubmission(self, api_call): """ diff --git a/lms/djangoapps/instructor_task/tests/test_tasks_helper.py b/lms/djangoapps/instructor_task/tests/test_tasks_helper.py index bf55e5701028..5e851a5019e5 100644 --- a/lms/djangoapps/instructor_task/tests/test_tasks_helper.py +++ b/lms/djangoapps/instructor_task/tests/test_tasks_helper.py @@ -420,7 +420,7 @@ def test_student_manually_enrolled_in_detailed_enrollment_source(self): result = upload_enrollment_report(None, None, self.course.id, task_input, 'generating_enrollment_report') enrollment_source = u'manually enrolled by username: {username}'.format( - username=self.instructor.username) # pylint: disable=no-member + username=self.instructor.username) self.assertDictContainsSubset({'attempted': 1, 'succeeded': 1, 'failed': 0}, result) self._verify_cell_data_in_csv(student.username, 'Enrollment Source', enrollment_source) self._verify_cell_data_in_csv( diff --git a/lms/djangoapps/licenses/tests.py b/lms/djangoapps/licenses/tests.py index b15820b9ede8..32d047dbec14 100644 --- a/lms/djangoapps/licenses/tests.py +++ b/lms/djangoapps/licenses/tests.py @@ -12,7 +12,7 @@ from django.test.client import Client from django.core.management import call_command from django.core.urlresolvers import reverse -from nose.tools import assert_true # pylint: disable=no-name-in-module +from nose.tools import assert_true from licenses.models import CourseSoftware, UserLicense diff --git a/lms/djangoapps/lms_migration/management/commands/create_user.py b/lms/djangoapps/lms_migration/management/commands/create_user.py index 53c879974ff0..03ebff0b2e73 100644 --- a/lms/djangoapps/lms_migration/management/commands/create_user.py +++ b/lms/djangoapps/lms_migration/management/commands/create_user.py @@ -6,7 +6,7 @@ import os import sys -import string # pylint: disable=deprecated-module +import string import datetime from getpass import getpass import json diff --git a/lms/djangoapps/lms_xblock/mixin.py b/lms/djangoapps/lms_xblock/mixin.py index ba07f8d081c6..61d3f77517c9 100644 --- a/lms/djangoapps/lms_xblock/mixin.py +++ b/lms/djangoapps/lms_xblock/mixin.py @@ -144,7 +144,7 @@ def validate(self): """ Validates the state of this xblock instance. """ - _ = self.runtime.service(self, "i18n").ugettext # pylint: disable=redefined-outer-name + _ = self.runtime.service(self, "i18n").ugettext validation = super(LmsBlockMixin, self).validate() has_invalid_user_partitions = False has_invalid_groups = False diff --git a/lms/djangoapps/lti_provider/outcomes.py b/lms/djangoapps/lti_provider/outcomes.py index 5b228930c010..0f9478341eec 100644 --- a/lms/djangoapps/lti_provider/outcomes.py +++ b/lms/djangoapps/lti_provider/outcomes.py @@ -89,7 +89,6 @@ def generate_replace_result_xml(result_sourcedid, score): consumer. The format of this message is defined in the LTI 1.1 spec. """ # Pylint doesn't recognize members in the LXML module - # pylint: disable=no-member elem = ElementMaker(nsmap={None: 'http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0'}) xml = elem.imsx_POXEnvelopeRequest( elem.imsx_POXHeader( @@ -215,7 +214,6 @@ def check_replace_result_response(response): False if not. The format of this message is defined in the LTI 1.1 spec. """ # Pylint doesn't recognize members in the LXML module - # pylint: disable=no-member if response.status_code != 200: log.error( "Outcome service response: Unexpected status code %s", diff --git a/lms/djangoapps/lti_provider/tests/test_tasks.py b/lms/djangoapps/lti_provider/tests/test_tasks.py index e181435d3d52..5bfa127be25b 100644 --- a/lms/djangoapps/lti_provider/tests/test_tasks.py +++ b/lms/djangoapps/lti_provider/tests/test_tasks.py @@ -79,7 +79,7 @@ class SendLeafOutcomeTest(BaseOutcomeTest): @ddt.unpack def test_outcome_with_score(self, earned, possible, expected): tasks.send_leaf_outcome( - self.assignment.id, # pylint: disable=no-member + self.assignment.id, earned, possible ) @@ -119,7 +119,7 @@ def setUp(self): def test_outcome_with_score_score(self, earned, possible, expected): self.weighted_scores.score_for_module = MagicMock(return_value=(earned, possible)) tasks.send_composite_outcome( - self.user.id, unicode(self.course_key), self.assignment.id, 1 # pylint: disable=no-member + self.user.id, unicode(self.course_key), self.assignment.id, 1 ) self.send_score_update_mock.assert_called_once_with(self.assignment, expected) @@ -127,6 +127,6 @@ def test_outcome_with_outdated_version(self): self.assignment.version_number = 2 self.assignment.save() tasks.send_composite_outcome( - self.user.id, unicode(self.course_key), self.assignment.id, 1 # pylint: disable=no-member + self.user.id, unicode(self.course_key), self.assignment.id, 1 ) self.assertEqual(self.weighted_scores_mock.call_count, 0) diff --git a/lms/djangoapps/mobile_api/models.py b/lms/djangoapps/mobile_api/models.py index d3bfe7662fb5..6413b3ededf5 100644 --- a/lms/djangoapps/mobile_api/models.py +++ b/lms/djangoapps/mobile_api/models.py @@ -24,4 +24,4 @@ def get_video_profiles(cls): """ Get the list of profiles in priority order when requesting from VAL """ - return [profile.strip() for profile in cls.current().video_profiles.split(",") if profile] # pylint: disable=no-member + return [profile.strip() for profile in cls.current().video_profiles.split(",") if profile] diff --git a/lms/djangoapps/mobile_api/testutils.py b/lms/djangoapps/mobile_api/testutils.py index 6756cb4a74d8..a57375eae86e 100644 --- a/lms/djangoapps/mobile_api/testutils.py +++ b/lms/djangoapps/mobile_api/testutils.py @@ -84,7 +84,7 @@ def api_response(self, reverse_args=None, expected_response_code=200, **kwargs): self.assertEqual(response.status_code, expected_response_code) return response - def reverse_url(self, reverse_args=None, **kwargs): # pylint: disable=unused-argument + def reverse_url(self, reverse_args=None, **kwargs): """Base implementation that returns URL for endpoint that's being tested.""" reverse_args = reverse_args or {} if 'course_id' in self.REVERSE_INFO['params']: diff --git a/lms/djangoapps/mobile_api/users/tests.py b/lms/djangoapps/mobile_api/users/tests.py index 14d1c44e473e..98100b159042 100644 --- a/lms/djangoapps/mobile_api/users/tests.py +++ b/lms/djangoapps/mobile_api/users/tests.py @@ -280,7 +280,7 @@ class TestCourseStatusPATCH(CourseStatusAPITestCase, MobileAuthUserTestMixin, Mo """ def url_method(self, url, **kwargs): # override implementation to use PATCH method. - return self.client.patch(url, data=kwargs.get('data', None)) # pylint: disable=no-member + return self.client.patch(url, data=kwargs.get('data', None)) def test_success(self): self.login_and_enroll() diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index c17c00eebf43..8a0dc4ab9f89 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -75,7 +75,7 @@ class StaffGradingTab(EnrolledTab): view_name = "staff_grading" @classmethod - def is_enabled(cls, course, user=None): # pylint: disable=unused-argument + def is_enabled(cls, course, user=None): if XBlockDisableConfig.is_block_type_disabled('combinedopenended'): return False if user and not has_access(user, 'staff', course, course.id): @@ -94,7 +94,7 @@ class PeerGradingTab(EnrolledTab): view_name = "peer_grading" @classmethod - def is_enabled(cls, course, user=None): # pylint: disable=unused-argument + def is_enabled(cls, course, user=None): if XBlockDisableConfig.is_block_type_disabled('combinedopenended'): return False if not super(PeerGradingTab, cls).is_enabled(course, user=user): @@ -113,7 +113,7 @@ class OpenEndedGradingTab(EnrolledTab): view_name = "open_ended_notifications" @classmethod - def is_enabled(cls, course, user=None): # pylint: disable=unused-argument + def is_enabled(cls, course, user=None): if XBlockDisableConfig.is_block_type_disabled('combinedopenended'): return False if not super(OpenEndedGradingTab, cls).is_enabled(course, user=user): diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index 91f9596ff0d0..68c96a8f9408 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -87,7 +87,7 @@ } # we need a tuple to represent the primary key of various OrderItem subclasses -OrderItemSubclassPK = namedtuple('OrderItemSubclassPK', ['cls', 'pk']) # pylint: disable=invalid-name +OrderItemSubclassPK = namedtuple('OrderItemSubclassPK', ['cls', 'pk']) class OrderTypes(object): @@ -202,7 +202,7 @@ def total_cost(self): Return the total cost of the cart. If the order has been purchased, returns total of all purchased and not refunded items. """ - return sum(i.line_cost for i in self.orderitem_set.filter(status=self.status)) # pylint: disable=no-member + return sum(i.line_cost for i in self.orderitem_set.filter(status=self.status)) def has_items(self, item_type=None): """ @@ -210,9 +210,9 @@ def has_items(self, item_type=None): If an item_type is passed in then we check to see if there are any items of that class type """ if not item_type: - return self.orderitem_set.exists() # pylint: disable=no-member + return self.orderitem_set.exists() else: - items = self.orderitem_set.all().select_subclasses() # pylint: disable=no-member + items = self.orderitem_set.all().select_subclasses() for item in items: if isinstance(item, item_type): return True @@ -222,7 +222,7 @@ def reset_cart_items_prices(self): """ Reset the items price state in the user cart """ - for item in self.orderitem_set.all(): # pylint: disable=no-member + for item in self.orderitem_set.all(): if item.is_discounted: item.unit_cost = item.list_price item.save() @@ -231,7 +231,7 @@ def clear(self): """ Clear out all the items in the cart """ - self.orderitem_set.all().delete() # pylint: disable=no-member + self.orderitem_set.all().delete() @transaction.atomic def start_purchase(self): @@ -259,7 +259,7 @@ def update_order_type(self): The UI/UX may change in the future to make the switching between PaidCourseRegistration and CourseRegCodeItems a more explicit UI gesture from the purchaser """ - cart_items = self.orderitem_set.all() # pylint: disable=no-member + cart_items = self.orderitem_set.all() is_order_type_business = False for cart_item in cart_items: if cart_item.qty > 1: @@ -314,7 +314,7 @@ def generate_pdf_receipt(self, order_items): PDFInvoice( items_data=items_data, - item_id=str(self.id), # pylint: disable=no-member + item_id=str(self.id), date=self.purchase_time, is_invoice=False, total_cost=self.total_cost, @@ -412,7 +412,7 @@ def send_confirmation_emails(self, orderitems, is_order_type_business, csv_file, email.attach(u'pdf_not_available.txt', file_buffer.getvalue(), 'text/plain') email.send() except (smtplib.SMTPException, BotoServerError): # sadly need to handle diff. mail backends individually - log.error('Failed sending confirmation e-mail for order %d', self.id) # pylint: disable=no-member + log.error('Failed sending confirmation e-mail for order %d', self.id) def purchase(self, first='', last='', street1='', street2='', city='', state='', postalcode='', country='', ccnum='', cardtype='', processor_reply_dump=''): @@ -514,8 +514,8 @@ def _emit_order_event(self, event_name, orderitems): try: if settings.LMS_SEGMENT_KEY: tracking_context = tracker.get_tracker().resolve_context() - analytics.track(self.user.id, event_name, { # pylint: disable=no-member - 'orderId': self.id, # pylint: disable=no-member + analytics.track(self.user.id, event_name, { + 'orderId': self.id, 'total': str(self.total_cost), 'currency': self.currency, 'products': [item.analytics_data() for item in orderitems] @@ -532,7 +532,7 @@ def _emit_order_event(self, event_name, orderitems): # errors in the logs. log.exception( u'Unable to emit {event} event for user {user} and order {order}'.format( - event=event_name, user=self.user.id, order=self.id) # pylint: disable=no-member + event=event_name, user=self.user.id, order=self.id) ) def add_billing_details(self, company_name='', company_contact_name='', company_contact_email='', recipient_name='', @@ -597,7 +597,7 @@ def retire(self): ) ) - for item in self.orderitem_set.all(): # pylint: disable=no-member + for item in self.orderitem_set.all(): if item.status != self.status: raise UnexpectedOrderItemStatus( "order_item status is different from order status" @@ -606,7 +606,7 @@ def retire(self): self.status = ORDER_STATUS_MAP[self.status] self.save() - for item in self.orderitem_set.all(): # pylint: disable=no-member + for item in self.orderitem_set.all(): item.retire() def find_item_by_course_id(self, course_id): @@ -785,7 +785,7 @@ def analytics_data(self): """ return { - 'id': self.id, # pylint: disable=no-member + 'id': self.id, 'sku': type(self).__name__, 'name': 'N/A', 'price': str(self.unit_cost), @@ -880,7 +880,7 @@ def generate_pdf_invoice(self, course, course_price, quantity, sale_price): pdf_buffer = BytesIO() PDFInvoice( items_data=items_data, - item_id=str(self.id), # pylint: disable=no-member + item_id=str(self.id), date=datetime.now(pytz.utc), is_invoice=True, total_cost=float(self.total_amount), @@ -940,7 +940,7 @@ def __unicode__(self): ) created = ( - self.created.strftime("%Y-%m-%d") # pylint: disable=no-member + self.created.strftime("%Y-%m-%d") if self.created else u"No date" ) @@ -1056,8 +1056,8 @@ def snapshot(self): 'currency': self.currency, 'comments': self.comments, 'status': self.status, - 'created_by': self.created_by.username, # pylint: disable=no-member - 'last_modified_by': self.last_modified_by.username # pylint: disable=no-member + 'created_by': self.created_by.username, + 'last_modified_by': self.last_modified_by.username } @@ -1304,7 +1304,6 @@ def create_invoice_generated_registration_redemption(cls, course_reg_code, user) class SoftDeleteCouponManager(models.Manager): """ Use this manager to get objects that have a is_active=True """ - # pylint: disable=super-on-old-class def get_active_coupons_queryset(self): """ filter the is_active = True Coupons only @@ -1602,7 +1601,7 @@ def purchased_callback(self): self.save() log.info("Enrolled {0} in paid course {1}, paid ${2}" - .format(self.user.email, self.course_id, self.line_cost)) # pylint: disable=no-member + .format(self.user.email, self.course_id, self.line_cost)) def generate_receipt_instructions(self): """ @@ -1781,7 +1780,7 @@ def purchased_callback(self): save_registration_code(self.user, self.course_id, self.mode, order=self.order) log.info("Enrolled {0} in paid course {1}, paid ${2}" - .format(self.user.email, self.course_id, self.line_cost)) # pylint: disable=no-member + .format(self.user.email, self.course_id, self.line_cost)) @property def csv_report_comments(self): @@ -1983,7 +1982,7 @@ def purchased_callback(self): def additional_instruction_text(self): verification_reminder = "" - is_enrollment_mode_verified = self.course_enrollment.is_verified_enrollment() # pylint: disable=E1101 + is_enrollment_mode_verified = self.course_enrollment.is_verified_enrollment() if is_enrollment_mode_verified: domain = microsite.get_value('SITE_NAME', settings.SITE_NAME) @@ -2153,7 +2152,7 @@ def generate_receipt_instructions(self): """ return self.pk_with_subclass, set([self._tax_deduction_msg()]) - def additional_instruction_text(self, **kwargs): # pylint: disable=unused-argument + def additional_instruction_text(self, **kwargs): """Provide information about tax-deductible donations in the confirmation email. Returns: diff --git a/lms/djangoapps/shoppingcart/pdf.py b/lms/djangoapps/shoppingcart/pdf.py index 1dadfd01c3a7..86f39ca0d2d4 100644 --- a/lms/djangoapps/shoppingcart/pdf.py +++ b/lms/djangoapps/shoppingcart/pdf.py @@ -18,7 +18,7 @@ log = logging.getLogger("PDF Generation") -class NumberedCanvas(Canvas): # pylint: disable=abstract-method +class NumberedCanvas(Canvas): """ Canvas child class with auto page-numbering. """ diff --git a/lms/djangoapps/shoppingcart/processors/CyberSource2.py b/lms/djangoapps/shoppingcart/processors/CyberSource2.py index 846f2a039e79..a5bd8da5b655 100644 --- a/lms/djangoapps/shoppingcart/processors/CyberSource2.py +++ b/lms/djangoapps/shoppingcart/processors/CyberSource2.py @@ -377,7 +377,6 @@ def _payment_accepted(order_id, auth_amount, currency, decision): ) ) - #pylint: disable=attribute-defined-outside-init ex.order = order raise ex else: diff --git a/lms/djangoapps/shoppingcart/tests/test_models.py b/lms/djangoapps/shoppingcart/tests/test_models.py index b7da4f59ebbf..6dbfdffc2425 100644 --- a/lms/djangoapps/shoppingcart/tests/test_models.py +++ b/lms/djangoapps/shoppingcart/tests/test_models.py @@ -676,7 +676,7 @@ def test_regcode_redemptions(self): test_redemption = RegistrationCodeRedemption.registration_code_used_for_enrollment(enrollment) - self.assertEqual(test_redemption.id, redemption.id) # pylint: disable=no-member + self.assertEqual(test_redemption.id, redemption.id) def test_regcode_multi_redemptions(self): """ @@ -702,7 +702,7 @@ def test_regcode_multi_redemptions(self): course_enrollment=enrollment ) redemption.save() - ids.append(redemption.id) # pylint: disable=no-member + ids.append(redemption.id) test_redemption = RegistrationCodeRedemption.registration_code_used_for_enrollment(enrollment) diff --git a/lms/djangoapps/teams/models.py b/lms/djangoapps/teams/models.py index 832757a976e3..a7609de278dd 100644 --- a/lms/djangoapps/teams/models.py +++ b/lms/djangoapps/teams/models.py @@ -202,12 +202,12 @@ def save(self, *args, **kwargs): self.last_activity_at = datetime.utcnow().replace(tzinfo=pytz.utc) super(CourseTeamMembership, self).save(*args, **kwargs) if should_reset_team_size: - self.team.reset_team_size() # pylint: disable=no-member + self.team.reset_team_size() def delete(self, *args, **kwargs): """Recompute the related team's team_size after deleting a membership""" super(CourseTeamMembership, self).delete(*args, **kwargs) - self.team.reset_team_size() # pylint: disable=no-member + self.team.reset_team_size() @classmethod def get_memberships(cls, username=None, course_ids=None, team_id=None): diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index 24a03c50e9c7..0db3f3e50e0d 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -1102,7 +1102,7 @@ def get_user_latest_status(self, user_id): VerificationStatus object if found any else None """ try: - return self.checkpoint_status.filter(user_id=user_id).latest() # pylint: disable=no-member + return self.checkpoint_status.filter(user_id=user_id).latest() except ObjectDoesNotExist: return None diff --git a/lms/djangoapps/verify_student/tests/test_views.py b/lms/djangoapps/verify_student/tests/test_views.py index ec0b7c7c343b..21e08adf0b2d 100644 --- a/lms/djangoapps/verify_student/tests/test_views.py +++ b/lms/djangoapps/verify_student/tests/test_views.py @@ -1962,8 +1962,6 @@ def build_course(self): """ Build up a course tree with a Reverificaiton xBlock. """ - # pylint: disable=attribute-defined-outside-init - self.course_key = SlashSeparatedCourseKey("Robot", "999", "Test_Course") self.course = CourseFactory.create(org='Robot', number='999', display_name='Test Course') diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index 516a52a8e19c..0870a4e8fae0 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -691,7 +691,7 @@ def _response_if_deadline_passed(self, course, deadline_name, deadline_datetime) return render_to_response("verify_student/missed_deadline.html", context) -def checkout_with_ecommerce_service(user, course_key, course_mode, processor): # pylint: disable=invalid-name +def checkout_with_ecommerce_service(user, course_key, course_mode, processor): """ Create a new basket and trigger immediate checkout, using the E-Commerce API. """ course_id = unicode(course_key) try: @@ -1437,7 +1437,7 @@ def get(self, request, course_id, usage_id): } return render_to_response("verify_student/incourse_reverify.html", context) - def _track_reverification_events(self, event_name, user_id, course_id, checkpoint): # pylint: disable=invalid-name + def _track_reverification_events(self, event_name, user_id, course_id, checkpoint): """Track re-verification events for a user against a reverification checkpoint of a course. diff --git a/lms/envs/bok_choy.py b/lms/envs/bok_choy.py index 56b6e2cbedfb..af4fcc007b34 100644 --- a/lms/envs/bok_choy.py +++ b/lms/envs/bok_choy.py @@ -14,11 +14,6 @@ from path import Path as path from tempfile import mkdtemp -# Pylint gets confused by path.py instances, which report themselves as class -# objects. As a result, pylint applies the wrong regex in validating names, -# and throws spurious errors. Therefore, we disable invalid-name checking. -# pylint: disable=invalid-name - CONFIG_ROOT = path(__file__).abspath().dirname() TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" diff --git a/lms/envs/cms/acceptance.py b/lms/envs/cms/acceptance.py index 8ed294e8bcd5..c12a45e55dec 100644 --- a/lms/envs/cms/acceptance.py +++ b/lms/envs/cms/acceptance.py @@ -6,7 +6,7 @@ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, unused-wildcard-import, undefined-variable +# pylint: disable=wildcard-import, unused-wildcard-import from .dev import * @@ -15,7 +15,7 @@ INSTALLED_APPS = tuple(e for e in INSTALLED_APPS if e != 'debug_toolbar') INSTALLED_APPS = tuple(e for e in INSTALLED_APPS if e != 'debug_toolbar_mongo') -MIDDLEWARE_CLASSES = tuple(e for e in MIDDLEWARE_CLASSES # pylint: disable=used-before-assignment +MIDDLEWARE_CLASSES = tuple(e for e in MIDDLEWARE_CLASSES if e != 'debug_toolbar.middleware.DebugToolbarMiddleware') diff --git a/lms/envs/cms/microsite_test.py b/lms/envs/cms/microsite_test.py index 541eab764f9a..586e357e85ee 100644 --- a/lms/envs/cms/microsite_test.py +++ b/lms/envs/cms/microsite_test.py @@ -5,11 +5,6 @@ # want to import all variables from base settings files # pylint: disable=wildcard-import, unused-wildcard-import -# Pylint gets confused by path.py instances, which report themselves as class -# objects. As a result, pylint applies the wrong regex in validating names, -# and throws spurious errors. Therefore, we disable invalid-name checking. -# pylint: disable=invalid-name - from .dev import * from ..dev import ENV_ROOT, FEATURES diff --git a/lms/envs/common.py b/lms/envs/common.py index 317b50f8d318..f5f1fa71f66f 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -22,7 +22,7 @@ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=wildcard-import, unused-import, unused-wildcard-import, invalid-name +# pylint: disable=wildcard-import, unused-import, unused-wildcard-import # Pylint gets confused by path.py instances, which report themselves as class # objects. As a result, pylint applies the wrong regex in validating names, diff --git a/lms/envs/dev.py b/lms/envs/dev.py index 951cfd38d342..2b5f4229bebb 100644 --- a/lms/envs/dev.py +++ b/lms/envs/dev.py @@ -12,11 +12,6 @@ # want to import all variables from base settings files # pylint: disable=wildcard-import, unused-wildcard-import -# Pylint gets confused by path.py instances, which report themselves as class -# objects. As a result, pylint applies the wrong regex in validating names, -# and throws spurious errors. Therefore, we disable invalid-name checking. -# pylint: disable=invalid-name - from .common import * DEBUG = True diff --git a/lms/envs/discussionsettings.py b/lms/envs/discussionsettings.py index f32fb43e4472..f7aef72ddb6a 100644 --- a/lms/envs/discussionsettings.py +++ b/lms/envs/discussionsettings.py @@ -1,5 +1,2 @@ -# We intentionally define variables that aren't used -# pylint: disable=unused-wildcard-import - DISCUSSION_ALLOWED_UPLOAD_FILE_TYPES = ('.jpg', '.jpeg', '.gif', '.bmp', '.png', '.tiff') diff --git a/lms/envs/sauce.py b/lms/envs/sauce.py index c8c7577ed5e7..0bb84dcaf757 100644 --- a/lms/envs/sauce.py +++ b/lms/envs/sauce.py @@ -3,10 +3,6 @@ so that we can run the lettuce acceptance tests on SauceLabs. """ -# We intentionally define lots of variables that aren't used, and -# want to import all variables from base settings files -# pylint: disable=wildcard-import, unused-wildcard-import - from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import os diff --git a/lms/envs/test.py b/lms/envs/test.py index e58a311fff8a..2a8702c08694 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -309,7 +309,7 @@ # the same settings, we can generate this randomly and guarantee # that they are using the same secret. from random import choice -from string import letters, digits, punctuation # pylint: disable=deprecated-module +from string import letters, digits, punctuation RANDOM_SHARED_SECRET = ''.join( choice(letters + digits + punctuation) for x in range(250) diff --git a/lms/startup.py b/lms/startup.py index 15a36615bb0a..465b5e71c6a6 100644 --- a/lms/startup.py +++ b/lms/startup.py @@ -2,8 +2,6 @@ Module for code that should run during LMS startup """ -# pylint: disable=unused-argument - import django from django.conf import settings diff --git a/lms/urls.py b/lms/urls.py index 84f48ee65f5c..529f6591e6b9 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -20,7 +20,6 @@ admin.autodiscover() # Use urlpatterns formatted as within the Django docs with first parameter "stuck" to the open parenthesis -# pylint: disable=bad-continuation urlpatterns = ( '', diff --git a/openedx/core/djangoapps/call_stack_manager/core.py b/openedx/core/djangoapps/call_stack_manager/core.py index 099c8311ac95..716d2fe46768 100644 --- a/openedx/core/djangoapps/call_stack_manager/core.py +++ b/openedx/core/djangoapps/call_stack_manager/core.py @@ -136,7 +136,7 @@ def delete(self, *args, **kwargs): return super(CallStackMixin, self).delete(*args, **kwargs) -class CallStackManager(Manager): # pylint: disable=super-on-old-class +class CallStackManager(Manager): """ Manager class which overrides the default Manager class for getting call stacks """ def get_queryset(self): """ Override the default queryset API method """ diff --git a/openedx/core/djangoapps/common_views/xblock.py b/openedx/core/djangoapps/common_views/xblock.py index 85b45f25c634..3e78c01f1c9f 100644 --- a/openedx/core/djangoapps/common_views/xblock.py +++ b/openedx/core/djangoapps/common_views/xblock.py @@ -32,7 +32,7 @@ def xblock_resource(request, block_type, uri): # pylint: disable=unused-argumen except IOError: log.info('Failed to load xblock resource', exc_info=True) raise Http404 - except Exception: # pylint: disable=broad-except + except Exception: log.error('Failed to load xblock resource', exc_info=True) raise Http404 diff --git a/openedx/core/djangoapps/content/course_overviews/models.py b/openedx/core/djangoapps/content/course_overviews/models.py index 68bd278e65b5..f0982b759343 100644 --- a/openedx/core/djangoapps/content/course_overviews/models.py +++ b/openedx/core/djangoapps/content/course_overviews/models.py @@ -41,7 +41,7 @@ class Meta(object): version = IntegerField() # Course identification - id = CourseKeyField(db_index=True, primary_key=True, max_length=255) # pylint: disable=invalid-name + id = CourseKeyField(db_index=True, primary_key=True, max_length=255) _location = UsageKeyField(max_length=255) display_name = TextField(null=True) display_number_with_default = TextField() @@ -375,7 +375,7 @@ def is_discussion_tab_enabled(self): """ Returns True if course has discussion tab and is enabled """ - tabs = self.tabs.all() # pylint: disable=E1101 + tabs = self.tabs.all() # creates circular import; hence explicitly referenced is_discussion_enabled for tab in tabs: if tab.tab_id == "discussion" and django_comment_client.utils.is_discussion_enabled(self.id): diff --git a/openedx/core/djangoapps/course_groups/models.py b/openedx/core/djangoapps/course_groups/models.py index 7001fcd28446..3fa34f0f4732 100644 --- a/openedx/core/djangoapps/course_groups/models.py +++ b/openedx/core/djangoapps/course_groups/models.py @@ -79,7 +79,7 @@ def clean_fields(self, *args, **kwargs): super(CohortMembership, self).clean_fields(*args, **kwargs) def clean(self): - if self.course_user_group.group_type != CourseUserGroup.COHORT: # pylint: disable=E1101 + if self.course_user_group.group_type != CourseUserGroup.COHORT: raise ValidationError("CohortMembership cannot be used with CourseGroup types other than COHORT") if self.course_user_group.course_id != self.course_id: raise ValidationError("Non-matching course_ids provided") @@ -103,7 +103,7 @@ def save(self, *args, **kwargs): try: with transaction.atomic(): saved_membership, created = CohortMembership.objects.select_for_update().get_or_create( - user__id=self.user.id, # pylint: disable=E1101 + user__id=self.user.id, course_id=self.course_id, defaults={ 'course_user_group': self.course_user_group, @@ -116,7 +116,7 @@ def save(self, *args, **kwargs): if not created: if saved_membership.course_user_group == self.course_user_group: raise ValueError("User {user_name} already present in cohort {cohort_name}".format( - user_name=self.user.username, # pylint: disable=E1101 + user_name=self.user.username, cohort_name=self.course_user_group.name )) self.previous_cohort = saved_membership.course_user_group @@ -125,7 +125,7 @@ def save(self, *args, **kwargs): self.previous_cohort.users.remove(self.user) saved_membership.course_user_group = self.course_user_group - self.course_user_group.users.add(self.user) # pylint: disable=E1101 + self.course_user_group.users.add(self.user) super(CohortMembership, saved_membership).save(update_fields=['course_user_group']) diff --git a/openedx/core/djangoapps/course_groups/tests/helpers.py b/openedx/core/djangoapps/course_groups/tests/helpers.py index 260485c406a2..d5c3cf38a1f3 100644 --- a/openedx/core/djangoapps/course_groups/tests/helpers.py +++ b/openedx/core/djangoapps/course_groups/tests/helpers.py @@ -86,7 +86,7 @@ def config_course_cohorts_legacy( cohorted, cohorted_discussions=None, auto_cohort_groups=None, - always_cohort_inline_discussions=None # pylint: disable=invalid-name + always_cohort_inline_discussions=None ): """ Given a course with no discussion set up, add the discussions and set @@ -148,7 +148,7 @@ def config_course_cohorts( manual_cohorts=[], discussion_topics=[], cohorted_discussions=[], - always_cohort_inline_discussions=True # pylint: disable=invalid-name + always_cohort_inline_discussions=True ): """ Set discussions and configure cohorts for a course. diff --git a/openedx/core/djangoapps/credit/models.py b/openedx/core/djangoapps/credit/models.py index af843b201c1e..21a8d2926384 100644 --- a/openedx/core/djangoapps/credit/models.py +++ b/openedx/core/djangoapps/credit/models.py @@ -708,6 +708,6 @@ def __unicode__(self): """Unicode representation of a credit request.""" return u"{course}, {provider}, {status}".format( course=self.course.course_key, - provider=self.provider.provider_id, # pylint: disable=no-member + provider=self.provider.provider_id, status=self.status, ) diff --git a/openedx/core/djangoapps/profile_images/tests/test_views.py b/openedx/core/djangoapps/profile_images/tests/test_views.py index 1042d6318c6a..ea82ad213311 100644 --- a/openedx/core/djangoapps/profile_images/tests/test_views.py +++ b/openedx/core/djangoapps/profile_images/tests/test_views.py @@ -165,7 +165,7 @@ def test_unsupported_methods(self, mock_log): """ self.assertEqual(405, self.client.get(self.url).status_code) self.assertEqual(405, self.client.put(self.url).status_code) - self.assertEqual(405, self.client.patch(self.url).status_code) # pylint: disable=no-member + self.assertEqual(405, self.client.patch(self.url).status_code) self.assertFalse(mock_log.info.called) self.assert_no_events_were_emitted() diff --git a/openedx/core/djangoapps/profile_images/views.py b/openedx/core/djangoapps/profile_images/views.py index 235a23eb5880..5fa4685631f1 100644 --- a/openedx/core/djangoapps/profile_images/views.py +++ b/openedx/core/djangoapps/profile_images/views.py @@ -164,7 +164,7 @@ def post(self, request, username): # send client response. return Response(status=status.HTTP_204_NO_CONTENT) - def delete(self, request, username): # pylint: disable=unused-argument + def delete(self, request, username): """ DELETE /api/user/v1/accounts/{username}/image """ diff --git a/openedx/core/djangoapps/programs/utils.py b/openedx/core/djangoapps/programs/utils.py index 40ab607d9f32..8fceba77041b 100644 --- a/openedx/core/djangoapps/programs/utils.py +++ b/openedx/core/djangoapps/programs/utils.py @@ -23,7 +23,7 @@ def programs_api_client(api_url, jwt_access_token): ) -def is_cache_enabled_for_programs(): # pylint: disable=invalid-name +def is_cache_enabled_for_programs(): """Returns a Boolean indicating whether responses from the Programs API will be cached. """ diff --git a/openedx/core/djangoapps/programs/views.py b/openedx/core/djangoapps/programs/views.py index 06dab7148403..5f5fcf766e58 100644 --- a/openedx/core/djangoapps/programs/views.py +++ b/openedx/core/djangoapps/programs/views.py @@ -75,7 +75,7 @@ def get_course_programs_for_dashboard(user, course_keys): # pylint: disable=in return _get_user_course_programs(programs, course_keys) -def _get_user_course_programs(programs, users_enrolled_course_keys): # pylint: disable=invalid-name +def _get_user_course_programs(programs, users_enrolled_course_keys): """ Parse the raw programs according to the users enrolled courses and return the matched course runs. diff --git a/openedx/core/djangoapps/user_api/views.py b/openedx/core/djangoapps/user_api/views.py index 08aea57fd5ef..1e662f93f4e9 100644 --- a/openedx/core/djangoapps/user_api/views.py +++ b/openedx/core/djangoapps/user_api/views.py @@ -47,7 +47,7 @@ class LoginSessionView(APIView): authentication_classes = [] @method_decorator(ensure_csrf_cookie) - def get(self, request): # pylint: disable=unused-argument + def get(self, request): """Return a description of the login form. This decouples clients from the API definition: @@ -758,7 +758,7 @@ class PasswordResetView(APIView): authentication_classes = [] @method_decorator(ensure_csrf_cookie) - def get(self, request): # pylint: disable=unused-argument + def get(self, request): """Return a description of the password reset form. This decouples clients from the API definition: diff --git a/openedx/core/lib/api/view_utils.py b/openedx/core/lib/api/view_utils.py index fe57f6faa8dc..14bb3d462a9e 100644 --- a/openedx/core/lib/api/view_utils.py +++ b/openedx/core/lib/api/view_utils.py @@ -185,7 +185,7 @@ def _validate_patch(self, patch): """Validates a JSON merge patch. Captures DRF serializer errors and converts them to edX's standard format.""" field_errors = {} serializer = self.get_serializer(self.get_object_or_none(), data=patch, partial=True) - fields = self.get_serializer().get_fields() # pylint: disable=maybe-no-member + fields = self.get_serializer().get_fields() for key in patch: if key in fields and fields[key].read_only: diff --git a/openedx/core/lib/block_cache/block_structure.py b/openedx/core/lib/block_cache/block_structure.py index 4fedfe38d1cc..e297cf7f4806 100644 --- a/openedx/core/lib/block_cache/block_structure.py +++ b/openedx/core/lib/block_cache/block_structure.py @@ -8,7 +8,6 @@ _BlockRelations - Data structure for a single block's relations. _BlockData - Data structure for a single block's data. """ -# pylint: disable=protected-access from collections import defaultdict from logging import getLogger diff --git a/openedx/core/lib/django_test_client_utils.py b/openedx/core/lib/django_test_client_utils.py index d6c2b8e5dbcf..7ea0b2861fa1 100644 --- a/openedx/core/lib/django_test_client_utils.py +++ b/openedx/core/lib/django_test_client_utils.py @@ -2,8 +2,6 @@ This file includes util methods. """ -# pylint: disable=protected-access - def get_absolute_url(path): """ Generate an absolute URL for a resource on the test server. """ diff --git a/openedx/core/lib/xblock_utils.py b/openedx/core/lib/xblock_utils.py index 3431a8e15d0c..08a9b0eed4f7 100644 --- a/openedx/core/lib/xblock_utils.py +++ b/openedx/core/lib/xblock_utils.py @@ -347,7 +347,7 @@ def _course_info_content(html_parsed): # purely to handle free formed updates not done via editor. Actually kills them, but at least doesn't break. try: course_html_parsed = html.fromstring(course_updates.data) - except (etree.XMLSyntaxError, etree.ParserError): # pylint: disable=no-member + except (etree.XMLSyntaxError, etree.ParserError): log.error("Cannot parse: " + course_updates.data) escaped = escape(course_updates.data) course_html_parsed = html.fromstring("
  1. " + escaped + "
") diff --git a/pavelib/acceptance_test.py b/pavelib/acceptance_test.py index dfcfdeb96ad2..373db696edc9 100644 --- a/pavelib/acceptance_test.py +++ b/pavelib/acceptance_test.py @@ -8,7 +8,7 @@ try: from pygments.console import colorize except ImportError: - colorize = lambda color, text: text # pylint: disable=invalid-name + colorize = lambda color, text: text __test__ = False # do not collect diff --git a/pavelib/bok_choy.py b/pavelib/bok_choy.py index f21f95b5bb56..e43a149d714b 100644 --- a/pavelib/bok_choy.py +++ b/pavelib/bok_choy.py @@ -12,7 +12,7 @@ try: from pygments.console import colorize except ImportError: - colorize = lambda color, text: text # pylint: disable=invalid-name + colorize = lambda color, text: text __test__ = False # do not collect diff --git a/pavelib/i18n.py b/pavelib/i18n.py index dd737adebfa7..cd6ed7561c8c 100644 --- a/pavelib/i18n.py +++ b/pavelib/i18n.py @@ -9,7 +9,7 @@ try: from pygments.console import colorize except ImportError: - colorize = lambda color, text: text # pylint: disable=invalid-name + colorize = lambda color, text: text @task diff --git a/pavelib/tests.py b/pavelib/tests.py index 72e94823c3d4..fc1c800141c5 100644 --- a/pavelib/tests.py +++ b/pavelib/tests.py @@ -11,7 +11,7 @@ try: from pygments.console import colorize except ImportError: - colorize = lambda color, text: text # pylint: disable=invalid-name + colorize = lambda color, text: text __test__ = False # do not collect diff --git a/pavelib/utils/test/bokchoy_utils.py b/pavelib/utils/test/bokchoy_utils.py index 4153e58a45ec..7aac1ec60642 100644 --- a/pavelib/utils/test/bokchoy_utils.py +++ b/pavelib/utils/test/bokchoy_utils.py @@ -13,7 +13,7 @@ try: from pygments.console import colorize except ImportError: - colorize = lambda color, text: text # pylint: disable=invalid-name + colorize = lambda color, text: text __test__ = False # do not collect diff --git a/pavelib/utils/test/suites/bokchoy_suite.py b/pavelib/utils/test/suites/bokchoy_suite.py index 6591b8495149..8c2cc9a48019 100644 --- a/pavelib/utils/test/suites/bokchoy_suite.py +++ b/pavelib/utils/test/suites/bokchoy_suite.py @@ -14,7 +14,7 @@ try: from pygments.console import colorize except ImportError: - colorize = lambda color, text: text # pylint: disable=invalid-name + colorize = lambda color, text: text __test__ = False # do not collect diff --git a/pavelib/utils/test/suites/suite.py b/pavelib/utils/test/suites/suite.py index 9f8fbfcff016..4d135d5991fe 100644 --- a/pavelib/utils/test/suites/suite.py +++ b/pavelib/utils/test/suites/suite.py @@ -10,7 +10,7 @@ try: from pygments.console import colorize except ImportError: - colorize = lambda color, text: text # pylint: disable=invalid-name + colorize = lambda color, text: text __test__ = False # do not collect From 68e30f5dee39fcf14d23be7fda2bbf91b90c693d Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 23 Nov 2015 10:00:41 -0500 Subject: [PATCH 60/87] Update the django-wiki reference Django-wiki had an incorrect migration. This gets the right one. --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 5c7f8865aa8f..3d77fd5f3370 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -9,7 +9,7 @@ # Third-party: -e git+https://github.com/cyberdelia/django-pipeline.git@1.5.3#egg=django-pipeline -git+https://github.com/edx/django-wiki.git@v0.0.4#egg=django-wiki==0.0.4 +git+https://github.com/edx/django-wiki.git@v0.0.5#egg=django-wiki==0.0.5 -e git+https://github.com/edx/django-oauth2-provider.git@0.2.7-fork-edx-6a#egg=django-oauth2-provider==0.2.7-fork-edx-6 git+https://github.com/edx/django-openid-auth.git@0.8#egg=django-openid-auth==0.8 -e git+https://github.com/edx/django-rest-framework-oauth.git@f0b503fda8c254a38f97fef802ded4f5fe367f7a#egg=djangorestframework-oauth==1.0.1 From 6f0e7c511613acf36585668eab644ef2c31e7ddb Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Mon, 23 Nov 2015 12:26:03 -0500 Subject: [PATCH 61/87] Upgrade to latest 2.x version of pymongo. Release Notes: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=14795 Mostly backports to prep for moving to 3.0 --- requirements/edx/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 65769a903f5d..cf39e1c92235 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -58,7 +58,7 @@ pycrypto>=2.6 pygments==2.0.1 pygraphviz==1.1 PyJWT==1.0.1 -pymongo==2.8.1 +pymongo==2.9.1 pyparsing==2.0.1 python-memcached==1.48 python-openid==2.2.5 From c6f4afc9c99c0face5ed121a34fe46022aa1c594 Mon Sep 17 00:00:00 2001 From: Christine Lytwynec Date: Thu, 5 Nov 2015 14:42:47 -0500 Subject: [PATCH 62/87] Header a.dropdown --> button.dropdown --- .../tests/lms/test_account_settings.py | 2 +- .../tests/lms/test_lms_dashboard.py | 2 +- lms/static/js/my_courses_dropdown.js | 26 ++++++++++--------- lms/static/sass/shared/_header.scss | 22 +++++++++++++++- lms/templates/navigation-edx.html | 2 +- lms/templates/navigation.html | 2 +- 6 files changed, 39 insertions(+), 17 deletions(-) diff --git a/common/test/acceptance/tests/lms/test_account_settings.py b/common/test/acceptance/tests/lms/test_account_settings.py index dc00718b53b8..d010c3299495 100644 --- a/common/test/acceptance/tests/lms/test_account_settings.py +++ b/common/test/acceptance/tests/lms/test_account_settings.py @@ -461,7 +461,7 @@ def test_account_settings_a11y(self): self.visit_account_settings_page() self.account_settings_page.a11y_audit.config.set_rules({ 'ignore': [ - 'link-href', # TODO: AC-233, AC-230 + 'link-href', # TODO: AC-233, AC-238 'skip-link', # TODO: AC-179 ], }) diff --git a/common/test/acceptance/tests/lms/test_lms_dashboard.py b/common/test/acceptance/tests/lms/test_lms_dashboard.py index 6b3cc3e5e622..4b319e4b8f0a 100644 --- a/common/test/acceptance/tests/lms/test_lms_dashboard.py +++ b/common/test/acceptance/tests/lms/test_lms_dashboard.py @@ -236,7 +236,7 @@ def test_dashboard_course_listings_a11y(self): self.dashboard_page.a11y_audit.config.set_rules({ "ignore": [ 'skip-link', # TODO: AC-179 - 'link-href', # TODO: AC-230 + 'link-href', # TODO: AC-238, AC-179 ], }) diff --git a/lms/static/js/my_courses_dropdown.js b/lms/static/js/my_courses_dropdown.js index 5b76341b9a9e..516e268f5271 100644 --- a/lms/static/js/my_courses_dropdown.js +++ b/lms/static/js/my_courses_dropdown.js @@ -1,9 +1,11 @@ $(document).ready(function () { + 'use strict'; + // define variables for code legibility - var dropdownMenuToggle = $('a.dropdown'); - var dropdownMenu = $('ul.dropdown-menu'); + var dropdownMenuToggle = $('.dropdown'); + var dropdownMenu = $('.dropdown-menu'); var menuItems = dropdownMenu.find('a'); - + // bind menu toggle click for later use dropdownMenuToggle.toggle(function() { dropdownMenu.addClass("expanded").find('a').first().focus(); @@ -12,7 +14,7 @@ $(document).ready(function () { dropdownMenu.removeClass("expanded"); dropdownMenuToggle.removeClass("active").attr("aria-expanded", "false").focus(); }); - + //catch keypresses when focused on dropdownMenuToggle (we only care about spacebar keypresses here) dropdownMenuToggle.on('keydown', function(event){ // if space key pressed @@ -21,12 +23,12 @@ $(document).ready(function () { event.preventDefault(); } }); - + //catch keypresses when inside dropdownMenu (we want to catch spacebar; escape; up arrow or shift+tab; and down arrow or tab) dropdownMenu.on('keydown', function(event){ catchKeyPress($(this), event); }); - + function catchKeyPress(object, event) { // get currently focused item var focusedItem = jQuery(':focus'); @@ -36,22 +38,22 @@ $(document).ready(function () { // get the index of the currently focused item var focusedItemIndex = menuItems.index(focusedItem); - + // var to store next focused item index var itemToFocusIndex; - + // if space key pressed if ( event.which == 32) { dropdownMenuToggle.click(); event.preventDefault(); } - + // if escape key pressed if (event.which == 27) { dropdownMenuToggle.click(); event.preventDefault(); } - + // if up arrow key pressed or shift+tab if (event.which == 38 || (event.which == 9 && event.shiftKey)) { // if first item go to last @@ -63,7 +65,7 @@ $(document).ready(function () { } event.preventDefault(); } - + // if down arrow key pressed or tab key if (event.which == 40 || event.which == 9) { // if last item go to first @@ -76,4 +78,4 @@ $(document).ready(function () { event.preventDefault(); } } -}); \ No newline at end of file +}); diff --git a/lms/static/sass/shared/_header.scss b/lms/static/sass/shared/_header.scss index 43535f2ddd80..c66b2ed905c1 100644 --- a/lms/static/sass/shared/_header.scss +++ b/lms/static/sass/shared/_header.scss @@ -191,6 +191,16 @@ header.global { } } + .dropdown { + font-size: $body-font-size; + padding: 0 ($baseline/2); + color: $base-font-color; + border: none; + background: $white; + box-shadow: none; + text-shadow: none; + } + .dropdown-menu { background: $white; border-radius: 4px; @@ -486,7 +496,7 @@ header.global-new { } } } - a.user-link { + a.user-link { @include padding(5px, 2px, 10px, 10px); position: relative; text-transform: none; @@ -534,6 +544,16 @@ header.global-new { } } + .dropdown { + font-size: $body-font-size; + padding: 0 ($baseline/2); + color: $base-font-color; + border: none; + background: $white; + box-shadow: none; + text-shadow: none; + } + .dropdown-menu { background: $border-color-4; border-radius: 4px; diff --git a/lms/templates/navigation-edx.html b/lms/templates/navigation-edx.html index 713ef4580dc9..326ce236d4aa 100644 --- a/lms/templates/navigation-edx.html +++ b/lms/templates/navigation-edx.html @@ -83,7 +83,7 @@

  • - +
  • - % if get_course_about_section(course, "video"): + % if get_course_about_section(request, course, "video"):
    @@ -217,7 +217,7 @@

    - ${get_course_about_section(course, "overview")} + ${get_course_about_section(request, course, "overview")}
    @@ -231,10 +231,10 @@

    ## or something allowing themes to do whatever they ## want here (and on this whole page, really). % if self.stanford_theme_enabled(): - - % else: @@ -246,7 +246,7 @@

    ## Twitter account. {url} should appear at the end of the text. tweet_text = _("I just enrolled in {number} {title} through {account}: {url}").format( number=course.number, - title=get_course_about_section(course, 'title'), + title=get_course_about_section(request, course, 'title'), account=microsite.get_value('course_about_twitter_account', settings.PLATFORM_TWITTER_ACCOUNT), url=u"http://{domain}{path}".format( domain=site_domain, @@ -261,7 +261,7 @@

    subject=_("Take a course with {platform} online").format(platform=platform_name), body=_("I just enrolled in {number} {title} through {platform} {url}").format( number=course.number, - title=get_course_about_section(course, 'title'), + title=get_course_about_section(request, course, 'title'), platform=platform_name, url=u"http://{domain}{path}".format( domain=site_domain, @@ -291,13 +291,13 @@

    % endif ## We plan to ditch end_date (which is not stored in course metadata), ## but for backwards compatibility, show about/end_date blob if it exists. - % if get_course_about_section(course, "end_date") or course.end: + % if get_course_about_section(request, course, "end_date") or course.end:
  • ${_("Classes End")}

    - % if get_course_about_section(course, "end_date"): - ${get_course_about_section(course, "end_date")} + % if get_course_about_section(request, course, "end_date"): + ${get_course_about_section(request, course, "end_date")} % else: ${course.end_datetime_text()} % endif @@ -305,8 +305,8 @@

  • % endif - % if get_course_about_section(course, "effort"): -
  • ${_("Estimated Effort")}

    ${get_course_about_section(course, "effort")}
  • + % if get_course_about_section(request, course, "effort"): +
  • ${_("Estimated Effort")}

    ${get_course_about_section(request, course, "effort")}
  • % endif ##
  • ${_('Course Length')}

    ${_('{number} weeks').format(number=15)}
  • @@ -335,15 +335,15 @@

    % endif - % if get_course_about_section(course, "prerequisites"): -
  • ${_("Requirements")}

    ${get_course_about_section(course, "prerequisites")}
  • + % if get_course_about_section(request, course, "prerequisites"): +
  • ${_("Requirements")}

    ${get_course_about_section(request, course, "prerequisites")}
  • % endif ## For now, ocw links are the only thing that goes in additional resources - % if get_course_about_section(course, "ocw_links"): + % if get_course_about_section(request, course, "ocw_links"):

    ${_("Additional Resources")}

    @@ -352,7 +352,7 @@

    ${_("Additional Resources")}

    ## "MITOpenCourseware" should *not* be translated

    MITOpenCourseware

    - ${get_course_about_section(course, "ocw_links")} + ${get_course_about_section(request, course, "ocw_links")}
    %endif diff --git a/lms/templates/shoppingcart/receipt.html b/lms/templates/shoppingcart/receipt.html index 3940af4c63b1..3524ab6599ad 100644 --- a/lms/templates/shoppingcart/receipt.html +++ b/lms/templates/shoppingcart/receipt.html @@ -292,7 +292,7 @@

    ${_("Billed To Details")}:

    ${course.display_number_with_default | h} ${get_course_about_section(course, 'title')} Image + alt="${course.display_number_with_default | h} ${get_course_about_section(request, course, 'title')} Image"/>
    diff --git a/lms/templates/shoppingcart/registration_code_receipt.html b/lms/templates/shoppingcart/registration_code_receipt.html index b2f37b452d5f..b03096cea9c1 100644 --- a/lms/templates/shoppingcart/registration_code_receipt.html +++ b/lms/templates/shoppingcart/registration_code_receipt.html @@ -20,7 +20,7 @@

    ${_(

    diff --git a/lms/templates/shoppingcart/registration_code_redemption.html b/lms/templates/shoppingcart/registration_code_redemption.html index 3c91e41ce3bb..b8b62da5388d 100644 --- a/lms/templates/shoppingcart/registration_code_redemption.html +++ b/lms/templates/shoppingcart/registration_code_redemption.html @@ -20,7 +20,7 @@

    ${_(

    diff --git a/lms/templates/shoppingcart/shopping_cart.html b/lms/templates/shoppingcart/shopping_cart.html index 9d2a4b53a7c9..01b71824fba7 100644 --- a/lms/templates/shoppingcart/shopping_cart.html +++ b/lms/templates/shoppingcart/shopping_cart.html @@ -67,7 +67,7 @@
    ${course.display_number_with_default | h} ${get_course_about_section(course, 'title')} ${_('Cover Image')} + alt="${course.display_number_with_default | h} ${get_course_about_section(request, course, 'title')} ${_('Cover Image')}" />
    ## Translators: "Registration for:" is followed by a course name diff --git a/lms/templates/video_modal.html b/lms/templates/video_modal.html index a895df78d013..37c465052cfa 100644 --- a/lms/templates/video_modal.html +++ b/lms/templates/video_modal.html @@ -1,10 +1,10 @@ -<%! +<%! from courseware.courses import get_course_about_section %> <%namespace name='static' file='static_content.html'/> From 163e6f0a191440a73b2816338f2813bb5d4a7a9a Mon Sep 17 00:00:00 2001 From: Carol Tong Date: Mon, 23 Nov 2015 18:28:54 -0500 Subject: [PATCH 75/87] Update config.ini file with new paths --- docs/config.ini | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/config.ini b/docs/config.ini index e1f599961820..34d21026d745 100644 --- a/docs/config.ini +++ b/docs/config.ini @@ -18,29 +18,29 @@ default = index.html home = getting_started/get_started.html outline = developing_course/course_outline.html unit = developing_course/course_units.html -updates = building_course/handouts_updates.html -pages = building_course/pages.html -files = building_course/course_files.html -textbooks = building_course/textbooks.html -schedule = building_course/setting_up_student_view.html -grading = building_course/establish_grading_policy.html -team_course = building_course/creating_new_course.html#add-course-team-members -team_library = creating_content/libraries.html#give-other-users-access-to-your-library +updates = course_assets/handouts_updates.html +pages = course_assets/pages.html +files = course_assets/course_files.html +textbooks = course_assets/textbooks.html +schedule = set_up_course/setting_up_student_view.html +grading = grading/index.html +team_course = set_up_course/course_staffing.html#add-course-team-members +team_library = course_components/libraries.html#give-other-users-access-to-your-library advanced = index.html -checklist = building_course/creating_new_course.html#use-the-course-checklist -import_library = creating_content/libraries.html#import-a-library -import_course = building_course/export_import_course.html#import-a-course -export_library = creating_content/libraries.html#export-a-library -export_course = building_course/export_import_course.html#export-a-course +checklist = set_up_course/creating_new_course.html#use-the-course-checklist +import_library = course_components/libraries.html#import-a-library +import_course = releasing_course/export_import_course.html#import-a-course +export_library = course_components/libraries.html#export-a-library +export_course = releasing_course/export_import_course.html#export-a-course welcome = getting_started/get_started.html login = getting_started/get_started.html register = getting_started/get_started.html -content_libraries = creating_content/libraries.html -content_groups = cohorts/cohorted_courseware.html -group_configurations = content_experiments/content_experiments_configure.html#set-up-group-configurations-in-edx-studio +content_libraries = course_components/libraries.html +content_groups = course_features/cohorts/cohorted_courseware.html +group_configurations = course_features/content_experiments/content_experiments_configure.html#set-up-group-configurations-in-edx-studio container = developing_course/course_components.html#components-that-contain-other-components video = video/video_uploads.html -certificates = building_course/creating_course_certificates.html +certificates = set_up_course/creating_course_certificates.html # below are the language directory names for the different locales [locales] From 9e2e9af1f5fd82c50bc47654c63c98b381475c8f Mon Sep 17 00:00:00 2001 From: Chris Rodriguez Date: Tue, 24 Nov 2015 14:50:59 -0500 Subject: [PATCH 76/87] LMS: adjusting Wiki alert styles --- lms/static/sass/course/wiki/_wiki.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lms/static/sass/course/wiki/_wiki.scss b/lms/static/sass/course/wiki/_wiki.scss index 3dbdbf2f5079..f5c641655abc 100644 --- a/lms/static/sass/course/wiki/_wiki.scss +++ b/lms/static/sass/course/wiki/_wiki.scss @@ -896,11 +896,13 @@ section.wiki { .alert { position: relative; + width: auto; margin: 24px 40px; padding: 8px 12px; border: 1px solid #EBE8BF; border-radius: 3px; background: $yellow; + color: $black; font-size: 0.9em; .close { @@ -908,7 +910,7 @@ section.wiki { right: 12px; font-size: 1.3em; top: 6px; - color: #999; + color: $black; text-decoration: none; } } From fc875b1cc512e53e91d355e9ca3fe7ad2ea29f7d Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 24 Nov 2015 15:33:41 -0500 Subject: [PATCH 77/87] Add instructions to github.txt --- requirements/edx/github.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index e48349a78877..f8760f0b2598 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -4,6 +4,43 @@ # * @mollydb to check licensing # * One of @e0d, @feanil, @fredsmith, @maxrothman, or @jibsheet # to check system requirements +# +# A correct GitHub reference looks like this: +# +# git+https://github.com/OWNER/REPO-NAME.git@TAG-OR-SHA#egg=KIT-NAME==VERSION +# +# For example: +# +# git+https://github.com/edx/edx-lint.git@v0.3.2#egg=edx_lint==0.3.2 +# +# where: +# +# OWNER = edx +# REPO-NAME = edx-lint +# TAG-OR-SHA = v0.3.2 +# KIT-NAME = edx_lint +# VERSION = 0.3.2 +# +# +# Rules to follow (even though many URLs here don't follow them!): +# +# * Don't leave out any of these pieces. +# +# * Don't use -e +# +# * TAG-OR-SHA must be a git tag, or a git SHA. Don't use branch names here. +# +# * KIT-NAME might be different than REPO-NAME. KIT-NAME must be the same as +# the `name="KIT-NAME"` value in the repo's setup.py. +# +# * VERSION might not be the same as TAG-OR-SHA, but if the tag names the +# version, please make it match the VERSION, but with a "v" prefix. +# VERSION must be the same as the `version="VERSION"` value in the repo's +# setup.py. An alternative is to use 0.0 as VERSION: this forces pip to +# re-install the package each time, and can be useful when working with two +# repos before picking a version number. Don't use 0.0 on master, only for +# tight-loop work in progress. + # Python libraries to install directly from github From 92153752c08aef22ce714149b1f447a03fcd3960 Mon Sep 17 00:00:00 2001 From: Clinton Blackburn Date: Thu, 5 Nov 2015 02:06:30 -0500 Subject: [PATCH 78/87] Rewrote Credit API - API built atop Django REST Framework - Added support for OAuth 2.0 and session authentication - Added permissions around eligibility data ECOM-2609 --- lms/envs/common.py | 3 - lms/envs/test.py | 2 - lms/static/js/commerce/credit.js | 2 + lms/static/js/commerce/views/receipt_view.js | 6 +- lms/templates/commerce/provider.underscore | 6 +- lms/urls.py | 7 +- .../core/djangoapps/credit/api/eligibility.py | 8 +- .../core/djangoapps/credit/api/provider.py | 16 +- openedx/core/djangoapps/credit/exceptions.py | 28 + openedx/core/djangoapps/credit/models.py | 8 +- openedx/core/djangoapps/credit/serializers.py | 99 ++- openedx/core/djangoapps/credit/signature.py | 2 +- openedx/core/djangoapps/credit/tasks.py | 6 +- .../core/djangoapps/credit/tests/factories.py | 72 ++ .../core/djangoapps/credit/tests/test_api.py | 122 --- .../djangoapps/credit/tests/test_models.py | 3 +- .../credit/tests/test_serializers.py | 46 + .../djangoapps/credit/tests/test_views.py | 824 ++++++++++-------- openedx/core/djangoapps/credit/urls.py | 44 +- openedx/core/djangoapps/credit/views.py | 445 +++------- openedx/core/lib/api/permissions.py | 13 + .../core/lib/api/tests/test_permissions.py | 65 ++ 22 files changed, 938 insertions(+), 889 deletions(-) create mode 100644 openedx/core/djangoapps/credit/tests/factories.py create mode 100644 openedx/core/djangoapps/credit/tests/test_serializers.py create mode 100644 openedx/core/lib/api/tests/test_permissions.py diff --git a/lms/envs/common.py b/lms/envs/common.py index ff3dc5eb49c4..176659cf0a4a 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -393,9 +393,6 @@ # Enable OpenBadge support. See the BADGR_* settings later in this file. 'ENABLE_OPENBADGES': False, - # Credit course API - 'ENABLE_CREDIT_API': True, - # The block types to disable need to be specified in "x block disable config" in django admin. 'ENABLE_DISABLING_XBLOCK_TYPES': True, diff --git a/lms/envs/test.py b/lms/envs/test.py index 45b76cd54ea2..44e4cbb25660 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -68,8 +68,6 @@ FEATURES['ENABLE_VERIFIED_CERTIFICATES'] = True -FEATURES['ENABLE_CREDIT_API'] = True - # Enable this feature for course staff grade downloads, to enable acceptance tests FEATURES['ENABLE_S3_GRADE_DOWNLOADS'] = True FEATURES['ALLOW_COURSE_STAFF_GRADE_DOWNLOADS'] = True diff --git a/lms/static/js/commerce/credit.js b/lms/static/js/commerce/credit.js index 831b0ec0e19e..7d308d5778b7 100644 --- a/lms/static/js/commerce/credit.js +++ b/lms/static/js/commerce/credit.js @@ -16,6 +16,8 @@ var edx = edx || {}; headers: { 'X-CSRFToken': $.cookie('csrftoken') }, + dataType: 'json', + contentType: 'application/json', data: JSON.stringify({ 'course_key': courseKey, 'username': username diff --git a/lms/static/js/commerce/views/receipt_view.js b/lms/static/js/commerce/views/receipt_view.js index 8e0a5b9e62df..3263c70f3391 100644 --- a/lms/static/js/commerce/views/receipt_view.js +++ b/lms/static/js/commerce/views/receipt_view.js @@ -140,7 +140,11 @@ var edx = edx || {}; return $.ajax({ url: _.sprintf(providerUrl, providerId), type: 'GET', - dataType: 'json' + dataType: 'json', + contentType: 'application/json', + headers: { + 'X-CSRFToken': $.cookie('csrftoken') + } }).retry({times: 5, timeout: 2000, statusCodes: [404]}); }, /** diff --git a/lms/templates/commerce/provider.underscore b/lms/templates/commerce/provider.underscore index a1d978257a3a..7f40e192ea46 100644 --- a/lms/templates/commerce/provider.underscore +++ b/lms/templates/commerce/provider.underscore @@ -7,8 +7,8 @@
    <%= interpolate( - gettext("To finalize course credit, %(provider_id)s requires %(platform_name)s learners to submit a credit request."), - { provider_id: provider_id.toUpperCase(), platform_name: platformName }, true + gettext("To finalize course credit, %(display_name)s requires %(platform_name)s learners to submit a credit request."), + { display_name: display_name, platform_name: platformName }, true ) %>
    @@ -21,7 +21,7 @@ <%= interpolate("%s", [thumbnail_url, display_name]) %>
    - <%= interpolate('', [provider_id, course_key, username, + <%= interpolate('', [id, course_key, username, gettext( "Get Credit")]) %>
    diff --git a/lms/urls.py b/lms/urls.py index 529f6591e6b9..02eeae6fc7f3 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -98,6 +98,7 @@ url(r'^api/val/v0/', include('edxval.urls')), url(r'^api/commerce/', include('commerce.api.urls', namespace='commerce_api')), + url(r'^api/credit/', include('openedx.core.djangoapps.credit.urls', app_name="credit", namespace='credit')), ) if settings.FEATURES["ENABLE_COMBINED_LOGIN_REGISTRATION"]: @@ -115,12 +116,6 @@ url(r'^register$', 'student.views.register_user', name="register_user"), ) -if settings.FEATURES.get("ENABLE_CREDIT_API"): - # Credit API end-points - urlpatterns += ( - url(r'^api/credit/', include('openedx.core.djangoapps.credit.urls', app_name="credit", namespace='credit')), - ) - if settings.FEATURES["ENABLE_MOBILE_REST_API"]: urlpatterns += ( url(r'^api/mobile/v0.5/', include('mobile_api.urls')), diff --git a/openedx/core/djangoapps/credit/api/eligibility.py b/openedx/core/djangoapps/credit/api/eligibility.py index fd9c2bd82678..9ad0abff9ec9 100644 --- a/openedx/core/djangoapps/credit/api/eligibility.py +++ b/openedx/core/djangoapps/credit/api/eligibility.py @@ -5,6 +5,8 @@ import logging +from opaque_keys.edx.keys import CourseKey + from openedx.core.djangoapps.credit.exceptions import InvalidCreditRequirements, InvalidCreditCourse from openedx.core.djangoapps.credit.email_utils import send_credit_notifications from openedx.core.djangoapps.credit.models import ( @@ -14,8 +16,7 @@ CreditEligibility, ) -from opaque_keys.edx.keys import CourseKey - +# TODO: Cleanup this mess! ECOM-2908 log = logging.getLogger(__name__) @@ -246,8 +247,7 @@ def set_credit_requirement_status(username, course_key, req_namespace, req_name, # Find the requirement we're trying to set req_to_update = next(( req for req in reqs - if req.namespace == req_namespace - and req.name == req_name + if req.namespace == req_namespace and req.name == req_name ), None) # If we can't find the requirement, then the most likely explanation diff --git a/openedx/core/djangoapps/credit/api/provider.py b/openedx/core/djangoapps/credit/api/provider.py index ef2acc36c5ff..50dcd54be5fc 100644 --- a/openedx/core/djangoapps/credit/api/provider.py +++ b/openedx/core/djangoapps/credit/api/provider.py @@ -4,12 +4,12 @@ import datetime import logging -import pytz import uuid +import pytz from django.db import transaction -from lms.djangoapps.django_comment_client.utils import JsonResponse +from lms.djangoapps.django_comment_client.utils import JsonResponse from openedx.core.djangoapps.credit.exceptions import ( UserIsNotEligible, CreditProviderNotConfigured, @@ -28,6 +28,8 @@ from util.date_utils import to_timestamp +# TODO: Cleanup this mess! ECOM-2908 + log = logging.getLogger(__name__) @@ -257,12 +259,10 @@ def create_credit_request(course_key, provider_id, username): final_grade = unicode(final_grade) except (CreditRequirementStatus.DoesNotExist, TypeError, KeyError): - log.exception( - "Could not retrieve final grade from the credit eligibility table " - "for user %s in course %s.", - user.id, course_key - ) - raise UserIsNotEligible + msg = 'Could not retrieve final grade from the credit eligibility table for ' \ + 'user [{user_id}] in course [{course_key}].'.format(user_id=user.id, course_key=course_key) + log.exception(msg) + raise UserIsNotEligible(msg) parameters = { "request_uuid": credit_request.uuid, diff --git a/openedx/core/djangoapps/credit/exceptions.py b/openedx/core/djangoapps/credit/exceptions.py index cffa47e7d184..04d58c8c3032 100644 --- a/openedx/core/djangoapps/credit/exceptions.py +++ b/openedx/core/djangoapps/credit/exceptions.py @@ -1,4 +1,10 @@ """Exceptions raised by the credit API. """ +from __future__ import unicode_literals +from django.utils.translation import ugettext_lazy as _ +from rest_framework import status +from rest_framework.exceptions import APIException + +# TODO: Cleanup this mess! ECOM-2908 class CreditApiBadRequest(Exception): @@ -56,3 +62,25 @@ class InvalidCreditStatus(CreditApiBadRequest): The status is not either "approved" or "rejected". """ pass + + +class InvalidCreditRequest(APIException): + """ API request is invalid. """ + status_code = status.HTTP_400_BAD_REQUEST + + +class UserNotEligibleException(InvalidCreditRequest): + """ User not eligible for credit for a given course. """ + + def __init__(self, course_key, username): + detail = _('[{username}] is not eligible for credit for [{course_key}].').format(username=username, + course_key=course_key) + super(UserNotEligibleException, self).__init__(detail) + + +class InvalidCourseKey(InvalidCreditRequest): + """ Course key is invalid. """ + + def __init__(self, course_key): + detail = _('[{course_key}] is not a valid course key.').format(course_key=course_key) + super(InvalidCourseKey, self).__init__(detail) diff --git a/openedx/core/djangoapps/credit/models.py b/openedx/core/djangoapps/credit/models.py index 21a8d2926384..7cde41b58f8e 100644 --- a/openedx/core/djangoapps/credit/models.py +++ b/openedx/core/djangoapps/credit/models.py @@ -25,6 +25,7 @@ from django.utils.translation import ugettext_lazy +CREDIT_PROVIDER_ID_REGEX = r"[a-z,A-Z,0-9,\-]+" log = logging.getLogger(__name__) @@ -42,7 +43,7 @@ class CreditProvider(TimeStampedModel): unique=True, validators=[ RegexValidator( - regex=r"^[a-z,A-Z,0-9,\-]+$", + regex=CREDIT_PROVIDER_ID_REGEX, message="Only alphanumeric characters and hyphens (-) are allowed", code="invalid_provider_id", ) @@ -498,10 +499,7 @@ def default_deadline_for_credit_eligibility(): # pylint: disable=invalid-name class CreditEligibility(TimeStampedModel): - """ - A record of a user's eligibility for credit from a specific credit - provider for a specific course. - """ + """ A record of a user's eligibility for credit for a specific course. """ username = models.CharField(max_length=255, db_index=True) course = models.ForeignKey(CreditCourse, related_name="eligibilities") diff --git a/openedx/core/djangoapps/credit/serializers.py b/openedx/core/djangoapps/credit/serializers.py index 216aa1fa050d..d2f8a077207c 100644 --- a/openedx/core/djangoapps/credit/serializers.py +++ b/openedx/core/djangoapps/credit/serializers.py @@ -1,16 +1,25 @@ """ Credit API Serializers """ -from rest_framework import serializers +from __future__ import unicode_literals +import datetime +import logging -from opaque_keys.edx.keys import CourseKey +from django.conf import settings from opaque_keys import InvalidKeyError -from openedx.core.djangoapps.credit.models import CreditCourse +from opaque_keys.edx.keys import CourseKey +import pytz +from rest_framework import serializers +from rest_framework.exceptions import PermissionDenied + +from openedx.core.djangoapps.credit.models import CreditCourse, CreditProvider, CreditEligibility, CreditRequest +from openedx.core.djangoapps.credit.signature import get_shared_secret_key, signature +from util.date_utils import from_timestamp + +log = logging.getLogger(__name__) class CourseKeyField(serializers.Field): - """ - Serializer field for a model CourseKey field. - """ + """ Serializer field for a model CourseKey field. """ def to_representation(self, data): """Convert a course key to unicode. """ @@ -32,3 +41,81 @@ class CreditCourseSerializer(serializers.ModelSerializer): class Meta(object): model = CreditCourse exclude = ('id',) + + +class CreditProviderSerializer(serializers.ModelSerializer): + """ CreditProvider """ + id = serializers.CharField(source='provider_id') # pylint:disable=invalid-name + description = serializers.CharField(source='provider_description') + status_url = serializers.URLField(source='provider_status_url') + url = serializers.URLField(source='provider_url') + + class Meta(object): + model = CreditProvider + fields = ('id', 'display_name', 'url', 'status_url', 'description', 'enable_integration', + 'fulfillment_instructions', 'thumbnail_url',) + + +class CreditEligibilitySerializer(serializers.ModelSerializer): + """ CreditEligibility serializer. """ + course_key = serializers.SerializerMethodField() + + def get_course_key(self, obj): + """ Returns the course key associated with the course. """ + return unicode(obj.course.course_key) + + class Meta(object): + model = CreditEligibility + fields = ('username', 'course_key', 'deadline',) + + +class CreditProviderCallbackSerializer(serializers.Serializer): # pylint:disable=abstract-method + """ + Serializer for input to the CreditProviderCallback view. + + This is used solely for validating the input. + """ + request_uuid = serializers.CharField(required=True) + status = serializers.ChoiceField(required=True, choices=CreditRequest.REQUEST_STATUS_CHOICES) + timestamp = serializers.IntegerField(required=True) + signature = serializers.CharField(required=True) + + def __init__(self, **kwargs): + self.provider = kwargs.pop('provider', None) + super(CreditProviderCallbackSerializer, self).__init__(**kwargs) + + def validate_timestamp(self, value): + """ Ensure the request has been received in a timely manner. """ + date_time = from_timestamp(value) + + # Ensure we converted the timestamp to a datetime + if not date_time: + msg = '[{}] is not a valid timestamp'.format(value) + log.warning(msg) + raise serializers.ValidationError(msg) + + elapsed = (datetime.datetime.now(pytz.UTC) - date_time).total_seconds() + if elapsed > settings.CREDIT_PROVIDER_TIMESTAMP_EXPIRATION: + msg = '[{value}] is too far in the past (over [{elapsed}] seconds).'.format(value=value, elapsed=elapsed) + log.warning(msg) + raise serializers.ValidationError(msg) + + return value + + def validate_signature(self, value): + """ Validate the signature and ensure the provider is setup properly. """ + provider_id = self.provider.provider_id + secret_key = get_shared_secret_key(provider_id) + if secret_key is None: + msg = 'Could not retrieve secret key for credit provider [{}]. ' \ + 'Unable to validate requests from provider.'.format(provider_id) + log.error(msg) + raise PermissionDenied(msg) + + data = self.initial_data + actual_signature = data["signature"] + if signature(data, secret_key) != actual_signature: + msg = 'Request from credit provider [{}] had an invalid signature.'.format(provider_id) + raise PermissionDenied(msg) + + return value diff --git a/openedx/core/djangoapps/credit/signature.py b/openedx/core/djangoapps/credit/signature.py index ce5931a0b86f..343a3c833b4f 100644 --- a/openedx/core/djangoapps/credit/signature.py +++ b/openedx/core/djangoapps/credit/signature.py @@ -59,5 +59,5 @@ def signature(params, shared_secret): for key in sorted(params.keys()) if key != u"signature" ]) - hasher = hmac.new(shared_secret, encoded_params.encode('utf-8'), hashlib.sha256) + hasher = hmac.new(shared_secret.encode('utf-8'), encoded_params.encode('utf-8'), hashlib.sha256) return hasher.hexdigest() diff --git a/openedx/core/djangoapps/credit/tasks.py b/openedx/core/djangoapps/credit/tasks.py index 654aaee98ff4..a963e4798ef2 100644 --- a/openedx/core/djangoapps/credit/tasks.py +++ b/openedx/core/djangoapps/credit/tasks.py @@ -2,13 +2,9 @@ This file contains celery tasks for credit course views. """ -import datetime -from pytz import UTC - -from django.conf import settings - from celery import task from celery.utils.log import get_task_logger +from django.conf import settings from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey, UsageKey diff --git a/openedx/core/djangoapps/credit/tests/factories.py b/openedx/core/djangoapps/credit/tests/factories.py new file mode 100644 index 000000000000..ae6aa8398d83 --- /dev/null +++ b/openedx/core/djangoapps/credit/tests/factories.py @@ -0,0 +1,72 @@ +# pylint:disable=missing-docstring,no-member +import datetime +import json +import uuid # pylint:disable=unused-import + +from django.contrib.auth.models import User +import factory +from factory.fuzzy import FuzzyText +import pytz + +from openedx.core.djangoapps.credit.models import CreditProvider, CreditEligibility, CreditCourse, CreditRequest +from util.date_utils import to_timestamp + + +class CreditCourseFactory(factory.DjangoModelFactory): + class Meta(object): + model = CreditCourse + + course_key = FuzzyText(prefix='fake.org/', suffix='/fake.run') + enabled = True + + +class CreditProviderFactory(factory.DjangoModelFactory): + class Meta(object): + model = CreditProvider + + provider_id = FuzzyText(length=5) + provider_url = FuzzyText(prefix='http://') + + +class CreditEligibilityFactory(factory.DjangoModelFactory): + class Meta(object): + model = CreditEligibility + + course = factory.SubFactory(CreditCourseFactory) + + +class CreditRequestFactory(factory.DjangoModelFactory): + class Meta(object): + model = CreditRequest + + uuid = factory.LazyAttribute(lambda o: uuid.uuid4().hex) # pylint: disable=undefined-variable + + # pylint: disable=access-member-before-definition,attribute-defined-outside-init,no-self-argument,unused-argument + @factory.post_generation + def post(obj, create, extracted, **kwargs): + """ + Post-generation handler. + + Sets up parameters field. + """ + if not obj.parameters: + course_key = obj.course.course_key + user = User.objects.get(username=obj.username) + user_profile = user.profile + + # pylint:disable=access-member-before-definition + obj.parameters = json.dumps({ + "request_uuid": obj.uuid, + "timestamp": to_timestamp(datetime.datetime.now(pytz.UTC)), + "course_org": course_key.org, + "course_num": course_key.course, + "course_run": course_key.run, + "final_grade": '0.96', + "user_username": user.username, + "user_email": user.email, + "user_full_name": user_profile.name, + "user_mailing_address": "", + "user_country": user_profile.country.code or "", + }) + + obj.save() diff --git a/openedx/core/djangoapps/credit/tests/test_api.py b/openedx/core/djangoapps/credit/tests/test_api.py index 5328bd03f669..f8bdfda56f2e 100644 --- a/openedx/core/djangoapps/credit/tests/test_api.py +++ b/openedx/core/djangoapps/credit/tests/test_api.py @@ -2,17 +2,13 @@ Tests for the API functions in the credit app. """ import datetime -import json import unittest import ddt from django.conf import settings from django.core import mail -from django.test import TestCase from django.test.utils import override_settings from django.db import connection, transaction -from django.core.urlresolvers import reverse, NoReverseMatch -from mock import patch from opaque_keys.edx.keys import CourseKey import pytz from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase @@ -39,8 +35,6 @@ TEST_CREDIT_PROVIDER_SECRET_KEY = "931433d583c84ca7ba41784bad3232e6" -from util.testing import UrlResetMixin - @override_settings(CREDIT_PROVIDER_SECRET_KEYS={ "hogwarts": TEST_CREDIT_PROVIDER_SECRET_KEY, @@ -880,119 +874,3 @@ def _assert_credit_status(self, expected_status): """Check the user's credit status. """ statuses = api.get_credit_requests_for_user(self.USER_INFO["username"]) self.assertEqual(statuses[0]["status"], expected_status) - - -class CreditApiFeatureFlagTest(UrlResetMixin, TestCase): - """ - Base class to test the credit api urls. - """ - - def setUp(self, **kwargs): - enable_credit_api = kwargs.get('enable_credit_api', False) - with patch.dict('django.conf.settings.FEATURES', {'ENABLE_CREDIT_API': enable_credit_api}): - super(CreditApiFeatureFlagTest, self).setUp('lms.urls') - - -@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') -class CreditApiFeatureFlagDisabledTests(CreditApiFeatureFlagTest): - """ - Test Python API for credit provider api with feature flag - 'ENABLE_CREDIT_API' disabled. - """ - PROVIDER_ID = "hogwarts" - - def setUp(self): - super(CreditApiFeatureFlagDisabledTests, self).setUp(enable_credit_api=False) - - def test_get_credit_provider_details(self): - """ - Test that 'get_provider_info' api url not found. - """ - with self.assertRaises(NoReverseMatch): - reverse('credit:get_provider_info', args=[self.PROVIDER_ID]) - - -@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') -class CreditApiFeatureFlagEnabledTests(CreditApiFeatureFlagTest, CreditApiTestBase): - """ - Test Python API for credit provider api with feature flag - 'ENABLE_CREDIT_API' enabled. - """ - USER_INFO = { - "username": "bob", - "email": "bob@example.com", - "full_name": "Bob", - "mailing_address": "123 Fake Street, Cambridge MA", - "country": "US", - } - - FINAL_GRADE = 0.95 - - def setUp(self): - super(CreditApiFeatureFlagEnabledTests, self).setUp(enable_credit_api=True) - self.user = UserFactory( - username=self.USER_INFO['username'], - email=self.USER_INFO['email'], - ) - - self.user.profile.name = self.USER_INFO['full_name'] - self.user.profile.mailing_address = self.USER_INFO['mailing_address'] - self.user.profile.country = self.USER_INFO['country'] - self.user.profile.save() - - # By default, configure the database so that there is a single - # credit requirement that the user has satisfied (minimum grade) - self._configure_credit() - - def test_get_credit_provider_details(self): - """Test that credit api method 'test_get_credit_provider_details' - returns dictionary data related to provided credit provider. - """ - expected_result = { - "provider_id": self.PROVIDER_ID, - "display_name": self.PROVIDER_NAME, - "provider_url": self.PROVIDER_URL, - "provider_status_url": self.PROVIDER_STATUS_URL, - "provider_description": self.PROVIDER_DESCRIPTION, - "enable_integration": self.ENABLE_INTEGRATION, - "fulfillment_instructions": self.FULFILLMENT_INSTRUCTIONS, - "thumbnail_url": self.THUMBNAIL_URL - } - path = reverse('credit:get_provider_info', kwargs={'provider_id': self.PROVIDER_ID}) - result = self.client.get(path) - result = json.loads(result.content) - self.assertEqual(result, expected_result) - - # now test that user gets empty dict for non existent credit provider - path = reverse('credit:get_provider_info', kwargs={'provider_id': 'fake_provider_id'}) - result = self.client.get(path) - result = json.loads(result.content) - self.assertEqual(result, {}) - - def _configure_credit(self): - """ - Configure a credit course and its requirements. - - By default, add a single requirement (minimum grade) - that the user has satisfied. - - """ - credit_course = self.add_credit_course() - requirement = CreditRequirement.objects.create( - course=credit_course, - namespace="grade", - name="grade", - active=True - ) - status = CreditRequirementStatus.objects.create( - username=self.USER_INFO["username"], - requirement=requirement, - ) - status.status = "satisfied" - status.reason = {"final_grade": self.FINAL_GRADE} - status.save() - - CreditEligibility.objects.create( - username=self.USER_INFO['username'], - course=CreditCourse.objects.get(course_key=self.course_key) - ) diff --git a/openedx/core/djangoapps/credit/tests/test_models.py b/openedx/core/djangoapps/credit/tests/test_models.py index 9f0f14d160d6..733876f198f3 100644 --- a/openedx/core/djangoapps/credit/tests/test_models.py +++ b/openedx/core/djangoapps/credit/tests/test_models.py @@ -5,7 +5,6 @@ import ddt from django.test import TestCase - from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.credit.models import CreditCourse, CreditRequirement @@ -17,7 +16,7 @@ class CreditEligibilityModelTests(TestCase): Tests for credit models used to track credit eligibility. """ - def setUp(self, **kwargs): + def setUp(self): super(CreditEligibilityModelTests, self).setUp() self.course_key = CourseKey.from_string("edX/DemoX/Demo_Course") diff --git a/openedx/core/djangoapps/credit/tests/test_serializers.py b/openedx/core/djangoapps/credit/tests/test_serializers.py new file mode 100644 index 000000000000..9526627ac2fa --- /dev/null +++ b/openedx/core/djangoapps/credit/tests/test_serializers.py @@ -0,0 +1,46 @@ +""" Tests for Credit API serializers. """ + +# pylint: disable=no-member +from __future__ import unicode_literals + +from django.test import TestCase + +from openedx.core.djangoapps.credit import serializers +from openedx.core.djangoapps.credit.tests.factories import CreditProviderFactory, CreditEligibilityFactory +from student.tests.factories import UserFactory + + +class CreditProviderSerializerTests(TestCase): + """ CreditProviderSerializer tests. """ + + def test_data(self): + """ Verify the correct fields are serialized. """ + provider = CreditProviderFactory(active=False) + serializer = serializers.CreditProviderSerializer(provider) + expected = { + 'id': provider.provider_id, + 'display_name': provider.display_name, + 'url': provider.provider_url, + 'status_url': provider.provider_status_url, + 'description': provider.provider_description, + 'enable_integration': provider.enable_integration, + 'fulfillment_instructions': provider.fulfillment_instructions, + 'thumbnail_url': provider.thumbnail_url, + } + self.assertDictEqual(serializer.data, expected) + + +class CreditEligibilitySerializerTests(TestCase): + """ CreditEligibilitySerializer tests. """ + + def test_data(self): + """ Verify the correct fields are serialized. """ + user = UserFactory() + eligibility = CreditEligibilityFactory(username=user.username) + serializer = serializers.CreditEligibilitySerializer(eligibility) + expected = { + 'course_key': unicode(eligibility.course.course_key), + 'deadline': eligibility.deadline.strftime('%Y-%m-%dT%H:%M:%S.%fZ'), + 'username': user.username, + } + self.assertDictEqual(serializer.data, expected) diff --git a/openedx/core/djangoapps/credit/tests/test_views.py b/openedx/core/djangoapps/credit/tests/test_views.py index c7e497d87808..f687faea0926 100644 --- a/openedx/core/djangoapps/credit/tests/test_views.py +++ b/openedx/core/djangoapps/credit/tests/test_views.py @@ -1,6 +1,10 @@ """ Tests for credit app views. """ + +# pylint: disable=no-member + +from __future__ import unicode_literals import datetime import json import unittest @@ -10,397 +14,98 @@ from django.core.urlresolvers import reverse from django.test import TestCase, Client from django.test.utils import override_settings -from mock import patch from oauth2_provider.tests.factories import AccessTokenFactory, ClientFactory from opaque_keys.edx.keys import CourseKey import pytz -from student.tests.factories import UserFactory -from util.date_utils import to_timestamp -from util.testing import UrlResetMixin -from openedx.core.djangoapps.credit import api from openedx.core.djangoapps.credit.signature import signature +from openedx.core.djangoapps.credit.serializers import CreditProviderSerializer, CreditEligibilitySerializer +from openedx.core.djangoapps.credit.tests.factories import ( + CreditProviderFactory, + CreditEligibilityFactory, + CreditCourseFactory, CreditRequestFactory) +from student.tests.factories import UserFactory, AdminFactory from openedx.core.djangoapps.credit.models import ( CreditCourse, - CreditProvider, - CreditRequirement, - CreditRequirementStatus, - CreditEligibility, - CreditRequest, -) + CreditProvider, CreditRequest, CreditRequirement, CreditRequirementStatus) +from util.date_utils import to_timestamp JSON = 'application/json' -TEST_CREDIT_PROVIDER_SECRET_KEY = "931433d583c84ca7ba41784bad3232e6" - - -@ddt.ddt -@override_settings(CREDIT_PROVIDER_SECRET_KEYS={ - "hogwarts": TEST_CREDIT_PROVIDER_SECRET_KEY -}) -@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') -class CreditProviderViewTests(UrlResetMixin, TestCase): - """ - Tests for HTTP end-points used to issue requests to credit providers - and receive responses approving or denying requests. - """ - - USERNAME = "ron" - USER_FULL_NAME = "Ron Weasley" - PASSWORD = "password" - PROVIDER_ID = "hogwarts" - PROVIDER_URL = "https://credit.example.com/request" - COURSE_KEY = CourseKey.from_string("edX/DemoX/Demo_Course") - FINAL_GRADE = 0.95 - @patch.dict(settings.FEATURES, {"ENABLE_CREDIT_API": True}) - def setUp(self): - """ - Configure a credit course. - """ - super(CreditProviderViewTests, self).setUp() - # Create the test user and log in - self.user = UserFactory(username=self.USERNAME, password=self.PASSWORD) - self.user.profile.name = self.USER_FULL_NAME - self.user.profile.save() +class ApiTestCaseMixin(object): + """ Mixin to aid with API testing. """ - success = self.client.login(username=self.USERNAME, password=self.PASSWORD) - self.assertTrue(success, msg="Could not log in") + def assert_error_response(self, response, msg, status_code=400): + """ Validate the response's status and detail message. """ + self.assertEqual(response.status_code, status_code) + self.assertDictEqual(response.data, {'detail': msg}) - # Enable the course for credit - credit_course = CreditCourse.objects.create( - course_key=self.COURSE_KEY, - enabled=True, - ) - - # Configure a credit provider for the course - CreditProvider.objects.create( - provider_id=self.PROVIDER_ID, - enable_integration=True, - provider_url=self.PROVIDER_URL, - ) - # Add a single credit requirement (final grade) - requirement = CreditRequirement.objects.create( - course=credit_course, - namespace="grade", - name="grade", - ) - - # Mark the user as having satisfied the requirement - # and eligible for credit. - CreditRequirementStatus.objects.create( - username=self.USERNAME, - requirement=requirement, - status="satisfied", - reason={"final_grade": self.FINAL_GRADE} - ) - CreditEligibility.objects.create( - username=self.USERNAME, - course=credit_course, - ) - - def test_credit_request_and_response(self): - # Initiate a request - response = self._create_credit_request(self.USERNAME, self.COURSE_KEY) - self.assertEqual(response.status_code, 200) +class UserMixin(object): + """ Test mixin that creates, and authenticates, a new user for every test. """ + password = 'password' + list_path = None - # Check that the user's request status is pending - requests = api.get_credit_requests_for_user(self.USERNAME) - self.assertEqual(len(requests), 1) - self.assertEqual(requests[0]["status"], "pending") + def setUp(self): + super(UserMixin, self).setUp() - # Check request parameters - content = json.loads(response.content) - self.assertEqual(content["url"], self.PROVIDER_URL) - self.assertEqual(content["method"], "POST") - self.assertEqual(len(content["parameters"]["request_uuid"]), 32) - self.assertEqual(content["parameters"]["course_org"], "edX") - self.assertEqual(content["parameters"]["course_num"], "DemoX") - self.assertEqual(content["parameters"]["course_run"], "Demo_Course") - self.assertEqual(content["parameters"]["final_grade"], unicode(self.FINAL_GRADE)) - self.assertEqual(content["parameters"]["user_username"], self.USERNAME) - self.assertEqual(content["parameters"]["user_full_name"], self.USER_FULL_NAME) - self.assertEqual(content["parameters"]["user_mailing_address"], "") - self.assertEqual(content["parameters"]["user_country"], "") + # This value must be set here, as setting it outside of a method results in issues with CMS/Studio tests. + if self.list_path: + self.path = reverse(self.list_path) - # The signature is going to change each test run because the request - # is assigned a different UUID each time. - # For this reason, we use the signature function directly - # (the "signature" parameter will be ignored when calculating the signature). - # Other unit tests verify that the signature function is working correctly. - self.assertEqual( - content["parameters"]["signature"], - signature(content["parameters"], TEST_CREDIT_PROVIDER_SECRET_KEY) - ) + # Create a user and login, so that we can use session auth for the + # tests that aren't specifically testing authentication or authorization. + self.user = UserFactory(password=self.password, is_staff=True) + self.client.login(username=self.user.username, password=self.password) - # Simulate a response from the credit provider - response = self._credit_provider_callback( - content["parameters"]["request_uuid"], - "approved" - ) - self.assertEqual(response.status_code, 200) - # Check that the user's status is approved - requests = api.get_credit_requests_for_user(self.USERNAME) - self.assertEqual(len(requests), 1) - self.assertEqual(requests[0]["status"], "approved") +class AuthMixin(object): + """ Test mixin with methods to test OAuth 2.0 and session authentication. """ - def test_request_credit_anonymous_user(self): + def test_authentication_required(self): + """ Verify the endpoint requires authentication. """ self.client.logout() - response = self._create_credit_request(self.USERNAME, self.COURSE_KEY) - self.assertEqual(response.status_code, 403) - - def test_request_credit_for_another_user(self): - response = self._create_credit_request("another_user", self.COURSE_KEY) - self.assertEqual(response.status_code, 403) - - @ddt.data( - # Invalid JSON - "{", - - # Missing required parameters - json.dumps({"username": USERNAME}), - json.dumps({"course_key": unicode(COURSE_KEY)}), - - # Invalid course key format - json.dumps({"username": USERNAME, "course_key": "invalid"}), - ) - def test_create_credit_request_invalid_parameters(self, request_data): - url = reverse("credit:create_request", args=[self.PROVIDER_ID]) - response = self.client.post(url, data=request_data, content_type=JSON) - self.assertEqual(response.status_code, 400) - - def test_credit_provider_callback_validates_signature(self): - request_uuid = self._create_credit_request_and_get_uuid(self.USERNAME, self.COURSE_KEY) - - # Simulate a callback from the credit provider with an invalid signature - # Since the signature is invalid, we respond with a 403 Not Authorized. - response = self._credit_provider_callback(request_uuid, "approved", sig="invalid") - self.assertEqual(response.status_code, 403) - - def test_credit_provider_callback_validates_timestamp(self): - request_uuid = self._create_credit_request_and_get_uuid(self.USERNAME, self.COURSE_KEY) - - # Simulate a callback from the credit provider with a timestamp too far in the past - # (slightly more than 15 minutes) - # Since the message isn't timely, respond with a 403. - timestamp = to_timestamp(datetime.datetime.now(pytz.UTC) - datetime.timedelta(0, 60 * 15 + 1)) - response = self._credit_provider_callback(request_uuid, "approved", timestamp=timestamp) - self.assertEqual(response.status_code, 403) - - def test_credit_provider_callback_handles_string_timestamp(self): - request_uuid = self._create_credit_request_and_get_uuid(self.USERNAME, self.COURSE_KEY) + response = self.client.get(self.path) + self.assertEqual(response.status_code, 401) - # Simulate a callback from the credit provider with a timestamp - # encoded as a string instead of an integer. - timestamp = str(to_timestamp(datetime.datetime.now(pytz.UTC))) - response = self._credit_provider_callback(request_uuid, "approved", timestamp=timestamp) + def test_oauth(self): + """ Verify the endpoint supports authentication via OAuth 2.0. """ + access_token = AccessTokenFactory(user=self.user, client=ClientFactory()).token + headers = { + 'HTTP_AUTHORIZATION': 'Bearer ' + access_token + } + self.client.logout() + response = self.client.get(self.path, **headers) self.assertEqual(response.status_code, 200) - def test_credit_provider_callback_is_idempotent(self): - request_uuid = self._create_credit_request_and_get_uuid(self.USERNAME, self.COURSE_KEY) - - # Initially, the status should be "pending" - self._assert_request_status(request_uuid, "pending") - - # First call sets the status to approved - self._credit_provider_callback(request_uuid, "approved") - self._assert_request_status(request_uuid, "approved") - - # Second call succeeds as well; status is still approved - self._credit_provider_callback(request_uuid, "approved") - self._assert_request_status(request_uuid, "approved") - - @ddt.data( - # Invalid JSON - "{", - - # Not a dictionary - "4", - - # Invalid timestamp format - json.dumps({ - "request_uuid": "557168d0f7664fe59097106c67c3f847", - "status": "approved", - "timestamp": "invalid", - "signature": "7685ae1c8f763597ee7ce526685c5ac24353317dbfe087f0ed32a699daf7dc63", - }), - ) - def test_credit_provider_callback_invalid_parameters(self, request_data): - url = reverse("credit:provider_callback", args=[self.PROVIDER_ID]) - response = self.client.post(url, data=request_data, content_type=JSON) - self.assertEqual(response.status_code, 400) - - def test_credit_provider_invalid_status(self): - response = self._credit_provider_callback("557168d0f7664fe59097106c67c3f847", "invalid") - self.assertEqual(response.status_code, 400) - - def test_credit_provider_key_not_configured(self): - # Cannot initiate a request because we can't sign it - with override_settings(CREDIT_PROVIDER_SECRET_KEYS={}): - response = self._create_credit_request(self.USERNAME, self.COURSE_KEY) - self.assertEqual(response.status_code, 400) - - # Create the request with the secret key configured - request_uuid = self._create_credit_request_and_get_uuid(self.USERNAME, self.COURSE_KEY) - - # Callback from the provider is not authorized, because - # the shared secret isn't configured. - with override_settings(CREDIT_PROVIDER_SECRET_KEYS={}): - response = self._credit_provider_callback(request_uuid, "approved") - self.assertEqual(response.status_code, 403) - - def test_request_associated_with_another_provider(self): - other_provider_id = "other_provider" - other_provider_secret_key = "1d01f067a5a54b0b8059f7095a7c636d" - - # Create an additional credit provider - CreditProvider.objects.create(provider_id=other_provider_id, enable_integration=True) - - # Initiate a credit request with the first provider - request_uuid = self._create_credit_request_and_get_uuid(self.USERNAME, self.COURSE_KEY) - - # Attempt to update the request status for a different provider - with override_settings(CREDIT_PROVIDER_SECRET_KEYS={other_provider_id: other_provider_secret_key}): - response = self._credit_provider_callback( - request_uuid, - "approved", - provider_id=other_provider_id, - secret_key=other_provider_secret_key, - ) - - # Response should be a 404 to avoid leaking request UUID values to other providers. - self.assertEqual(response.status_code, 404) - - # Request status should still be "pending" - self._assert_request_status(request_uuid, "pending") - - def _create_credit_request(self, username, course_key): - """ - Initiate a request for credit. - """ - url = reverse("credit:create_request", args=[self.PROVIDER_ID]) - return self.client.post( - url, - data=json.dumps({ - "username": username, - "course_key": unicode(course_key), - }), - content_type=JSON, - ) - - def _create_credit_request_and_get_uuid(self, username, course_key): - """ - Initiate a request for credit and return the request UUID. - """ - response = self._create_credit_request(username, course_key) + def test_session_auth(self): + """ Verify the endpoint supports authentication via session. """ + self.client.logout() + self.client.login(username=self.user.username, password=self.password) + response = self.client.get(self.path) self.assertEqual(response.status_code, 200) - return json.loads(response.content)["parameters"]["request_uuid"] - - def _credit_provider_callback(self, request_uuid, status, **kwargs): - """ - Simulate a response from the credit provider approving - or rejecting the credit request. - - Arguments: - request_uuid (str): The UUID of the credit request. - status (str): The status of the credit request. - - Keyword Arguments: - provider_id (str): Identifier for the credit provider. - secret_key (str): Shared secret key for signing messages. - timestamp (datetime): Timestamp of the message. - sig (str): Digital signature to use on messages. - - """ - provider_id = kwargs.get("provider_id", self.PROVIDER_ID) - secret_key = kwargs.get("secret_key", TEST_CREDIT_PROVIDER_SECRET_KEY) - timestamp = kwargs.get("timestamp", to_timestamp(datetime.datetime.now(pytz.UTC))) - - url = reverse("credit:provider_callback", args=[provider_id]) - - parameters = { - "request_uuid": request_uuid, - "status": status, - "timestamp": timestamp, - } - parameters["signature"] = kwargs.get("sig", signature(parameters, secret_key)) - return self.client.post(url, data=json.dumps(parameters), content_type=JSON) - - def _assert_request_status(self, uuid, expected_status): - """ - Check the status of a credit request. - """ - request = CreditRequest.objects.get(uuid=uuid) - self.assertEqual(request.status, expected_status) - - def test_get_providers_detail(self): - """Verify that the method 'get_provider_detail' returns provider with - the given provide in 'provider_ids'. - """ - url = reverse("credit:providers_detail") + "?provider_ids=hogwarts" - response = self.client.get(url) - expected = [ - { - 'enable_integration': True, - 'description': '', - 'url': 'https://credit.example.com/request', - 'status_url': '', - 'thumbnail_url': '', - 'fulfillment_instructions': None, - 'display_name': '', - 'id': 'hogwarts' - } - ] - - self.assertListEqual(json.loads(response.content), expected) - def test_get_providers_with_multiple_provider_ids(self): - """Test that the method 'get_provider_detail' returns multiple - providers with given 'provider_ids' or when no provider in - 'provider_ids' is given. - """ - # Add another credit provider for the course - CreditProvider.objects.create( - provider_id='dummy_id', - enable_integration=True, - provider_url='https://example.com', - ) - - # verify that all the matching providers are returned when provider ids - # are given in parameter 'provider_ids' - url = reverse("credit:providers_detail") + "?provider_ids=hogwarts,dummy_id" - response = self.client.get(url) - self.assertEquals(len(json.loads(response.content)), 2) +@ddt.ddt +class ReadOnlyMixin(object): + """ Test mixin for read-only API endpoints. """ - # verify that all providers are returned when no provider id in - # parameter 'provider_ids' is provided - url = reverse("credit:providers_detail") - response = self.client.get(url) - self.assertEquals(len(json.loads(response.content)), 2) + @ddt.data('delete', 'post', 'put') + def test_readonly(self, method): + """ Verify the viewset does not allow CreditProvider objects to be created or modified. """ + response = getattr(self.client, method)(self.path) + self.assertEqual(response.status_code, 405) @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') -class CreditCourseViewSetTests(TestCase): +class CreditCourseViewSetTests(UserMixin, TestCase): """ Tests for the CreditCourse endpoints. GET/POST /api/v1/credit/creditcourse/ GET/PUT /api/v1/credit/creditcourse/:course_id/ """ - password = 'password' - - def setUp(self): - super(CreditCourseViewSetTests, self).setUp() - - # This value must be set here, as setting it outside of a method results in issues with CMS/Studio tests. - self.path = reverse('credit:creditcourse-list') - - # Create a user and login, so that we can use session auth for the - # tests that aren't specifically testing authentication or authorization. - user = UserFactory(password=self.password, is_staff=True) - self.client.login(username=user.username, password=self.password) + list_path = 'credit:creditcourse-list' def _serialize_credit_course(self, credit_course): """ Serializes a CreditCourse to a Python dict. """ @@ -442,7 +147,7 @@ def test_session_auth_post_requires_csrf_token(self): self.assertIn('CSRF', response.content) # Retrieve a CSRF token - response = client.get('/dashboard') + response = client.get('/') csrf_token = response.cookies[settings.CSRF_COOKIE_NAME].value # pylint: disable=no-member self.assertGreater(len(csrf_token), 0) @@ -552,3 +257,410 @@ def test_update(self): # Verify the data was persisted credit_course = CreditCourse.objects.get(course_key=credit_course.course_key) self.assertTrue(credit_course.enabled) + + +@ddt.ddt +@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') +class CreditProviderViewSetTests(ApiTestCaseMixin, ReadOnlyMixin, AuthMixin, UserMixin, TestCase): + """ Tests for CreditProviderViewSet. """ + list_path = 'credit:creditprovider-list' + + @classmethod + def setUpClass(cls): + super(CreditProviderViewSetTests, cls).setUpClass() + cls.bayside = CreditProviderFactory(provider_id='bayside') + cls.hogwarts = CreditProviderFactory(provider_id='hogwarts') + cls.starfleet = CreditProviderFactory(provider_id='starfleet') + + def test_list(self): + """ Verify the endpoint returns a list of all CreditProvider objects. """ + response = self.client.get(self.path) + self.assertEqual(response.status_code, 200) + + expected = CreditProviderSerializer(CreditProvider.objects.all(), many=True).data + self.assertEqual(response.data, expected) + + @ddt.data( + ('bayside',), + ('hogwarts', 'starfleet') + ) + def test_list_filtering(self, provider_ids): + """ Verify the endpoint returns a list of all CreditProvider objects, filtered to contain only those objects + associated with the given IDs. """ + url = '{}?provider_ids={}'.format(self.path, ','.join(provider_ids)) + response = self.client.get(url) + self.assertEqual(response.status_code, 200) + + expected = CreditProviderSerializer(CreditProvider.objects.filter(provider_id__in=provider_ids), + many=True).data + self.assertEqual(response.data, expected) + + def test_retrieve(self): + """ Verify the endpoint returns the details for a single CreditProvider. """ + url = reverse('credit:creditprovider-detail', kwargs={'provider_id': self.bayside.provider_id}) + response = self.client.get(url) + self.assertEqual(response.status_code, 200) + self.assertEqual(response.data, CreditProviderSerializer(self.bayside).data) + + +@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') +class CreditProviderRequestCreateViewTests(ApiTestCaseMixin, UserMixin, TestCase): + """ Tests for CreditProviderRequestCreateView. """ + + @classmethod + def setUpClass(cls): + super(CreditProviderRequestCreateViewTests, cls).setUpClass() + cls.provider = CreditProviderFactory() + + def setUp(self): + super(CreditProviderRequestCreateViewTests, self).setUp() + self.path = reverse('credit:create_request', kwargs={'provider_id': self.provider.provider_id}) + self.eligibility = CreditEligibilityFactory(username=self.user.username) + + def post_credit_request(self, username, course_id): + """ Create a credit request for the given user and course. """ + data = { + 'username': username, + 'course_key': unicode(course_id) + } + return self.client.post(self.path, json.dumps(data), content_type=JSON) + + def test_post_with_provider_integration(self): + """ Verify the endpoint can create a new credit request. """ + username = self.user.username + course = self.eligibility.course + course_key = course.course_key + final_grade = 0.95 + + # Enable provider integration + self.provider.enable_integration = True + self.provider.save() + + # Add a single credit requirement (final grade) + requirement = CreditRequirement.objects.create( + course=course, + namespace='grade', + name='grade', + ) + + # Mark the user as having satisfied the requirement and eligible for credit. + CreditRequirementStatus.objects.create( + username=username, + requirement=requirement, + status='satisfied', + reason={'final_grade': final_grade} + ) + + secret_key = 'secret' + with override_settings(CREDIT_PROVIDER_SECRET_KEYS={self.provider.provider_id: secret_key}): + response = self.post_credit_request(username, course_key) + self.assertEqual(response.status_code, 200) + + # Check that the user's request status is pending + request = CreditRequest.objects.get(username=username, course__course_key=course_key) + self.assertEqual(request.status, 'pending') + + # Check request parameters + content = json.loads(response.content) + parameters = content['parameters'] + + self.assertEqual(content['url'], self.provider.provider_url) + self.assertEqual(content['method'], 'POST') + self.assertEqual(len(parameters['request_uuid']), 32) + self.assertEqual(parameters['course_org'], course_key.org) + self.assertEqual(parameters['course_num'], course_key.course) + self.assertEqual(parameters['course_run'], course_key.run) + self.assertEqual(parameters['final_grade'], unicode(final_grade)) + self.assertEqual(parameters['user_username'], username) + self.assertEqual(parameters['user_full_name'], self.user.get_full_name()) + self.assertEqual(parameters['user_mailing_address'], '') + self.assertEqual(parameters['user_country'], '') + + # The signature is going to change each test run because the request + # is assigned a different UUID each time. + # For this reason, we use the signature function directly + # (the "signature" parameter will be ignored when calculating the signature). + # Other unit tests verify that the signature function is working correctly. + self.assertEqual(parameters['signature'], signature(parameters, secret_key)) + + def test_post_invalid_provider(self): + """ Verify the endpoint returns HTTP 404 if the credit provider is not valid. """ + path = reverse('credit:create_request', kwargs={'provider_id': 'fake'}) + response = self.client.post(path, {}) + self.assertEqual(response.status_code, 404) + + def test_post_no_username(self): + """ Verify the endpoint returns HTTP 400 if no username is supplied. """ + response = self.post_credit_request(None, 'a/b/c') + self.assert_error_response(response, 'A username must be specified.') + + def test_post_invalid_course_key(self): + """ Verify the endpoint returns HTTP 400 if the course is not a valid course key. """ + course_key = 'not-a-course-id' + response = self.post_credit_request(self.user.username, course_key) + self.assert_error_response(response, '[{}] is not a valid course key.'.format(course_key)) + + def test_post_user_not_eligible(self): + """ Verify the endpoint returns HTTP 400 if the user is not eligible for credit for the course. """ + credit_course = CreditCourseFactory() + username = 'ineligible-user' + course_key = credit_course.course_key + + response = self.post_credit_request(username, course_key) + msg = '[{username}] is not eligible for credit for [{course_key}].'.format(username=username, + course_key=course_key) + self.assert_error_response(response, msg) + + def test_post_permissions_staff(self): + """ Verify staff users can create requests for any user. """ + admin = AdminFactory(password=self.password) + self.client.logout() + self.client.login(username=admin.username, password=self.password) + response = self.post_credit_request(self.user.username, self.eligibility.course.course_key) + self.assertEqual(response.status_code, 200) + + def test_post_other_user(self): + """ Verify non-staff users cannot create requests for other users. """ + user = UserFactory(password=self.password) + self.client.logout() + self.client.login(username=user.username, password=self.password) + response = self.post_credit_request(self.user.username, self.eligibility.course.course_key) + self.assertEqual(response.status_code, 403) + + def test_post_no_provider_integration(self): + """ Verify the endpoint returns the provider URL if provider integration is not enabled. """ + response = self.post_credit_request(self.user.username, self.eligibility.course.course_key) + self.assertEqual(response.status_code, 200) + expected = { + 'url': self.provider.provider_url, + 'method': 'GET', + 'parameters': {}, + } + self.assertEqual(response.data, expected) + + def test_post_secret_key_not_set(self): + """ Verify the endpoint returns HTTP 400 if we attempt to create a + request for a provider with no secret key set. """ + # Enable provider integration + self.provider.enable_integration = True + self.provider.save() + + # Cannot initiate a request because we cannot sign it + with override_settings(CREDIT_PROVIDER_SECRET_KEYS={}): + response = self.post_credit_request(self.user.username, self.eligibility.course.course_key) + self.assertEqual(response.status_code, 400) + + +@ddt.ddt +@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') +class CreditProviderCallbackViewTests(UserMixin, TestCase): + """ Tests for CreditProviderCallbackView. """ + + def setUp(self): + super(CreditProviderCallbackViewTests, self).setUp() + + # Authentication should NOT be required for this endpoint. + self.client.logout() + + self.provider = CreditProviderFactory() + self.path = reverse('credit:provider_callback', args=[self.provider.provider_id]) + self.eligibility = CreditEligibilityFactory(username=self.user.username) + + def _credit_provider_callback(self, request_uuid, status, **kwargs): + """ + Simulate a response from the credit provider approving + or rejecting the credit request. + + Arguments: + request_uuid (str): The UUID of the credit request. + status (str): The status of the credit request. + + Keyword Arguments: + provider_id (str): Identifier for the credit provider. + secret_key (str): Shared secret key for signing messages. + timestamp (datetime): Timestamp of the message. + sig (str): Digital signature to use on messages. + keys (dict): Override for CREDIT_PROVIDER_SECRET_KEYS setting. + + """ + provider_id = kwargs.get('provider_id', self.provider.provider_id) + secret_key = kwargs.get('secret_key', '931433d583c84ca7ba41784bad3232e6') + timestamp = kwargs.get('timestamp', to_timestamp(datetime.datetime.now(pytz.UTC))) + keys = kwargs.get('keys', {self.provider.provider_id: secret_key}) + + url = reverse('credit:provider_callback', args=[provider_id]) + + parameters = { + 'request_uuid': request_uuid, + 'status': status, + 'timestamp': timestamp, + } + parameters['signature'] = kwargs.get('sig', signature(parameters, secret_key)) + + with override_settings(CREDIT_PROVIDER_SECRET_KEYS=keys): + return self.client.post(url, data=json.dumps(parameters), content_type=JSON) + + def _create_credit_request_and_get_uuid(self, username=None, course_key=None): + """ Initiate a request for credit and return the request UUID. """ + username = username or self.user.username + course = CreditCourse.objects.get(course_key=course_key) if course_key else self.eligibility.course + credit_request = CreditRequestFactory(username=username, course=course, provider=self.provider) + return credit_request.uuid + + def _assert_request_status(self, uuid, expected_status): + """ Check the status of a credit request. """ + request = CreditRequest.objects.get(uuid=uuid) + self.assertEqual(request.status, expected_status) + + def test_post_invalid_provider_id(self): + """ Verify the endpoint returns HTTP 404 if the provider does not exist. """ + provider_id = 'fakey-provider' + self.assertFalse(CreditProvider.objects.filter(provider_id=provider_id).exists()) + + path = reverse('credit:provider_callback', args=[provider_id]) + response = self.client.post(path, {}) + self.assertEqual(response.status_code, 404) + + def test_post_with_invalid_signature(self): + """ Verify the endpoint returns HTTP 403 if a request is received with an invalid signature. """ + request_uuid = self._create_credit_request_and_get_uuid() + + # Simulate a callback from the credit provider with an invalid signature + # Since the signature is invalid, we respond with a 403 Not Authorized. + response = self._credit_provider_callback(request_uuid, "approved", sig="invalid") + self.assertEqual(response.status_code, 403) + + @ddt.data( + to_timestamp(datetime.datetime.now(pytz.UTC) - datetime.timedelta(0, 60 * 15 + 1)), + 'invalid' + ) + def test_post_with_invalid_timestamp(self, timestamp): + """ Verify HTTP 400 is returned for requests with an invalid timestamp. """ + request_uuid = self._create_credit_request_and_get_uuid() + response = self._credit_provider_callback(request_uuid, 'approved', timestamp=timestamp) + self.assertEqual(response.status_code, 400) + + def test_post_with_string_timestamp(self): + """ Verify the endpoint supports timestamps transmitted as strings instead of integers. """ + request_uuid = self._create_credit_request_and_get_uuid() + timestamp = str(to_timestamp(datetime.datetime.now(pytz.UTC))) + response = self._credit_provider_callback(request_uuid, 'approved', timestamp=timestamp) + self.assertEqual(response.status_code, 200) + + def test_credit_provider_callback_is_idempotent(self): + """ Verify clients can make subsequent calls with the same status. """ + request_uuid = self._create_credit_request_and_get_uuid() + + # Initially, the status should be "pending" + self._assert_request_status(request_uuid, "pending") + + # First call sets the status to approved + self._credit_provider_callback(request_uuid, 'approved') + self._assert_request_status(request_uuid, "approved") + + # Second call succeeds as well; status is still approved + self._credit_provider_callback(request_uuid, 'approved') + self._assert_request_status(request_uuid, "approved") + + def test_credit_provider_invalid_status(self): + """ Verify requests with an invalid status value return HTTP 400. """ + request_uuid = self._create_credit_request_and_get_uuid() + response = self._credit_provider_callback(request_uuid, 'invalid') + self.assertEqual(response.status_code, 400) + + def test_request_associated_with_another_provider(self): + """ Verify the endpoint returns HTTP 404 if a request is received for the incorrect provider. """ + other_provider_id = 'other-provider' + other_provider_secret_key = '1d01f067a5a54b0b8059f7095a7c636d' + + # Create an additional credit provider + CreditProvider.objects.create(provider_id=other_provider_id, enable_integration=True) + + # Initiate a credit request with the first provider + request_uuid = self._create_credit_request_and_get_uuid() + + # Attempt to update the request status for a different provider + response = self._credit_provider_callback( + request_uuid, + 'approved', + provider_id=other_provider_id, + secret_key=other_provider_secret_key, + keys={other_provider_id: other_provider_secret_key} + ) + + # Response should be a 404 to avoid leaking request UUID values to other providers. + self.assertEqual(response.status_code, 404) + + # Request status should still be 'pending' + self._assert_request_status(request_uuid, 'pending') + + def test_credit_provider_key_not_configured(self): + """ Verify the endpoint returns HTTP 403 if the provider has no key configured. """ + request_uuid = self._create_credit_request_and_get_uuid() + + # Callback from the provider is not authorized, because the shared secret isn't configured. + with override_settings(CREDIT_PROVIDER_SECRET_KEYS={}): + response = self._credit_provider_callback(request_uuid, 'approved', keys={}) + self.assertEqual(response.status_code, 403) + + +@ddt.ddt +@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') +class CreditEligibilityViewTests(AuthMixin, UserMixin, ReadOnlyMixin, TestCase): + """ Tests for CreditEligibilityView. """ + view_name = 'credit:eligibility_details' + + def setUp(self): + super(CreditEligibilityViewTests, self).setUp() + self.eligibility = CreditEligibilityFactory(username=self.user.username) + self.path = self.create_url(self.eligibility) + + def create_url(self, eligibility): + """ Returns a URL that can be used to view eligibility data. """ + return '{path}?username={username}&course_key={course_key}'.format( + path=reverse(self.view_name), + username=eligibility.username, + course_key=eligibility.course.course_key + ) + + def assert_valid_get_response(self, eligibility): + """ Ensure the endpoint returns the correct eligibility data. """ + url = self.create_url(eligibility) + response = self.client.get(url) + + self.assertEqual(response.status_code, 200) + self.assertListEqual(response.data, CreditEligibilitySerializer([eligibility], many=True).data) + + def test_get(self): + """ Verify the endpoint returns eligibility information for the give user and course. """ + self.assert_valid_get_response(self.eligibility) + + def test_get_with_missing_parameters(self): + """ Verify the endpoint returns HTTP status 400 if either the username or course_key querystring argument + is not provided. """ + response = self.client.get(reverse(self.view_name)) + self.assertEqual(response.status_code, 400) + self.assertDictEqual(response.data, + {'detail': 'Both the course_key and username querystring parameters must be supplied.'}) + + def test_get_with_invalid_course_key(self): + """ Verify the endpoint returns HTTP status 400 if the provided course_key is not an actual CourseKey. """ + url = '{}?username=edx&course_key=a'.format(reverse(self.view_name)) + response = self.client.get(url) + self.assertEqual(response.status_code, 400) + self.assertDictEqual(response.data, {'detail': '[a] is not a valid course key.'}) + + def test_staff_can_view_all(self): + """ Verify that staff users can view eligibility data for all users. """ + staff = AdminFactory(password=self.password) + self.client.logout() + self.client.login(username=staff.username, password=self.password) + self.assert_valid_get_response(self.eligibility) + + def test_nonstaff_can_only_view_own_data(self): + """ Verify that non-staff users can only view their own eligibility data. """ + user = UserFactory(password=self.password) + self.client.logout() + self.client.login(username=user.username, password=self.password) + response = self.client.get(self.path) + self.assertEqual(response.status_code, 403) diff --git a/openedx/core/djangoapps/credit/urls.py b/openedx/core/djangoapps/credit/urls.py index a5e92ffc88cc..1f495acb3a6d 100644 --- a/openedx/core/djangoapps/credit/urls.py +++ b/openedx/core/djangoapps/credit/urls.py @@ -3,47 +3,25 @@ """ from django.conf.urls import patterns, url, include -from openedx.core.djangoapps.credit import views, routers -from openedx.core.djangoapps.credit.api.provider import get_credit_provider_info +from openedx.core.djangoapps.credit import views, routers, models -PROVIDER_ID_PATTERN = r'(?P[^/]+)' +PROVIDER_ID_PATTERN = r'(?P{})'.format(models.CREDIT_PROVIDER_ID_REGEX) -V1_URLS = patterns( +PROVIDER_URLS = patterns( '', + url(r'^request/$', views.CreditProviderRequestCreateView.as_view(), name='create_request'), + url(r'^callback/?$', views.CreditProviderCallbackView.as_view(), name='provider_callback'), +) - url( - r'^providers/$', - views.get_providers_detail, - name='providers_detail' - ), - - url( - r'^providers/{provider_id}/$'.format(provider_id=PROVIDER_ID_PATTERN), - get_credit_provider_info, - name='get_provider_info' - ), - - url( - r'^providers/{provider_id}/request/$'.format(provider_id=PROVIDER_ID_PATTERN), - views.create_credit_request, - name='create_request' - ), - - url( - r'^providers/{provider_id}/callback/?$'.format(provider_id=PROVIDER_ID_PATTERN), - views.credit_provider_callback, - name='provider_callback' - ), - - url( - r'^eligibility/$', - views.get_eligibility_for_user, - name='eligibility_details' - ), +V1_URLS = patterns( + '', + url(r'^providers/{}/'.format(PROVIDER_ID_PATTERN), include(PROVIDER_URLS)), + url(r'^eligibility/$', views.CreditEligibilityView.as_view(), name='eligibility_details'), ) router = routers.SimpleRouter() # pylint: disable=invalid-name router.register(r'courses', views.CreditCourseViewSet) +router.register(r'providers', views.CreditProviderViewSet) V1_URLS += router.urls urlpatterns = patterns( diff --git a/openedx/core/djangoapps/credit/views.py b/openedx/core/djangoapps/credit/views.py index 03ebf8f19f50..1be3f90cfeac 100644 --- a/openedx/core/djangoapps/credit/views.py +++ b/openedx/core/djangoapps/credit/views.py @@ -1,376 +1,157 @@ """ Views for the credit Django app. """ -import datetime -import json +from __future__ import unicode_literals import logging +import datetime from django.conf import settings -from django.http import ( - HttpResponse, - HttpResponseBadRequest, - HttpResponseForbidden, - Http404 -) from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt -from django.views.decorators.http import require_POST, require_GET from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey import pytz -from rest_framework import viewsets, mixins, permissions +from rest_framework import viewsets, mixins, permissions, views, generics from rest_framework.authentication import SessionAuthentication +from rest_framework.exceptions import ValidationError +from rest_framework.response import Response from rest_framework_oauth.authentication import OAuth2Authentication -from openedx.core.djangoapps.credit import api -from openedx.core.djangoapps.credit.exceptions import CreditApiBadRequest, CreditRequestNotFound -from openedx.core.djangoapps.credit.models import CreditCourse -from openedx.core.djangoapps.credit.serializers import CreditCourseSerializer -from openedx.core.djangoapps.credit.signature import signature, get_shared_secret_key +from openedx.core.djangoapps.credit.api import create_credit_request +from openedx.core.djangoapps.credit.exceptions import (UserNotEligibleException, InvalidCourseKey, CreditApiBadRequest, + InvalidCreditRequest) +from openedx.core.djangoapps.credit.models import (CreditCourse, CreditProvider, CREDIT_PROVIDER_ID_REGEX, + CreditEligibility, CreditRequest) +from openedx.core.djangoapps.credit.serializers import (CreditCourseSerializer, CreditProviderSerializer, + CreditEligibilitySerializer, CreditProviderCallbackSerializer) from openedx.core.lib.api.mixins import PutAsCreateMixin -from util.date_utils import from_timestamp -from util.json_request import JsonResponse +from openedx.core.lib.api.permissions import IsStaffOrOwner log = logging.getLogger(__name__) -@require_GET -def get_providers_detail(request): - """ - - **User Cases** - - Returns details of the credit providers filtered by provided query parameters. - - **Parameters:** - - * provider_id (list of provider ids separated with ","): The identifiers for the providers for which - user requested - - **Example Usage:** - - GET /api/credit/v1/providers?provider_id=asu,hogwarts - "response": [ - "id": "hogwarts", - "display_name": "Hogwarts School of Witchcraft and Wizardry", - "url": "https://credit.example.com/", - "status_url": "https://credit.example.com/status/", - "description": "A new model for the Witchcraft and Wizardry School System.", - "enable_integration": false, - "fulfillment_instructions": " -

    In order to fulfill credit, Hogwarts School of Witchcraft and Wizardry requires learners to:

    -
      -
    • Sample instruction abc
    • -
    • Sample instruction xyz
    • -
    ", - }, - ... - ] - - **Responses:** - - * 200 OK: The request was created successfully. Returned content - is a JSON-encoded dictionary describing what the client should - send to the credit provider. - - * 404 Not Found: The provider does not exist. - - """ - provider_ids = request.GET.get("provider_ids", None) - providers_list = provider_ids.split(",") if provider_ids else None - providers = api.get_credit_providers(providers_list) - return JsonResponse(providers) - - -@require_POST -def create_credit_request(request, provider_id): - """ - Initiate a request for credit in a course. - - This end-point will get-or-create a record in the database to track - the request. It will then calculate the parameters to send to - the credit provider and digitally sign the parameters, using a secret - key shared with the credit provider. - - The user's browser is responsible for POSTing these parameters - directly to the credit provider. - - **Example Usage:** - - POST /api/credit/v1/providers/hogwarts/request/ - { - "username": "ron", - "course_key": "edX/DemoX/Demo_Course" - } - - Response: 200 OK - Content-Type: application/json - { - "url": "http://example.com/request-credit", - "method": "POST", - "parameters": { - request_uuid: "557168d0f7664fe59097106c67c3f847" - timestamp: 1434631630, - course_org: "ASUx" - course_num: "DemoX" - course_run: "1T2015" - final_grade: "0.95", - user_username: "john", - user_email: "john@example.com" - user_full_name: "John Smith" - user_mailing_address: "", - user_country: "US", - signature: "cRCNjkE4IzY+erIjRwOQCpRILgOvXx4q2qvx141BCqI=" - } - } - - **Parameters:** - - * username (unicode): The username of the user requesting credit. - - * course_key (unicode): The identifier for the course for which the user - is requesting credit. - - **Responses:** - - * 200 OK: The request was created successfully. Returned content - is a JSON-encoded dictionary describing what the client should - send to the credit provider. - - * 400 Bad Request: - - The provided course key did not correspond to a valid credit course. - - The user already has a completed credit request for this course and provider. - - * 403 Not Authorized: - - The username does not match the name of the logged in user. - - The user is not eligible for credit in the course. - - * 404 Not Found: - - The provider does not exist. - - """ - response, parameters = _validate_json_parameters(request.body, ["username", "course_key"]) - if response is not None: - return response - - try: - course_key = CourseKey.from_string(parameters["course_key"]) - except InvalidKeyError: - return HttpResponseBadRequest( - u'Could not parse "{course_key}" as a course key'.format( - course_key=parameters["course_key"] - ) - ) - - # Check user authorization - if not (request.user and request.user.username == parameters["username"]): - log.warning( - u'User with ID %s attempted to initiate a credit request for user with username "%s"', - request.user.id if request.user else "[Anonymous]", - parameters["username"] - ) - return HttpResponseForbidden("Users are not allowed to initiate credit requests for other users.") - - # Initiate the request - try: - credit_request = api.create_credit_request(course_key, provider_id, parameters["username"]) - except CreditApiBadRequest as ex: - return HttpResponseBadRequest(ex) - else: - return JsonResponse(credit_request) - - -@require_POST -@csrf_exempt -def credit_provider_callback(request, provider_id): - """ - Callback end-point used by credit providers to approve or reject - a request for credit. - - **Example Usage:** - - POST /api/credit/v1/providers/{provider-id}/callback - { - "request_uuid": "557168d0f7664fe59097106c67c3f847", - "status": "approved", - "timestamp": 1434631630, - "signature": "cRCNjkE4IzY+erIjRwOQCpRILgOvXx4q2qvx141BCqI=" - } - - Response: 200 OK - - **Parameters:** - - * request_uuid (string): The UUID of the request. - - * status (string): Either "approved" or "rejected". - - * timestamp (int or string): The datetime at which the POST request was made, represented - as the number of seconds since January 1, 1970 00:00:00 UTC. - If the timestamp is a string, it will be converted to an integer. - - * signature (string): A digital signature of the request parameters, - created using a secret key shared with the credit provider. - - **Responses:** - - * 200 OK: The user's status was updated successfully. - - * 400 Bad request: The provided parameters were not valid. - Response content will be a JSON-encoded string describing the error. +class CreditProviderViewSet(viewsets.ReadOnlyModelViewSet): + """ Credit provider endpoints. """ - * 403 Forbidden: Signature was invalid or timestamp was too far in the past. - - * 404 Not Found: Could not find a request with the specified UUID associated with this provider. - - """ - response, parameters = _validate_json_parameters(request.body, [ - "request_uuid", "status", "timestamp", "signature" - ]) - if response is not None: - return response - - # Validate the digital signature of the request. - # This ensures that the message came from the credit provider - # and hasn't been tampered with. - response = _validate_signature(parameters, provider_id) - if response is not None: - return response - - # Validate the timestamp to ensure that the request is timely. - response = _validate_timestamp(parameters["timestamp"], provider_id) - if response is not None: - return response - - # Update the credit request status - try: - api.update_credit_request_status(parameters["request_uuid"], provider_id, parameters["status"]) - except CreditRequestNotFound: - raise Http404 - except CreditApiBadRequest as ex: - return HttpResponseBadRequest(ex) - else: - return HttpResponse() - - -@require_GET -def get_eligibility_for_user(request): - """ - - **User Cases** - - Retrieve user eligibility against course. - - **Parameters:** + lookup_field = 'provider_id' + lookup_value_regex = CREDIT_PROVIDER_ID_REGEX + authentication_classes = (OAuth2Authentication, SessionAuthentication,) + pagination_class = None + permission_classes = (permissions.IsAuthenticated,) + queryset = CreditProvider.objects.all() + serializer_class = CreditProviderSerializer - * course_key (unicode): Identifier of course. - * username (unicode): Username of current User. + def filter_queryset(self, queryset): + queryset = super(CreditProviderViewSet, self).filter_queryset(queryset) - **Example Usage:** + # Filter by provider ID + provider_ids = self.request.GET.get('provider_ids', None) - GET /api/credit/v1/eligibility?username=user&course_key=edX/Demo_101/Fall - "response": { - "course_key": "edX/Demo_101/Fall", - "deadline": "2015-10-23" - } + if provider_ids: + provider_ids = provider_ids.split(',') + queryset = queryset.filter(provider_id__in=provider_ids) - **Responses:** + return queryset - * 200 OK: The request was created successfully. - * 404 Not Found: The provider does not exist. +class CreditProviderRequestCreateView(views.APIView): + """ Creates a credit request for the given user and course, if the user is eligible for credit.""" - """ - course_key = request.GET.get("course_key", None) - username = request.GET.get("username", None) - return JsonResponse(api.get_eligibilities_for_user(username=username, course_key=course_key)) + authentication_classes = (OAuth2Authentication, SessionAuthentication,) + permission_classes = (permissions.IsAuthenticated, IsStaffOrOwner,) + def post(self, request, provider_id): + """ POST handler. """ + # Get the provider, or return HTTP 404 if it doesn't exist + provider = generics.get_object_or_404(CreditProvider, provider_id=provider_id) -def _validate_json_parameters(params_string, expected_parameters): - """ - Load the request parameters as a JSON dictionary and check that - all required paramters are present. + # Validate the course key + course_key = request.data.get('course_key') + try: + course_key = CourseKey.from_string(course_key) + except InvalidKeyError: + raise InvalidCourseKey(course_key) - Arguments: - params_string (unicode): The JSON-encoded parameter dictionary. - expected_parameters (list): Required keys of the parameters dictionary. + # Validate the username + username = request.data.get('username') + if not username: + raise ValidationError({'detail': 'A username must be specified.'}) - Returns: tuple of (HttpResponse, dict) + # Ensure the user is actually eligible to receive credit + if not CreditEligibility.is_user_eligible_for_credit(course_key, username): + raise UserNotEligibleException(course_key, username) - """ - try: - parameters = json.loads(params_string) - except (TypeError, ValueError): - return HttpResponseBadRequest("Could not parse the request body as JSON."), None + try: + credit_request = create_credit_request(course_key, provider.provider_id, username) + return Response(credit_request) + except CreditApiBadRequest as ex: + raise InvalidCreditRequest(ex.message) - if not isinstance(parameters, dict): - return HttpResponseBadRequest("Request parameters must be a JSON-encoded dictionary."), None - missing_params = set(expected_parameters) - set(parameters.keys()) - if missing_params: - msg = u"Required parameters are missing: {missing}".format(missing=u", ".join(missing_params)) - return HttpResponseBadRequest(msg), None +class CreditProviderCallbackView(views.APIView): + """ Callback used by credit providers to update credit request status. """ - return None, parameters + # This endpoint should be open to all external credit providers. + authentication_classes = () + permission_classes = () + @method_decorator(csrf_exempt) + def dispatch(self, request, *args, **kwargs): + return super(CreditProviderCallbackView, self).dispatch(request, *args, **kwargs) + + def post(self, request, provider_id): + """ POST handler. """ + provider = generics.get_object_or_404(CreditProvider, provider_id=provider_id) + data = request.data + + # Ensure the input data is valid + serializer = CreditProviderCallbackSerializer(data=data, provider=provider) + serializer.is_valid(raise_exception=True) + + # Update the credit request status + request_uuid = data['request_uuid'] + new_status = data['status'] + credit_request = generics.get_object_or_404(CreditRequest, uuid=request_uuid, provider=provider) + old_status = credit_request.status + credit_request.status = new_status + credit_request.save() + + log.info( + 'Updated [%s] CreditRequest [%s] from status [%s] to [%s].', + provider_id, request_uuid, old_status, new_status + ) -def _validate_signature(parameters, provider_id): - """ - Check that the signature from the credit provider is valid. + return Response() - Arguments: - parameters (dict): Parameters received from the credit provider. - provider_id (unicode): Identifier for the credit provider. - Returns: - HttpResponseForbidden or None +class CreditEligibilityView(generics.ListAPIView): + """ Returns eligibility for a user-course combination. """ - """ - secret_key = get_shared_secret_key(provider_id) - if secret_key is None: - log.error( - ( - u'Could not retrieve secret key for credit provider with ID "%s". ' - u'Since no key has been configured, we cannot validate requests from the credit provider.' - ), provider_id - ) - return HttpResponseForbidden("Credit provider credentials have not been configured.") - - if signature(parameters, secret_key) != parameters["signature"]: - log.warning(u'Request from credit provider with ID "%s" had an invalid signature', parameters["signature"]) - return HttpResponseForbidden("Invalid signature.") - - -def _validate_timestamp(timestamp_value, provider_id): - """ - Check that the timestamp of the request is recent. - - Arguments: - timestamp (int or string): Number of seconds since Jan. 1, 1970 UTC. - If specified as a string, it will be converted to an integer. - provider_id (unicode): Identifier for the credit provider. - - Returns: - HttpResponse or None - - """ - timestamp = from_timestamp(timestamp_value) - if timestamp is None: - msg = u'"{timestamp}" is not a valid timestamp'.format(timestamp=timestamp_value) - log.warning(msg) - return HttpResponseBadRequest(msg) - - # Check that the timestamp is recent - elapsed_seconds = (datetime.datetime.now(pytz.UTC) - timestamp).total_seconds() - if elapsed_seconds > settings.CREDIT_PROVIDER_TIMESTAMP_EXPIRATION: - log.warning( - ( - u'Timestamp %s is too far in the past (%s seconds), ' - u'so we are rejecting the notification from the credit provider "%s".' - ), - timestamp_value, elapsed_seconds, provider_id, + authentication_classes = (OAuth2Authentication, SessionAuthentication,) + pagination_class = None + permission_classes = (permissions.IsAuthenticated, IsStaffOrOwner) + serializer_class = CreditEligibilitySerializer + queryset = CreditEligibility.objects.all() + + def filter_queryset(self, queryset): + username = self.request.GET.get('username') + course_key = self.request.GET.get('course_key') + + if not (username and course_key): + raise ValidationError( + {'detail': 'Both the course_key and username querystring parameters must be supplied.'}) + + course_key = unicode(course_key) + + try: + course_key = CourseKey.from_string(course_key) + except InvalidKeyError: + raise ValidationError({'detail': '[{}] is not a valid course key.'.format(course_key)}) + return queryset.filter( + username=username, + course__course_key=course_key, + deadline__gt=datetime.datetime.now(pytz.UTC) ) - return HttpResponseForbidden(u"Timestamp is too far in the past.") class CreditCourseViewSet(PutAsCreateMixin, mixins.UpdateModelMixin, viewsets.ReadOnlyModelViewSet): diff --git a/openedx/core/lib/api/permissions.py b/openedx/core/lib/api/permissions.py index dc371431860c..2ec8cd9625d8 100644 --- a/openedx/core/lib/api/permissions.py +++ b/openedx/core/lib/api/permissions.py @@ -80,3 +80,16 @@ def has_object_permission(self, request, view, obj): return (request.user.is_staff or CourseStaffRole(obj.course_id).has_user(request.user) or request.method in permissions.SAFE_METHODS) + + +class IsStaffOrOwner(permissions.BasePermission): + """ + Permission that allows access to admin users or the owner of an object. + The owner is considered the User object represented by obj.user. + """ + def has_object_permission(self, request, view, obj): + return request.user.is_staff or obj.user == request.user + + def has_permission(self, request, view): + user = request.user + return user.is_staff or (user.username == request.data.get('username')) diff --git a/openedx/core/lib/api/tests/test_permissions.py b/openedx/core/lib/api/tests/test_permissions.py new file mode 100644 index 000000000000..cc2436085ab0 --- /dev/null +++ b/openedx/core/lib/api/tests/test_permissions.py @@ -0,0 +1,65 @@ +""" Tests for API permissions classes. """ +from django.test import TestCase, RequestFactory + +from openedx.core.lib.api.permissions import IsStaffOrOwner +from student.tests.factories import UserFactory + + +class TestObject(object): + """ Fake class for object permission tests. """ + user = None + + +class IsStaffOrOwnerTests(TestCase): + """ Tests for IsStaffOrOwner permission class. """ + def setUp(self): + super(IsStaffOrOwnerTests, self).setUp() + self.permission = IsStaffOrOwner() + self.request = RequestFactory().get('/') + self.obj = TestObject() + + def assert_user_has_object_permission(self, user, permitted): + """ + Asserts whether or not the user has permission to access an object. + + Arguments + user (User) + permitted (boolean) + """ + self.request.user = user + self.assertEqual(self.permission.has_object_permission(self.request, None, self.obj), permitted) + + def test_staff_user(self): + """ Staff users should be permitted. """ + user = UserFactory.create(is_staff=True) + self.assert_user_has_object_permission(user, True) + + def test_owner(self): + """ Owners should be permitted. """ + user = UserFactory.create() + self.obj.user = user + self.assert_user_has_object_permission(user, True) + + def test_non_staff_test_non_owner_or_staff_user(self): + """ Non-staff and non-owner users should not be permitted. """ + user = UserFactory.create() + self.assert_user_has_object_permission(user, False) + + def test_has_permission_as_staff(self): + """ Staff users always have permission. """ + self.request.user = UserFactory.create(is_staff=True) + self.assertTrue(self.permission.has_permission(self.request, None)) + + def test_has_permission_as_owner(self): + """ Owners always have permission. """ + user = UserFactory.create() + request = RequestFactory().get('/?username={}'.format(user.username)) + request.user = user + self.assertTrue(self.permission.has_permission(request, None)) + + def test_has_permission_as_non_owner(self): + """ Non-owners should not have permission. """ + user = UserFactory.create() + request = RequestFactory().get('/?username={}'.format(user.username)) + request.user = UserFactory.create() + self.assertFalse(self.permission.has_permission(request, None)) From 764ceb00c81bd4b7457549d461d538523803e42f Mon Sep 17 00:00:00 2001 From: Saleem Latif Date: Tue, 17 Nov 2015 12:49:34 +0500 Subject: [PATCH 79/87] Cert Exceptions: View and Edit Exception list --- .../pages/lms/instructor_dashboard.py | 15 + .../lms/test_lms_instructor_dashboard.py | 102 +++-- lms/djangoapps/certificates/models.py | 23 +- .../certificates/tests/factories.py | 2 +- .../instructor/tests/test_certificates.py | 430 ++++++++++++------ lms/djangoapps/instructor/views/api.py | 217 ++++++--- lms/djangoapps/instructor/views/api_urls.py | 10 +- .../instructor/views/instructor_dashboard.py | 13 +- .../collections/certificate_whitelist.js | 15 +- .../certificate_whitelist_factory.js | 17 +- .../models/certificate_exception.js | 4 + .../views/certificate_whitelist.js | 45 +- .../views/certificate_whitelist_editor.js | 67 ++- .../certificates_exception_spec.js | 101 +++- .../sass/course/instructor/_instructor_2.scss | 15 +- .../certificate-white-list.underscore | 37 +- .../instructor_dashboard_2/certificates.html | 5 +- 17 files changed, 809 insertions(+), 309 deletions(-) diff --git a/common/test/acceptance/pages/lms/instructor_dashboard.py b/common/test/acceptance/pages/lms/instructor_dashboard.py index 486fa27146f9..f89910a80eaf 100644 --- a/common/test/acceptance/pages/lms/instructor_dashboard.py +++ b/common/test/acceptance/pages/lms/instructor_dashboard.py @@ -1032,17 +1032,32 @@ def add_certificate_exception(self, student, free_text_note): self.get_selector('#notes').fill(free_text_note) self.get_selector('#add-exception').click() + self.wait_for_ajax() self.wait_for( lambda: student in self.get_selector('div.white-listed-students table tr:last-child td').text, description='Certificate Exception added to list' ) + def remove_first_certificate_exception(self): + """ + Remove Certificate Exception from the white list. + """ + self.wait_for_element_visibility('#add-exception', 'Add Exception button is visible') + self.get_selector('div.white-listed-students table tr td .delete-exception').first.click() + self.wait_for_ajax() + def click_generate_certificate_exceptions_button(self): # pylint: disable=invalid-name """ Click 'Generate Exception Certificates' button in 'Certificates Exceptions' section """ self.get_selector('#generate-exception-certificates').click() + def fill_user_name_field(self, student): + """ + Fill username/email field with given text + """ + self.get_selector('#certificate-exception').fill(student) + def click_add_exception_button(self): """ Click 'Add Exception' button in 'Certificates Exceptions' section diff --git a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py index 0b2201c5e633..21a87ec03ef8 100644 --- a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py +++ b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py @@ -661,16 +661,65 @@ def test_certificate_exceptions_section_is_visible(self): def test_instructor_can_add_certificate_exception(self): """ - Scenario: On the Certificates tab of the Instructor Dashboard, Instructor can added new certificate - exception to list + Scenario: On the Certificates tab of the Instructor Dashboard, Instructor can add new certificate + exception to list. Given that I am on the Certificates tab on the Instructor Dashboard - When I fill in student username and click 'Add Exception' button + When I fill in student username and notes fields and click 'Add Exception' button Then new certificate exception should be visible in certificate exceptions list """ + notes = 'Test Notes' # Add a student to Certificate exception list - self.certificates_section.add_certificate_exception(self.user_name, '') + self.certificates_section.add_certificate_exception(self.user_name, notes) + self.assertIn(self.user_name, self.certificates_section.last_certificate_exception.text) + self.assertIn(notes, self.certificates_section.last_certificate_exception.text) + self.assertIn(str(self.user_id), self.certificates_section.last_certificate_exception.text) + + # Verify that added exceptions are also synced with backend + # Revisit Page + self.certificates_section.refresh() + + # wait for the certificate exception section to render + self.certificates_section.wait_for_certificate_exceptions_section() + + # validate certificate exception synced with server is visible in certificate exceptions list self.assertIn(self.user_name, self.certificates_section.last_certificate_exception.text) + self.assertIn(notes, self.certificates_section.last_certificate_exception.text) + self.assertIn(str(self.user_id), self.certificates_section.last_certificate_exception.text) + + def test_instructor_can_remove_certificate_exception(self): + """ + Scenario: On the Certificates tab of the Instructor Dashboard, Instructor can remove added certificate + exceptions from the list. + + Given that I am on the Certificates tab on the Instructor Dashboard + When I fill in student username and notes fields and click 'Add Exception' button + Then new certificate exception should be visible in certificate exceptions list + """ + notes = 'Test Notes' + # Add a student to Certificate exception list + self.certificates_section.add_certificate_exception(self.user_name, notes) + self.assertIn(self.user_name, self.certificates_section.last_certificate_exception.text) + self.assertIn(notes, self.certificates_section.last_certificate_exception.text) + self.assertIn(str(self.user_id), self.certificates_section.last_certificate_exception.text) + + # Remove Certificate Exception + self.certificates_section.remove_first_certificate_exception() + self.assertNotIn(self.user_name, self.certificates_section.last_certificate_exception.text) + self.assertNotIn(notes, self.certificates_section.last_certificate_exception.text) + self.assertNotIn(str(self.user_id), self.certificates_section.last_certificate_exception.text) + + # Verify that added exceptions are also synced with backend + # Revisit Page + self.certificates_section.refresh() + + # wait for the certificate exception section to render + self.certificates_section.wait_for_certificate_exceptions_section() + + # validate certificate exception synced with server is visible in certificate exceptions list + self.assertNotIn(self.user_name, self.certificates_section.last_certificate_exception.text) + self.assertNotIn(notes, self.certificates_section.last_certificate_exception.text) + self.assertNotIn(str(self.user_id), self.certificates_section.last_certificate_exception.text) def test_error_on_duplicate_certificate_exception(self): """ @@ -711,51 +760,46 @@ def test_error_on_empty_user_name(self): self.certificates_section.message.text ) - def test_generate_certificate_exception(self): + def test_error_on_non_existing_user(self): """ - Scenario: On the Certificates tab of the Instructor Dashboard, when user clicks - 'Generate Exception Certificates' newly added certificate exceptions should be synced on server + Scenario: On the Certificates tab of the Instructor Dashboard, + Error message appears if username/email does not exists in the system while clicking "Add Exception" button Given that I am on the Certificates tab on the Instructor Dashboard - When I click 'Generate Exception Certificates' - Then newly added certificate exceptions should be synced on server + When I click on 'Add Exception' button + AND student username/email does not exists + Then Error Message should say 'Student username/email is required.' """ - # Add a student to Certificate exception list - self.certificates_section.add_certificate_exception(self.user_name, '') + invalid_user = 'test_user_non_existent' + # Click 'Add Exception' button with invalid username/email field + self.certificates_section.wait_for_certificate_exceptions_section() - # Click 'Generate Exception Certificates' button - self.certificates_section.click_generate_certificate_exceptions_button() + self.certificates_section.fill_user_name_field(invalid_user) + self.certificates_section.click_add_exception_button() self.certificates_section.wait_for_ajax() - # Revisit Page - self.certificates_section.refresh() - - # wait for the certificate exception section to render - self.certificates_section.wait_for_certificate_exceptions_section() - - # validate certificate exception synced with server is visible in certificate exceptions list - self.assertIn(self.user_name, self.certificates_section.last_certificate_exception.text) + self.assertIn( + 'Student (username/email={}) does not exist'.format(invalid_user), + self.certificates_section.message.text + ) - def test_invalid_user_on_generate_certificate_exception(self): + def test_generate_certificate_exception(self): """ Scenario: On the Certificates tab of the Instructor Dashboard, when user clicks - 'Generate Exception Certificates' error message should appear if user does not exist + 'Generate Exception Certificates' newly added certificate exceptions should be synced on server Given that I am on the Certificates tab on the Instructor Dashboard When I click 'Generate Exception Certificates' - AND the user specified by instructor does not exist - Then an error message "Student (username/email=test_user) does not exist" is displayed + Then newly added certificate exceptions should be synced on server """ - invalid_user = 'test_user_non_existent' # Add a student to Certificate exception list - self.certificates_section.add_certificate_exception(invalid_user, '') + self.certificates_section.add_certificate_exception(self.user_name, '') # Click 'Generate Exception Certificates' button self.certificates_section.click_generate_certificate_exceptions_button() self.certificates_section.wait_for_ajax() - # validate certificate exception synced with server is visible in certificate exceptions list self.assertIn( - 'Student (username/email={}) does not exist'.format(invalid_user), + 'Certificate generation started for white listed students.', self.certificates_section.message.text ) diff --git a/lms/djangoapps/certificates/models.py b/lms/djangoapps/certificates/models.py index e4ec4e1592f7..cef5482e252e 100644 --- a/lms/djangoapps/certificates/models.py +++ b/lms/djangoapps/certificates/models.py @@ -116,7 +116,7 @@ class Meta(object): notes = models.TextField(default=None, null=True) @classmethod - def get_certificate_white_list(cls, course_id): + def get_certificate_white_list(cls, course_id, student=None): """ Return certificate white list for the given course as dict object, returned dictionary will have the following key-value pairs @@ -133,6 +133,8 @@ def get_certificate_white_list(cls, course_id): """ white_list = cls.objects.filter(course_id=course_id, whitelist=True) + if student: + white_list = white_list.filter(user=student) result = [] for item in white_list: @@ -214,6 +216,25 @@ def get_unique_statuses(cls, course_key=None, flat=False): else: return query.values('status').annotate(count=Count('status')) + def invalidate(self): + """ + Invalidate Generated Certificate by marking it 'unavailable'. + + Following is the list of fields with their defaults + 1 - verify_uuid = '', + 2 - download_uuid = '', + 3 - download_url = '', + 4 - grade = '' + 5 - status = 'unavailable' + """ + self.verify_uuid = '' + self.download_uuid = '' + self.download_url = '' + self.grade = '' + self.status = CertificateStatuses.unavailable + + self.save() + @receiver(post_save, sender=GeneratedCertificate) def handle_post_cert_generated(sender, instance, **kwargs): # pylint: disable=unused-argument diff --git a/lms/djangoapps/certificates/tests/factories.py b/lms/djangoapps/certificates/tests/factories.py index eb185c50e450..0c68994c6996 100644 --- a/lms/djangoapps/certificates/tests/factories.py +++ b/lms/djangoapps/certificates/tests/factories.py @@ -30,7 +30,7 @@ class Meta(object): course_id = None whitelist = True - notes = None + notes = 'Test Notes' class BadgeAssertionFactory(DjangoModelFactory): diff --git a/lms/djangoapps/instructor/tests/test_certificates.py b/lms/djangoapps/instructor/tests/test_certificates.py index a10efa03f0c3..c3622536bc21 100644 --- a/lms/djangoapps/instructor/tests/test_certificates.py +++ b/lms/djangoapps/instructor/tests/test_certificates.py @@ -6,15 +6,18 @@ from nose.plugins.attrib import attr from django.core.urlresolvers import reverse +from django.core.exceptions import ObjectDoesNotExist from django.test.utils import override_settings from django.conf import settings from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory from config_models.models import cache from courseware.tests.factories import GlobalStaffFactory, InstructorFactory, UserFactory -from certificates.tests.factories import GeneratedCertificateFactory -from certificates.models import CertificateGenerationConfiguration, CertificateStatuses +from certificates.tests.factories import GeneratedCertificateFactory, CertificateWhitelistFactory +from certificates.models import CertificateGenerationConfiguration, CertificateStatuses, CertificateWhitelist, \ + GeneratedCertificate from certificates import api as certs_api +from student.models import CourseEnrollment @attr('shard_1') @@ -206,18 +209,9 @@ def setUp(self): self.global_staff = GlobalStaffFactory() self.instructor = InstructorFactory(course_key=self.course.id) self.user = UserFactory() + CourseEnrollment.enroll(self.user, self.course.id) # Enable certificate generation - self.certificate_exception_data = [ - dict( - created="Wednesday, October 28, 2015", - notes="Test Notes for Test Certificate Exception", - user_email='', - user_id='', - user_name=unicode(self.user.username) - ), - ] - cache.clear() CertificateGenerationConfiguration.objects.create(enabled=True) @@ -314,35 +308,143 @@ def test_certificate_generation_api_with_global_staff(self): self.assertIsNotNone(res_json['message']) self.assertIsNotNone(res_json['task_id']) - def test_certificate_exception_added_successfully(self): + def test_certificate_regeneration_success(self): """ - Test certificates exception addition api endpoint returns success status and updated certificate exception data - when called with valid course key and certificate exception data + Test certificate regeneration is successful when accessed with 'certificate_statuses' + present in GeneratedCertificate table. """ - self.client.login(username=self.global_staff.username, password='test') - url = reverse( - 'create_certificate_exception', - kwargs={'course_id': unicode(self.course.id), 'white_list_student': ''} - ) - response = self.client.post( - url, - data=json.dumps(self.certificate_exception_data), - content_type='application/json' + # Create a generated Certificate of some user with status 'downloadable' + GeneratedCertificateFactory.create( + user=self.user, + course_id=self.course.id, + status=CertificateStatuses.downloadable, + mode='honor' ) - # Assert successful request processing + # Login the client and access the url with 'certificate_statuses' + self.client.login(username=self.global_staff.username, password='test') + url = reverse('start_certificate_regeneration', kwargs={'course_id': unicode(self.course.id)}) + response = self.client.post(url, data={'certificate_statuses': [CertificateStatuses.downloadable]}) + + # Assert 200 status code in response self.assertEqual(response.status_code, 200) res_json = json.loads(response.content) - # Assert Request was successful + # Assert request is successful self.assertTrue(res_json['success']) - # Assert Success Message - self.assertEqual(res_json['message'], u'Students added to Certificate white list successfully') + # Assert success message + self.assertEqual( + res_json['message'], + u'Certificate regeneration task has been started. You can view the status of the generation task in ' + u'the "Pending Tasks" section.' + ) + + def test_certificate_regeneration_error(self): + """ + Test certificate regeneration errors out when accessed with either empty list of 'certificate_statuses' or + the 'certificate_statuses' that are not present in GeneratedCertificate table. + """ + # Create a dummy course and GeneratedCertificate with the same status as the one we will use to access + # 'start_certificate_regeneration' but their error message should be displayed as GeneratedCertificate + # belongs to a different course + dummy_course = CourseFactory.create() + GeneratedCertificateFactory.create( + user=self.user, + course_id=dummy_course.id, + status=CertificateStatuses.generating, + mode='honor' + ) + + # Login the client and access the url without 'certificate_statuses' + self.client.login(username=self.global_staff.username, password='test') + url = reverse('start_certificate_regeneration', kwargs={'course_id': unicode(self.course.id)}) + response = self.client.post(url) + + # Assert 400 status code in response + self.assertEqual(response.status_code, 400) + res_json = json.loads(response.content) + + # Assert Error Message + self.assertEqual( + res_json['message'], + u'Please select one or more certificate statuses that require certificate regeneration.' + ) + + # Access the url passing 'certificate_statuses' that are not present in db + url = reverse('start_certificate_regeneration', kwargs={'course_id': unicode(self.course.id)}) + response = self.client.post(url, data={'certificate_statuses': [CertificateStatuses.generating]}) + + # Assert 400 status code in response + self.assertEqual(response.status_code, 400) + res_json = json.loads(response.content) + + # Assert Error Message + self.assertEqual(res_json['message'], u'Please select certificate statuses from the list only.') + + +@attr('shard_1') +@override_settings(CERT_QUEUE='certificates') +@ddt.ddt +class CertificateExceptionViewInstructorApiTest(SharedModuleStoreTestCase): + """Tests for the generate certificates end-points in the instructor dash API. """ + @classmethod + def setUpClass(cls): + super(CertificateExceptionViewInstructorApiTest, cls).setUpClass() + cls.course = CourseFactory.create() + + def setUp(self): + super(CertificateExceptionViewInstructorApiTest, self).setUp() + self.global_staff = GlobalStaffFactory() + self.instructor = InstructorFactory(course_key=self.course.id) + self.user = UserFactory() + self.user2 = UserFactory() + CourseEnrollment.enroll(self.user, self.course.id) + CourseEnrollment.enroll(self.user2, self.course.id) + self.url = reverse('certificate_exception_view', kwargs={'course_id': unicode(self.course.id)}) + + certificate_white_list_item = CertificateWhitelistFactory.create( + user=self.user2, + course_id=self.course.id, + ) + + self.certificate_exception = dict( + created="", + notes="Test Notes for Test Certificate Exception", + user_email='', + user_id='', + user_name=unicode(self.user.username) + ) + + self.certificate_exception_in_db = dict( + id=certificate_white_list_item.id, + user_name=certificate_white_list_item.user.username, + notes=certificate_white_list_item.notes, + user_email=certificate_white_list_item.user.email, + user_id=certificate_white_list_item.user.id, + ) + + # Enable certificate generation + cache.clear() + CertificateGenerationConfiguration.objects.create(enabled=True) + self.client.login(username=self.global_staff.username, password='test') + + def test_certificate_exception_added_successfully(self): + """ + Test certificates exception addition api endpoint returns success status and updated certificate exception data + when called with valid course key and certificate exception data + """ + response = self.client.post( + self.url, + data=json.dumps(self.certificate_exception), + content_type='application/json' + ) + # Assert successful request processing + self.assertEqual(response.status_code, 200) + certificate_exception = json.loads(response.content) # Assert Certificate Exception Updated data - certificate_exception = json.loads(res_json['data'])[0] self.assertEqual(certificate_exception['user_email'], self.user.email) self.assertEqual(certificate_exception['user_name'], self.user.username) self.assertEqual(certificate_exception['user_id'], self.user.id) # pylint: disable=no-member @@ -353,18 +455,12 @@ def test_certificate_exception_invalid_username_error(self): invalid username. """ invalid_user = 'test_invalid_user_name' - self.certificate_exception_data[0].update({'user_name': invalid_user}) - - self.client.login(username=self.global_staff.username, password='test') - url = reverse( - 'create_certificate_exception', - kwargs={'course_id': unicode(self.course.id), 'white_list_student': ''} - ) - + self.certificate_exception.update({'user_name': invalid_user}) response = self.client.post( - url, - data=json.dumps(self.certificate_exception_data), - content_type='application/json') + self.url, + data=json.dumps(self.certificate_exception), + content_type='application/json' + ) # Assert 400 status code in response self.assertEqual(response.status_code, 400) @@ -384,18 +480,12 @@ def test_certificate_exception_missing_username_and_email_error(self): Test certificates exception addition api endpoint returns failure when called with missing username/email. """ - self.certificate_exception_data[0].update({'user_name': '', 'user_email': ''}) - - self.client.login(username=self.global_staff.username, password='test') - url = reverse( - 'create_certificate_exception', - kwargs={'course_id': unicode(self.course.id), 'white_list_student': ''} - ) - + self.certificate_exception.update({'user_name': '', 'user_email': ''}) response = self.client.post( - url, - data=json.dumps(self.certificate_exception_data), - content_type='application/json') + self.url, + data=json.dumps(self.certificate_exception), + content_type='application/json' + ) # Assert 400 status code in response self.assertEqual(response.status_code, 400) @@ -415,23 +505,9 @@ def test_certificate_exception_duplicate_user_error(self): Test certificates exception addition api endpoint returns failure when called with username/email that already exists in 'CertificateWhitelist' table. """ - - self.client.login(username=self.global_staff.username, password='test') - url = reverse( - 'create_certificate_exception', - kwargs={'course_id': unicode(self.course.id), 'white_list_student': ''} - ) - - self.client.post( - url, - data=json.dumps(self.certificate_exception_data), - content_type='application/json' - ) - - # Make some request again to simulate duplicate user scenario response = self.client.post( - url, - data=json.dumps(self.certificate_exception_data), + self.url, + data=json.dumps(self.certificate_exception_in_db), content_type='application/json' ) @@ -442,11 +518,11 @@ def test_certificate_exception_duplicate_user_error(self): # Assert Request not successful self.assertFalse(res_json['success']) - user = self.certificate_exception_data[0]['user_name'] + user = self.certificate_exception_in_db['user_name'] # Assert Error Message self.assertEqual( res_json['message'], - u"Student (username/email={user_id} already in certificate exception list)".format(user_id=user) + u"Student (username/email={user_name}) already in certificate exception list.".format(user_name=user) ) def test_certificate_exception_same_user_in_two_different_courses(self): @@ -454,111 +530,207 @@ def test_certificate_exception_same_user_in_two_different_courses(self): Test certificates exception addition api endpoint in scenario when same student is added to two different courses. """ - - self.client.login(username=self.global_staff.username, password='test') - - url_course1 = reverse( - 'create_certificate_exception', - kwargs={'course_id': unicode(self.course.id), 'white_list_student': ''} - ) - response = self.client.post( - url_course1, - data=json.dumps(self.certificate_exception_data), + self.url, + data=json.dumps(self.certificate_exception), content_type='application/json' ) self.assertEqual(response.status_code, 200) - res_json = json.loads(response.content) - self.assertTrue(res_json['success']) + certificate_exception = json.loads(response.content) + + # Assert Certificate Exception Updated data + self.assertEqual(certificate_exception['user_email'], self.user.email) + self.assertEqual(certificate_exception['user_name'], self.user.username) + self.assertEqual(certificate_exception['user_id'], self.user.id) # pylint: disable=no-member course2 = CourseFactory.create() url_course2 = reverse( - 'create_certificate_exception', - kwargs={'course_id': unicode(course2.id), 'white_list_student': ''} + 'certificate_exception_view', + kwargs={'course_id': unicode(course2.id)} ) # add certificate exception for same user in a different course self.client.post( url_course2, - data=json.dumps(self.certificate_exception_data), + data=json.dumps(self.certificate_exception), content_type='application/json' ) self.assertEqual(response.status_code, 200) - res_json = json.loads(response.content) - self.assertTrue(res_json['success']) + certificate_exception = json.loads(response.content) - def test_certificate_regeneration_success(self): + # Assert Certificate Exception Updated data + self.assertEqual(certificate_exception['user_email'], self.user.email) + self.assertEqual(certificate_exception['user_name'], self.user.username) + self.assertEqual(certificate_exception['user_id'], self.user.id) # pylint: disable=no-member + + def test_certificate_exception_removed_successfully(self): """ - Test certificate regeneration is successful when accessed with 'certificate_statuses' - present in GeneratedCertificate table. + Test certificates exception removal api endpoint returns success status + when called with valid course key and certificate exception id """ - - # Create a generated Certificate of some user with status 'downloadable' GeneratedCertificateFactory.create( - user=self.user, + user=self.user2, course_id=self.course.id, status=CertificateStatuses.downloadable, - mode='honor' + grade='1.0' + ) + response = self.client.post( + self.url, + data=json.dumps(self.certificate_exception_in_db), + content_type='application/json', + REQUEST_METHOD='DELETE' ) + # Assert successful request processing + self.assertEqual(response.status_code, 204) - # Login the client and access the url with 'certificate_statuses' - self.client.login(username=self.global_staff.username, password='test') - url = reverse('start_certificate_regeneration', kwargs={'course_id': unicode(self.course.id)}) - response = self.client.post(url, data={'certificate_statuses': [CertificateStatuses.downloadable]}) + # Verify that certificate exception successfully removed from CertificateWhitelist and GeneratedCertificate + with self.assertRaises(ObjectDoesNotExist): + CertificateWhitelist.objects.get(user=self.user2, course_id=self.course.id) + GeneratedCertificate.objects.get( + user=self.user2, course_id=self.course.id, status__not=CertificateStatuses.unavailable + ) - # Assert 200 status code in response - self.assertEqual(response.status_code, 200) - res_json = json.loads(response.content) + def test_remove_certificate_exception_invalid_request_error(self): + """ + Test certificates exception removal api endpoint returns error + when called without certificate exception id + """ + # Try to delete certificate exception without passing valid data + response = self.client.post( + self.url, + data='Test Invalid data', + content_type='application/json', + REQUEST_METHOD='DELETE' + ) + # Assert error on request + self.assertEqual(response.status_code, 400) - # Assert request is successful - self.assertTrue(res_json['success']) + res_json = json.loads(response.content) - # Assert success message + # Assert Request not successful + self.assertFalse(res_json['success']) + # Assert Error Message self.assertEqual( res_json['message'], - u'Certificate regeneration task has been started. You can view the status of the generation task in ' - u'the "Pending Tasks" section.' + u"Invalid Json data" ) - def test_certificate_regeneration_error(self): + def test_remove_certificate_exception_non_existing_error(self): """ - Test certificate regeneration errors out when accessed with either empty list of 'certificate_statuses' or - the 'certificate_statuses' that are not present in GeneratedCertificate table. + Test certificates exception removal api endpoint returns error + when called with non existing certificate exception id """ - # Create a dummy course and GeneratedCertificate with the same status as the one we will use to access - # 'start_certificate_regeneration' but their error message should be displayed as GeneratedCertificate - # belongs to a different course - dummy_course = CourseFactory.create() - GeneratedCertificateFactory.create( + response = self.client.post( + self.url, + data=json.dumps(self.certificate_exception), + content_type='application/json', + REQUEST_METHOD='DELETE' + ) + # Assert error on request + self.assertEqual(response.status_code, 400) + + res_json = json.loads(response.content) + + # Assert Request not successful + self.assertFalse(res_json['success']) + # Assert Error Message + self.assertEqual( + res_json['message'], + u"Certificate exception [user={}] does not exist in " + u"certificate white list.".format(self.certificate_exception['user_name']) + ) + + +@attr('shard_1') +@override_settings(CERT_QUEUE='certificates') +@ddt.ddt +class GenerateCertificatesInstructorApiTest(SharedModuleStoreTestCase): + """Tests for the generate certificates end-points in the instructor dash API. """ + @classmethod + def setUpClass(cls): + super(GenerateCertificatesInstructorApiTest, cls).setUpClass() + cls.course = CourseFactory.create() + + def setUp(self): + super(GenerateCertificatesInstructorApiTest, self).setUp() + self.global_staff = GlobalStaffFactory() + self.instructor = InstructorFactory(course_key=self.course.id) + self.user = UserFactory() + CourseEnrollment.enroll(self.user, self.course.id) + certificate_exception = CertificateWhitelistFactory.create( user=self.user, - course_id=dummy_course.id, - status=CertificateStatuses.generating, - mode='honor' + course_id=self.course.id, ) - # Login the client and access the url without 'certificate_statuses' + self.certificate_exception = dict( + id=certificate_exception.id, + user_name=certificate_exception.user.username, + notes=certificate_exception.notes, + user_email=certificate_exception.user.email, + user_id=certificate_exception.user.id, + ) + + # Enable certificate generation + cache.clear() + CertificateGenerationConfiguration.objects.create(enabled=True) self.client.login(username=self.global_staff.username, password='test') - url = reverse('start_certificate_regeneration', kwargs={'course_id': unicode(self.course.id)}) - response = self.client.post(url) - # Assert 400 status code in response - self.assertEqual(response.status_code, 400) + def test_generate_certificate_exceptions_all_students(self): + """ + Test generate certificates exceptions api endpoint returns success + when called with existing certificate exception + """ + url = reverse( + 'generate_certificate_exceptions', + kwargs={'course_id': unicode(self.course.id), 'generate_for': 'all'} + ) + + response = self.client.post( + url, + data=json.dumps([self.certificate_exception]), + content_type='application/json' + ) + # Assert Success + self.assertEqual(response.status_code, 200) + res_json = json.loads(response.content) - # Assert Error Message + # Assert Request is successful + self.assertTrue(res_json['success']) + # Assert Message self.assertEqual( res_json['message'], - u'Please select one or more certificate statuses that require certificate regeneration.' + u"Certificate generation started for white listed students." ) - # Access the url passing 'certificate_statuses' that are not present in db - url = reverse('start_certificate_regeneration', kwargs={'course_id': unicode(self.course.id)}) - response = self.client.post(url, data={'certificate_statuses': [CertificateStatuses.generating]}) + def test_generate_certificate_exceptions_invalid_user_list_error(self): + """ + Test generate certificates exceptions api endpoint returns error + when called with certificate exceptions with empty 'user_id' field + """ + url = reverse( + 'generate_certificate_exceptions', + kwargs={'course_id': unicode(self.course.id), 'generate_for': 'new'} + ) - # Assert 400 status code in response + # assign empty user_id + self.certificate_exception.update({'user_id': ''}) + + response = self.client.post( + url, + data=json.dumps([self.certificate_exception]), + content_type='application/json' + ) + # Assert Failure self.assertEqual(response.status_code, 400) + res_json = json.loads(response.content) - # Assert Error Message - self.assertEqual(res_json['message'], u'Please select certificate statuses from the list only.') + # Assert Request is not successful + self.assertFalse(res_json['success']) + # Assert Message + self.assertEqual( + res_json['message'], + u"Invalid data, user_id must be present for all certificate exceptions." + ) diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index ec976be5c13b..2d420768639e 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -13,7 +13,7 @@ import requests from django.conf import settings from django.views.decorators.csrf import ensure_csrf_cookie -from django.views.decorators.http import require_POST +from django.views.decorators.http import require_POST, require_http_methods from django.views.decorators.cache import cache_control from django.core.exceptions import ValidationError, PermissionDenied from django.core.mail.message import EmailMessage @@ -2727,14 +2727,144 @@ def start_certificate_regeneration(request, course_id): return JsonResponse(response_payload) +@transaction.non_atomic_requests +@ensure_csrf_cookie +@cache_control(no_cache=True, no_store=True, must_revalidate=True) +@require_global_staff +@require_http_methods(['POST', 'DELETE']) +def certificate_exception_view(request, course_id): + """ + Add/Remove students to/from certificate white list. + + :param request: HttpRequest object + :param course_id: course identifier of the course for whom to add/remove certificates exception. + :return: JsonResponse object with success/error message or certificate exception data. + """ + course_key = CourseKey.from_string(course_id) + # Validate request data and return error response in case of invalid data + try: + certificate_exception, student = parse_request_data_and_get_user(request) + except ValueError as error: + return JsonResponse({'success': False, 'message': error.message}, status=400) + + # Add new Certificate Exception for the student passed in request data + if request.method == 'POST': + try: + exception = add_certificate_exception(course_key, student, certificate_exception) + except ValueError as error: + return JsonResponse({'success': False, 'message': error.message}, status=400) + return JsonResponse(exception) + + # Remove Certificate Exception for the student passed in request data + elif request.method == 'DELETE': + try: + remove_certificate_exception(course_key, student) + except ValueError as error: + return JsonResponse({'success': False, 'message': error.message}, status=400) + + return JsonResponse({}, status=204) + + +def add_certificate_exception(course_key, student, certificate_exception): + """ + Add a certificate exception to CertificateWhitelist table. + Raises ValueError in case Student is already white listed. + + :param course_key: identifier of the course whose certificate exception will be added. + :param student: User object whose certificate exception will be added. + :param certificate_exception: A dict object containing certificate exception info. + :return: CertificateWhitelist item in dict format containing certificate exception info. + """ + if len(CertificateWhitelist.get_certificate_white_list(course_key, student)) > 0: + raise ValueError( + _("Student (username/email={user}) already in certificate exception list.").format(user=student.username) + ) + + certificate_white_list, __ = CertificateWhitelist.objects.get_or_create( + user=student, + course_id=course_key, + defaults={ + 'whitelist': True, + 'notes': certificate_exception.get('notes', '') + } + ) + + exception = dict({ + 'id': certificate_white_list.id, + 'user_email': student.email, + 'user_name': student.username, + 'user_id': student.id, + 'created': certificate_white_list.created.strftime("%A, %B %d, %Y"), + }) + + return exception + + +def remove_certificate_exception(course_key, student): + """ + Remove certificate exception for given course and student from CertificateWhitelist table and + invalidate its GeneratedCertificate if present. + Raises ValueError in case no exception exists for the student in the given course. + + :param course_key: identifier of the course whose certificate exception needs to be removed. + :param student: User object whose certificate exception needs to be removed. + :return: + """ + try: + certificate_exception = CertificateWhitelist.objects.get(user=student, course_id=course_key) + except ObjectDoesNotExist: + raise ValueError( + _('Certificate exception [user={}] does not exist in ' + 'certificate white list.').format(student.username) + ) + + try: + generated_certificate = GeneratedCertificate.objects.get(user=student, course_id=course_key) + generated_certificate.invalidate() + except ObjectDoesNotExist: + # Certificate has not been generated yet, so just remove the certificate exception from white list + pass + certificate_exception.delete() + + +def parse_request_data_and_get_user(request): + """ + Parse request data into Certificate Exception and User object. + Certificate Exception is the dict object containing information about certificate exception. + + :param request: + :return: key-value pairs containing certificate exception data and User object + """ + try: + certificate_exception = json.loads(request.body or '{}') + except ValueError: + raise ValueError(_('Invalid Json data')) + + user = certificate_exception.get('user_name', '') or certificate_exception.get('user_email', '') + if not user: + raise ValueError(_('Student username/email is required.')) + try: + db_user = get_user_by_username_or_email(user) + except ObjectDoesNotExist: + raise ValueError(_('Student (username/email={user}) does not exist').format(user=user)) + + return certificate_exception, db_user + + @transaction.non_atomic_requests @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @require_global_staff @require_POST -def create_certificate_exception(request, course_id, white_list_student=None): +def generate_certificate_exceptions(request, course_id, generate_for=None): """ - Add Students to certificate white list. + Generate Certificate for students in the Certificate White List. + + :param request: HttpRequest object, + :param course_id: course identifier of the course for whom to generate certificates + :param generate_for: string to identify whether to generate certificates for 'all' or 'new' + additions to the certificate white-list + :return: JsonResponse object containing success/failure message and certificate exception data """ course_key = CourseKey.from_string(course_id) @@ -2746,21 +2876,29 @@ def create_certificate_exception(request, course_id, white_list_student=None): 'message': _('Invalid Json data') }, status=400) - with outer_atomic(): - try: - certificate_white_list, students = process_certificate_exceptions(certificate_white_list, course_key) - except ValueError as error: - return JsonResponse( - {'success': False, 'message': error.message, 'data': json.dumps(certificate_white_list)}, - status=400 - ) + users = [exception.get('user_id', False) for exception in certificate_white_list] - if white_list_student == 'all': + if generate_for == 'all': # Generate Certificates for all white listed students students = User.objects.filter( certificatewhitelist__course_id=course_key, certificatewhitelist__whitelist=True ) + elif not all(users): + # Invalid data, user_id must be present for all certificate exceptions + return JsonResponse( + { + 'success': False, + 'message': _('Invalid data, user_id must be present for all certificate exceptions.'), + }, + status=400 + ) + else: + students = User.objects.filter( + id__in=users, + certificatewhitelist__course_id=course_key, + certificatewhitelist__whitelist=True + ) if students: # generate certificates for students if 'students' list is not empty @@ -2768,60 +2906,7 @@ def create_certificate_exception(request, course_id, white_list_student=None): response_payload = { 'success': True, - 'message': _('Students added to Certificate white list successfully'), - 'data': json.dumps(certificate_white_list) + 'message': _('Certificate generation started for white listed students.'), } return JsonResponse(response_payload) - - -def process_certificate_exceptions(data_list, course_key): - """ - Validate user data for certificate exceptions, raise ValueError in case of invalid data and create - 'CertificateWhitelist' record for students in data_list. - - return updated data_list after creating 'CertificateWhitelist' records in db. - """ - students = [] - users = [data.get('user_name', False) or data.get('user_email', False) for data in data_list] - - if not all(users): - # Username and email can not both be empty - raise ValueError(_('Student username/email is required.')) - - if len(users) != len(set(users)): - # Duplicate Student username/email is not allowed - raise ValueError(_('Duplicate Student Username/password.')) - - for data in data_list: - user = data.get('user_name', '') or data.get('user_email', '') - try: - db_user = get_user_by_username_or_email(user) - except ObjectDoesNotExist: - raise ValueError(_('Student (username/email={user}) does not exist').format(user=user)) - except MultipleObjectsReturned: - raise ValueError(_('Multiple Students found with username/email={user}').format(user=user)) - - if CertificateWhitelist.objects.filter(user=db_user, course_id=course_key, whitelist=True).count() > 0: - raise ValueError( - _("Student (username/email={user_id} already in certificate exception list)").format(user_id=user) - ) - - certificate_white_list = CertificateWhitelist.objects.create( - user=db_user, - course_id=course_key, - whitelist=True, - notes=data.get('notes', '') - ) - - data.update({ - 'id': certificate_white_list.id, - 'user_email': db_user.email, - 'user_name': db_user.username, - 'user_id': db_user.id, - 'created': certificate_white_list.created.strftime("%A, %B %d, %Y"), - }) - - students.append(db_user) - - return data_list, students diff --git a/lms/djangoapps/instructor/views/api_urls.py b/lms/djangoapps/instructor/views/api_urls.py index 6bb918d729c6..7b7d6535ca64 100644 --- a/lms/djangoapps/instructor/views/api_urls.py +++ b/lms/djangoapps/instructor/views/api_urls.py @@ -150,7 +150,11 @@ 'instructor.views.api.start_certificate_regeneration', name='start_certificate_regeneration'), - url(r'^create_certificate_exception/(?P[^/]*)', - 'instructor.views.api.create_certificate_exception', - name='create_certificate_exception'), + url(r'^certificate_exception_view/$', + 'instructor.views.api.certificate_exception_view', + name='certificate_exception_view'), + + url(r'^generate_certificate_exceptions/(?P[^/]*)', + 'instructor.views.api.generate_certificate_exceptions', + name='generate_certificate_exceptions'), ) diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index 7207a536f8e0..3582e5f7c368 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -165,9 +165,13 @@ def instructor_dashboard_2(request, course_id): disable_buttons = not _is_small_course(course_key) certificate_white_list = CertificateWhitelist.get_certificate_white_list(course_key) - certificate_exception_url = reverse( - 'create_certificate_exception', - kwargs={'course_id': unicode(course_key), 'white_list_student': ''} + generate_certificate_exceptions_url = reverse( # pylint: disable=invalid-name + 'generate_certificate_exceptions', + kwargs={'course_id': unicode(course_key), 'generate_for': ''} + ) + certificate_exception_view_url = reverse( + 'certificate_exception_view', + kwargs={'course_id': unicode(course_key)} ) context = { @@ -178,7 +182,8 @@ def instructor_dashboard_2(request, course_id): 'disable_buttons': disable_buttons, 'analytics_dashboard_message': analytics_dashboard_message, 'certificate_white_list': certificate_white_list, - 'certificate_exception_url': certificate_exception_url + 'generate_certificate_exceptions_url': generate_certificate_exceptions_url, + 'certificate_exception_view_url': certificate_exception_view_url } return render_to_response('instructor/instructor_dashboard_2/instructor_dashboard_2.html', context) diff --git a/lms/static/js/certificates/collections/certificate_whitelist.js b/lms/static/js/certificates/collections/certificate_whitelist.js index 1831be387b67..0604582561c3 100644 --- a/lms/static/js/certificates/collections/certificate_whitelist.js +++ b/lms/static/js/certificates/collections/certificate_whitelist.js @@ -15,7 +15,7 @@ model: CertificateExceptionModel, initialize: function(attrs, options){ - this.url = options.url; + this.generate_certificates_url = options.generate_certificates_url; }, getModel: function(attrs){ @@ -33,13 +33,16 @@ }, sync: function(options, appended_url){ - var filtered = this.filter(function(model){ - return model.isNew(); - }); - + var filtered = []; + if(appended_url === 'new'){ + filtered = this.filter(function(model){ + return model.get('new'); + }); + } + var url = this.generate_certificates_url + appended_url; Backbone.sync( 'create', - new CertificateWhiteList(filtered, {url: this.url + appended_url}), + new CertificateWhiteList(filtered, {url: url, generate_certificates_url: url}), options ); }, diff --git a/lms/static/js/certificates/factories/certificate_whitelist_factory.js b/lms/static/js/certificates/factories/certificate_whitelist_factory.js index 1eee6e3cf971..38e37c89f6db 100644 --- a/lms/static/js/certificates/factories/certificate_whitelist_factory.js +++ b/lms/static/js/certificates/factories/certificate_whitelist_factory.js @@ -12,21 +12,26 @@ ], function($, CertificateWhiteListListView, CertificateExceptionModel, CertificateWhiteListEditorView , CertificateWhiteListCollection){ - return function(certificate_white_list_json, certificate_exception_url){ + return function(certificate_white_list_json, generate_certificate_exceptions_url, + certificate_exception_view_url){ var certificateWhiteList = new CertificateWhiteListCollection(JSON.parse(certificate_white_list_json), { parse: true, canBeEmpty: true, - url: certificate_exception_url + url: certificate_exception_view_url, + generate_certificates_url: generate_certificate_exceptions_url }); - new CertificateWhiteListListView({ + var certificateWhiteListEditorView = new CertificateWhiteListEditorView({ collection: certificateWhiteList - }).render(); + }); + certificateWhiteListEditorView.render(); - new CertificateWhiteListEditorView({ - collection: certificateWhiteList + new CertificateWhiteListListView({ + collection: certificateWhiteList, + certificateWhiteListEditorView: certificateWhiteListEditorView }).render(); + }; } ); diff --git a/lms/static/js/certificates/models/certificate_exception.js b/lms/static/js/certificates/models/certificate_exception.js index ecca48e213f7..617832193ee8 100644 --- a/lms/static/js/certificates/models/certificate_exception.js +++ b/lms/static/js/certificates/models/certificate_exception.js @@ -24,6 +24,10 @@ notes: '' }, + url: function() { + return this.get('url'); + }, + validate: function(attrs){ if (!_.str.trim(attrs.user_name) && !_.str.trim(attrs.user_email)) { return gettext('Student username/email is required.'); diff --git a/lms/static/js/certificates/views/certificate_whitelist.js b/lms/static/js/certificates/views/certificate_whitelist.js index c14e32d93894..ec6d6a7fb7de 100644 --- a/lms/static/js/certificates/views/certificate_whitelist.js +++ b/lms/static/js/certificates/views/certificate_whitelist.js @@ -14,16 +14,19 @@ function($, _, gettext, Backbone){ return Backbone.View.extend({ el: "#white-listed-students", + message_div: '#certificate-white-list-editor .message', generate_exception_certificates_radio: 'input:radio[name=generate-exception-certificates-radio]:checked', events: { - 'click #generate-exception-certificates': 'generateExceptionCertificates' + 'click #generate-exception-certificates': 'generateExceptionCertificates', + 'click .delete-exception': 'removeException' }, - initialize: function(){ + initialize: function(options){ + this.certificateWhiteListEditorView = options.certificateWhiteListEditorView; // Re-render the view when an item is added to the collection - this.listenTo(this.collection, 'change add', this.render); + this.listenTo(this.collection, 'change add remove', this.render); }, render: function(){ @@ -38,6 +41,14 @@ return _.template(templateText); }, + removeException: function(event){ + // Delegate remove exception event to certificate white-list editor view + this.certificateWhiteListEditorView.trigger('removeException', $(event.target).data()); + + // avoid default click behavior of link by returning false. + return false; + }, + generateExceptionCertificates: function(){ this.collection.sync( {success: this.showSuccess(this), error: this.showError(this)}, @@ -45,25 +56,29 @@ ); }, + showMessage: function(message, messageClass){ + $(this.message_div).text(message). + removeClass('msg-error msg-success').addClass(messageClass).focus(); + $('html, body').animate({ + scrollTop: $(this.message_div).offset().top - 20 + }, 1000); + }, + showSuccess: function(caller_object){ return function(xhr){ - var response = xhr; - $(".message").text(response.message).removeClass('msg-error').addClass('msg-success').focus(); - caller_object.collection.update(JSON.parse(response.data)); - $('html, body').animate({ - scrollTop: $("#certificate-exception").offset().top - 10 - }, 1000); + caller_object.showMessage(xhr.message, 'msg-success'); }; }, showError: function(caller_object){ return function(xhr){ - var response = JSON.parse(xhr.responseText); - $(".message").text(response.message).removeClass('msg-success').addClass("msg-error").focus(); - caller_object.collection.update(JSON.parse(response.data)); - $('html, body').animate({ - scrollTop: $("#certificate-exception").offset().top - 10 - }, 1000); + try{ + var response = JSON.parse(xhr.responseText); + caller_object.showMessage(response.message, 'msg-error'); + } + catch(exception){ + caller_object.showMessage("Server Error, Please try again later.", 'msg-error'); + } }; } }); diff --git a/lms/static/js/certificates/views/certificate_whitelist_editor.js b/lms/static/js/certificates/views/certificate_whitelist_editor.js index d7b3b598b83f..074a5861a059 100644 --- a/lms/static/js/certificates/views/certificate_whitelist_editor.js +++ b/lms/static/js/certificates/views/certificate_whitelist_editor.js @@ -19,6 +19,11 @@ 'click #add-exception': 'addException' }, + initialize: function(){ + this.on('removeException', this.removeException); + }, + + render: function(){ var template = this.loadTemplate('certificate-white-list-editor'); this.$el.html(template()); @@ -45,23 +50,58 @@ } var certificate_exception = new CertificateExceptionModel({ + url: this.collection.url, user_name: user_name, user_email: user_email, - notes: notes + notes: notes, + new: true }); if(this.collection.findWhere(model)){ this.showMessage("username/email already in exception list", 'msg-error'); } else if(certificate_exception.isValid()){ - this.collection.add(certificate_exception, {validate: true}); - this.showMessage("Student Added to exception list", 'msg-success'); + certificate_exception.save( + null, + { + success: this.showSuccess( + this, + true, + 'Students added to Certificate white list successfully' + ), + error: this.showError(this) + } + ); + } else{ this.showMessage(certificate_exception.validationError, 'msg-error'); } }, + removeException: function(certificate){ + var model = this.collection.findWhere(certificate); + if(model){ + model.destroy( + { + success: this.showSuccess( + this, + false, + 'Student Removed from certificate white list successfully.' + ), + error: this.showError(this), + wait: true, + //emulateJSON: true, + data: JSON.stringify(model.attributes) + } + ); + this.showMessage('Exception is being removed from server.', 'msg-success'); + } + else{ + this.showMessage('Could not find Certificate Exception in white list.', 'msg-error'); + } + }, + isEmailAddress: function validateEmail(email) { var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; return re.test(email); @@ -73,6 +113,27 @@ $('html, body').animate({ scrollTop: this.$el.offset().top - 20 }, 1000); + }, + + showSuccess: function(caller, add_model, message){ + return function(model){ + if(add_model){ + caller.collection.add(model); + } + caller.showMessage(message, 'msg-success'); + }; + }, + + showError: function(caller){ + return function(model, response){ + try{ + var response_data = JSON.parse(response.responseText); + caller.showMessage(response_data.message, 'msg-error'); + } + catch(exception){ + caller.showMessage("Server Error, Please try again later.", 'msg-error'); + } + }; } }); } diff --git a/lms/static/js/spec/instructor_dashboard/certificates_exception_spec.js b/lms/static/js/spec/instructor_dashboard/certificates_exception_spec.js index 39597395f47d..eb60f56c6c13 100644 --- a/lms/static/js/spec/instructor_dashboard/certificates_exception_spec.js +++ b/lms/static/js/spec/instructor_dashboard/certificates_exception_spec.js @@ -54,8 +54,8 @@ define([ certificate_exception_url = 'test/url/'; var certificates_exceptions_json = [ { - id: "1", - user_id: "1", + id: 1, + user_id: 1, user_name: "test1", user_email: "test1@test.com", course_id: "edX/test/course", @@ -63,8 +63,8 @@ define([ notes: "test notes for test certificate exception" }, { - id: "2", - user_id : "2", + id: 2, + user_id : 2, user_name: "test2", user_email : "test2@test.com", course_id: "edX/test/course", @@ -77,7 +77,8 @@ define([ certificate_white_list = new CertificateWhiteListCollection(certificates_exceptions_json, { parse: true, canBeEmpty: true, - url: certificate_exception_url + url: certificate_exception_url, + generate_certificates_url: certificate_exception_url }); }); @@ -94,7 +95,7 @@ define([ expect(certificate_white_list.getModel({user_name: 'test1'}).attributes).toEqual( { - id: '1', user_id: '1', user_name: 'test1', user_email: 'test1@test.com', + id: 1, user_id: 1, user_name: 'test1', user_email: 'test1@test.com', course_id: 'edX/test/course', created: "Thursday, October 29, 2015", notes: 'test notes for test certificate exception' } @@ -102,7 +103,7 @@ define([ expect(certificate_white_list.getModel({user_email: 'test2@test.com'}).attributes).toEqual( { - id: '2', user_id: '2', user_name: 'test2', user_email: 'test2@test.com', + id: 2, user_id: 2, user_name: 'test2', user_email: 'test2@test.com', course_id: 'edX/test/course', created: "Thursday, October 29, 2015", notes: 'test notes for test certificate exception' } @@ -129,7 +130,7 @@ define([ requests = AjaxHelpers.requests(this), add_students = 'new'; - certificate_white_list.add({user_name: 'test3', notes: 'test3 notes'}); + certificate_white_list.add({user_name: 'test3', notes: 'test3 notes', new: true}); certificate_white_list.sync({success: successCallback, error: errorCallback}, add_students); var expected = { @@ -139,7 +140,8 @@ define([ user_name: "test3", user_email: "", created: "", - notes: "test3 notes"} + notes: "test3 notes", + new: true} ] }; AjaxHelpers.expectJsonRequest(requests, 'POST', expected.url, expected.postData); @@ -152,8 +154,8 @@ define([ var certificates_exceptions_json = [ { - id: "1", - user_id: "1", + id: 1, + user_id: 1, user_name: "test1", user_email: "test1@test.com", course_id: "edX/test/course", @@ -161,8 +163,8 @@ define([ notes: "test notes for test certificate exception" }, { - id: "2", - user_id : "2", + id: 2, + user_id : 2, user_name: "test2", user_email : "test2@test.com", course_id: "edX/test/course", @@ -181,7 +183,9 @@ define([ var certificate_white_list = new CertificateWhiteListCollection(certificates_exceptions_json, { parse: true, canBeEmpty: true, - url: certificate_exception_url + url: certificate_exception_url, + generate_certificates_url: certificate_exception_url + }); view = new CertificateWhiteListView({collection: certificate_white_list}); @@ -252,20 +256,24 @@ define([ describe("edx.certificates.views.certificate_whitelist_editor.CertificateWhiteListEditorView", function() { var view = null, + list_view= null, certificate_exception_url = 'test/url/'; var certificates_exceptions_json = [ { - id: "1", - user_id: "1", + url: certificate_exception_url, + id: 1, + user_id: 1, user_name: "test1", user_email: "test1@test.com", course_id: "edX/test/course", created: "Thursday, October 29, 2015", - notes: "test notes for test certificate exception" + notes: "test notes for test certificate exception", + new: true }, { - id: "2", - user_id : "2", + url: certificate_exception_url, + id: 2, + user_id : 2, user_name: "test2", user_email : "test2@test.com", course_id: "edX/test/course", @@ -281,19 +289,35 @@ define([ "templates/instructor/instructor_dashboard_2/certificate-white-list-editor.underscore" ); + var fixture_2 = readFixtures( + "templates/instructor/instructor_dashboard_2/certificate-white-list.underscore" + ); + setFixtures( "" + - "
    " + "" + + "
    " + + "
    " ); var certificate_white_list = new CertificateWhiteListCollection(certificates_exceptions_json, { parse: true, canBeEmpty: true, - url: certificate_exception_url + url: certificate_exception_url, + generate_certificates_url: certificate_exception_url }); - view = new CertificateWhiteListEditorView({collection: certificate_white_list}); + view = new CertificateWhiteListEditorView({ + collection: certificate_white_list, + url: certificate_exception_url + }); view.render(); + + list_view = new CertificateWhiteListView({ + collection: certificate_white_list, + certificateWhiteListEditorView: view + }); + list_view.render(); }); it("verifies view is initialized and rendered successfully", function() { @@ -307,7 +331,8 @@ define([ var message_selector='.message', error_class = 'msg-error', success_class = 'msg-success', - success_message = 'Student Added to exception list'; + success_message = 'Students added to Certificate white list successfully', + requests = AjaxHelpers.requests(this); var error_messages = { empty_user_name_email: 'Student username/email is required.', @@ -315,6 +340,7 @@ define([ }; // click 'Add Exception' button with empty username/email field + view.$el.find('#certificate-exception').val(""); view.$el.find('#add-exception').click(); // Verify error message for missing username/email @@ -326,6 +352,19 @@ define([ view.$el.find('#notes').val("test user notes"); view.$el.find('#add-exception').click(); + AjaxHelpers.respondWithJson( + requests, + { + id: 3, + user_id : 3, + user_name: "test_user", + user_email : "test2@test.com", + course_id: "edX/test/course", + created: "Thursday, October 29, 2015", + notes: "test user notes" + } + ); + // Verify success message expect(view.$el.find(message_selector)).toHaveClass(success_class); expect(view.$el.find(message_selector).html()).toMatch(success_message); @@ -339,6 +378,22 @@ define([ expect(view.$el.find(message_selector)).toHaveClass(error_class); expect(view.$el.find(message_selector).html()).toMatch(error_messages.duplicate_user); }); + + it('verifies certificate exception can be deleted by clicking "delete" ', function(){ + var user_name = 'test1', + certificate_exception_selector = "div.white-listed-students table tr:contains('" + user_name + "')", + delete_btn_selector = + certificate_exception_selector + " td .delete-exception", + requests = AjaxHelpers.requests(this); + + $(delete_btn_selector).click(); + AjaxHelpers.respondWithJson(requests, {}); + + // Verify the certificate exception is removed from the list + expect($(certificate_exception_selector).length).toBe(0); + + }); + }); } ); diff --git a/lms/static/sass/course/instructor/_instructor_2.scss b/lms/static/sass/course/instructor/_instructor_2.scss index 744696f8c48b..2966bf02dcf1 100644 --- a/lms/static/sass/course/instructor/_instructor_2.scss +++ b/lms/static/sass/course/instructor/_instructor_2.scss @@ -2169,9 +2169,22 @@ input[name="subject"] { text-align: left; color: $gray; - &.date-column{ + &.date, &.email{ width: 230px; } + + &.user-id{ + width: 60px; + } + + &.user-name{ + width: 150px; + } + + &.action{ + width: 150px; + } + } td { diff --git a/lms/templates/instructor/instructor_dashboard_2/certificate-white-list.underscore b/lms/templates/instructor/instructor_dashboard_2/certificate-white-list.underscore index 4cd6cdaa20e4..c6f0108041a4 100644 --- a/lms/templates/instructor/instructor_dashboard_2/certificate-white-list.underscore +++ b/lms/templates/instructor/instructor_dashboard_2/certificate-white-list.underscore @@ -1,13 +1,26 @@ + +
    + +
    + +
    <% if (certificates.length === 0) { %>

    <%- gettext("No results") %>

    <% } else { %> - - - - - + + + + + + <% for (var i = 0; i < certificates.length; i++) { @@ -19,21 +32,9 @@ + <% } %>
    <%- gettext("Name") %><%- gettext("User ID") %><%- gettext("User Email") %><%- gettext("Date Exception Granted") %><%- gettext("Notes") %><%- gettext("Name") %><%- gettext("User ID") %><%- gettext("User Email") %><%- gettext("Date Exception Granted") %><%- gettext("Notes") %><%- gettext("Action") %>
    <%- cert.get("user_email") %> <%- cert.get("created") %> <%- cert.get("notes") %>
    <% } %> - -
    - -
    - -
    - diff --git a/lms/templates/instructor/instructor_dashboard_2/certificates.html b/lms/templates/instructor/instructor_dashboard_2/certificates.html index bc3060f06089..68ac9ad3c5e8 100644 --- a/lms/templates/instructor/instructor_dashboard_2/certificates.html +++ b/lms/templates/instructor/instructor_dashboard_2/certificates.html @@ -5,7 +5,7 @@ %> <%static:require_module module_name="js/certificates/factories/certificate_whitelist_factory" class_name="CertificateWhitelistFactory"> - CertificateWhitelistFactory('${json.dumps(certificate_white_list)}', "${certificate_exception_url}"); + CertificateWhitelistFactory('${json.dumps(certificate_white_list)}', "${generate_certificate_exceptions_url}", "${certificate_exception_view_url}"); <%page args="section_data"/> @@ -123,11 +123,8 @@

    ${_("Certificate Exceptions")}

    ${_("Use this to generate certificates for users who did not pass the course but have been given an exception by the Course Team to earn a certificate.")}


    -
    -

    -
    From 6ea7c236310a84713c4615d83e89ffefaa18aa1d Mon Sep 17 00:00:00 2001 From: wajeeha-khalid Date: Wed, 25 Nov 2015 17:35:21 +0500 Subject: [PATCH 80/87] MA-1593; include post in comment count --- lms/djangoapps/discussion_api/serializers.py | 16 +++++++++++++-- .../discussion_api/tests/test_api.py | 20 +++++++++---------- .../discussion_api/tests/test_serializers.py | 4 ++-- .../discussion_api/tests/test_views.py | 15 ++++++++------ 4 files changed, 35 insertions(+), 20 deletions(-) diff --git a/lms/djangoapps/discussion_api/serializers.py b/lms/djangoapps/discussion_api/serializers.py index 7a53d1a713b3..ac71e89c8a9f 100644 --- a/lms/djangoapps/discussion_api/serializers.py +++ b/lms/djangoapps/discussion_api/serializers.py @@ -190,8 +190,8 @@ class ThreadSerializer(_ContentSerializer): pinned = serializers.SerializerMethodField(read_only=True) closed = serializers.BooleanField(read_only=True) following = serializers.SerializerMethodField() - comment_count = serializers.IntegerField(source="comments_count", read_only=True) - unread_comment_count = serializers.IntegerField(source="unread_comments_count", read_only=True) + comment_count = serializers.SerializerMethodField(read_only=True) + unread_comment_count = serializers.SerializerMethodField(read_only=True) comment_list_url = serializers.SerializerMethodField() endorsed_comment_list_url = serializers.SerializerMethodField() non_endorsed_comment_list_url = serializers.SerializerMethodField() @@ -252,6 +252,18 @@ def get_non_endorsed_comment_list_url(self, obj): """Returns the URL to retrieve the thread's non-endorsed comments.""" return self.get_comment_list_url(obj, endorsed=False) + def get_comment_count(self, obj): + """Increments comment count to include post and returns total count of + contributions (i.e. post + responses + comments) for the thread""" + return obj["comments_count"] + 1 + + def get_unread_comment_count(self, obj): + """Increments comment count to include post if thread is unread and returns + total count of unread contributions (i.e. post + responses + comments) for the thread""" + if not obj["read"]: + return obj["unread_comments_count"] + 1 + return obj["unread_comments_count"] + def create(self, validated_data): thread = Thread(user_id=self.context["cc_requester"]["id"], **validated_data) thread.save() diff --git a/lms/djangoapps/discussion_api/tests/test_api.py b/lms/djangoapps/discussion_api/tests/test_api.py index c07e5abfac66..62e6c4306ad6 100644 --- a/lms/djangoapps/discussion_api/tests/test_api.py +++ b/lms/djangoapps/discussion_api/tests/test_api.py @@ -644,7 +644,7 @@ def test_thread_content(self): "abuse_flagged": False, "voted": False, "vote_count": 4, - "comment_count": 5, + "comment_count": 6, "unread_comment_count": 3, "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_thread_id_0", "endorsed_comment_list_url": None, @@ -673,8 +673,8 @@ def test_thread_content(self): "abuse_flagged": False, "voted": False, "vote_count": 9, - "comment_count": 18, - "unread_comment_count": 0, + "comment_count": 19, + "unread_comment_count": 1, "comment_list_url": None, "endorsed_comment_list_url": ( "http://testserver/api/discussion/v1/comments/?thread_id=test_thread_id_1&endorsed=True" @@ -1397,8 +1397,8 @@ def test_basic(self, mock_emit): "abuse_flagged": False, "voted": False, "vote_count": 0, - "comment_count": 0, - "unread_comment_count": 0, + "comment_count": 1, + "unread_comment_count": 1, "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_id", "endorsed_comment_list_url": None, "non_endorsed_comment_list_url": None, @@ -1943,7 +1943,7 @@ def test_basic(self): "abuse_flagged": False, "voted": False, "vote_count": 0, - "comment_count": 0, + "comment_count": 1, "unread_comment_count": 0, "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_thread", "endorsed_comment_list_url": None, @@ -2999,8 +2999,8 @@ def test_basic(self): "pinned": False, "closed": False, "following": False, - "comment_count": 0, - "unread_comment_count": 0, + "comment_count": 1, + "unread_comment_count": 1, "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_thread", "endorsed_comment_list_url": None, "non_endorsed_comment_list_url": None, @@ -3039,8 +3039,8 @@ def test_nonauthor_enrolled_in_course(self): "pinned": False, "closed": False, "following": False, - "comment_count": 0, - "unread_comment_count": 0, + "comment_count": 1, + "unread_comment_count": 1, "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_thread", "endorsed_comment_list_url": None, "non_endorsed_comment_list_url": None, diff --git a/lms/djangoapps/discussion_api/tests/test_serializers.py b/lms/djangoapps/discussion_api/tests/test_serializers.py index ae2c53e7b47b..2ffe52317da5 100644 --- a/lms/djangoapps/discussion_api/tests/test_serializers.py +++ b/lms/djangoapps/discussion_api/tests/test_serializers.py @@ -203,8 +203,8 @@ def test_basic(self): "abuse_flagged": False, "voted": False, "vote_count": 4, - "comment_count": 5, - "unread_comment_count": 3, + "comment_count": 6, + "unread_comment_count": 4, "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_thread", "endorsed_comment_list_url": None, "non_endorsed_comment_list_url": None, diff --git a/lms/djangoapps/discussion_api/tests/test_views.py b/lms/djangoapps/discussion_api/tests/test_views.py index 536d86ad2cbc..fdd330960128 100644 --- a/lms/djangoapps/discussion_api/tests/test_views.py +++ b/lms/djangoapps/discussion_api/tests/test_views.py @@ -296,8 +296,8 @@ def test_basic(self): "abuse_flagged": False, "voted": True, "vote_count": 4, - "comment_count": 5, - "unread_comment_count": 3, + "comment_count": 6, + "unread_comment_count": 4, "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_thread", "endorsed_comment_list_url": None, "non_endorsed_comment_list_url": None, @@ -519,8 +519,8 @@ def test_basic(self): "abuse_flagged": False, "voted": False, "vote_count": 0, - "comment_count": 0, - "unread_comment_count": 0, + "comment_count": 1, + "unread_comment_count": 1, "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_thread", "endorsed_comment_list_url": None, "non_endorsed_comment_list_url": None, @@ -634,6 +634,7 @@ def test_basic(self): ], "created_at": "Test Created Date", "updated_at": "Test Updated Date", + "comment_count": 1, }) ) self.assertEqual( @@ -684,6 +685,8 @@ def test_closed_thread(self, field, value): "closed": True, "abuse_flagged": value, "editable_fields": ["abuse_flagged", "read"], + "comment_count": 1, + "unread_comment_count": 1, }) ) @@ -1154,8 +1157,8 @@ def test_basic(self): "pinned": False, "closed": False, "following": False, - "comment_count": 0, - "unread_comment_count": 0, + "comment_count": 1, + "unread_comment_count": 1, "comment_list_url": "http://testserver/api/discussion/v1/comments/?thread_id=test_thread", "endorsed_comment_list_url": None, "non_endorsed_comment_list_url": None, From aa529fe0b65d4432d539a979eb3f44a39f0a36a0 Mon Sep 17 00:00:00 2001 From: Zia Fazal Date: Wed, 25 Nov 2015 14:38:38 +0500 Subject: [PATCH 81/87] remove audit course mode removed print statement --- cms/djangoapps/contentstore/views/certificates.py | 8 +++++--- .../contentstore/views/tests/test_certificates.py | 14 ++++++++++++++ .../spec/views/certificate_preview_spec.js | 7 +------ .../js/certificates/views/certificate_preview.js | 2 -- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/cms/djangoapps/contentstore/views/certificates.py b/cms/djangoapps/contentstore/views/certificates.py index 2b409ddb298f..dd656fa28db1 100644 --- a/cms/djangoapps/contentstore/views/certificates.py +++ b/cms/djangoapps/contentstore/views/certificates.py @@ -354,9 +354,11 @@ def certificates_list_handler(request, course_key_string): handler_name='certificates.certificate_activation_handler', course_key=course_key ) - course_modes = [mode.slug for mode in CourseMode.modes_for_course( - course_id=course.id, include_expired=True - )] + course_modes = [ + mode.slug for mode in CourseMode.modes_for_course( + course_id=course.id, include_expired=True + ) if mode.slug != 'audit' + ] certificate_web_view_url = get_lms_link_for_certificate_web_view( user_id=request.user.id, course_key=course_key, diff --git a/cms/djangoapps/contentstore/views/tests/test_certificates.py b/cms/djangoapps/contentstore/views/tests/test_certificates.py index 404e9a979c20..a62097bdf5bf 100644 --- a/cms/djangoapps/contentstore/views/tests/test_certificates.py +++ b/cms/djangoapps/contentstore/views/tests/test_certificates.py @@ -22,6 +22,7 @@ from student.models import CourseEnrollment from student.roles import CourseInstructorRole, CourseStaffRole from student.tests.factories import UserFactory +from course_modes.tests.factories import CourseModeFactory from contentstore.views.certificates import CertificateManager from django.test.utils import override_settings from contentstore.utils import get_lms_link_for_certificate_web_view @@ -326,6 +327,19 @@ def test_not_permitted(self): self.assertEqual(response.status_code, 403) self.assertIn("error", response.content) + def test_audit_course_mode_is_skipped(self): + """ + Tests audit course mode is skipped when rendering certificates page. + """ + CourseModeFactory.create(course_id=self.course.id) + CourseModeFactory.create(course_id=self.course.id, mode_slug='verified') + response = self.client.get_html( + self._url(), + ) + self.assertEqual(response.status_code, 200) + self.assertContains(response, 'verified') + self.assertNotContains(response, 'audit') + def test_assign_unique_identifier_to_certificates(self): """ Test certificates have unique ids diff --git a/cms/static/js/certificates/spec/views/certificate_preview_spec.js b/cms/static/js/certificates/spec/views/certificate_preview_spec.js index 49bb93be1751..e8bcd6ba8dff 100644 --- a/cms/static/js/certificates/spec/views/certificate_preview_spec.js +++ b/cms/static/js/certificates/spec/views/certificate_preview_spec.js @@ -49,7 +49,7 @@ function(_, $, Course, CertificatePreview, TemplateHelpers, ViewHelpers, AjaxHel appendSetFixtures(''); this.view = new CertificatePreview({ el: $('.preview-certificate'), - course_modes: ['test1', 'test2', 'test3', 'audit'], + course_modes: ['test1', 'test2', 'test3'], certificate_web_view_url: '/users/1/courses/orgX/009/2016?preview=test1', certificate_activation_handler_url: '/certificates/activation/'+ window.course.id, is_active: true @@ -58,11 +58,6 @@ function(_, $, Course, CertificatePreview, TemplateHelpers, ViewHelpers, AjaxHel }); describe('Certificate preview', function() { - - it('course mode "audit" should not be render in preview list', function () { - expect(this.view.course_modes.indexOf('audit') < 0).toBe(true); - }); - it('course mode event should call when user choose a new mode', function () { spyOn(this.view, 'courseModeChanged'); this.view.delegateEvents(); diff --git a/cms/static/js/certificates/views/certificate_preview.js b/cms/static/js/certificates/views/certificate_preview.js index a895e161926f..a86ef200ef95 100644 --- a/cms/static/js/certificates/views/certificate_preview.js +++ b/cms/static/js/certificates/views/certificate_preview.js @@ -27,8 +27,6 @@ function(_, gettext, BaseView, ViewUtils, NotificationView) { }, render: function () { - // removing the course mode 'audit' from the preview list. - this.course_modes = _.without(this.course_modes, 'audit'); this.$el.html(this.template({ course_modes: this.course_modes, certificate_web_view_url: this.certificate_web_view_url, From c5be59d8c7d68d3f6b65f4085a088b9018107876 Mon Sep 17 00:00:00 2001 From: Jesse Zoldak Date: Wed, 25 Nov 2015 10:45:20 -0500 Subject: [PATCH 82/87] Disable the pip version check message for uninstalls --- pavelib/prereqs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pavelib/prereqs.py b/pavelib/prereqs.py index eb04404e3136..0646ca307616 100644 --- a/pavelib/prereqs.py +++ b/pavelib/prereqs.py @@ -199,17 +199,17 @@ def uninstall_python_packages(): # Uninstall South if any(line.startswith("South") for line in frozen): - sh("pip uninstall -y South") + sh("pip uninstall --disable-pip-version-check -y South") uninstalled = True # Uninstall edx-val if any("edxval" in line for line in frozen): - sh("pip uninstall -y edxval") + sh("pip uninstall --disable-pip-version-check -y edxval") uninstalled = True # Uninstall django-storages if any("django-storages==" in line for line in frozen): - sh("pip uninstall -y django-storages") + sh("pip uninstall --disable-pip-version-check -y django-storages") uninstalled = True if not uninstalled: From 330120bb7ad4ca4df5068f434fab9645525b81da Mon Sep 17 00:00:00 2001 From: Nimisha Asthagiri Date: Tue, 24 Nov 2015 09:20:13 -0500 Subject: [PATCH 83/87] MA-1712: Update Mobile API to include course_about --- lms/djangoapps/mobile_api/testutils.py | 10 +- .../mobile_api/users/serializers.py | 113 ++++++++++-------- lms/djangoapps/mobile_api/users/tests.py | 33 +++-- lms/djangoapps/mobile_api/users/views.py | 13 +- 4 files changed, 103 insertions(+), 66 deletions(-) diff --git a/lms/djangoapps/mobile_api/testutils.py b/lms/djangoapps/mobile_api/testutils.py index a57375eae86e..a1cce2f9d430 100644 --- a/lms/djangoapps/mobile_api/testutils.py +++ b/lms/djangoapps/mobile_api/testutils.py @@ -139,14 +139,17 @@ class MobileCourseAccessTestMixin(MobileAPIMilestonesMixin): Subclasses can override verify_success, verify_failure, and init_course_access methods. """ ALLOW_ACCESS_TO_UNRELEASED_COURSE = False # pylint: disable=invalid-name + ALLOW_ACCESS_TO_NON_VISIBLE_COURSE = False # pylint: disable=invalid-name def verify_success(self, response): """Base implementation of verifying a successful response.""" self.assertEqual(response.status_code, 200) - def verify_failure(self, response): + def verify_failure(self, response, error_type=None): """Base implementation of verifying a failed response.""" self.assertEqual(response.status_code, 404) + if error_type: + self.assertEqual(response.data, error_type.to_json()) def init_course_access(self, course_id=None): """Base implementation of initializing the user for each test.""" @@ -201,6 +204,8 @@ def test_visible_to_staff_only_course(self, role, should_succeed): self.init_course_access() self.course.visible_to_staff_only = True self.store.update_item(self.course, self.user.id) + if self.ALLOW_ACCESS_TO_NON_VISIBLE_COURSE: + should_succeed = True self._verify_response(should_succeed, VisibilityError(), role) def _verify_response(self, should_succeed, error_type, role=None): @@ -216,5 +221,4 @@ def _verify_response(self, should_succeed, error_type, role=None): if should_succeed: self.verify_success(response) else: - self.verify_failure(response) - self.assertEqual(response.data, error_type.to_json()) + self.verify_failure(response, error_type) diff --git a/lms/djangoapps/mobile_api/users/serializers.py b/lms/djangoapps/mobile_api/users/serializers.py index e40df4de9ca9..31de1c10b7f5 100644 --- a/lms/djangoapps/mobile_api/users/serializers.py +++ b/lms/djangoapps/mobile_api/users/serializers.py @@ -13,70 +13,83 @@ class CourseOverviewField(serializers.RelatedField): - """Custom field to wrap a CourseDescriptor object. Read-only.""" + """ + Custom field to wrap a CourseOverview object. Read-only. + """ def to_representation(self, course_overview): course_id = unicode(course_overview.id) - request = self.context.get('request', None) - if request: - video_outline_url = reverse( - 'video-summary-list', + + if course_overview.advertised_start is not None: + start_type = 'string' + start_display = course_overview.advertised_start + elif course_overview.start != DEFAULT_START_DATE: + start_type = 'timestamp' + start_display = defaultfilters.date(course_overview.start, 'DATE_FORMAT') + else: + start_type = 'empty' + start_display = None + + request = self.context.get('request') + return { + # identifiers + 'id': course_id, + 'name': course_overview.display_name, + 'number': course_overview.display_number_with_default, + 'org': course_overview.display_org_with_default, + + # dates + 'start': course_overview.start, + 'start_display': start_display, + 'start_type': start_type, + 'end': course_overview.end, + + # notification info + 'subscription_id': course_overview.clean_id(padding_char='_'), + + # access info + 'courseware_access': has_access( + request.user, + 'load_mobile', + course_overview + ).to_json(), + + # various URLs + 'course_image': course_overview.course_image_url, + 'course_about': reverse( + 'about_course', kwargs={'course_id': course_id}, - request=request - ) - course_updates_url = reverse( + request=request, + ), + 'course_updates': reverse( 'course-updates-list', kwargs={'course_id': course_id}, - request=request - ) - course_handouts_url = reverse( + request=request, + ), + 'course_handouts': reverse( 'course-handouts-list', kwargs={'course_id': course_id}, - request=request - ) - discussion_url = reverse( + request=request, + ), + 'discussion_url': reverse( 'discussion_course', kwargs={'course_id': course_id}, - request=request - ) if course_overview.is_discussion_tab_enabled() else None - else: - video_outline_url = None - course_updates_url = None - course_handouts_url = None - discussion_url = None + request=request, + ) if course_overview.is_discussion_tab_enabled() else None, - if course_overview.advertised_start is not None: - start_type = "string" - start_display = course_overview.advertised_start - elif course_overview.start != DEFAULT_START_DATE: - start_type = "timestamp" - start_display = defaultfilters.date(course_overview.start, "DATE_FORMAT") - else: - start_type = "empty" - start_display = None + 'video_outline': reverse( + 'video-summary-list', + kwargs={'course_id': course_id}, + request=request, + ), - return { - "id": course_id, - "name": course_overview.display_name, - "number": course_overview.display_number_with_default, - "org": course_overview.display_org_with_default, - "start": course_overview.start, - "start_display": start_display, - "start_type": start_type, - "end": course_overview.end, - "course_image": course_overview.course_image_url, - "social_urls": { - "facebook": course_overview.facebook_url, + # Note: The following 2 should be deprecated. + 'social_urls': { + 'facebook': course_overview.facebook_url, }, - "latest_updates": { - "video": None + 'latest_updates': { + 'video': None }, - "video_outline": video_outline_url, - "course_updates": course_updates_url, - "course_handouts": course_handouts_url, - "discussion_url": discussion_url, - "subscription_id": course_overview.clean_id(padding_char='_'), - "courseware_access": has_access(request.user, 'load_mobile', course_overview).to_json() if request else None } diff --git a/lms/djangoapps/mobile_api/users/tests.py b/lms/djangoapps/mobile_api/users/tests.py index 98100b159042..84b333d74d47 100644 --- a/lms/djangoapps/mobile_api/users/tests.py +++ b/lms/djangoapps/mobile_api/users/tests.py @@ -9,6 +9,7 @@ from django.conf import settings from django.utils import timezone from django.template import defaultfilters +from django.test import RequestFactory from certificates.models import CertificateStatuses from certificates.tests.factories import GeneratedCertificateFactory @@ -24,11 +25,11 @@ ) from xmodule.course_module import DEFAULT_START_DATE from xmodule.modulestore.tests.factories import ItemFactory, CourseFactory +from util.testing import UrlResetMixin from .. import errors from ..testutils import MobileAPITestCase, MobileAuthTestMixin, MobileAuthUserTestMixin, MobileCourseAccessTestMixin from .serializers import CourseEnrollmentSerializer -from util.testing import UrlResetMixin class TestUserDetailApi(MobileAPITestCase, MobileAuthUserTestMixin): @@ -61,13 +62,14 @@ def test_success(self): @ddt.ddt -class TestUserEnrollmentApi(UrlResetMixin, MobileAPITestCase, MobileAuthUserTestMixin): +class TestUserEnrollmentApi(UrlResetMixin, MobileAPITestCase, MobileAuthUserTestMixin, MobileCourseAccessTestMixin): """ Tests for /api/mobile/v0.5/users//course_enrollments/ """ REVERSE_INFO = {'name': 'courseenrollment-detail', 'params': ['username']} ALLOW_ACCESS_TO_UNRELEASED_COURSE = True ALLOW_ACCESS_TO_MILESTONE_COURSE = True + ALLOW_ACCESS_TO_NON_VISIBLE_COURSE = True NEXT_WEEK = datetime.datetime.now(pytz.UTC) + datetime.timedelta(days=7) LAST_WEEK = datetime.datetime.now(pytz.UTC) - datetime.timedelta(days=7) ADVERTISED_START = "Spring 2016" @@ -85,13 +87,15 @@ def verify_success(self, response): self.assertEqual(len(courses), 1) found_course = courses[0]['course'] - self.assertTrue('video_outline' in found_course) - self.assertTrue('course_handouts' in found_course) + self.assertIn('courses/{}/about'.format(self.course.id), found_course['course_about']) + self.assertIn('course_info/{}/updates'.format(self.course.id), found_course['course_updates']) + self.assertIn('course_info/{}/handouts'.format(self.course.id), found_course['course_handouts']) + self.assertIn('video_outlines/courses/{}'.format(self.course.id), found_course['video_outline']) self.assertEqual(found_course['id'], unicode(self.course.id)) self.assertEqual(courses[0]['mode'], 'honor') self.assertEqual(courses[0]['course']['subscription_id'], self.course.clean_id(padding_char='_')) - def verify_failure(self, response): + def verify_failure(self, response, error_type=None): self.assertEqual(response.status_code, 200) courses = response.data self.assertEqual(len(courses), 0) @@ -380,22 +384,29 @@ class TestCourseEnrollmentSerializer(MobileAPITestCase): """ Test the course enrollment serializer """ - def test_success(self): + def setUp(self): + super(TestCourseEnrollmentSerializer, self).setUp() self.login_and_enroll() + self.request = RequestFactory().get('/') + self.request.user = self.user - serialized = CourseEnrollmentSerializer(CourseEnrollment.enrollments_for_user(self.user)[0]).data - self.assertEqual(serialized['course']['video_outline'], None) + def test_success(self): + serialized = CourseEnrollmentSerializer( + CourseEnrollment.enrollments_for_user(self.user)[0], + context={'request': self.request}, + ).data self.assertEqual(serialized['course']['name'], self.course.display_name) self.assertEqual(serialized['course']['number'], self.course.id.course) self.assertEqual(serialized['course']['org'], self.course.id.org) def test_with_display_overrides(self): - self.login_and_enroll() - self.course.display_coursenumber = "overridden_number" self.course.display_organization = "overridden_org" self.store.update_item(self.course, self.user.id) - serialized = CourseEnrollmentSerializer(CourseEnrollment.enrollments_for_user(self.user)[0]).data + serialized = CourseEnrollmentSerializer( + CourseEnrollment.enrollments_for_user(self.user)[0], + context={'request': self.request}, + ).data self.assertEqual(serialized['course']['number'], self.course.display_coursenumber) self.assertEqual(serialized['course']['org'], self.course.display_organization) diff --git a/lms/djangoapps/mobile_api/users/views.py b/lms/djangoapps/mobile_api/users/views.py index a5f5825427d3..879e36557750 100644 --- a/lms/djangoapps/mobile_api/users/views.py +++ b/lms/djangoapps/mobile_api/users/views.py @@ -225,9 +225,15 @@ class UserCourseEnrollmentsList(generics.ListAPIView): course. * course: A collection of the following data about the course. + * courseware_access: A JSON representation with access information for the course, + including any access errors. + + * course_about: The URL to the course about page. * course_handouts: The URI to get data for course handouts. * course_image: The path to the course image. * course_updates: The URI to get data for course updates. + * discussion_url: The URI to access data for course discussions if + it is enabled, otherwise null. * end: The end date of the course. * id: The unique ID of the course. * latest_updates: Reserved for future use. @@ -235,12 +241,15 @@ class UserCourseEnrollmentsList(generics.ListAPIView): * number: The course number. * org: The organization that created the course. * start: The date and time when the course starts. + * start_display: + If start_type is a string, then the advertised_start date for the course. + If start_type is a timestamp, then a formatted date for the start of the course. + If start_type is empty, then the value is None and it indicates that the course has not yet started. + * start_type: One of either "string", "timestamp", or "empty" * subscription_id: A unique "clean" (alphanumeric with '_') ID of the course. * video_outline: The URI to get the list of all videos that the user can access in the course. - * discussion_url: The URI to access data for course discussions if - it is enabled, otherwise null. * created: The date the course was created. * is_active: Whether the course is currently active. Possible values From c6bfac720f95bc7d23bd5b03fe8d183248ae12fe Mon Sep 17 00:00:00 2001 From: Clinton Blackburn Date: Wed, 25 Nov 2015 14:27:21 -0500 Subject: [PATCH 84/87] Updated credit migration for CreditProvider.provider_id There is no need for a separate migration for the validation. Updated the regex in the initial migration to appease Django. ECOM-2609 --- openedx/core/djangoapps/credit/migrations/0001_initial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openedx/core/djangoapps/credit/migrations/0001_initial.py b/openedx/core/djangoapps/credit/migrations/0001_initial.py index 0ea46d557a6d..927845070b46 100644 --- a/openedx/core/djangoapps/credit/migrations/0001_initial.py +++ b/openedx/core/djangoapps/credit/migrations/0001_initial.py @@ -47,7 +47,7 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), - ('provider_id', models.CharField(help_text='Unique identifier for this credit provider. Only alphanumeric characters and hyphens (-) are allowed. The identifier is case-sensitive.', unique=True, max_length=255, validators=[django.core.validators.RegexValidator(regex=b'^[a-z,A-Z,0-9,\\-]+$', message=b'Only alphanumeric characters and hyphens (-) are allowed', code=b'invalid_provider_id')])), + ('provider_id', models.CharField(help_text='Unique identifier for this credit provider. Only alphanumeric characters and hyphens (-) are allowed. The identifier is case-sensitive.', unique=True, max_length=255, validators=[django.core.validators.RegexValidator(regex=b'[a-z,A-Z,0-9,\\-]+', message=b'Only alphanumeric characters and hyphens (-) are allowed', code=b'invalid_provider_id')])), ('active', models.BooleanField(default=True, help_text='Whether the credit provider is currently enabled.')), ('display_name', models.CharField(help_text='Name of the credit provider displayed to users', max_length=255)), ('enable_integration', models.BooleanField(default=False, help_text='When true, automatically notify the credit provider when a user requests credit. In order for this to work, a shared secret key MUST be configured for the credit provider in secure auth settings.')), From 70d57327eb3f592067cabb2b4655088101266bcd Mon Sep 17 00:00:00 2001 From: Renzo Lucioni Date: Tue, 10 Nov 2015 13:25:35 -0500 Subject: [PATCH 85/87] Add Programs tab to Studio Extends the Programs ConfigurationModel, cleans up Programs-related utilities and corresponding tests, and corrects caching. Uses the Programs API to list programs within Studio. ECOM-2769. --- .../contentstore/tests/test_programs.py | 66 ++++ cms/djangoapps/contentstore/views/course.py | 127 ++++---- cms/envs/aws.py | 5 + cms/envs/bok_choy.env.json | 3 +- cms/envs/common.py | 11 + cms/envs/devstack.py | 3 + cms/envs/test.py | 3 - cms/lib/studio_tabs.py | 64 ---- cms/lib/tests/__init__.py | 0 cms/lib/tests/test_studio_tabs.py | 35 --- cms/static/js/index.js | 8 +- cms/static/sass/views/_dashboard.scss | 6 +- cms/templates/index.html | 69 +++- common/djangoapps/student/tests/tests.py | 27 +- common/djangoapps/student/views.py | 42 ++- common/djangoapps/terrain/stubs/programs.py | 41 +++ common/djangoapps/terrain/stubs/start.py | 2 + common/test/acceptance/fixtures/__init__.py | 3 + common/test/acceptance/fixtures/programs.py | 61 ++++ common/test/acceptance/pages/studio/index.py | 46 +++ .../tests/studio/test_studio_home.py | 86 ++++- common/test/db_fixtures/programs_client.json | 15 + lms/djangoapps/edxnotes/helpers.py | 2 +- lms/urls.py | 2 + openedx/README.rst | 16 +- .../migrations/0003_auto_20151120_1613.py | 34 ++ openedx/core/djangoapps/programs/models.py | 87 +++-- .../core/djangoapps/programs/tests/mixins.py | 210 +++++++++++-- .../djangoapps/programs/tests/test_models.py | 133 ++++---- .../djangoapps/programs/tests/test_utils.py | 131 ++++++++ .../djangoapps/programs/tests/test_views.py | 297 ------------------ openedx/core/djangoapps/programs/utils.py | 122 +++++-- openedx/core/djangoapps/programs/views.py | 100 ------ openedx/core/djangoapps/util/helpers.py | 48 --- .../core/djangoapps/util/tests/__init__.py | 0 .../djangoapps/util/tests/test_helpers.py | 45 --- openedx/core/lib/tests/test_token_utils.py | 64 ++++ openedx/core/lib/token_utils.py | 60 ++++ pavelib/utils/envs.py | 5 + 39 files changed, 1229 insertions(+), 850 deletions(-) create mode 100644 cms/djangoapps/contentstore/tests/test_programs.py delete mode 100644 cms/lib/studio_tabs.py delete mode 100644 cms/lib/tests/__init__.py delete mode 100644 cms/lib/tests/test_studio_tabs.py create mode 100644 common/djangoapps/terrain/stubs/programs.py create mode 100644 common/test/acceptance/fixtures/programs.py create mode 100644 common/test/db_fixtures/programs_client.json create mode 100644 openedx/core/djangoapps/programs/migrations/0003_auto_20151120_1613.py create mode 100644 openedx/core/djangoapps/programs/tests/test_utils.py delete mode 100644 openedx/core/djangoapps/programs/tests/test_views.py delete mode 100644 openedx/core/djangoapps/programs/views.py delete mode 100644 openedx/core/djangoapps/util/helpers.py delete mode 100644 openedx/core/djangoapps/util/tests/__init__.py delete mode 100644 openedx/core/djangoapps/util/tests/test_helpers.py create mode 100644 openedx/core/lib/tests/test_token_utils.py create mode 100644 openedx/core/lib/token_utils.py diff --git a/cms/djangoapps/contentstore/tests/test_programs.py b/cms/djangoapps/contentstore/tests/test_programs.py new file mode 100644 index 000000000000..e2af560a3f08 --- /dev/null +++ b/cms/djangoapps/contentstore/tests/test_programs.py @@ -0,0 +1,66 @@ +"""Tests covering the Programs listing on the Studio home.""" +from django.core.urlresolvers import reverse +import httpretty +from oauth2_provider.tests.factories import ClientFactory +from provider.constants import CONFIDENTIAL + +from openedx.core.djangoapps.programs.models import ProgramsApiConfig +from openedx.core.djangoapps.programs.tests.mixins import ProgramsApiConfigMixin, ProgramsDataMixin +from student.tests.factories import UserFactory +from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase + + +class TestProgramListing(ProgramsApiConfigMixin, ProgramsDataMixin, ModuleStoreTestCase): + """Verify Program listing behavior.""" + def setUp(self): + super(TestProgramListing, self).setUp() + + ClientFactory(name=ProgramsApiConfig.OAUTH2_CLIENT_NAME, client_type=CONFIDENTIAL) + + self.user = UserFactory(is_staff=True) + self.client.login(username=self.user.username, password='test') + + self.studio_home = reverse('home') + + @httpretty.activate + def test_programs_config_disabled(self): + """Verify that the programs tab and creation button aren't rendered when config is disabled.""" + self.create_config(enable_studio_tab=False) + self.mock_programs_api() + + response = self.client.get(self.studio_home) + + self.assertNotIn("You haven't created any programs yet.", response.content) + + for program_name in self.PROGRAM_NAMES: + self.assertNotIn(program_name, response.content) + + @httpretty.activate + def test_programs_requires_staff(self): + """Verify that the programs tab and creation button aren't rendered unless the user has global staff.""" + self.user = UserFactory(is_staff=False) + self.client.login(username=self.user.username, password='test') + + self.create_config() + self.mock_programs_api() + + response = self.client.get(self.studio_home) + self.assertNotIn("You haven't created any programs yet.", response.content) + + @httpretty.activate + def test_programs_displayed(self): + """Verify that the programs tab and creation button can be rendered when config is enabled.""" + self.create_config() + + # When no data is provided, expect creation prompt. + self.mock_programs_api(data={'results': []}) + + response = self.client.get(self.studio_home) + self.assertIn("You haven't created any programs yet.", response.content) + + # When data is provided, expect a program listing. + self.mock_programs_api() + + response = self.client.get(self.studio_home) + for program_name in self.PROGRAM_NAMES: + self.assertIn(program_name, response.content) diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index 473fe058d360..680e4a5945a6 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -2,97 +2,96 @@ Views related to operations on course objects """ import copy -from django.shortcuts import redirect import json -import random import logging -import string -from django.utils.translation import ugettext as _ -import django.utils -from django.contrib.auth.decorators import login_required +import random +import string # pylint: disable=deprecated-module + from django.conf import settings -from django.views.decorators.http import require_http_methods, require_GET +from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse -from django.http import HttpResponseBadRequest, HttpResponseNotFound, HttpResponse, Http404 -from util.json_request import JsonResponse, JsonResponseBadRequest -from util.date_utils import get_default_time_display -from edxmako.shortcuts import render_to_response - -from xmodule.course_module import DEFAULT_START_DATE -from xmodule.error_module import ErrorDescriptor -from xmodule.modulestore.django import modulestore -from xmodule.contentstore.content import StaticContent -from xmodule.tabs import CourseTab, CourseTabList, InvalidTabsException -from openedx.core.lib.course_tabs import CourseTabPluginManager -from openedx.core.djangoapps.credit.api import is_credit_course, get_credit_requirements -from openedx.core.djangoapps.credit.tasks import update_credit_course_requirements -from openedx.core.djangoapps.content.course_structures.api.v0 import api, errors -from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration -from xmodule.modulestore import EdxJSONEncoder -from xmodule.modulestore.exceptions import ItemNotFoundError, DuplicateCourseError +from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseNotFound, Http404 +from django.shortcuts import redirect +import django.utils +from django.utils.translation import ugettext as _ +from django.views.decorators.http import require_http_methods, require_GET +from django.views.decorators.csrf import ensure_csrf_cookie from opaque_keys import InvalidKeyError -from opaque_keys.edx.locations import Location from opaque_keys.edx.keys import CourseKey +from opaque_keys.edx.locations import Location -from django.views.decorators.csrf import ensure_csrf_cookie -from openedx.core.lib.js_utils import escape_json_dumps -from contentstore.course_info_model import get_course_updates, update_course_updates, delete_course_update +from .component import ( + ADVANCED_COMPONENT_TYPES, + SPLIT_TEST_COMPONENT_TYPE, +) +from .item import create_xblock_info +from .library import LIBRARIES_ENABLED +from contentstore import utils from contentstore.course_group_config import ( + COHORT_SCHEME, GroupConfiguration, GroupConfigurationsValidationError, RANDOM_SCHEME, - COHORT_SCHEME ) +from contentstore.course_info_model import get_course_updates, update_course_updates, delete_course_update from contentstore.courseware_index import CoursewareSearchIndexer, SearchIndexingError +from contentstore.push_notification import push_notification_enabled +from contentstore.tasks import rerun_course from contentstore.utils import ( add_instructor, initialize_permissions, get_lms_link_for_item, + remove_all_instructors, reverse_course_url, reverse_library_url, reverse_usage_url, reverse_url, - remove_all_instructors, ) -from models.settings.course_details import CourseDetails, CourseSettingsEncoder -from models.settings.course_grading import CourseGradingModel -from models.settings.course_metadata import CourseMetadata -from util.json_request import expect_json -from util.string_utils import _has_non_ascii_characters -from student.auth import has_studio_write_access, has_studio_read_access -from .component import ( - SPLIT_TEST_COMPONENT_TYPE, - ADVANCED_COMPONENT_TYPES, -) -from contentstore.tasks import rerun_course from contentstore.views.entrance_exam import ( create_entrance_exam, + delete_entrance_exam, update_entrance_exam, - delete_entrance_exam ) - -from .library import LIBRARIES_ENABLED -from .item import create_xblock_info -from contentstore.push_notification import push_notification_enabled +from course_action_state.managers import CourseActionStateItemNotFoundError +from course_action_state.models import CourseRerunState, CourseRerunUIStateManager from course_creators.views import get_course_creator_status, add_user_with_status_unrequested -from contentstore import utils +from edxmako.shortcuts import render_to_response +from microsite_configuration import microsite +from models.settings.course_details import CourseDetails, CourseSettingsEncoder +from models.settings.course_grading import CourseGradingModel +from models.settings.course_metadata import CourseMetadata +from openedx.core.djangoapps.content.course_structures.api.v0 import api, errors +from openedx.core.djangoapps.credit.api import is_credit_course, get_credit_requirements +from openedx.core.djangoapps.credit.tasks import update_credit_course_requirements +from openedx.core.djangoapps.programs.models import ProgramsApiConfig +from openedx.core.djangoapps.programs.utils import get_programs +from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration +from openedx.core.lib.course_tabs import CourseTabPluginManager +from openedx.core.lib.js_utils import escape_json_dumps +from student import auth +from student.auth import has_course_author_access, has_studio_write_access, has_studio_read_access from student.roles import ( CourseInstructorRole, CourseStaffRole, CourseCreatorRole, GlobalStaff, UserBasedRole ) -from student import auth -from course_action_state.models import CourseRerunState, CourseRerunUIStateManager -from course_action_state.managers import CourseActionStateItemNotFoundError -from microsite_configuration import microsite -from xmodule.course_module import CourseFields -from student.auth import has_course_author_access - +from util.date_utils import get_default_time_display +from util.json_request import JsonResponse, JsonResponseBadRequest, expect_json from util.milestones_helpers import ( - set_prerequisite_courses, - is_valid_course_key, + is_entrance_exams_enabled, is_prerequisite_courses_enabled, - is_entrance_exams_enabled + is_valid_course_key, + set_prerequisite_courses, ) +from util.string_utils import _has_non_ascii_characters +from xmodule.contentstore.content import StaticContent +from xmodule.course_module import CourseFields +from xmodule.course_module import DEFAULT_START_DATE +from xmodule.error_module import ErrorDescriptor +from xmodule.modulestore import EdxJSONEncoder +from xmodule.modulestore.django import modulestore +from xmodule.modulestore.exceptions import ItemNotFoundError, DuplicateCourseError +from xmodule.tabs import CourseTab, CourseTabList, InvalidTabsException + log = logging.getLogger(__name__) @@ -219,6 +218,7 @@ def _dismiss_notification(request, course_action_state_id): # pylint: disable=u return JsonResponse({'success': True}) +# pylint: disable=unused-argument @login_required def course_handler(request, course_key_string=None): """ @@ -422,6 +422,13 @@ def course_listing(request): courses, in_process_course_actions = get_courses_accessible_to_user(request) libraries = _accessible_libraries_list(request.user) if LIBRARIES_ENABLED else [] + programs_config = ProgramsApiConfig.current() + raw_programs = get_programs(request.user) if programs_config.is_studio_tab_enabled else [] + + # Sort programs alphabetically by name. + # TODO: Support ordering in the Programs API itself. + programs = sorted(raw_programs, key=lambda p: p['name'].lower()) + def format_in_process_course_view(uca): """ Return a dict of the data which the view requires for each unsucceeded course @@ -470,7 +477,9 @@ def format_library_for_view(library): 'course_creator_status': _get_course_creator_status(request.user), 'rerun_creator_status': GlobalStaff().has_user(request.user), 'allow_unicode_course_id': settings.FEATURES.get('ALLOW_UNICODE_COURSE_ID', False), - 'allow_course_reruns': settings.FEATURES.get('ALLOW_COURSE_RERUNS', True) + 'allow_course_reruns': settings.FEATURES.get('ALLOW_COURSE_RERUNS', True), + 'is_programs_enabled': programs_config.is_studio_tab_enabled and request.user.is_staff, + 'programs': programs, }) @@ -805,6 +814,7 @@ def _rerun_course(request, org, number, run, fields): }) +# pylint: disable=unused-argument @login_required @ensure_csrf_cookie @require_http_methods(["GET"]) @@ -837,6 +847,7 @@ def course_info_handler(request, course_key_string): return HttpResponseBadRequest("Only supports html requests") +# pylint: disable=unused-argument @login_required @ensure_csrf_cookie @require_http_methods(("GET", "POST", "PUT", "DELETE")) diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 80f2718b53f6..3d7093431d41 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -364,3 +364,8 @@ PROCTORING_BACKEND_PROVIDER = AUTH_TOKENS.get("PROCTORING_BACKEND_PROVIDER", PROCTORING_BACKEND_PROVIDER) PROCTORING_SETTINGS = ENV_TOKENS.get("PROCTORING_SETTINGS", PROCTORING_SETTINGS) + +############################ OAUTH2 Provider ################################### + +# OpenID Connect issuer ID. Normally the URL of the authentication endpoint. +OAUTH_OIDC_ISSUER = ENV_TOKENS['OAUTH_OIDC_ISSUER'] diff --git a/cms/envs/bok_choy.env.json b/cms/envs/bok_choy.env.json index 77d00876a249..d9856eec73fd 100644 --- a/cms/envs/bok_choy.env.json +++ b/cms/envs/bok_choy.env.json @@ -103,5 +103,6 @@ "TECH_SUPPORT_EMAIL": "technical@example.com", "THEME_NAME": "", "TIME_ZONE": "America/New_York", - "WIKI_ENABLED": true + "WIKI_ENABLED": true, + "OAUTH_OIDC_ISSUER": "https://www.example.com/oauth2" } diff --git a/cms/envs/common.py b/cms/envs/common.py index 930ab32438c5..47f604f1a1f4 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -806,6 +806,11 @@ # Self-paced course configuration 'openedx.core.djangoapps.self_paced', + # OAuth2 Provider + 'provider', + 'provider.oauth2', + 'oauth2_provider', + # These are apps that aren't strictly needed by Studio, but are imported by # other apps that are. Django 1.8 wants to have imported models supported # by installed apps. @@ -1112,3 +1117,9 @@ 'options': {}, } PROCTORING_SETTINGS = {} + + +############################ OAUTH2 Provider ################################### + +# OpenID Connect issuer ID. Normally the URL of the authentication endpoint. +OAUTH_OIDC_ISSUER = 'https://www.example.com/oauth2' diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index 6634a202ff81..127eb8a3a1f8 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -115,6 +115,9 @@ def should_show_debug_toolbar(_): # Whether to run django-require in debug mode. REQUIRE_DEBUG = DEBUG +########################### OAUTH2 ################################# +OAUTH_OIDC_ISSUER = 'http://127.0.0.1:8000/oauth2' + ############################################################################### # See if the developer has any local overrides. if os.path.isfile(join(dirname(abspath(__file__)), 'private.py')): diff --git a/cms/envs/test.py b/cms/envs/test.py index 186d34bb0c57..45263bebdcfe 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -33,9 +33,6 @@ DEFAULT_FILE_STORAGE, MEDIA_ROOT, MEDIA_URL, - # This is practically unused but needed by the oauth2_provider package, which - # some tests in common/ rely on. - OAUTH_OIDC_ISSUER, ) # mongo connection settings diff --git a/cms/lib/studio_tabs.py b/cms/lib/studio_tabs.py deleted file mode 100644 index d91f6fa9d86a..000000000000 --- a/cms/lib/studio_tabs.py +++ /dev/null @@ -1,64 +0,0 @@ -"""Studio tab plugin manager and API.""" -import abc - -from openedx.core.lib.api.plugins import PluginManager - - -class StudioTabPluginManager(PluginManager): - """Manager for all available Studio tabs. - - Examples of Studio tabs include Courses, Libraries, and Programs. All Studio - tabs should implement `StudioTab`. - """ - NAMESPACE = 'openedx.studio_tab' - - @classmethod - def get_enabled_tabs(cls): - """Returns a list of enabled Studio tabs.""" - tabs = cls.get_available_plugins() - enabled_tabs = [tab for tab in tabs.viewvalues() if tab.is_enabled()] - - return enabled_tabs - - -class StudioTab(object): - """Abstract class used to represent Studio tabs. - - Examples of Studio tabs include Courses, Libraries, and Programs. - """ - __metaclass__ = abc.ABCMeta - - @abc.abstractproperty - def tab_text(self): - """Text to display in a tab used to navigate to a list of instances of this tab. - - Should be internationalized using `ugettext_noop()` since the user won't be available in this context. - """ - pass - - @abc.abstractproperty - def button_text(self): - """Text to display in a button used to create a new instance of this tab. - - Should be internationalized using `ugettext_noop()` since the user won't be available in this context. - """ - pass - - @abc.abstractproperty - def view_name(self): - """Name of the view used to render this tab. - - Used within templates in conjuction with Django's `reverse()` to generate a URL for this tab. - """ - pass - - @abc.abstractmethod - def is_enabled(cls, user=None): # pylint: disable=no-self-argument,unused-argument - """Indicates whether this tab should be enabled. - - This is a class method; override with @classmethod. - - Keyword Arguments: - user (User): The user signed in to Studio. - """ - pass diff --git a/cms/lib/tests/__init__.py b/cms/lib/tests/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/cms/lib/tests/test_studio_tabs.py b/cms/lib/tests/test_studio_tabs.py deleted file mode 100644 index 35140c546472..000000000000 --- a/cms/lib/tests/test_studio_tabs.py +++ /dev/null @@ -1,35 +0,0 @@ -"""Tests for the Studio tab plugin API.""" -from django.test import TestCase -import mock - -from cms.lib.studio_tabs import StudioTabPluginManager -from openedx.core.lib.api.plugins import PluginError - - -class TestStudioTabPluginApi(TestCase): - """Unit tests for the Studio tab plugin API.""" - - @mock.patch('cms.lib.studio_tabs.StudioTabPluginManager.get_available_plugins') - def test_get_enabled_tabs(self, get_available_plugins): - """Verify that only enabled tabs are retrieved.""" - enabled_tab = self._mock_tab(is_enabled=True) - mock_tabs = { - 'disabled_tab': self._mock_tab(), - 'enabled_tab': enabled_tab, - } - - get_available_plugins.return_value = mock_tabs - - self.assertEqual(StudioTabPluginManager.get_enabled_tabs(), [enabled_tab]) - - def test_get_invalid_plugin(self): - """Verify that get_plugin fails when an invalid plugin is requested.""" - with self.assertRaises(PluginError): - StudioTabPluginManager.get_plugin('invalid_tab') - - def _mock_tab(self, is_enabled=False): - """Generate a mock tab.""" - tab = mock.Mock() - tab.is_enabled = mock.Mock(return_value=is_enabled) - - return tab diff --git a/cms/static/js/index.js b/cms/static/js/index.js index f130b7365657..243c6021251c 100644 --- a/cms/static/js/index.js +++ b/cms/static/js/index.js @@ -141,20 +141,26 @@ define(["domReady", "jquery", "underscore", "js/utils/cancel_on_escape", "js/vie e.preventDefault(); $('.courses-tab').toggleClass('active', tab === 'courses'); $('.libraries-tab').toggleClass('active', tab === 'libraries'); + $('.programs-tab').toggleClass('active', tab === 'programs'); + // Also toggle this course-related notice shown below the course tab, if it is present: - $('.wrapper-creationrights').toggleClass('is-hidden', tab === 'libraries'); + $('.wrapper-creationrights').toggleClass('is-hidden', tab !== 'courses'); }; }; var onReady = function () { $('.new-course-button').bind('click', addNewCourse); $('.new-library-button').bind('click', addNewLibrary); + $('.dismiss-button').bind('click', ViewUtils.deleteNotificationHandler(function () { ViewUtils.reload(); })); + $('.action-reload').bind('click', ViewUtils.reload); + $('#course-index-tabs .courses-tab').bind('click', showTab('courses')); $('#course-index-tabs .libraries-tab').bind('click', showTab('libraries')); + $('#course-index-tabs .programs-tab').bind('click', showTab('programs')); }; domReady(onReady); diff --git a/cms/static/sass/views/_dashboard.scss b/cms/static/sass/views/_dashboard.scss index c81690b4a242..42de626249c6 100644 --- a/cms/static/sass/views/_dashboard.scss +++ b/cms/static/sass/views/_dashboard.scss @@ -55,7 +55,7 @@ } - .action-create-course, .action-create-library { + .action-create-course, .action-create-library, .action-create-program { @extend %btn-primary-green; @extend %t-action3; } @@ -318,7 +318,7 @@ } // ELEM: course listings - .courses-tab, .libraries-tab { + .courses-tab, .libraries-tab, .programs-tab { display: none; &.active { @@ -326,7 +326,7 @@ } } - .courses, .libraries { + .courses, .libraries, .programs { .title { @extend %t-title6; margin-bottom: $baseline; diff --git a/cms/templates/index.html b/cms/templates/index.html index 472156038c02..7f9dc051f54f 100644 --- a/cms/templates/index.html +++ b/cms/templates/index.html @@ -1,6 +1,7 @@ <%! from django.utils.translation import ugettext as _ %> <%inherit file="base.html" /> + <%def name="online_help_token()"><% return "home" %> <%block name="title">${_("{studio_name} Home").format(studio_name=settings.STUDIO_SHORT_NAME)} <%block name="bodyclass">is-signedin index view-dashboard @@ -27,10 +28,17 @@

    ${_("Page Actions")}

    % elif course_creator_status=='disallowed_for_this_site' and settings.FEATURES.get('STUDIO_REQUEST_EMAIL',''): ${_("Email staff to create course")} % endif + % if show_new_library_button: ${_("New Library")} % endif + + % if is_programs_enabled: + + + % endif @@ -271,12 +279,19 @@

    ${course_info['display_name'] | h}

    %endif - %if libraries_enabled: + % if libraries_enabled or is_programs_enabled: - %endif + % endif %if len(courses) > 0:
    @@ -485,6 +500,54 @@

    ${_('Create Your First Library')}

    %endif + % if is_programs_enabled: + % if len(programs) > 0: + + + % else: +
    +
    + +
    +

    ${_("You haven't created any programs yet.")}

    +
    +

    ${_("Programs are groups of courses related to a common subject.")}

    +
    +
    + +
      +
    • + + +
    • +
    + +
    +
    + % endif + % endif +