├── .github ├── dependabot.yml └── workflows │ └── tests.yml ├── .gitignore ├── .python-version ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── README.md ├── __init__.py ├── accounts ├── __init__.py ├── tests.py ├── urls.py └── views.py ├── api ├── __init__.py ├── admin.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_customizationrequest.py │ ├── 0003_auto_20200923_1328.py │ ├── 0004_customizationrequest_complete.py │ ├── 0005_customizationrequest_created.py │ ├── 0006_customizationrequest_book.py │ ├── 0007_featureflag.py │ ├── 0008_alter_featureflag_name.py │ ├── 0009_auto_20220203_1256.py │ ├── 0010_alter_featureflag_name.py │ ├── 0011_webviewsettings.py │ ├── 0012_alter_webviewsettings_options.py │ ├── 0013_delete_progresstracker.py │ └── __init__.py ├── models.py ├── serializers.py ├── signals.py ├── tests.py ├── urls.py └── views.py ├── books ├── __init__.py ├── constants.py ├── management │ └── commands │ │ └── add_missing_licenses.py ├── migrations │ ├── 0001_initial_squashed_0100_videofacultyresources.py │ ├── 0002_auto_20200720_1527.py │ ├── 0101_auto_20200716_1553.py │ ├── 0102_auto_20200716_1605.py │ ├── 0103_auto_20200722_1544.py │ ├── 0103_merge_20200723_1300.py │ ├── 0104_book_give_today.py │ ├── 0105_merge_20200727_1405.py │ ├── 0106_auto_20200728_1547.py │ ├── 0107_auto_20200813_1613.py │ ├── 0108_auto_20200910_1245.py │ ├── 0109_customizationrequest.py │ ├── 0109_remove_book_give_today.py │ ├── 0110_customizationform.py │ ├── 0111_delete_customizationform.py │ ├── 0112_delete_customizationrequest.py │ ├── 0113_merge_20200930_1001.py │ ├── 0114_book_customization_form_content.py │ ├── 0115_auto_20200930_1205.py │ ├── 0116_auto_20200930_1237.py │ ├── 0117_auto_20201002_1301.py │ ├── 0118_auto_20201014_1249.py │ ├── 0119_auto_20201014_1251.py │ ├── 0120_auto_20201016_1253.py │ ├── 0121_auto_20201020_1707.py │ ├── 0122_auto_20201021_1050.py │ ├── 0123_book_support_statement.py │ ├── 0124_auto_20201021_1100.py │ ├── 0125_remove_book_table_of_contents.py │ ├── 0126_auto_20210127_1042.py │ ├── 0127_remove_book_ally_content.py │ ├── 0128_remove_book_coming_soon.py │ ├── 0129_auto_20210709_1624.py │ ├── 0130_remove_book_errata_content.py │ ├── 0131_book_translations.py │ ├── 0132_bookindex_translations.py │ ├── 0133_bookcategories_bookcategory.py │ ├── 0134_alter_book_license_name.py │ ├── 0135_alter_book_license_name.py │ ├── 0136_auto_20220915_0950.py │ ├── 0137_alter_book_salesforce_book_id.py │ ├── 0138_alter_book_authors_alter_book_bookstore_content_and_more.py │ ├── 0138_auto_20230112_1426.py │ ├── 0139_auto_20230112_1426.py │ ├── 0140_merge_20230118_1543.py │ ├── 0141_remove_book_k12_subject_studentresources_k12.py │ ├── 0142_remove_book_digital_isbn_10_and_more.py │ ├── 0143_remove_studentresources_k12_and_more.py │ ├── 0144_book_assignable_book_book_assignable_book_link.py │ ├── 0145_remove_book_assignable_book_link.py │ ├── 0146_alter_facultyresources_link_external_and_more.py │ ├── 0147_alter_facultyresources_link_external_and_more.py │ ├── 0148_book_book_uuid_alter_book_cnx_id.py │ ├── 0149_alter_book_book_state.py │ ├── 0150_book_amazon_iframe.py │ ├── 0151_book_promote_snippet_promotesnippets.py │ ├── 0152_alter_book_promote_snippet_delete_promotesnippets.py │ ├── 0153_book_polish_site_link.py │ ├── 0154_alter_book_salesforce_abbreviation_and_more.py │ ├── 0155_alter_book_book_cover_text_color_and_more.py │ ├── 0156_book_content_warning.py │ ├── 0157_alter_book_print_isbn_13_and_more.py │ ├── 0158_alter_book_cover_color.py │ ├── 0159_book_assignable_isbn_13.py │ └── __init__.py ├── models.py ├── serializers.py ├── tests.py ├── urls.py └── views.py ├── codecov.yml ├── docker-compose.override.yml ├── docker-compose.yml ├── docker ├── bash ├── entrypoint └── start ├── docs ├── app-design.md └── openstax-cms-db.svg ├── donations ├── __init__.py ├── admin.py ├── apps.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_donationpopup.py │ ├── 0003_auto_20210607_1320.py │ ├── 0004_auto_20210609_1344.py │ ├── 0005_auto_20211021_1045.py │ ├── 0006_fundraiser.py │ ├── 0007_auto_20220516_2113.py │ ├── 0008_thankyounote_source.py │ ├── 0009_alter_thankyounote_options.py │ ├── 0009_thankyounote_salesforce_id.py │ ├── 0010_merge_20250110_1518.py │ └── __init__.py ├── models.py ├── serializers.py ├── signals.py ├── tests.py ├── urls.py └── views.py ├── errata ├── __init__.py ├── admin.py ├── forms.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto_20161121_1453.py │ ├── 0003_errata_archived.py │ ├── 0004_auto_20161206_1115.py │ ├── 0005_errata_supporting_documentation.py │ ├── 0006_remove_errata_supporting_documentation.py │ ├── 0007_externaldocumentation_internaldocumentation.py │ ├── 0008_auto_20161212_1309.py │ ├── 0009_auto_20170124_1338.py │ ├── 0010_auto_20170126_1218.py │ ├── 0011_auto_20170131_1201.py │ ├── 0012_auto_20170202_1423.py │ ├── 0013_auto_20170203_0955.py │ ├── 0014_auto_20170203_1420.py │ ├── 0015_auto_20170206_1125.py │ ├── 0016_errata_is_assessment_errata.py │ ├── 0017_auto_20170419_1228.py │ ├── 0018_auto_20170919_1140.py │ ├── 0019_auto_20171019_1158.py │ ├── 0020_errata_duplicate_id.py │ ├── 0021_auto_20180125_1128.py │ ├── 0022_auto_20180205_1505.py │ ├── 0023_auto_20180222_1002.py │ ├── 0024_errata_assessment_id.py │ ├── 0025_auto_20180301_1107.py │ ├── 0026_auto_20180308_0943.py │ ├── 0027_errata_number_of_errors.py │ ├── 0028_auto_20180830_1220.py │ ├── 0029_auto_20181002_1052.py │ ├── 0030_auto_20181130_1235.py │ ├── 0031_blockedusers.py │ ├── 0032_auto_20190627_1548.py │ ├── 0033_auto_20190701_1154.py │ ├── 0034_auto_20190730_1153.py │ ├── 0035_emailtext.py │ ├── 0036_errata_junk.py │ ├── 0037_auto_20191210_1419.py │ ├── 0038_auto_20200127_1318.py │ ├── 0039_auto_20200213_1248.py │ ├── 0039_auto_20200213_1418.py │ ├── 0040_merge_20200214_0945.py │ ├── 0041_auto_20200326_1531.py │ ├── 0042_auto_20200401_1500.py │ ├── 0043_auto_20200414_1517.py │ ├── 0044_auto_20200714_1429.py │ ├── 0045_auto_20200721_0959.py │ ├── 0046_auto_20200722_1225.py │ ├── 0047_auto_20200804_1200.py │ ├── 0048_auto_20200807_1056.py │ ├── 0049_alter_errata_status.py │ ├── 0050_auto_20220207_1057.py │ ├── 0051_auto_20220516_2113.py │ ├── 0052_alter_errata_status.py │ ├── 0053_alter_errata_resource.py │ ├── 0054_alter_errata_resource.py │ ├── 0055_remove_errata_accounts_user_email_and_more.py │ ├── 0056_alter_errata_options.py │ └── __init__.py ├── models.py ├── serializers.py ├── static │ └── errata │ │ └── errata-admin-ui.js ├── templates │ └── templates │ │ ├── email.html │ │ └── email.txt ├── tests.py ├── urls.py ├── views.py └── wagtail_hooks.py ├── fixtures └── vcr_cassettes │ ├── README.md │ ├── books_license.yaml │ ├── books_no_cnx_id.yaml │ ├── books_prealgebra.yaml │ ├── books_univ_physics.yaml │ ├── contact.yaml │ ├── partners.yaml │ └── retired_book.yaml ├── global_settings ├── __init__.py ├── apps.py ├── functions.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto_20160906_1344.py │ ├── 0003_auto_20160906_1348.py │ ├── 0004_auto_20160906_1403.py │ ├── 0005_remove_stickynote_header.py │ ├── 0006_auto_20161213_1054.py │ ├── 0007_footer.py │ ├── 0008_auto_20170822_0956.py │ ├── 0009_auto_20170912_1337.py │ ├── 0010_auto_20170914_1600.py │ ├── 0011_mail.py │ ├── 0012_auto_20171009_1008.py │ ├── 0013_auto_20180515_1603.py │ ├── 0014_auto_20180607_1351.py │ ├── 0015_auto_20180816_1056.py │ ├── 0016_cloudfrontdistribution.py │ ├── 0017_auto_20200325_1058.py │ ├── 0018_auto_20200727_1047.py │ ├── 0019_stickynote_show_popup.py │ ├── 0020_givetoday.py │ ├── 0021_auto_20201002_1012.py │ └── __init__.py ├── models.py ├── signals.py ├── views.py └── wagtail_hooks.py ├── mail ├── __init__.py ├── admin.py ├── functions.py ├── migrations │ ├── 0001_initial.py │ └── __init__.py ├── models.py └── tests.py ├── manage.py ├── news ├── __init__.py ├── feeds.py ├── fields.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_newsarticle_tags.py │ ├── 0003_auto_20160517_1521.py │ ├── 0004_newsarticle_press_kit.py │ ├── 0005_auto_20160523_1023.py │ ├── 0006_auto_20160523_1042.py │ ├── 0007_auto_20160523_1049.py │ ├── 0008_newsarticle_author.py │ ├── 0009_auto_20160614_1024.py │ ├── 0010_auto_20160614_1032.py │ ├── 0011_auto_20160614_1034.py │ ├── 0012_auto_20160614_1037.py │ ├── 0013_auto_20160616_1033.py │ ├── 0014_auto_20160617_1140.py │ ├── 0015_remove_newsarticle_heading.py │ ├── 0016_newsarticle_heading.py │ ├── 0017_auto_20161018_0757.py │ ├── 0018_auto_20161025_1300.py │ ├── 0019_experts_expertspr_pressindex_pressrelease.py │ ├── 0020_auto_20180509_1016.py │ ├── 0021_auto_20180515_1603.py │ ├── 0022_auto_20180515_1612.py │ ├── 0023_missionstatement_missionstatements.py │ ├── 0024_auto_20180517_1102.py │ ├── 0025_auto_20180517_1426.py │ ├── 0026_auto_20180517_1434.py │ ├── 0027_auto_20180517_1443.py │ ├── 0028_remove_pressindex_mentions.py │ ├── 0029_pressindex_mentions.py │ ├── 0030_auto_20180521_1137.py │ ├── 0031_auto_20180523_0934.py │ ├── 0032_auto_20180705_1947.py │ ├── 0033_auto_20181113_1249.py │ ├── 0034_auto_20191008_1546.py │ ├── 0035_auto_20210226_1150.py │ ├── 0036_blogtype_contenttype.py │ ├── 0037_newsarticle_collections.py │ ├── 0038_auto_20220420_1547.py │ ├── 0039_auto_20220427_1107.py │ ├── 0040_alter_newsarticle_content_types.py │ ├── 0041_alter_newsarticletag_tag.py │ ├── 0041_auto_20220517_1353.py │ ├── 0042_auto_20220520_0855.py │ ├── 0042_merge_20220519_1249.py │ ├── 0043_alter_newsarticle_featured_video.py │ ├── 0044_auto_20220520_1158.py │ ├── 0045_merge_20220520_1523.py │ ├── 0046_auto_20220616_1349.py │ ├── 0047_alter_newsarticle_article_subjects_and_more.py │ ├── 0048_pressindex_faqs_pressindex_infographic_image_and_more.py │ ├── 0049_pressindex_about_alter_pressindex_mentions.py │ ├── 0050_newsindex_display_footer_and_more.py │ ├── 0051_alter_pressindex_faqs.py │ └── __init__.py ├── models.py ├── search.py ├── tests.py ├── urls.py └── views.py ├── openstax ├── __init__.py ├── api.py ├── custom_storages.py ├── functions.py ├── middleware.py ├── settings │ ├── __init__.py │ ├── base.py │ ├── docker.py │ ├── local.py.example │ └── test.py ├── tests.py ├── urls.py └── wsgi.py ├── oxauth ├── __init__.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_create_user_profile.py │ └── __init__.py └── models.py ├── oxmenus ├── __init__.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_alter_menus_options_alter_menus_menu.py │ └── __init__.py ├── models.py ├── serializers.py ├── signals.py ├── tests.py ├── urls.py ├── views.py └── wagtail_hooks.py ├── pages ├── __init__.py ├── custom_blocks.py ├── custom_fields.py ├── management │ ├── __init__.py │ └── commands │ │ ├── __init__.py │ │ ├── create_subject_pages.py │ │ ├── create_subjects_page.py │ │ └── restructure_root_page.py ├── migrations │ ├── 0001_initial_squashed_0232_auto_20200623_0848.py │ ├── 0002_auto_20200813_1540.py │ ├── 0002_auto_20200928_1405.py │ ├── 0003_merge_20200930_1001.py │ ├── 0004_delete_roverpage.py │ ├── 0004_llphpage.py │ ├── 0005_auto_20201105_1414.py │ ├── 0006_auto_20201105_1620.py │ ├── 0007_merge_20201106_1444.py │ ├── 0008_tutormarketing.py │ ├── 0009_auto_20201204_1518.py │ ├── 0010_auto_20201204_1520.py │ ├── 0011_auto_20201204_1524.py │ ├── 0012_auto_20201204_1525.py │ ├── 0013_auto_20201204_1532.py │ ├── 0014_auto_20201207_1355.py │ ├── 0015_delete_card.py │ ├── 0016_auto_20201209_0842.py │ ├── 0017_tutorlanding.py │ ├── 0018_auto_20210126_0947.py │ ├── 0019_auto_20210126_1056.py │ ├── 0020_auto_20210126_1314.py │ ├── 0021_auto_20210126_1318.py │ ├── 0022_auto_20210126_1323.py │ ├── 0023_auto_20210126_1333.py │ ├── 0024_auto_20210126_1336.py │ ├── 0025_auto_20210126_1519.py │ ├── 0026_auto_20210126_1521.py │ ├── 0027_auto_20210126_1607.py │ ├── 0028_auto_20210127_1109.py │ ├── 0029_auto_20210127_1300.py │ ├── 0030_auto_20210127_1302.py │ ├── 0031_auto_20210127_1304.py │ ├── 0032_auto_20210127_1347.py │ ├── 0033_auto_20210127_1356.py │ ├── 0034_auto_20210127_1550.py │ ├── 0035_auto_20210127_1612.py │ ├── 0036_auto_20210127_1731.py │ ├── 0037_auto_20210426_1315.py │ ├── 0038_auto_20210427_1025.py │ ├── 0039_auto_20210427_1415.py │ ├── 0040_auto_20210505_1339.py │ ├── 0041_auto_20210506_1329.py │ ├── 0042_auto_20210506_1347.py │ ├── 0043_auto_20210506_1453.py │ ├── 0044_auto_20210513_1515.py │ ├── 0045_auto_20210517_0957.py │ ├── 0046_auto_20210628_1632.py │ ├── 0047_institutionalpartnership_application_link.py │ ├── 0048_auto_20210830_1133.py │ ├── 0049_auto_20211215_1046.py │ ├── 0050_auto_20211216_1220.py │ ├── 0051_auto_20220207_1342.py │ ├── 0051_subjects.py │ ├── 0052_alter_supporters_funder_groups.py │ ├── 0052_subject_subjectorderable.py │ ├── 0053_alter_supporters_funder_groups.py │ ├── 0053_subject_page_description.py │ ├── 0054_alter_supporters_funder_groups.py │ ├── 0055_supporters_disclaimer.py │ ├── 0056_merge_20220208_1013.py │ ├── 0057_merge_20220223_1247.py │ ├── 0058_alter_subject_tutor_ad.py │ ├── 0059_alter_supporters_funder_groups.py │ ├── 0060_auto_20220412_1344.py │ ├── 0061_alter_impactstory_body.py │ ├── 0062_alter_impactstory_body.py │ ├── 0063_auto_20220614_1525.py │ ├── 0064_formheadings.py │ ├── 0065_auto_20220823_1112.py │ ├── 0066_allylogos.py │ ├── 0067_alter_aboutuspage_what_cards_and_more.py │ ├── 0067_learningresearchpage.py │ ├── 0068_k12mainpage_k12subject.py │ ├── 0069_merge_20230118_1543.py │ ├── 0069_remove_learningresearchpage_mission_header_and_more.py │ ├── 0070_alter_k12mainpage_faqs_and_more.py │ ├── 0071_merge_20230202_1030.py │ ├── 0072_k12mainpage_subject_list_default_and_more.py │ ├── 0073_assignable.py │ ├── 0074_remove_assignable_admin_button_text_and_more.py │ ├── 0075_remove_assignable_available_courses_and_more.py │ ├── 0076_remove_assignable_heading_and_more.py │ ├── 0077_assignable_add_assignable_cta_button_text_and_more.py │ ├── 0078_rename_add_assignable_header_assignable_faq_header_and_more.py │ ├── 0079_remove_assignable_section_2_image_and_more.py │ ├── 0080_homepage_k12_cta_button_text_and_more.py │ ├── 0081_remove_allylogos_openstax_logos_and_more.py │ ├── 0082_remove_webinarpage_description_and_more.py │ ├── 0083_alter_k12mainpage_testimonials.py │ ├── 0084_customizablepage_squashed_0110_alter_rootpage_body.py │ ├── 0111_alter_rootpage_body_squashed_0130_alter_rootpage_body.py │ ├── 0131_alter_impact_making_a_difference.py │ ├── 0131_alter_impact_making_a_difference_squashed_0144_alter_rootpage_body_alter_rootpage_layout.py │ ├── 0132_remove_rootpage_layout.py │ ├── 0133_rootpage_layout.py │ ├── 0134_alter_rootpage_layout.py │ ├── 0135_alter_rootpage_layout.py │ ├── 0136_alter_rootpage_layout.py │ ├── 0137_alter_rootpage_body_alter_rootpage_layout.py │ ├── 0137_alter_rootpage_promote_image.py │ ├── 0138_alter_rootpage_body.py │ ├── 0139_alter_rootpage_body.py │ ├── 0140_alter_rootpage_body.py │ ├── 0141_alter_rootpage_body.py │ ├── 0142_alter_rootpage_body.py │ ├── 0143_alter_rootpage_body_alter_rootpage_layout.py │ ├── 0144_alter_rootpage_body_alter_rootpage_layout.py │ ├── 0145_alter_rootpage_body_alter_rootpage_layout.py │ ├── 0146_alter_rootpage_body.py │ ├── 0147_merge_20240725_1221.py │ ├── 0148_alter_rootpage_layout.py │ ├── 0149_alter_rootpage_body.py │ ├── 0150_alter_rootpage_body.py │ ├── 0151_alter_assignable_faqs_alter_faq_questions_and_more.py │ ├── 0152_alter_rootpage_body_alter_rootpage_layout.py │ ├── 0153_alter_homepage_options.py │ ├── 0154_alter_impact_improving_access.py │ ├── 0155_alter_rootpage_layout.py │ ├── 0156_alter_rootpage_body.py │ ├── 0157_alter_rootpage_body.py │ ├── 0158_alter_rootpage_body.py │ ├── 0159_alter_rootpage_body.py │ ├── 0160_alter_rootpage_body.py │ └── __init__.py ├── models.py ├── static │ └── images │ │ └── openstax.png ├── templates │ ├── news │ │ └── news_article.html │ ├── page.html │ ├── pages │ │ └── general_page.html │ ├── preview.html │ ├── wagtailadmin │ │ ├── admin_base.html │ │ └── base.html │ └── wagtailusers │ │ └── users │ │ └── edit.html └── tests.py ├── public └── favicon.ico ├── pyproject.toml ├── redirects ├── __init__.py ├── management │ └── commands │ │ └── check_redirects.py └── templates │ └── wagtailredirects │ └── add.html ├── requirements ├── base.txt ├── dev.txt ├── production.txt └── test.txt ├── salesforce ├── __init__.py ├── admin.py ├── functions.py ├── management │ └── commands │ │ ├── delete_resource_downloads.py │ │ ├── sync_thank_you_notes.py │ │ ├── update_opportunities.py │ │ ├── update_partners.py │ │ ├── update_resource_downloads.py │ │ ├── update_schools.py │ │ ├── update_schools_and_mapbox.py │ │ └── upload_mapbox_schools.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto_20160318_0843.py │ ├── 0003_school.py │ ├── 0004_auto_20180522_1342.py │ ├── 0005_auto_20180522_1530.py │ ├── 0006_auto_20180522_1552.py │ ├── 0007_auto_20180522_1557.py │ ├── 0008_mapboxdataset.py │ ├── 0009_salesforcesettings.py │ ├── 0010_auto_20180910_1320.py │ ├── 0011_auto_20190531_0025.py │ ├── 0012_mapboxdataset_style_url.py │ ├── 0013_mapboxdataset_tileset_id.py │ ├── 0014_remove_mapboxdataset_dataset_id.py │ ├── 0015_adoptionopportunityrecord.py │ ├── 0016_auto_20190815_1211.py │ ├── 0017_adoptionopportunityrecord_updated.py │ ├── 0018_remove_adoptionopportunityrecord_updated.py │ ├── 0019_adoptionopportunityrecord_updated.py │ ├── 0020_school_salesforce_id.py │ ├── 0021_partner.py │ ├── 0022_auto_20191111_1220.py │ ├── 0023_auto_20191111_1229.py │ ├── 0024_auto_20191111_1525.py │ ├── 0025_partner_books.py │ ├── 0026_auto_20191115_1123.py │ ├── 0027_auto_20191122_1705.py │ ├── 0028_partner_partner_logo.py │ ├── 0029_partner_visible_on_website.py │ ├── 0030_auto_20191220_1353.py │ ├── 0031_auto_20200109_1048.py │ ├── 0032_partner_partner_website.py │ ├── 0033_partner_partner_list_label.py │ ├── 0034_auto_20200117_1536.py │ ├── 0035_auto_20200117_1619.py │ ├── 0036_partner_formstack_url.py │ ├── 0037_partnercategorymapping_partnerfieldnamemapping_partnertypemapping.py │ ├── 0038_remove_partnertypemapping_salesforce_name.py │ ├── 0039_auto_20200304_0919.py │ ├── 0039_partner_lead_sharing.py │ ├── 0040_partnerfieldnamemapping_hidden.py │ ├── 0041_merge_20200311_1529.py │ ├── 0042_salesforceforms.py │ ├── 0043_salesforceforms_debug.py │ ├── 0044_auto_20200615_1402.py │ ├── 0045_auto_20200707_1042.py │ ├── 0046_auto_20200720_1527.py │ ├── 0047_auto_20200721_1134.py │ ├── 0048_auto_20200721_1256.py │ ├── 0049_resourcedownload_salesforce_id.py │ ├── 0050_auto_20200724_1333.py │ ├── 0051_auto_20200727_1324.py │ ├── 0052_auto_20200728_1547.py │ ├── 0053_remove_adoptionopportunityrecord_updated.py │ ├── 0054_remove_adoptionopportunityrecord_book.py │ ├── 0055_adoptionopportunityrecord_verified.py │ ├── 0056_auto_20200730_1547.py │ ├── 0057_partner_instructional_level_k12.py │ ├── 0058_auto_20201012_0946.py │ ├── 0058_partnerreview.py │ ├── 0059_auto_20201005_1411.py │ ├── 0060_partnerreview_partner.py │ ├── 0061_merge_20201012_1151.py │ ├── 0062_savingsnumber.py │ ├── 0063_auto_20201014_1229.py │ ├── 0064_auto_20201015_1524.py │ ├── 0065_auto_20201016_1253.py │ ├── 0066_auto_20201021_1627.py │ ├── 0067_auto_20201023_0945.py │ ├── 0068_auto_20201028_1341.py │ ├── 0069_auto_20201028_1350.py │ ├── 0070_partnerreview_approved_review_text.py │ ├── 0071_auto_20201028_1427.py │ ├── 0072_auto_20201028_1434.py │ ├── 0073_remove_partnerreview_approved_review_text.py │ ├── 0074_partnerreview_partner_response_date.py │ ├── 0075_auto_20201117_1412.py │ ├── 0076_auto_20201117_1419.py │ ├── 0077_partnerreview_to_delete.py │ ├── 0078_auto_20201119_1633.py │ ├── 0079_auto_20201130_1600.py │ ├── 0080_resourcedownload_contact_id.py │ ├── 0081_auto_20210510_1023.py │ ├── 0082_partner_partnership_level.py │ ├── 0083_alter_resourcedownload_contact_id.py │ ├── 0084_alter_resourcedownload_contact_id.py │ ├── 0085_partnerreview_user_faculty_status.py │ ├── 0086_alter_partnerreview_user_faculty_status.py │ ├── 0087_school_location.py │ ├── 0088_school_total_school_enrollment.py │ ├── 0089_auto_20211014_1124.py │ ├── 0090_auto_20211014_1201.py │ ├── 0091_auto_20211018_1150.py │ ├── 0092_auto_20211018_1152.py │ ├── 0093_partnerreview_submitted_by_account_uuid.py │ ├── 0094_alter_partnerreview_submitted_by_account_id.py │ ├── 0095_adoptionopportunityrecord_account_uuid.py │ ├── 0096_salesforceforms_debug_email.py │ ├── 0097_auto_20220328_1130.py │ ├── 0098_partner_equity_rating.py │ ├── 0098_remove_resourcedownload_salesforce_id.py │ ├── 0099_remove_resourcedownload_number_of_times_accessed.py │ ├── 0100_merge_20220426_0826.py │ ├── 0100_partner_partner_sf_account_id.py │ ├── 0101_merge_20220506_1353.py │ ├── 0102_auto_20220512_0814.py │ ├── 0103_auto_20220516_1045.py │ ├── 0104_alter_partner_visible_on_website.py │ ├── 0105_auto_20221212_1543.py │ ├── 0106_remove_resourcedownload_salesforce__account_b11d37_idx_and_more.py │ ├── 0107_alter_resourcedownload_account_uuid_and_more.py │ ├── 0108_partner_partner_anniversary_date_and_more.py │ ├── 0109_remove_partner_salesforce_created_date.py │ ├── 0110_partner_account_id_partner_partner_status.py │ ├── 0111_alter_partner_partner_sf_account_id_and_more.py │ ├── 0112_remove_adoptionopportunityrecord_fall_student_number_and_more.py │ ├── 0113_school_created_school_updated.py │ └── __init__.py ├── models.py ├── salesforce.py ├── serializers.py ├── signals.py ├── tests.py ├── urls.py └── views.py ├── setup.cfg ├── shared ├── test_utilities.py └── tests.py ├── snippets ├── __init__.py ├── migrations │ ├── 0001_initial_squashed_0022_subject_page_content.py │ ├── 0002_auto_20200722_1544.py │ ├── 0003_delete_givetoday.py │ ├── 0004_customizationformcontent.py │ ├── 0005_delete_customizationformcontent.py │ ├── 0006_erratacontent.py │ ├── 0007_erratacontent_heading.py │ ├── 0008_alter_erratacontent_book_state.py │ ├── 0009_alter_erratacontent_book_state.py │ ├── 0010_auto_20210715_1313.py │ ├── 0011_auto_20210715_1317.py │ ├── 0012_auto_20210715_1327.py │ ├── 0013_subjectcategories.py │ ├── 0014_auto_20220126_1603.py │ ├── 0015_rename_subjectcategories_subjectcategory.py │ ├── 0016_subject_icon.py │ ├── 0017_subjectcategory_description.py │ ├── 0018_subject_subject_color.py │ ├── 0019_givebanner.py │ ├── 0020_blogcontenttype.py │ ├── 0020_contentlicense.py │ ├── 0021_blogcollection.py │ ├── 0022_merge_0020_contentlicense_0021_blogcollection.py │ ├── 0023_delete_contentlicense.py │ ├── 0024_k12subject.py │ ├── 0025_facultyresource_icon_studentresource_icon_and_more.py │ ├── 0026_facultyresource_resource_category_and_more.py │ ├── 0027_nowebinarmessage.py │ ├── 0028_webinarcollection.py │ ├── 0029_assignableavailable.py │ ├── 0030_alter_erratacontent_book_state.py │ ├── 0030_amazonbookblurb.py │ ├── 0031_merge_20231101_1313.py │ ├── 0031_merge_20231101_1438.py │ ├── 0032_merge_20231117_0830.py │ ├── 0033_promotesnippet.py │ ├── 0034_delete_assignableavailable.py │ ├── 0035_alter_k12subject_subject_color_and_more.py │ ├── 0036_contentwarning.py │ ├── 0037_pagelayout.py │ ├── 0038_alter_pagelayout_layout.py │ ├── 0039_alter_pagelayout_layout.py │ ├── 0040_remove_pagelayout_background_image.py │ ├── 0041_delete_pagelayout.py │ ├── 0042_alter_amazonbookblurb_locale_and_more.py │ ├── 0043_alter_k12subject_subject_color_and_more.py │ └── __init__.py ├── models.py ├── serializers.py ├── signals.py ├── tests.py ├── urls.py └── views.py ├── versions ├── __init__.py ├── templates │ └── versions.html ├── views.py └── wagtail_hooks.py ├── wagtailimportexport ├── __init__.py ├── admin_urls.py ├── apps.py ├── config.py ├── exporting.py ├── forms.py ├── functions.py ├── importing.py ├── migrations │ └── __init__.py ├── templates │ └── wagtailimportexport │ │ ├── export-page.html │ │ ├── import-page.html │ │ └── index.html ├── tests │ ├── __init__.py │ ├── test_functions.py │ └── tests.py ├── views.py └── wagtail_hooks.py └── webinars ├── __init__.py ├── migrations ├── 0001_initial.py ├── 0002_webinar_display_on_tutor_page.py ├── 0003_webinar_webinar_subjects.py ├── 0004_alter_webinar_webinar_subjects.py ├── 0005_webinar_webinar_collections.py ├── 0006_alter_webinar_spaces_remaining.py └── __init__.py ├── models.py ├── search.py ├── serializers.py ├── signals.py ├── tests.py ├── urls.py ├── views.py └── wagtail_hooks.py /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Keep GitHub Actions up to date with GitHub's Dependabot... 2 | # https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot 3 | # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem 4 | version: 2 5 | updates: 6 | - package-ecosystem: github-actions 7 | directory: / 8 | groups: 9 | github-actions: 10 | patterns: 11 | - "*" # Group all Actions updates into a single larger pull request 12 | schedule: 13 | interval: weekly 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.vagrant 2 | */public 3 | /public/static 4 | /public/media 5 | /static 6 | *.pyc 7 | /media 8 | /Vagrantfile.local 9 | openstax/settings/local.py 10 | *.log 11 | /.idea 12 | /htmlcov 13 | /.coverage 14 | .venv 15 | .DS_STORE 16 | *.icloud 17 | *.bk 18 | .vscode/settings.json 19 | .env 20 | -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.13 2 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Thanks for Contributing! 2 | 3 | See [openstax/CONTRIBUTING.md](https://github.com/openstax/napkin-notes/blob/master/CONTRIBUTING.md) for more information! 4 | 5 | 6 | # Creating an Issue 7 | 8 | - add either `bug` or `enhancement` label 9 | - describe the issue clearly in the description 10 | - include a screenshot in the sssue description if possible 11 | 12 | # Coding 13 | 14 | * [CMS Branching and Releases](https://openstax.atlassian.net/wiki/spaces/BIT/pages/2207219713/CMS+Branching+and+Releases) 15 | 16 | # Pull Requests 17 | 18 | * [CMS Pull Requests](https://openstax.atlassian.net/wiki/spaces/BIT/pages/2207252512/CMS+Pull+Requests) -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10-slim 2 | 3 | ENV PYTHONUNBUFFERED 1 4 | 5 | RUN apt-get update && \ 6 | apt-get install -y --no-install-recommends \ 7 | git \ 8 | gcc \ 9 | libxml2-dev \ 10 | libxslt1-dev \ 11 | libz-dev \ 12 | libpq-dev \ 13 | && rm -rf /var/lib/apt/lists/* 14 | 15 | WORKDIR /usr/local/cms-app 16 | 17 | COPY ./requirements /usr/local/cms-app/requirements 18 | COPY ./docker /usr/local/cms-app/docker 19 | RUN pip install -r requirements/dev.txt 20 | 21 | ENTRYPOINT ["/usr/local/cms-app/docker/entrypoint"] 22 | 23 | ENV DJANGO_SETTINGS_MODULE openstax.settings.docker 24 | 25 | CMD /usr/local/cms-app/docker/start 26 | -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/__init__.py -------------------------------------------------------------------------------- /accounts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/accounts/__init__.py -------------------------------------------------------------------------------- /accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | from django.test.utils import override_settings 3 | 4 | class AccountsTestCase(TestCase): 5 | 6 | @override_settings(ACCOUNTS_URL='https://fakeaccounts.org') 7 | def test_accounts_redirects_to_accounts_url(self): 8 | path = "/accounts/login?blah=whatever" 9 | response = self.client.get(path) 10 | self.assertRedirects(response, 11 | "https://fakeaccounts.org{}".format(path), 12 | fetch_redirect_response=False) 13 | -------------------------------------------------------------------------------- /accounts/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import re_path 2 | from .views import accounts 3 | 4 | urlpatterns = [ 5 | re_path(r"^.*$", accounts), 6 | ] 7 | -------------------------------------------------------------------------------- /accounts/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import redirect 2 | from django.http import request 3 | from django.conf import settings 4 | 5 | def accounts(request): 6 | # This will not be reached in deployed environments where Cloudfront is serving OSWeb, 7 | # because Cloudfront proxies all `/accounts*` traffic straight to Accounts. It is only 8 | # for test and dev environments. 9 | 10 | url = "{}{}".format(settings.ACCOUNTS_URL, request.get_full_path()) 11 | return redirect(url) 12 | -------------------------------------------------------------------------------- /api/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/api/__init__.py -------------------------------------------------------------------------------- /api/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.9 on 2019-02-14 23:54 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='ProgressTracker', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('account_id', models.IntegerField()), 19 | ('progress', models.IntegerField()), 20 | ], 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /api/migrations/0002_customizationrequest.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-23 17:44 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='CustomizationRequest', 15 | fields=[ 16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('email', models.CharField(max_length=255)), 18 | ('number_of_students', models.IntegerField()), 19 | ('why', models.TextField()), 20 | ('modules', models.TextField()), 21 | ], 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /api/migrations/0003_auto_20200923_1328.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-23 18:28 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0002_customizationrequest'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameField( 14 | model_name='customizationrequest', 15 | old_name='number_of_students', 16 | new_name='num_students', 17 | ), 18 | migrations.RenameField( 19 | model_name='customizationrequest', 20 | old_name='why', 21 | new_name='reason', 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /api/migrations/0004_customizationrequest_complete.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-07 19:08 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0003_auto_20200923_1328'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='customizationrequest', 15 | name='complete', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /api/migrations/0005_customizationrequest_created.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2021-01-14 16:20 2 | 3 | from django.db import migrations, models 4 | import django.utils.timezone 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('api', '0004_customizationrequest_complete'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='customizationrequest', 16 | name='created', 17 | field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now), 18 | preserve_default=False, 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /api/migrations/0006_customizationrequest_book.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2021-01-28 18:08 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('books', '0125_remove_book_table_of_contents'), 11 | ('api', '0005_customizationrequest_created'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='customizationrequest', 17 | name='book', 18 | field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='books.Book'), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /api/migrations/0007_featureflag.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-02-03 18:44 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0006_customizationrequest_book'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='FeatureFlag', 15 | fields=[ 16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('name', models.CharField(max_length=255)), 18 | ('description', models.TextField(blank=True, default='')), 19 | ('feature_active', models.BooleanField(default=False)), 20 | ], 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /api/migrations/0008_alter_featureflag_name.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-02-03 18:46 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0007_featureflag'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='featureflag', 15 | name='name', 16 | field=models.CharField(max_length=255, unique=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /api/migrations/0009_auto_20220203_1256.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-02-03 18:56 2 | 3 | from django.db import migrations, models 4 | import django.utils.timezone 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('api', '0008_alter_featureflag_name'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='featureflag', 16 | name='created', 17 | field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now), 18 | preserve_default=False, 19 | ), 20 | migrations.AddField( 21 | model_name='featureflag', 22 | name='updated', 23 | field=models.DateTimeField(auto_now=True), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /api/migrations/0010_alter_featureflag_name.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-03-28 21:43 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0009_auto_20220203_1256'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='featureflag', 15 | name='name', 16 | field=models.CharField(help_text='Create flag names with underscores to be more machine friendly. Eg. awesome_feature', max_length=255, unique=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /api/migrations/0011_webviewsettings.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-03-28 21:44 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0010_alter_featureflag_name'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='WebviewSettings', 15 | fields=[ 16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('name', models.CharField(max_length=255, unique=True)), 18 | ('value', models.CharField(max_length=255)), 19 | ], 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /api/migrations/0012_alter_webviewsettings_options.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-05-17 02:13 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('api', '0011_webviewsettings'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name='webviewsettings', 15 | options={'verbose_name_plural': 'Webview Settings'}, 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /api/migrations/0013_delete_progresstracker.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.12 on 2025-02-22 00:27 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0012_alter_webviewsettings_options"), 10 | ] 11 | 12 | operations = [ 13 | migrations.DeleteModel( 14 | name="ProgressTracker", 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /api/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/api/migrations/__init__.py -------------------------------------------------------------------------------- /api/signals.py: -------------------------------------------------------------------------------- 1 | from django.db.models.signals import post_save 2 | from django.dispatch import receiver 3 | 4 | from global_settings.functions import invalidate_cloudfront_caches 5 | from .models import FeatureFlag, WebviewSettings 6 | 7 | 8 | @receiver(post_save, sender=FeatureFlag) 9 | def clear_cloudfront_on_feature_flag_save(sender, **kwargs): 10 | invalidate_cloudfront_caches('flags') 11 | 12 | 13 | @receiver(post_save, sender=WebviewSettings) 14 | def clear_cloudfront_on_webview_settings_save(sender, **kwargs): 15 | invalidate_cloudfront_caches('webview-settings') 16 | -------------------------------------------------------------------------------- /books/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/books/__init__.py -------------------------------------------------------------------------------- /books/migrations/0002_auto_20200720_1527.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-20 20:27 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0001_initial_squashed_0100_videofacultyresources'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='facultyresources', 15 | name='link_text', 16 | field=models.CharField(help_text='Call to Action Text', max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /books/migrations/0103_auto_20200722_1544.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-22 20:44 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0102_auto_20200716_1605'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='facultyresources', 15 | name='link_text', 16 | field=models.CharField(help_text='Call to Action Text', max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /books/migrations/0103_merge_20200723_1300.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-23 18:00 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0002_auto_20200720_1527'), 10 | ('books', '0102_auto_20200716_1605'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /books/migrations/0104_book_give_today.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-22 21:13 2 | 3 | import books.models 4 | from django.db import migrations 5 | import snippets.models 6 | import wagtail.fields 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('books', '0103_auto_20200722_1544'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AddField( 17 | model_name='book', 18 | name='give_today', 19 | field=wagtail.fields.StreamField([('content', books.models.SharedContentChooserBlock(snippets.models.SharedContent))], blank=True, help_text='Give link text and url.', null=True), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /books/migrations/0105_merge_20200727_1405.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-27 19:05 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0104_book_give_today'), 10 | ('books', '0103_merge_20200723_1300'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /books/migrations/0106_auto_20200728_1547.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-28 20:47 2 | 3 | import books.models 4 | from django.db import migrations 5 | import snippets.models 6 | import wagtail.fields 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('books', '0105_merge_20200727_1405'), 13 | ] 14 | 15 | operations = [ 16 | # migrations.AlterField( 17 | # model_name='book', 18 | # name='give_today', 19 | # field=wagtail.fields.StreamField([('content', books.models.GiveTodayChooserBlock(snippets.models.GiveToday))], blank=True, help_text='Give link text and url.', null=True), 20 | # ), 21 | ] 22 | -------------------------------------------------------------------------------- /books/migrations/0108_auto_20200910_1245.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-10 17:45 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0107_auto_20200813_1613'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='facultyresources', 15 | name='print_link', 16 | field=models.URLField(blank=True, help_text='Link for Buy Print link on resource', null=True), 17 | ), 18 | migrations.AddField( 19 | model_name='studentresources', 20 | name='print_link', 21 | field=models.URLField(blank=True, help_text='Link for Buy Print link on resource', null=True), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /books/migrations/0109_customizationrequest.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-22 21:36 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0108_auto_20200910_1245'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='CustomizationRequest', 15 | fields=[ 16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('email', models.CharField(max_length=255)), 18 | ('number_of_students', models.IntegerField()), 19 | ('why', models.TextField()), 20 | ('modules', models.TextField()), 21 | ], 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /books/migrations/0109_remove_book_give_today.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-28 19:05 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0108_auto_20200910_1245'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='book', 15 | name='give_today', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /books/migrations/0110_customizationform.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-22 21:39 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0109_customizationrequest'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='CustomizationForm', 15 | fields=[ 16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('form_header', models.CharField(max_length=255)), 18 | ('form_subheader', models.CharField(max_length=255)), 19 | ('disclaimer', models.TextField()), 20 | ], 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /books/migrations/0111_delete_customizationform.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-22 21:52 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0110_customizationform'), 10 | ] 11 | 12 | operations = [ 13 | migrations.DeleteModel( 14 | name='CustomizationForm', 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /books/migrations/0112_delete_customizationrequest.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-23 17:44 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0111_delete_customizationform'), 10 | ] 11 | 12 | operations = [ 13 | migrations.DeleteModel( 14 | name='CustomizationRequest', 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /books/migrations/0113_merge_20200930_1001.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-30 15:01 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0109_remove_book_give_today'), 10 | ('books', '0112_delete_customizationrequest'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /books/migrations/0114_book_customization_form_content.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-30 16:54 2 | 3 | import books.models 4 | from django.db import migrations 5 | import snippets.models 6 | import wagtail.fields 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('books', '0113_merge_20200930_1001'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AddField( 17 | model_name='book', 18 | name='customization_form_content', 19 | field=wagtail.fields.StreamField([], blank=True, null=True), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /books/migrations/0115_auto_20200930_1205.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-30 17:05 2 | 3 | import books.models 4 | from django.db import migrations 5 | import snippets.models 6 | import wagtail.fields 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('books', '0114_book_customization_form_content'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='book', 18 | name='customization_form_content', 19 | field=wagtail.fields.StreamField([], blank=True, null=True), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /books/migrations/0117_auto_20201002_1301.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-02 18:01 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0116_auto_20200930_1237'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='book', 15 | name='amazon_coming_soon', 16 | field=models.BooleanField(default=False, verbose_name='Individual Print Coming Soon'), 17 | ), 18 | migrations.AlterField( 19 | model_name='book', 20 | name='amazon_link', 21 | field=models.URLField(blank=True, verbose_name='Individual Print Link'), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /books/migrations/0119_auto_20201014_1251.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-14 17:51 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0118_auto_20201014_1249'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='bookindex', 15 | name='dev_standard_4_description', 16 | field=models.TextField(), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /books/migrations/0120_auto_20201016_1253.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-16 17:53 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0119_auto_20201014_1251'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='bookindex', 15 | name='dev_standard_4_description', 16 | field=models.TextField(help_text='Keep in place to populate with Salesforce data. id=adoption_number for classrooms and id=savings for savings number.'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /books/migrations/0121_auto_20201020_1707.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-20 22:07 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0120_auto_20201016_1253'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='book', 15 | name='adoptions', 16 | field=models.IntegerField(blank=True, null=True), 17 | ), 18 | migrations.AddField( 19 | model_name='book', 20 | name='savings', 21 | field=models.DecimalField(blank=True, decimal_places=2, max_digits=50, null=True), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /books/migrations/0122_auto_20201021_1050.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-21 15:50 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0121_auto_20201020_1707'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='book', 15 | name='savings', 16 | field=models.IntegerField(blank=True, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /books/migrations/0123_book_support_statement.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-21 15:58 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0122_auto_20201021_1050'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='book', 15 | name='support_statement', 16 | field=models.TextField(blank=True, default="With philanthropic support, this book is used in classrooms, saving students dollars this school year. Learn more about our impact and how you can help.", null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /books/migrations/0124_auto_20201021_1100.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-21 16:00 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0123_book_support_statement'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='book', 15 | name='support_statement', 16 | field=models.TextField(blank=True, default="With philanthropic support, this book is used in classrooms, saving students dollars this school year. Learn more about our impact and how you can help.", help_text='Updating this statement updates it for all book pages.', null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /books/migrations/0125_remove_book_table_of_contents.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-11-12 21:20 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0124_auto_20201021_1100'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='book', 15 | name='table_of_contents', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /books/migrations/0127_remove_book_ally_content.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2021-01-27 16:45 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0126_auto_20210127_1042'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='book', 15 | name='ally_content', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /books/migrations/0128_remove_book_coming_soon.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2021-01-29 16:44 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0127_remove_book_ally_content'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='book', 15 | name='coming_soon', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /books/migrations/0130_remove_book_errata_content.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-07-12 16:03 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0129_auto_20210709_1624'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='book', 15 | name='errata_content', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /books/migrations/0131_book_translations.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-07-22 20:39 2 | 3 | from django.db import migrations 4 | import wagtail.blocks 5 | import wagtail.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('books', '0130_remove_book_errata_content'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='book', 17 | name='translations', 18 | field=wagtail.fields.StreamField([('translation', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('locale', wagtail.blocks.CharBlock()), ('slug', wagtail.blocks.CharBlock())])))], blank=True, null=True), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /books/migrations/0132_bookindex_translations.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-08-02 19:19 2 | 3 | from django.db import migrations 4 | import wagtail.blocks 5 | import wagtail.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('books', '0131_book_translations'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='bookindex', 17 | name='translations', 18 | field=wagtail.fields.StreamField([('translation', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('locale', wagtail.blocks.CharBlock()), ('slug', wagtail.blocks.CharBlock())])))], blank=True, null=True), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /books/migrations/0134_alter_book_license_name.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-05-09 20:10 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0133_bookcategories_bookcategory'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='book', 15 | name='license_name', 16 | field=models.CharField(blank=True, choices=[('Creative Commons Attribution License', 'Creative Commons Attribution License'), ('Creative Commons Attribution-NonCommercial-ShareAlike License', 'Creative Commons Attribution-NonCommercial-ShareAlike License')], help_text='Name of the license.', max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /books/migrations/0137_alter_book_salesforce_book_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-09-15 19:09 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0136_auto_20220915_0950'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='book', 15 | name='salesforce_book_id', 16 | field=models.CharField(blank=True, help_text='No tracking and not included on adoption and interest forms if left blank)', max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /books/migrations/0140_merge_20230118_1543.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.8 on 2023-01-18 21:43 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0138_alter_book_authors_alter_book_bookstore_content_and_more'), 10 | ('books', '0139_auto_20230112_1426'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /books/migrations/0141_remove_book_k12_subject_studentresources_k12.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.8 on 2023-02-08 19:09 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0140_merge_20230118_1543'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='book', 15 | name='k12_subject', 16 | ), 17 | migrations.AddField( 18 | model_name='studentresources', 19 | name='k12', 20 | field=models.BooleanField(default=False, help_text='Add to K12 student resources.'), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /books/migrations/0145_remove_book_assignable_book_link.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.8 on 2023-03-24 17:26 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0144_book_assignable_book_book_assignable_book_link'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='book', 15 | name='assignable_book_link', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /books/migrations/0150_book_amazon_iframe.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.7 on 2023-10-31 16:26 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0149_alter_book_book_state'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='book', 15 | name='amazon_iframe', 16 | field=models.TextField(blank=True, help_text='Amazon iframe code block', null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /books/migrations/0153_book_polish_site_link.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.8 on 2024-02-23 17:56 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("books", "0152_alter_book_promote_snippet_delete_promotesnippets"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="book", 14 | name="polish_site_link", 15 | field=models.URLField( 16 | blank=True, 17 | help_text="Stores target URL to the Polish site so that REX Polish page headers lead back to each individual book on the Polish site", 18 | null=True, 19 | ), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /books/migrations/0159_book_assignable_isbn_13.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.14 on 2025-05-19 14:44 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("books", "0158_alter_book_cover_color"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="book", 15 | name="assignable_isbn_13", 16 | field=models.CharField(blank=True, help_text="ISBN 13 for assignable version.", max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /books/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/books/migrations/__init__.py -------------------------------------------------------------------------------- /books/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import re_path, path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('/resources/', views.ResourcesViewSet.as_view({'get': 'list'})), 6 | re_path(r'^/?$', views.book_index), 7 | re_path(r'^/(?P[\w-]+)/?$', views.book_detail), 8 | ] 9 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | notify: 3 | require_ci_to_pass: yes 4 | 5 | coverage: 6 | precision: 2 7 | round: down 8 | range: "70...100" 9 | 10 | status: 11 | project: false 12 | patch: true 13 | 14 | parsers: 15 | gcov: 16 | branch_detection: 17 | conditional: yes 18 | loop: yes 19 | method: no 20 | macro: no 21 | 22 | comment: false 23 | ignore: 24 | - "*tests.py" 25 | - 'manage.py' 26 | - '*/migrations/*' 27 | - '*/settings/*' 28 | - '*settings.py' 29 | - '*wsgi.py' 30 | - '*/__init__.py' 31 | - '*/urls.py' 32 | - 'versions/*' # this is internal only, and not mission critical 33 | - 'wagtailimportexport/*' # this doesn't work, candidate for removal / offloading / rewriting -------------------------------------------------------------------------------- /docker-compose.override.yml: -------------------------------------------------------------------------------- 1 | version: '3.5' 2 | services: 3 | app: 4 | platform: linux/amd64 5 | build: . 6 | ports: 7 | - "8000:8000" 8 | volumes: 9 | - .:/code 10 | networks: 11 | - openstax 12 | links: 13 | - postgres 14 | depends_on: 15 | - postgres 16 | postgres: 17 | image: "postgres:13" 18 | volumes: 19 | - pgdata:/var/lib/postgresql/data 20 | networks: 21 | - openstax 22 | environment: 23 | - POSTGRES_USER=postgres 24 | - POSTGRES_PASSWORD=password 25 | - POSTGRES_DB=openstax 26 | networks: 27 | openstax: 28 | name: openstax 29 | volumes: 30 | pgdata: 31 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.5' 2 | services: 3 | app: 4 | image: "openstax/openstax-cms" 5 | -------------------------------------------------------------------------------- /docker/bash: -------------------------------------------------------------------------------- 1 | docker-compose exec -e DJANGO_SETTINGS_MODULE=openstax.settings.docker app bash 2 | -------------------------------------------------------------------------------- /docker/entrypoint: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o errexit 4 | set -o pipefail 5 | set -o nounset 6 | 7 | # uncomment this to load docker secrets into environment variables 8 | # export $(egrep -v '^#' /run/secrets/* | xargs) 9 | 10 | exec "$@" 11 | -------------------------------------------------------------------------------- /docker/start: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o errexit 4 | set -o pipefail 5 | set -o nounset 6 | 7 | cd /code/ || (echo "application code must be mounted at /code/"; exit 1); 8 | 9 | DJANGO_SETTINGS_MODULE=openstax.settings.docker python3 manage.py migrate 10 | DJANGO_SETTINGS_MODULE=openstax.settings.docker python3 manage.py runserver 0.0.0.0:8000 11 | -------------------------------------------------------------------------------- /donations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/donations/__init__.py -------------------------------------------------------------------------------- /donations/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class DonationsConfig(AppConfig): 5 | name = 'donations' 6 | -------------------------------------------------------------------------------- /donations/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2021-05-25 18:00 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='ThankYouNote', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('thank_you_note', models.TextField(blank=True, null=True)), 19 | ('user_info', models.TextField(blank=True, null=True)), 20 | ('created', models.DateField(auto_now_add=True)), 21 | ], 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /donations/migrations/0005_auto_20211021_1045.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-10-21 15:45 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('donations', '0004_auto_20210609_1344'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='thankyounote', 15 | name='consent_to_share_or_contact', 16 | field=models.BooleanField(default=False), 17 | ), 18 | migrations.AddField( 19 | model_name='thankyounote', 20 | name='contact_email_address', 21 | field=models.EmailField(blank=True, max_length=254, null=True), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /donations/migrations/0008_thankyounote_source.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.7 on 2023-11-17 14:37 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('donations', '0007_auto_20220516_2113'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='thankyounote', 15 | name='source', 16 | field=models.CharField(blank=True, default='', max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /donations/migrations/0009_alter_thankyounote_options.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.1.1 on 2025-01-08 23:01 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("donations", "0008_thankyounote_source"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name="thankyounote", 15 | options={"verbose_name": "Thank You Note", "verbose_name_plural": "Thank You Notes"}, 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /donations/migrations/0009_thankyounote_salesforce_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.1.1 on 2025-01-06 23:16 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("donations", "0008_thankyounote_source"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="thankyounote", 15 | name="salesforce_id", 16 | field=models.CharField( 17 | blank=True, default="", help_text="Not null if uploaded to Salesforce", max_length=255 18 | ), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /donations/migrations/0010_merge_20250110_1518.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.1.1 on 2025-01-10 21:18 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("donations", "0009_alter_thankyounote_options"), 10 | ("donations", "0009_thankyounote_salesforce_id"), 11 | ] 12 | 13 | operations = [] 14 | -------------------------------------------------------------------------------- /donations/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/donations/migrations/__init__.py -------------------------------------------------------------------------------- /donations/signals.py: -------------------------------------------------------------------------------- 1 | from django.db.models.signals import post_save 2 | from django.dispatch import receiver 3 | 4 | from global_settings.functions import invalidate_cloudfront_caches 5 | from .models import DonationPopup, Fundraiser 6 | 7 | 8 | @receiver(post_save, sender=DonationPopup) 9 | def clear_cloudfront_on_donation_popup_save(sender, **kwargs): 10 | invalidate_cloudfront_caches('donations/donation-popup') 11 | 12 | 13 | @receiver(post_save, sender=Fundraiser) 14 | def clear_cloudfront_on_fundraiser_save(sender, **kwargs): 15 | invalidate_cloudfront_caches('donations/fundraiser') 16 | -------------------------------------------------------------------------------- /donations/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import include, path 2 | from . import views 3 | from rest_framework import routers 4 | 5 | router = routers.SimpleRouter() 6 | router.register(r'donation-popup', views.DonationPopupViewSet, basename='DonationPopup') 7 | router.register(r'fundraiser', views.FundraiserViewSet, basename='Fundraiser') 8 | 9 | urlpatterns = [ 10 | path('', include(router.urls)), 11 | path('thankyounote/', views.ThankYouNoteViewSet.as_view({'post': 'post'})) 12 | ] 13 | -------------------------------------------------------------------------------- /errata/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/errata/__init__.py -------------------------------------------------------------------------------- /errata/migrations/0002_auto_20161121_1453.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.2 on 2016-11-21 20:53 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('errata', '0001_initial'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='errata', 17 | name='resource', 18 | ), 19 | migrations.AddField( 20 | model_name='errata', 21 | name='resource', 22 | field=models.ManyToManyField(to='errata.Resource'), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /errata/migrations/0003_errata_archived.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.2 on 2016-11-22 15:17 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('errata', '0002_auto_20161121_1453'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='errata', 17 | name='archived', 18 | field=models.BooleanField(default=False), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /errata/migrations/0005_errata_supporting_documentation.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.2 on 2016-12-06 17:39 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('errata', '0004_auto_20161206_1115'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='errata', 17 | name='supporting_documentation', 18 | field=models.FileField(blank=True, null=True, upload_to='errata/'), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /errata/migrations/0006_remove_errata_supporting_documentation.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.2 on 2016-12-06 22:13 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('errata', '0005_errata_supporting_documentation'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='errata', 17 | name='supporting_documentation', 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /errata/migrations/0008_auto_20161212_1309.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.2 on 2016-12-12 19:09 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('errata', '0007_externaldocumentation_internaldocumentation'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='errata', 17 | name='location', 18 | field=models.TextField(blank=True, null=True), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /errata/migrations/0010_auto_20170126_1218.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.5 on 2017-01-26 18:18 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('errata', '0009_auto_20170124_1338'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='errata', 17 | name='resolution', 18 | field=models.CharField(blank=True, choices=[('Duplicate', 'Duplicate'), ('Not An Error', 'Not An Error'), ('Will Not Fix', 'Will Not Fix'), ('Approved', 'Approved'), ('Major Book Revision', 'Major Book Revision')], max_length=100, null=True), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /errata/migrations/0011_auto_20170131_1201.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.5 on 2017-01-31 18:01 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('errata', '0010_auto_20170126_1218'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='externaldocumentation', 18 | name='errata', 19 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='external_documentation', to='errata.Errata'), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /errata/migrations/0013_auto_20170203_0955.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.5 on 2017-02-03 15:55 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('errata', '0012_auto_20170202_1423'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='errata', 17 | name='file', 18 | field=models.FileField(blank=True, null=True, upload_to='errata/user_uploads'), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /errata/migrations/0015_auto_20170206_1125.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.5 on 2017-02-06 17:25 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('errata', '0014_auto_20170203_1420'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='externaldocumentation', 17 | name='errata', 18 | ), 19 | migrations.DeleteModel( 20 | name='ExternalDocumentation', 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /errata/migrations/0016_errata_is_assessment_errata.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.5 on 2017-02-21 16:26 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('errata', '0015_auto_20170206_1125'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='errata', 17 | name='is_assessment_errata', 18 | field=models.CharField(blank=True, choices=[('Yes', 'Yes'), ('No', 'No')], max_length=100, null=True), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /errata/migrations/0017_auto_20170419_1228.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.6 on 2017-04-19 17:28 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('errata', '0016_errata_is_assessment_errata'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='errata', 17 | name='corrected_date', 18 | field=models.DateField(blank=True, null=True), 19 | ), 20 | migrations.AddField( 21 | model_name='errata', 22 | name='reviewed_date', 23 | field=models.DateField(blank=True, null=True), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /errata/migrations/0019_auto_20171019_1158.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-19 16:58 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('errata', '0018_auto_20170919_1140'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='errata', 17 | name='reviewed_date', 18 | field=models.DateField(blank=True, editable=False, null=True), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /errata/migrations/0020_errata_duplicate_id.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-11-01 16:41 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('errata', '0019_auto_20171019_1158'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AddField( 17 | model_name='errata', 18 | name='duplicate_id', 19 | field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='duplicate_report', to='errata.Errata'), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /errata/migrations/0023_auto_20180222_1002.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2018-02-22 16:02 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('errata', '0022_auto_20180205_1505'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='errata', 18 | name='duplicate_id', 19 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='duplicate_report', to='errata.Errata'), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /errata/migrations/0024_errata_assessment_id.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.10 on 2018-02-27 19:29 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('errata', '0023_auto_20180222_1002'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='errata', 17 | name='assessment_id', 18 | field=models.CharField(blank=True, max_length=255, null=True), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /errata/migrations/0026_auto_20180308_0943.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.2 on 2018-03-08 15:43 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('errata', '0025_auto_20180301_1107'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='errata', 15 | name='resolution', 16 | field=models.CharField(blank=True, choices=[('Duplicate', 'Duplicate'), ('Not An Error', 'Not An Error'), ('Will Not Fix', 'Will Not Fix'), ('Approved', 'Approved'), ('Major Book Revision', 'Major Book Revision'), ('Technical Error', 'Technical Error'), ('Sent to Customer Support', 'Sent to Customer Support')], max_length=100, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /errata/migrations/0027_errata_number_of_errors.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.2 on 2018-06-06 13:59 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('errata', '0026_auto_20180308_0943'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='errata', 15 | name='number_of_errors', 16 | field=models.IntegerField(blank=True, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /errata/migrations/0028_auto_20180830_1220.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.2 on 2018-08-30 17:20 2 | 3 | import django.core.validators 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('errata', '0027_errata_number_of_errors'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='errata', 16 | name='openstax_book', 17 | field=models.CharField(max_length=255, null=True), 18 | ), 19 | migrations.AddField( 20 | model_name='errata', 21 | name='submitted_by_account_id', 22 | field=models.IntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0)]), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /errata/migrations/0029_auto_20181002_1052.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.2 on 2018-10-02 15:52 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('errata', '0028_auto_20180830_1220'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='errata', 15 | name='openstax_book', 16 | field=models.CharField(blank=True, editable=False, max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /errata/migrations/0031_blockedusers.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-06-27 20:40 2 | 3 | import django.core.validators 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('errata', '0030_auto_20181130_1235'), 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='BlockedUsers', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('account_id', models.IntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0)])), 19 | ('reason', models.TextField(blank=True, null=True)), 20 | ], 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /errata/migrations/0032_auto_20190627_1548.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-06-27 20:48 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('errata', '0031_blockedusers'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameModel( 14 | old_name='BlockedUsers', 15 | new_name='BlockedUser', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /errata/migrations/0036_errata_junk.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.5 on 2019-11-21 21:32 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('errata', '0035_emailtext'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='errata', 15 | name='junk', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /errata/migrations/0037_auto_20191210_1419.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.5 on 2019-12-10 20:19 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('errata', '0036_errata_junk'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='errata', 15 | name='number_of_errors', 16 | field=models.PositiveIntegerField(default=1), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /errata/migrations/0040_merge_20200214_0945.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.8 on 2020-02-14 15:45 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('errata', '0039_auto_20200213_1248'), 10 | ('errata', '0039_auto_20200213_1418'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /errata/migrations/0044_auto_20200714_1429.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-14 19:29 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('errata', '0043_auto_20200414_1517'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='errata', 15 | name='status', 16 | field=models.CharField(choices=[('New', 'New'), ('Editorial Review', 'Editorial Review'), ('K-12 Editorial Review', 'K-12 Editorial Review'), ('Reviewed', 'Reviewed'), ('Completed', 'Completed')], default='New', max_length=100), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /errata/migrations/0047_auto_20200804_1200.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-08-04 17:00 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('errata', '0046_auto_20200722_1225'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='errata', 15 | name='status', 16 | field=models.CharField(choices=[('New', 'New'), ('Editorial Review', 'Editorial Review'), ('K-12 Editorial Review', 'K-12 Editorial Review'), ('Internal Editorial Review', 'Internal Editorial Review'), ('Reviewed', 'Reviewed'), ('Completed', 'Completed')], default='New', max_length=100), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /errata/migrations/0048_auto_20200807_1056.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-08-07 15:56 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('errata', '0047_auto_20200804_1200'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='errata', 15 | name='status', 16 | field=models.CharField(choices=[('New', 'New'), ('Editorial Review', 'Editorial Review'), ('Andrew Editorial Review', 'Andrew Editorial Review'), ('Anthony Editorial Review', 'Anthony Editorial Review'), ('Reviewed', 'Reviewed'), ('Completed', 'Completed')], default='New', max_length=100), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /errata/migrations/0049_alter_errata_status.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-07-20 17:55 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('errata', '0048_auto_20200807_1056'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='errata', 15 | name='status', 16 | field=models.CharField(choices=[('New', 'New'), ('Editorial Review', 'Editorial Review'), ('K-12 Editorial Review', 'K-12 Editorial Review'), ('Associate Editorial Review', 'Kelsey Editorial Review'), ('Anthony Editorial Review', 'Anthony Editorial Review'), ('Reviewed', 'Reviewed'), ('Completed', 'Completed')], default='New', max_length=100), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /errata/migrations/0051_auto_20220516_2113.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-05-17 02:13 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('errata', '0050_auto_20220207_1057'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='errata', 15 | name='submitted_by', 16 | ), 17 | migrations.RemoveField( 18 | model_name='errata', 19 | name='submitter_email_address', 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /errata/migrations/0052_alter_errata_status.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-07-19 17:28 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('errata', '0051_auto_20220516_2113'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='errata', 15 | name='status', 16 | field=models.CharField(choices=[('New', 'New'), ('Editorial Review', 'Editorial Review'), ('K-12 Editorial Review', 'K-12 Editorial Review'), ('Cartridge Review', 'Cartridge Review'), ('OpenStax Editorial Review', 'OpenStax Editorial Review'), ('Reviewed', 'Reviewed'), ('Completed', 'Completed')], default='New', max_length=100), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /errata/migrations/0055_remove_errata_accounts_user_email_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.7 on 2023-09-25 19:06 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("errata", "0054_alter_errata_resource"), 9 | ] 10 | 11 | operations = [ 12 | migrations.RemoveField( 13 | model_name="errata", 14 | name="accounts_user_email", 15 | ), 16 | migrations.RemoveField( 17 | model_name="errata", 18 | name="accounts_user_faculty_status", 19 | ), 20 | migrations.RemoveField( 21 | model_name="errata", 22 | name="accounts_user_name", 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /errata/migrations/0056_alter_errata_options.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.7 on 2023-11-17 14:37 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('errata', '0055_remove_errata_accounts_user_email_and_more'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name='errata', 15 | options={'verbose_name': 'erratum list', 'verbose_name_plural': 'errata list'}, 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /errata/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/errata/migrations/__init__.py -------------------------------------------------------------------------------- /errata/templates/templates/email.txt: -------------------------------------------------------------------------------- 1 | OpenStax 2 | openstax.org 3 | 4 | {{subject}} 5 | 6 | {{body}} 7 | 8 | {% if created %} 9 | Submission ID: {{ id }} 10 | Title: {{ title }} 11 | Source: {{ source }} 12 | Status: {{ status }} 13 | Error Type: {{ error_type }} 14 | Source: {{ source }} 15 | Description: {{ description }} 16 | Submitted: {{ date_submitted }} 17 | {% endif %} 18 | 19 | For more details, visit {{ host }}/errata/{{ id }} 20 | 21 | Access. The future of education. 22 | 23 | Sincerely, 24 | The OpenStax Team 25 | 26 | OpenStax 27 | 6100 Main St 28 | MS-375 29 | Houston, Texas 77005 -------------------------------------------------------------------------------- /errata/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import include, path 2 | from rest_framework import routers 3 | from . import views 4 | 5 | router = routers.SimpleRouter() 6 | router.register(r'', views.ErrataView) 7 | 8 | urlpatterns = [ 9 | path(r'', include(router.urls)), 10 | ] 11 | -------------------------------------------------------------------------------- /errata/wagtail_hooks.py: -------------------------------------------------------------------------------- 1 | from wagtail import hooks 2 | from .views import errata_viewset 3 | 4 | @hooks.register("register_admin_viewset") 5 | def register_viewset(): 6 | return errata_viewset 7 | -------------------------------------------------------------------------------- /fixtures/vcr_cassettes/README.md: -------------------------------------------------------------------------------- 1 | # VCR Recordings for openstax-cms 2 | These are VCR cassettes to record interactions with Salesforce. 3 | If you need to change a test that interacts with these, you can remove the affected yaml file and rerun the tests, 4 | this will regenerate the API interaction. 5 | 6 | **Be sure to remove any usernames or passwords from the file before checking them in.** 7 | -------------------------------------------------------------------------------- /global_settings/__init__.py: -------------------------------------------------------------------------------- 1 | #default_app_config = 'global_settings.apps.GlobalSettingsConfig' 2 | -------------------------------------------------------------------------------- /global_settings/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class GlobalSettingsConfig(AppConfig): 5 | name = 'global_settings' 6 | verbose_name = 'global_settings' 7 | default = True 8 | 9 | def ready(self): 10 | import global_settings.signals # noqa 11 | import api.signals 12 | import donations.signals 13 | import webinars.signals 14 | import snippets.signals 15 | import salesforce.signals 16 | import oxmenus.signals 17 | -------------------------------------------------------------------------------- /global_settings/migrations/0002_auto_20160906_1344.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.8 on 2016-09-06 18:44 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('global_settings', '0001_initial'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='stickynote', 17 | name='show_sticky', 18 | field=models.NullBooleanField(), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /global_settings/migrations/0003_auto_20160906_1348.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.8 on 2016-09-06 18:48 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('global_settings', '0002_auto_20160906_1344'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='stickynote', 17 | name='show_sticky', 18 | field=models.BooleanField(default=False), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /global_settings/migrations/0005_remove_stickynote_header.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.1 on 2016-09-23 15:11 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('global_settings', '0004_auto_20160906_1403'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='stickynote', 17 | name='header', 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /global_settings/migrations/0009_auto_20170912_1337.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.6 on 2017-09-12 18:37 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | import wagtail.fields 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('global_settings', '0008_auto_20170822_0956'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='footer', 18 | name='copyright', 19 | field=wagtail.fields.RichTextField(), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /global_settings/migrations/0010_auto_20170914_1600.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.6 on 2017-09-14 21:00 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('global_settings', '0009_auto_20170912_1337'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='footer', 17 | name='copyright', 18 | field=models.TextField(), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /global_settings/migrations/0012_auto_20171009_1008.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-09 15:08 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('global_settings', '0011_mail'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='mail', 17 | name='site', 18 | ), 19 | migrations.DeleteModel( 20 | name='Mail', 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /global_settings/migrations/0013_auto_20180515_1603.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.2 on 2018-05-15 21:03 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('global_settings', '0012_auto_20171009_1008'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='stickynote', 15 | name='expires', 16 | field=models.DateTimeField(blank=True, help_text='Used to override the content of the Give Sticky. Set the content below to change.', null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /global_settings/migrations/0014_auto_20180607_1351.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.2 on 2018-06-07 18:51 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('global_settings', '0013_auto_20180515_1603'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='stickynote', 15 | name='expires', 16 | field=models.DateTimeField(blank=True, help_text='Set the date to override the content of the Give Sticky. Set the content below to change.', null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /global_settings/migrations/0015_auto_20180816_1056.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.2 on 2018-08-16 15:56 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('global_settings', '0014_auto_20180607_1351'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='stickynote', 15 | name='content', 16 | field=models.TextField(), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /global_settings/migrations/0017_auto_20200325_1058.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.10 on 2020-03-25 15:58 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('global_settings', '0016_cloudfrontdistribution'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='cloudfrontdistribution', 15 | name='distribution_id', 16 | field=models.CharField(blank=True, max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /global_settings/migrations/0019_stickynote_show_popup.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-08-10 18:11 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('global_settings', '0018_auto_20200727_1047'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='stickynote', 15 | name='show_popup', 16 | field=models.BooleanField(default=False, help_text='Replaces the top banner with a popup, start and expire dates still control timing.'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /global_settings/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/global_settings/migrations/__init__.py -------------------------------------------------------------------------------- /mail/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/mail/__init__.py -------------------------------------------------------------------------------- /mail/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Mail 4 | 5 | 6 | class MailAdmin(admin.ModelAdmin): 7 | list_display = ['subject', 'to_address'] 8 | 9 | admin.site.register(Mail, MailAdmin) 10 | -------------------------------------------------------------------------------- /mail/functions.py: -------------------------------------------------------------------------------- 1 | from django.core.mail import EmailMessage, send_mail 2 | from sentry_sdk import capture_exception 3 | 4 | 5 | def send_redirect_report(bad_redirects): 6 | msg = 'The Openstax Redirect Report has been run' 7 | msg += '\n\nShort Code,Redirect URL' 8 | msg += '\n' + str(bad_redirects) 9 | 10 | subject = 'OpenStax Redirect Report' 11 | from_address = 'noreply@openstax.org' 12 | to_address = ['cmsupport@openstax.org', ] 13 | 14 | try: 15 | email = EmailMessage(subject, 16 | msg, 17 | from_address, 18 | to_address) 19 | email.send() 20 | 21 | except Exception as e: 22 | capture_exception(e) 23 | -------------------------------------------------------------------------------- /mail/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-09 15:13 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='Mail', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('subject', models.CharField(max_length=255)), 21 | ('to_address', models.EmailField(max_length=254)), 22 | ], 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /mail/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/mail/migrations/__init__.py -------------------------------------------------------------------------------- /mail/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class Mail(models.Model): 5 | subject = models.CharField(max_length=255) 6 | to_address = models.EmailField() 7 | 8 | def __str__(self): 9 | return self.subject 10 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'openstax.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /news/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/news/__init__.py -------------------------------------------------------------------------------- /news/migrations/0002_newsarticle_tags.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.6 on 2016-05-17 19:55 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | import taggit.managers 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('taggit', '0002_auto_20150616_2121'), 13 | ('news', '0001_initial'), 14 | ] 15 | 16 | operations = [ 17 | migrations.AddField( 18 | model_name='newsarticle', 19 | name='tags', 20 | field=taggit.managers.TaggableManager(help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags'), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /news/migrations/0004_newsarticle_press_kit.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.6 on 2016-05-23 15:12 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('wagtaildocs', '0007_merge'), 13 | ('news', '0003_auto_20160517_1521'), 14 | ] 15 | 16 | operations = [ 17 | migrations.AddField( 18 | model_name='newsarticle', 19 | name='press_kit', 20 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtaildocs.Document'), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /news/migrations/0007_auto_20160523_1049.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.6 on 2016-05-23 15:49 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('news', '0006_auto_20160523_1042'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='newsarticle', 17 | name='pin_to_top', 18 | field=models.BooleanField(default=False), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /news/migrations/0008_newsarticle_author.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.6 on 2016-06-06 15:19 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('news', '0007_auto_20160523_1049'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='newsarticle', 17 | name='author', 18 | field=models.CharField(default='', max_length=250), 19 | preserve_default=False, 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /news/migrations/0012_auto_20160614_1037.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.6 on 2016-06-14 15:37 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('news', '0011_auto_20160614_1034'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RenameField( 16 | model_name='newsarticle', 17 | old_name='image', 18 | new_name='featured_image', 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /news/migrations/0014_auto_20160617_1140.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.6 on 2016-06-17 16:40 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('news', '0013_auto_20160616_1033'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='newsarticle', 17 | name='subheading', 18 | field=models.CharField(blank=True, max_length=250, null=True), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /news/migrations/0015_remove_newsarticle_heading.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.6 on 2016-06-17 16:42 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('news', '0014_auto_20160617_1140'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='newsarticle', 17 | name='heading', 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /news/migrations/0016_newsarticle_heading.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.8 on 2016-08-29 19:59 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('news', '0015_remove_newsarticle_heading'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='newsarticle', 17 | name='heading', 18 | field=models.CharField(default='', help_text='Heading displayed on website', max_length=250), 19 | preserve_default=False, 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /news/migrations/0017_auto_20161018_0757.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.1 on 2016-10-18 12:57 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('news', '0016_newsarticle_heading'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='newsarticle', 18 | name='featured_image', 19 | field=models.ForeignKey(blank=True, help_text='Image should be 1200px x 600px', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image'), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /news/migrations/0018_auto_20161025_1300.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.2 on 2016-10-25 18:00 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('news', '0017_auto_20161018_0757'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='newsarticle', 18 | name='featured_image', 19 | field=models.ForeignKey(blank=True, help_text='Image should be 1200 x 600', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image'), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /news/migrations/0022_auto_20180515_1612.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.2 on 2018-05-15 21:12 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('news', '0021_auto_20180515_1603'), 10 | ] 11 | 12 | operations = [ 13 | migrations.DeleteModel( 14 | name='MissionStatement', 15 | ), 16 | migrations.RemoveField( 17 | model_name='missionstatements', 18 | name='mission_statements', 19 | ), 20 | migrations.DeleteModel( 21 | name='MissionStatements', 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /news/migrations/0028_remove_pressindex_mentions.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.2 on 2018-05-17 21:47 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('news', '0027_auto_20180517_1443'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='pressindex', 15 | name='mentions', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /news/migrations/0040_alter_newsarticle_content_types.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2022-04-27 16:21 2 | 3 | from django.db import migrations 4 | import news.models 5 | import wagtail.blocks 6 | import wagtail.fields 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('news', '0039_auto_20220427_1107'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='newsarticle', 18 | name='content_types', 19 | field=wagtail.fields.StreamField([('content_type', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('content_type', news.models.ContentTypeChooserBlock(label='Blog Content Type', required=True, target_model='snippets.BlogContentType'))])))], null=True), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /news/migrations/0041_alter_newsarticletag_tag.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.4 on 2022-05-18 16:36 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('news', '0040_alter_newsarticle_content_types'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='newsarticletag', 16 | name='tag', 17 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_items', to='taggit.tag'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /news/migrations/0042_merge_20220519_1249.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.4 on 2022-05-19 17:49 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('news', '0041_alter_newsarticletag_tag'), 10 | ('news', '0041_auto_20220517_1353'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /news/migrations/0043_alter_newsarticle_featured_video.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-05-20 16:07 2 | 3 | from django.db import migrations 4 | import wagtail.blocks 5 | import wagtail.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('news', '0042_auto_20220520_0855'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='newsarticle', 17 | name='featured_video', 18 | field=wagtail.fields.StreamField([('video', wagtail.blocks.RawHTMLBlock())], blank=True, null=True), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /news/migrations/0045_merge_20220520_1523.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-05-20 20:23 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('news', '0042_merge_20220519_1249'), 10 | ('news', '0044_auto_20220520_1158'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /news/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/news/migrations/__init__.py -------------------------------------------------------------------------------- /news/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import re_path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | re_path(r'^news/?$', views.news_index), 6 | re_path(r'^news/(?P[\w-]+)/?$', views.news_detail), 7 | 8 | re_path(r'^press/?$', views.press_index), 9 | re_path(r'^press/(?P[\w-]+)/?$', views.press_detail), 10 | ] 11 | -------------------------------------------------------------------------------- /openstax/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/openstax/__init__.py -------------------------------------------------------------------------------- /openstax/custom_storages.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | from storages.backends.s3boto3 import S3Boto3Storage 3 | 4 | 5 | class MediaStorage(S3Boto3Storage): 6 | location = settings.MEDIAFILES_LOCATION 7 | file_overwrite = False 8 | -------------------------------------------------------------------------------- /openstax/settings/__init__.py: -------------------------------------------------------------------------------- 1 | from .base import * 2 | -------------------------------------------------------------------------------- /oxauth/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/oxauth/__init__.py -------------------------------------------------------------------------------- /oxauth/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-05-17 14:27 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ] 15 | 16 | operations = [ 17 | ] 18 | -------------------------------------------------------------------------------- /oxauth/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/oxauth/migrations/__init__.py -------------------------------------------------------------------------------- /oxauth/models.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.models import User 2 | from django.db import models 3 | 4 | # TODO: This can be removed, it's not being used but will do in another PR because it causing deployment issues. 5 | class OpenStaxUserProfile(models.Model): 6 | user = models.OneToOneField(User, on_delete=models.CASCADE) 7 | openstax_accounts_id = models.IntegerField() 8 | openstax_accounts_uuid = models.UUIDField() 9 | 10 | def __str__(self): 11 | return self.user.username 12 | -------------------------------------------------------------------------------- /oxmenus/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/oxmenus/__init__.py -------------------------------------------------------------------------------- /oxmenus/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/oxmenus/migrations/__init__.py -------------------------------------------------------------------------------- /oxmenus/serializers.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | from .models import Menus 3 | 4 | 5 | class OXMenusSerializer(serializers.ModelSerializer): 6 | menu = serializers.SerializerMethodField() 7 | 8 | def get_menu(self, obj): 9 | return obj.menu_block_json() 10 | 11 | 12 | class Meta: 13 | model = Menus 14 | fields = ('name', 15 | 'menu') 16 | read_only_fields = ('name', 17 | 'menu') 18 | -------------------------------------------------------------------------------- /oxmenus/signals.py: -------------------------------------------------------------------------------- 1 | from django.db.models.signals import post_save 2 | from django.dispatch import receiver 3 | 4 | from global_settings.functions import invalidate_cloudfront_caches 5 | from .models import Menus 6 | 7 | 8 | @receiver(post_save, sender=Menus) 9 | def clear_cloudfront_on_oxmenus_save(sender, **kwargs): 10 | invalidate_cloudfront_caches('oxmenus') -------------------------------------------------------------------------------- /oxmenus/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import include, path 2 | from rest_framework import routers 3 | from . import views 4 | 5 | router = routers.SimpleRouter() 6 | router.register(r'', views.OXMenusViewSet, basename='OXMenus') 7 | 8 | urlpatterns = [ 9 | path(r'', include(router.urls)), 10 | ] -------------------------------------------------------------------------------- /oxmenus/views.py: -------------------------------------------------------------------------------- 1 | from rest_framework import viewsets 2 | from .models import Menus 3 | from .serializers import OXMenusSerializer 4 | 5 | 6 | class OXMenusViewSet(viewsets.ReadOnlyModelViewSet): 7 | queryset = Menus.objects.all() 8 | serializer_class = OXMenusSerializer 9 | -------------------------------------------------------------------------------- /oxmenus/wagtail_hooks.py: -------------------------------------------------------------------------------- 1 | from wagtail_modeladmin.options import ModelAdmin, modeladmin_register 2 | from .models import Menus 3 | 4 | 5 | class OXMenusAdmin(ModelAdmin): 6 | model = Menus 7 | menu_icon = 'grip' 8 | menu_label = 'OX Menu' 9 | menu_order = 5000 10 | list_display = ('name',) 11 | search_fields = ('name',) # trailing comma needed to make search work 12 | 13 | 14 | modeladmin_register(OXMenusAdmin) 15 | -------------------------------------------------------------------------------- /pages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/pages/__init__.py -------------------------------------------------------------------------------- /pages/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/pages/management/__init__.py -------------------------------------------------------------------------------- /pages/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/pages/management/commands/__init__.py -------------------------------------------------------------------------------- /pages/migrations/0003_merge_20200930_1001.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-30 15:01 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0002_auto_20200928_1405'), 10 | ('pages', '0002_auto_20200813_1540'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /pages/migrations/0004_delete_roverpage.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-11-05 23:27 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('wagtailredirects', '0006_redirect_increase_max_length'), 10 | ('wagtailforms', '0004_add_verbose_name_plural'), 11 | ('wagtailcore', '0052_pagelogentry'), 12 | ('pages', '0003_merge_20200930_1001'), 13 | ] 14 | 15 | operations = [ 16 | migrations.DeleteModel( 17 | name='RoverPage', 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /pages/migrations/0006_auto_20201105_1620.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-11-05 22:20 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('wagtaildocs', '0010_document_file_hash'), 11 | ('pages', '0005_auto_20201105_1414'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='llphpage', 17 | name='book_cover', 18 | field=models.ForeignKey(blank=True, help_text='The book cover to be shown on the website.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtaildocs.Document'), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /pages/migrations/0007_merge_20201106_1444.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-11-06 20:44 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0006_auto_20201105_1620'), 10 | ('pages', '0004_delete_roverpage'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /pages/migrations/0010_auto_20201204_1520.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-12-04 21:20 2 | 3 | from django.db import migrations 4 | import wagtail.blocks 5 | import wagtail.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('pages', '0009_auto_20201204_1518'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='tutormarketing', 17 | name='cost_cards', 18 | field=wagtail.fields.StreamField([('cards', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=True)), ('description', wagtail.blocks.RichTextBlock(required=True))]))]), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /pages/migrations/0012_auto_20201204_1525.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-12-04 21:25 2 | 3 | from django.db import migrations 4 | import pages.models 5 | import wagtail.blocks 6 | import wagtail.fields 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('pages', '0011_auto_20201204_1524'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='tutormarketing', 18 | name='features_cards', 19 | field=wagtail.fields.StreamField([('cards', wagtail.blocks.StructBlock([('icon', pages.models.APIImageChooserBlock(required=False)), ('title', wagtail.blocks.CharBlock(required=True)), ('description', wagtail.blocks.RichTextBlock(required=True))]))]), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /pages/migrations/0014_auto_20201207_1355.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-12-07 19:55 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('wagtailimages', '0022_uploadedimage'), 11 | ('pages', '0013_auto_20201204_1532'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='tutormarketing', 17 | name='feedback_image', 18 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image'), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /pages/migrations/0015_delete_card.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-12-09 14:35 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0014_auto_20201207_1355'), 10 | ] 11 | 12 | operations = [ 13 | migrations.DeleteModel( 14 | name='Card', 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /pages/migrations/0040_auto_20210505_1339.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2021-05-05 18:39 2 | 3 | from django.db import migrations 4 | import wagtail.blocks 5 | import wagtail.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('pages', '0039_auto_20210427_1415'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='homepage', 17 | name='quotes', 18 | field=wagtail.fields.StreamField([('quote', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('testimonial', wagtail.blocks.TextBlock(required=False)), ('author', wagtail.blocks.CharBlock(Required=False))])))]), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /pages/migrations/0044_auto_20210513_1515.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2021-05-13 20:15 2 | 3 | from django.db import migrations 4 | import wagtail.blocks 5 | import wagtail.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('pages', '0043_auto_20210506_1453'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='tutormarketing', 17 | name='feedback_image', 18 | ), 19 | migrations.AddField( 20 | model_name='tutormarketing', 21 | name='feedback_video', 22 | field=wagtail.fields.StreamField([('html', wagtail.blocks.RawHTMLBlock())], default=''), 23 | preserve_default=False, 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /pages/migrations/0047_institutionalpartnership_application_link.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-07-19 15:40 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0046_auto_20210628_1632'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='institutionalpartnership', 15 | name='application_link', 16 | field=models.URLField(blank=True, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /pages/migrations/0049_auto_20211215_1046.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2021-12-15 16:46 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0048_auto_20210830_1133'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='homepage', 15 | name='banner_get_started_link', 16 | field=models.CharField(blank=True, default='', max_length=255), 17 | ), 18 | migrations.AlterField( 19 | model_name='homepage', 20 | name='banner_login_link', 21 | field=models.CharField(blank=True, default='', max_length=255), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /pages/migrations/0050_auto_20211216_1220.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2021-12-16 18:20 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0049_auto_20211215_1046'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='homepage', 15 | name='banner_get_started_link', 16 | field=models.URLField(blank=True, default=''), 17 | ), 18 | migrations.AlterField( 19 | model_name='homepage', 20 | name='banner_login_link', 21 | field=models.URLField(blank=True, default=''), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /pages/migrations/0052_alter_supporters_funder_groups.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2022-02-07 20:34 2 | 3 | from django.db import migrations 4 | import wagtail.blocks 5 | import wagtail.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('pages', '0051_auto_20220207_1342'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='supporters', 17 | name='funder_groups', 18 | field=wagtail.fields.StreamField([('grouplist', wagtail.blocks.StructBlock([('funders', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('funder_name', wagtail.blocks.CharBlock(required=True)), ('url', wagtail.blocks.URLBlock(required=False))])))]))]), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /pages/migrations/0053_subject_page_description.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2022-02-17 19:03 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0052_subject_subjectorderable'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='subject', 15 | name='page_description', 16 | field=models.TextField(default=''), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /pages/migrations/0055_supporters_disclaimer.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2022-02-07 21:16 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0054_alter_supporters_funder_groups'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='supporters', 15 | name='disclaimer', 16 | field=models.TextField(default=''), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /pages/migrations/0056_merge_20220208_1013.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2022-02-08 16:13 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0052_subject_subjectorderable'), 10 | ('pages', '0055_supporters_disclaimer'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /pages/migrations/0057_merge_20220223_1247.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2022-02-23 18:47 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0053_subject_page_description'), 10 | ('pages', '0056_merge_20220208_1013'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /pages/migrations/0069_merge_20230118_1543.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.8 on 2023-01-18 21:43 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0067_alter_aboutuspage_what_cards_and_more'), 10 | ('pages', '0068_k12mainpage_k12subject'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /pages/migrations/0069_remove_learningresearchpage_mission_header_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.8 on 2023-01-23 18:13 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0068_k12mainpage_k12subject'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='learningresearchpage', 15 | name='mission_header', 16 | ), 17 | migrations.DeleteModel( 18 | name='ResearchPage', 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /pages/migrations/0071_merge_20230202_1030.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.8 on 2023-02-02 16:30 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0069_remove_learningresearchpage_mission_header_and_more'), 10 | ('pages', '0070_alter_k12mainpage_faqs_and_more'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /pages/migrations/0081_remove_allylogos_openstax_logos_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.8 on 2023-07-11 19:28 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0080_homepage_k12_cta_button_text_and_more'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='allylogos', 15 | name='openstax_logos', 16 | ), 17 | migrations.RemoveField( 18 | model_name='allylogos', 19 | name='openstax_logos_description', 20 | ), 21 | migrations.RemoveField( 22 | model_name='allylogos', 23 | name='openstax_logos_heading', 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /pages/migrations/0082_remove_webinarpage_description_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.8 on 2023-07-27 14:45 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('pages', '0081_remove_allylogos_openstax_logos_and_more'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='webinarpage', 15 | name='description', 16 | ), 17 | migrations.RemoveField( 18 | model_name='webinarpage', 19 | name='hero_image', 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /pages/migrations/0132_remove_rootpage_layout.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.7 on 2024-07-24 23:45 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("pages", "0131_alter_impact_making_a_difference"), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name="rootpage", 15 | name="layout", 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /pages/migrations/0147_merge_20240725_1221.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.7 on 2024-07-25 17:21 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("pages", "0137_alter_rootpage_promote_image"), 10 | ("pages", "0146_alter_rootpage_body"), 11 | ] 12 | 13 | operations = [] 14 | -------------------------------------------------------------------------------- /pages/migrations/0153_alter_homepage_options.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.1.1 on 2025-01-08 23:01 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("pages", "0152_alter_rootpage_body_alter_rootpage_layout"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name="homepage", 15 | options={"verbose_name": "Home Page"}, 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /pages/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/pages/migrations/__init__.py -------------------------------------------------------------------------------- /pages/static/images/openstax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/pages/static/images/openstax.png -------------------------------------------------------------------------------- /pages/templates/pages/general_page.html: -------------------------------------------------------------------------------- 1 | {% extends 'page.html' %} 2 | {% load wagtailcore_tags wagtailimages_tags %} 3 | 4 | {% block content %} 5 | {% for block in page.body %} 6 | {% if block.block_type == 'multicolumn' %} 7 | {# We need to do some magic to handle this block type and have it look good. Ignoring for the spike. #} 8 | {% else %} 9 |
10 | {% include_block block %} 11 |
12 | {% endif %} 13 | {% endfor %} 14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /pages/templates/preview.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /pages/templates/wagtailadmin/admin_base.html: -------------------------------------------------------------------------------- 1 | {% extends "wagtailadmin/admin_base.html" %} 2 | {% load static %} 3 | 4 | {% block branding_title %}OpenStax CMS{% endblock %} 5 | 6 | {% block branding_logo %} 7 | OpenStax CMS 8 | {% endblock %} 9 | 10 | {% block branding_favicon %} 11 | 12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /pages/templates/wagtailadmin/base.html: -------------------------------------------------------------------------------- 1 | {% extends "wagtailadmin/base.html" %} 2 | {% load static %} 3 | 4 | {% block branding_logo %} 5 | OpenStax CMS 6 | {% endblock %} 7 | -------------------------------------------------------------------------------- /pages/templates/wagtailusers/users/edit.html: -------------------------------------------------------------------------------- 1 | {% extends "wagtailusers/users/edit.html" %} 2 | 3 |
  • 4 | {% block extra_fields %} 5 | {% include "wagtailadmin/shared/field.html" with field=form.is_staff %} 6 | {% endblock extra_fields %} 7 |
  • 8 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/public/favicon.ico -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.black] 2 | line-length = 120 3 | include = '\.pyi?$' 4 | extend_exclude = ''' 5 | ^.*\b(migrations)\b.*$ 6 | ''' 7 | -------------------------------------------------------------------------------- /redirects/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/redirects/__init__.py -------------------------------------------------------------------------------- /requirements/base.txt: -------------------------------------------------------------------------------- 1 | boto3 2 | botocore 3 | bs4 4 | Django==5.0.14 5 | certifi 6 | django-admin-rangefilter 7 | django-crontab 8 | django-compressor 9 | django-filter 10 | django-import-export 11 | django-modelcluster 12 | django-openstax-accounts 13 | django-openstax-healthcheck 14 | django-rest-auth 15 | django-reversion 16 | django-ses 17 | django-storages 18 | django-taggit>=6.1.0 19 | djangorestframework 20 | html2text # news feed 21 | mapbox 22 | Pillow 23 | psycopg2 24 | python-dotenv 25 | rapidfuzz 26 | requests 27 | sentry-sdk 28 | simple-salesforce 29 | six 30 | ua-parser 31 | unicodecsv 32 | vcrpy # recoding Salesforce interactions in tests 33 | wagtail 34 | wagtail-modeladmin 35 | whitenoise 36 | -------------------------------------------------------------------------------- /requirements/dev.txt: -------------------------------------------------------------------------------- 1 | -r base.txt 2 | django-extensions 3 | pipdeptree 4 | pydot 5 | black # code formatting 6 | django-debug-toolbar 7 | django-cors-headers 8 | -------------------------------------------------------------------------------- /requirements/production.txt: -------------------------------------------------------------------------------- 1 | -r base.txt 2 | uwsgi>=2.0.20 3 | -------------------------------------------------------------------------------- /requirements/test.txt: -------------------------------------------------------------------------------- 1 | -r dev.txt 2 | selenium>=4.0.0 3 | coverage>=6.2 4 | 5 | -------------------------------------------------------------------------------- /salesforce/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/salesforce/__init__.py -------------------------------------------------------------------------------- /salesforce/functions.py: -------------------------------------------------------------------------------- 1 | from .salesforce import Salesforce 2 | 3 | 4 | def retrieve_salesforce_names(sf_book_id): 5 | if sf_book_id: 6 | with Salesforce() as sf: 7 | command = "Select Name, Official_Name__c from Book__c where Id = '" + sf_book_id + "'" 8 | response = sf.query_all(command) 9 | book = response['records'] 10 | sf_names = {} 11 | for record in book: 12 | sf_names['Name'] = record['Name'] 13 | sf_names['Official_Name'] = record['Official_Name__c'] 14 | return sf_names -------------------------------------------------------------------------------- /salesforce/management/commands/update_schools_and_mapbox.py: -------------------------------------------------------------------------------- 1 | from django.core.management.base import BaseCommand 2 | from django.core.management import call_command 3 | 4 | class Command(BaseCommand): 5 | help = "update schools from salesforce.com and then upload geoJSON school data to Mapbox" 6 | 7 | def handle(self, *args, **options): 8 | print("Running update_schools...") 9 | call_command("update_schools") 10 | 11 | print("Running upload_mapbox_schools...") 12 | call_command("upload_mapbox_schools") 13 | -------------------------------------------------------------------------------- /salesforce/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.1 on 2016-03-18 00:50 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='Adopter', 18 | fields=[ 19 | ('sales_id', models.CharField(max_length=255, primary_key=True, serialize=False)), 20 | ('name', models.CharField(max_length=255, null=True)), 21 | ('description', models.TextField(null=True)), 22 | ('website', models.URLField(max_length=255, null=True)), 23 | ], 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /salesforce/migrations/0002_auto_20160318_0843.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.1 on 2016-03-18 13:43 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('salesforce', '0001_initial'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='adopter', 17 | name='name', 18 | field=models.CharField(default='', max_length=255), 19 | preserve_default=False, 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /salesforce/migrations/0003_school.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.10.6 on 2017-05-08 17:39 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('salesforce', '0002_auto_20160318_0843'), 12 | ] 13 | 14 | operations = [ 15 | migrations.CreateModel( 16 | name='School', 17 | fields=[ 18 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 19 | ('name', models.CharField(max_length=255)), 20 | ], 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /salesforce/migrations/0008_mapboxdataset.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.2 on 2018-07-30 14:39 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0007_auto_20180522_1557'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='MapBoxDataset', 15 | fields=[ 16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('name', models.CharField(max_length=255)), 18 | ('dataset_id', models.CharField(max_length=255)), 19 | ], 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /salesforce/migrations/0010_auto_20180910_1320.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.2 on 2018-09-10 18:20 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0009_salesforcesettings'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='school', 15 | name='testimonial_name', 16 | field=models.CharField(blank=True, max_length=255, null=True), 17 | ), 18 | migrations.AddField( 19 | model_name='school', 20 | name='testimonial_position', 21 | field=models.CharField(blank=True, max_length=255, null=True), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /salesforce/migrations/0011_auto_20190531_0025.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-05-31 05:25 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0010_auto_20180910_1320'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='school', 15 | name='all_time_savings', 16 | field=models.DecimalField(blank=True, decimal_places=3, max_digits=12, null=True), 17 | ), 18 | migrations.AlterField( 19 | model_name='school', 20 | name='current_year_savings', 21 | field=models.DecimalField(blank=True, decimal_places=3, max_digits=12, null=True), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /salesforce/migrations/0012_mapboxdataset_style_url.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-06-03 15:40 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0011_auto_20190531_0025'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='mapboxdataset', 15 | name='style_url', 16 | field=models.CharField(default=str, max_length=255), 17 | preserve_default=False, 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /salesforce/migrations/0013_mapboxdataset_tileset_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-06-07 16:19 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0012_mapboxdataset_style_url'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='mapboxdataset', 15 | name='tileset_id', 16 | field=models.CharField(default='', max_length=255), 17 | preserve_default=False, 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /salesforce/migrations/0014_remove_mapboxdataset_dataset_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-06-07 21:14 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0013_mapboxdataset_tileset_id'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='mapboxdataset', 15 | name='dataset_id', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /salesforce/migrations/0016_auto_20190815_1211.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-08-15 17:11 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0015_adoptionopportunityrecord'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='adoptionopportunityrecord', 15 | name='email', 16 | field=models.EmailField(blank=True, max_length=254, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0017_adoptionopportunityrecord_updated.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-08-15 17:20 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0016_auto_20190815_1211'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='adoptionopportunityrecord', 15 | name='updated', 16 | field=models.DateTimeField(blank=True, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0018_remove_adoptionopportunityrecord_updated.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-08-19 18:00 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0017_adoptionopportunityrecord_updated'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='adoptionopportunityrecord', 15 | name='updated', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /salesforce/migrations/0019_adoptionopportunityrecord_updated.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-08-19 18:00 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0018_remove_adoptionopportunityrecord_updated'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='adoptionopportunityrecord', 15 | name='updated', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0020_school_salesforce_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-08-28 14:28 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0019_adoptionopportunityrecord_updated'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='school', 15 | name='salesforce_id', 16 | field=models.CharField(blank=True, max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0024_auto_20191111_1525.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.5 on 2019-11-11 21:25 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0023_auto_20191111_1229'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partner', 15 | name='affordability_cost', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0025_partner_books.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.5 on 2019-11-15 16:07 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0024_auto_20191111_1525'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partner', 15 | name='books', 16 | field=models.CharField(blank=True, max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0026_auto_20191115_1123.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.5 on 2019-11-15 17:23 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0025_partner_books'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partner', 15 | name='books', 16 | field=models.TextField(blank=True, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0028_partner_partner_logo.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.5 on 2019-12-19 16:27 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0027_auto_20191122_1705'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partner', 15 | name='partner_logo', 16 | field=models.ImageField(blank=True, null=True, upload_to='partner_logos/'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0029_partner_visible_on_website.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.5 on 2019-12-19 18:50 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0028_partner_partner_logo'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partner', 15 | name='visible_on_website', 16 | field=models.BooleanField(default=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0030_auto_20191220_1353.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.5 on 2019-12-20 19:53 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0029_partner_visible_on_website'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partner', 15 | name='affordability_cost', 16 | field=models.CharField(blank=True, max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0032_partner_partner_website.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.5 on 2020-01-09 16:53 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0031_auto_20200109_1048'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partner', 15 | name='partner_website', 16 | field=models.CharField(blank=True, max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0033_partner_partner_list_label.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.5 on 2020-01-13 22:13 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0032_partner_partner_website'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partner', 15 | name='partner_list_label', 16 | field=models.CharField(blank=True, max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0034_auto_20200117_1536.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.8 on 2020-01-17 21:36 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0033_partner_partner_list_label'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partner', 15 | name='video_1', 16 | field=models.FileField(blank=True, null=True, upload_to='partner_videos/'), 17 | ), 18 | migrations.AddField( 19 | model_name='partner', 20 | name='video_2', 21 | field=models.FileField(blank=True, null=True, upload_to='partner_videos/'), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /salesforce/migrations/0035_auto_20200117_1619.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.8 on 2020-01-17 22:19 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0034_auto_20200117_1536'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partner', 15 | name='image_4', 16 | field=models.ImageField(blank=True, null=True, upload_to='partner_images/'), 17 | ), 18 | migrations.AddField( 19 | model_name='partner', 20 | name='image_5', 21 | field=models.ImageField(blank=True, null=True, upload_to='partner_images/'), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /salesforce/migrations/0036_partner_formstack_url.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.8 on 2020-01-22 20:58 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0035_auto_20200117_1619'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partner', 15 | name='formstack_url', 16 | field=models.CharField(blank=True, max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0038_remove_partnertypemapping_salesforce_name.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.10 on 2020-02-21 20:08 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0037_partnercategorymapping_partnerfieldnamemapping_partnertypemapping'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='partnertypemapping', 15 | name='salesforce_name', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /salesforce/migrations/0039_auto_20200304_0919.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.10 on 2020-03-04 15:19 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0038_remove_partnertypemapping_salesforce_name'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partner', 15 | name='visible_on_website', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0039_partner_lead_sharing.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.10 on 2020-03-05 18:59 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0038_remove_partnertypemapping_salesforce_name'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partner', 15 | name='lead_sharing', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0040_partnerfieldnamemapping_hidden.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.10 on 2020-03-09 16:25 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0039_partner_lead_sharing'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partnerfieldnamemapping', 15 | name='hidden', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0041_merge_20200311_1529.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.10 on 2020-03-11 20:29 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0039_auto_20200304_0919'), 10 | ('salesforce', '0040_partnerfieldnamemapping_hidden'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /salesforce/migrations/0042_salesforceforms.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-06-15 14:57 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0041_merge_20200311_1529'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='SalesforceForms', 15 | fields=[ 16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('oid', models.CharField(help_text='OID value to use for FE forms', max_length=255)), 18 | ], 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /salesforce/migrations/0043_salesforceforms_debug.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-06-15 17:53 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0042_salesforceforms'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='salesforceforms', 15 | name='debug', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0044_auto_20200615_1402.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-06-15 19:02 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0043_salesforceforms_debug'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name='salesforceforms', 15 | options={'verbose_name_plural': 'Salesforce Forms'}, 16 | ), 17 | migrations.AddField( 18 | model_name='salesforceforms', 19 | name='posting_url', 20 | field=models.URLField(default='https://test.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8'), 21 | preserve_default=False, 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /salesforce/migrations/0045_auto_20200707_1042.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-07 15:42 2 | 3 | from django.db import migrations, models 4 | from salesforce.models import AdoptionOpportunityRecord 5 | 6 | def remove_all_adoptions(apps, schema_editor): 7 | AdoptionOpportunityRecord.objects.all().delete() 8 | 9 | 10 | class Migration(migrations.Migration): 11 | 12 | dependencies = [ 13 | ('salesforce', '0044_auto_20200615_1402'), 14 | ] 15 | 16 | operations = [ 17 | migrations.RunPython(remove_all_adoptions), 18 | migrations.AlterField( 19 | model_name='adoptionopportunityrecord', 20 | name='opportunity_id', 21 | field=models.CharField(max_length=255, unique=True), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /salesforce/migrations/0047_auto_20200721_1134.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-21 16:34 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('books', '0002_auto_20200720_1527'), 10 | ('salesforce', '0046_auto_20200720_1527'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='resourcedownload', 16 | name='account_id', 17 | field=models.IntegerField(), 18 | ), 19 | migrations.AlterUniqueTogether( 20 | name='resourcedownload', 21 | unique_together={('account_id', 'book', 'resource_name')}, 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /salesforce/migrations/0048_auto_20200721_1256.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-21 17:56 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0047_auto_20200721_1134'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterUniqueTogether( 14 | name='resourcedownload', 15 | unique_together=set(), 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /salesforce/migrations/0049_resourcedownload_salesforce_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-23 17:59 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0048_auto_20200721_1256'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='resourcedownload', 15 | name='salesforce_id', 16 | field=models.CharField(blank=True, max_length=100, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0050_auto_20200724_1333.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-24 18:33 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0049_resourcedownload_salesforce_id'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='resourcedownload', 15 | name='resource_name', 16 | field=models.CharField(max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0053_remove_adoptionopportunityrecord_updated.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-28 20:50 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0052_auto_20200728_1547'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='adoptionopportunityrecord', 15 | name='updated', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /salesforce/migrations/0054_remove_adoptionopportunityrecord_book.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-28 21:42 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0053_remove_adoptionopportunityrecord_updated'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='adoptionopportunityrecord', 15 | name='book', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /salesforce/migrations/0055_adoptionopportunityrecord_verified.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-29 16:39 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0054_remove_adoptionopportunityrecord_book'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='adoptionopportunityrecord', 15 | name='verified', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0056_auto_20200730_1547.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-07-30 20:47 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0055_adoptionopportunityrecord_verified'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='adoptionopportunityrecord', 15 | name='confirmed_yearly_students', 16 | field=models.IntegerField(blank=True, null=True), 17 | ), 18 | migrations.AlterField( 19 | model_name='adoptionopportunityrecord', 20 | name='account_id', 21 | field=models.CharField(blank=True, max_length=255, null=True), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /salesforce/migrations/0057_partner_instructional_level_k12.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-08 16:48 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0056_auto_20200730_1547'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partner', 15 | name='instructional_level_k12', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0059_auto_20201005_1411.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-05 19:11 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0058_partnerreview'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameField( 14 | model_name='partnerreview', 15 | old_name='star_rating', 16 | new_name='rating', 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0060_partnerreview_partner.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-05 19:52 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('salesforce', '0059_auto_20201005_1411'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='partnerreview', 16 | name='partner', 17 | field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='salesforce.Partner'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /salesforce/migrations/0061_merge_20201012_1151.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-12 16:51 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0058_auto_20201012_0946'), 10 | ('salesforce', '0060_partnerreview_partner'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /salesforce/migrations/0063_auto_20201014_1229.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-14 17:29 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0062_savingsnumber'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='savingsnumber', 15 | name='savings', 16 | field=models.DecimalField(blank=True, decimal_places=2, max_digits=50, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0064_auto_20201015_1524.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-15 20:24 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0063_auto_20201014_1229'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='partnerreview', 15 | name='rejection_reason', 16 | ), 17 | migrations.AddField( 18 | model_name='partnerreview', 19 | name='review_salesforce_id', 20 | field=models.CharField(blank=True, max_length=255, null=True), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /salesforce/migrations/0065_auto_20201016_1253.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-16 17:53 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0064_auto_20201015_1524'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partnerreview', 15 | name='review_salesforce_id', 16 | field=models.CharField(blank=True, max_length=255, null=True, unique=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0066_auto_20201021_1627.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-21 21:27 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0065_auto_20201016_1253'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partnerreview', 15 | name='status', 16 | field=models.CharField(choices=[('New', 'New'), ('Edited', 'Edited'), ('Rejected', 'Rejected')], max_length=255), 17 | ), 18 | migrations.AlterField( 19 | model_name='savingsnumber', 20 | name='savings', 21 | field=models.IntegerField(blank=True, null=True), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /salesforce/migrations/0067_auto_20201023_0945.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-23 14:45 2 | 3 | from django.db import migrations, models 4 | import django.utils.timezone 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('salesforce', '0066_auto_20201021_1627'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='partnerreview', 16 | name='created', 17 | field=models.DateField(auto_now_add=True, default=django.utils.timezone.now), 18 | preserve_default=False, 19 | ), 20 | migrations.AddField( 21 | model_name='partnerreview', 22 | name='updated', 23 | field=models.DateField(auto_now=True), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /salesforce/migrations/0068_auto_20201028_1341.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-28 18:41 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0067_auto_20201023_0945'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partnerreview', 15 | name='status', 16 | field=models.CharField(choices=[('New', 'New'), ('Edited', 'Edited'), ('Approved', 'Approved'), ('Rejected', 'Rejected')], max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0069_auto_20201028_1350.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-28 18:50 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0068_auto_20201028_1341'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partnerreview', 15 | name='status', 16 | field=models.CharField(choices=[('New', 'New'), ('Edited', 'Edited'), ('Approved', 'Approved'), ('Responded', 'Responded')], default='New', max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0070_partnerreview_approved_review_text.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-28 19:02 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0069_auto_20201028_1350'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partnerreview', 15 | name='approved_review_text', 16 | field=models.TextField(blank=True, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0071_auto_20201028_1427.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-28 19:27 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0070_partnerreview_approved_review_text'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partnerreview', 15 | name='status', 16 | field=models.CharField(choices=[('New', 'New'), ('Edited', 'Edited'), ('Awaiting Approval', 'Awaiting Approval'), ('Approved', 'Approved'), ('Responded', 'Responded')], default='New', max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0072_auto_20201028_1434.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-28 19:34 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0071_auto_20201028_1427'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partnerreview', 15 | name='status', 16 | field=models.CharField(choices=[('New', 'New'), ('Edited', 'Edited'), ('Awaiting Approval', 'Awaiting Approval'), ('Approved', 'Approved')], default='New', max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0073_remove_partnerreview_approved_review_text.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-10-30 19:38 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0072_auto_20201028_1434'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='partnerreview', 15 | name='approved_review_text', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /salesforce/migrations/0074_partnerreview_partner_response_date.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-11-17 19:59 2 | 3 | from django.db import migrations, models 4 | import django.utils.timezone 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('salesforce', '0073_remove_partnerreview_approved_review_text'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='partnerreview', 16 | name='partner_response_date', 17 | field=models.DateField(default=django.utils.timezone.now), 18 | preserve_default=False, 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /salesforce/migrations/0075_auto_20201117_1412.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-11-17 20:12 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0074_partnerreview_partner_response_date'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partnerreview', 15 | name='partner_response_date', 16 | field=models.DateField(blank=True, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0076_auto_20201117_1419.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-11-17 20:19 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0075_auto_20201117_1412'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='resourcedownload', 15 | name='edited', 16 | field=models.DateTimeField(auto_now=True), 17 | ), 18 | migrations.AlterField( 19 | model_name='resourcedownload', 20 | name='last_access', 21 | field=models.DateTimeField(), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /salesforce/migrations/0077_partnerreview_to_delete.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-11-19 21:17 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0076_auto_20201117_1419'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partnerreview', 15 | name='to_delete', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0078_auto_20201119_1633.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-11-19 22:33 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0077_partnerreview_to_delete'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='partnerreview', 15 | name='to_delete', 16 | ), 17 | migrations.AlterField( 18 | model_name='partnerreview', 19 | name='status', 20 | field=models.CharField(choices=[('New', 'New'), ('Edited', 'Edited'), ('Awaiting Approval', 'Awaiting Approval'), ('Approved', 'Approved'), ('Deleted', 'Deleted')], default='New', max_length=255), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /salesforce/migrations/0079_auto_20201130_1600.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-11-30 22:00 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0078_auto_20201119_1633'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partnerreview', 15 | name='status', 16 | field=models.CharField(choices=[('New', 'New'), ('Edited', 'Edited'), ('Awaiting Approval', 'Awaiting Approval'), ('Approved', 'Approved'), ('Rejected', 'Rejected'), ('Deleted', 'Deleted')], default='New', max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0080_resourcedownload_contact_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2021-05-06 15:48 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0079_auto_20201130_1600'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='resourcedownload', 15 | name='contact_id', 16 | field=models.CharField(blank=True, max_length=100, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0081_auto_20210510_1023.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2021-05-10 15:23 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0080_resourcedownload_contact_id'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='resourcedownload', 15 | name='contact_id', 16 | field=models.CharField(blank=True, default='', max_length=100), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0082_partner_partnership_level.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2021-06-08 18:38 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0081_auto_20210510_1023'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partner', 15 | name='partnership_level', 16 | field=models.CharField(default='', max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0083_alter_resourcedownload_contact_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-06-29 15:41 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0082_partner_partnership_level'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='resourcedownload', 15 | name='contact_id', 16 | field=models.CharField(default='', max_length=100, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0084_alter_resourcedownload_contact_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-06-29 15:44 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0083_alter_resourcedownload_contact_id'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='resourcedownload', 15 | name='contact_id', 16 | field=models.CharField(blank=True, max_length=100, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0085_partnerreview_user_faculty_status.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-07-23 17:52 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0084_alter_resourcedownload_contact_id'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partnerreview', 15 | name='user_faculty_status', 16 | field=models.CharField(choices=[('New', 'New'), ('Edited', 'Edited'), ('Awaiting Approval', 'Awaiting Approval'), ('Approved', 'Approved'), ('Rejected', 'Rejected'), ('Deleted', 'Deleted')], default='Rejected', max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0086_alter_partnerreview_user_faculty_status.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-07-23 19:15 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0085_partnerreview_user_faculty_status'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partnerreview', 15 | name='user_faculty_status', 16 | field=models.CharField(choices=[('no_faculty_info', 'No Faculty Info'), ('confirmed_faculty', 'Confirmed Faculty'), ('rejected_faculty', 'Rejected Faculty'), ('pending_faculty', 'Pending Faculty')], default='No Faculty Info', max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0087_school_location.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-09-20 18:22 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0086_alter_partnerreview_user_faculty_status'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='school', 15 | name='location', 16 | field=models.CharField(blank=True, max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0088_school_total_school_enrollment.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-09-21 18:15 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0087_school_location'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='school', 15 | name='total_school_enrollment', 16 | field=models.CharField(blank=True, max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0091_auto_20211018_1150.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-10-18 16:50 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0090_auto_20211014_1201'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='resourcedownload', 15 | name='accounts_uuid', 16 | field=models.UUIDField(null=True), 17 | ), 18 | migrations.AlterField( 19 | model_name='resourcedownload', 20 | name='account_id', 21 | field=models.IntegerField(blank=True, null=True), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /salesforce/migrations/0092_auto_20211018_1152.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-10-18 16:52 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0091_auto_20211018_1150'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameField( 14 | model_name='resourcedownload', 15 | old_name='accounts_uuid', 16 | new_name='account_uuid', 17 | ), 18 | migrations.AddIndex( 19 | model_name='resourcedownload', 20 | index=models.Index(fields=['account_uuid'], name='salesforce__account_9af0c7_idx'), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /salesforce/migrations/0093_partnerreview_submitted_by_account_uuid.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-11-03 21:53 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0092_auto_20211018_1152'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partnerreview', 15 | name='submitted_by_account_uuid', 16 | field=models.UUIDField(null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0094_alter_partnerreview_submitted_by_account_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-11-03 22:44 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0093_partnerreview_submitted_by_account_uuid'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partnerreview', 15 | name='submitted_by_account_id', 16 | field=models.IntegerField(blank=True, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0095_adoptionopportunityrecord_account_uuid.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2021-11-19 19:29 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0094_alter_partnerreview_submitted_by_account_id'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='adoptionopportunityrecord', 15 | name='account_uuid', 16 | field=models.UUIDField(null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0096_salesforceforms_debug_email.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2022-03-15 14:57 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0095_adoptionopportunityrecord_account_uuid'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='salesforceforms', 15 | name='debug_email', 16 | field=models.EmailField(blank=True, help_text='Only required if Debug is selected', max_length=254, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0098_partner_equity_rating.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2022-04-11 13:12 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0097_auto_20220328_1130'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partner', 15 | name='equity_rating', 16 | field=models.CharField(default='', max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0098_remove_resourcedownload_salesforce_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2022-04-19 15:42 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0097_auto_20220328_1130'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='resourcedownload', 15 | name='salesforce_id', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /salesforce/migrations/0099_remove_resourcedownload_number_of_times_accessed.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2022-04-19 20:38 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0098_remove_resourcedownload_salesforce_id'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='resourcedownload', 15 | name='number_of_times_accessed', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /salesforce/migrations/0100_merge_20220426_0826.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2022-04-26 13:26 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0098_partner_equity_rating'), 10 | ('salesforce', '0099_remove_resourcedownload_number_of_times_accessed'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /salesforce/migrations/0100_partner_partner_sf_account_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-05-03 20:50 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0099_remove_resourcedownload_number_of_times_accessed'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='partner', 15 | name='partner_sf_account_id', 16 | field=models.CharField(blank=True, max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0101_merge_20220506_1353.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-05-06 18:53 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0100_merge_20220426_0826'), 10 | ('salesforce', '0100_partner_partner_sf_account_id'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /salesforce/migrations/0104_alter_partner_visible_on_website.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.16 on 2022-12-02 20:51 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0103_auto_20220516_1045'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='partner', 15 | name='visible_on_website', 16 | field=models.BooleanField(default=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /salesforce/migrations/0105_auto_20221212_1543.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.16 on 2022-12-12 21:43 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('salesforce', '0104_alter_partner_visible_on_website'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='school', 15 | name='testimonial', 16 | ), 17 | migrations.RemoveField( 18 | model_name='school', 19 | name='testimonial_name', 20 | ), 21 | migrations.RemoveField( 22 | model_name='school', 23 | name='testimonial_position', 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /salesforce/migrations/0106_remove_resourcedownload_salesforce__account_b11d37_idx_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.7 on 2023-12-13 19:28 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("salesforce", "0105_auto_20221212_1543"), 9 | ] 10 | 11 | operations = [ 12 | migrations.RemoveIndex( 13 | model_name="resourcedownload", 14 | name="salesforce__account_b11d37_idx", 15 | ), 16 | migrations.RemoveField( 17 | model_name="resourcedownload", 18 | name="account_id", 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /salesforce/migrations/0109_remove_partner_salesforce_created_date.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.1.1 on 2024-10-14 16:37 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("salesforce", "0108_partner_partner_anniversary_date_and_more"), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name="partner", 15 | name="salesforce_created_date", 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /salesforce/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/salesforce/migrations/__init__.py -------------------------------------------------------------------------------- /salesforce/signals.py: -------------------------------------------------------------------------------- 1 | from django.db.models.signals import post_save 2 | from django.dispatch import receiver 3 | 4 | from global_settings.functions import invalidate_cloudfront_caches 5 | from salesforce.models import Partner 6 | 7 | @receiver(post_save, sender=Partner) 8 | def clear_cloudfront_on_partner_save(sender, instance, **kwargs): 9 | # only invalidate if from admin 10 | if getattr(instance, 'from_admin_site', False): 11 | invalidate_cloudfront_caches('salesforce/partners') -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | omit = 3 | *tests.py 4 | manage.py 5 | */migrations/* 6 | *settings.py 7 | *wsgi.py 8 | -------------------------------------------------------------------------------- /shared/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | from shared.test_utilities import mock_user_login, RequestMock 3 | 4 | 5 | class TestMockRequest(TestCase): 6 | def test_create_mock_request(self): 7 | req = RequestMock() 8 | self.assertEqual(req.cookies, {}) 9 | 10 | -------------------------------------------------------------------------------- /snippets/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/snippets/__init__.py -------------------------------------------------------------------------------- /snippets/migrations/0003_delete_givetoday.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-28 19:23 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('snippets', '0002_auto_20200722_1544'), 10 | ] 11 | 12 | operations = [ 13 | migrations.DeleteModel( 14 | name='GiveToday', 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /snippets/migrations/0005_delete_customizationformcontent.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-09-30 17:37 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('snippets', '0004_customizationformcontent'), 10 | ] 11 | 12 | operations = [ 13 | migrations.DeleteModel( 14 | name='CustomizationFormContent', 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /snippets/migrations/0007_erratacontent_heading.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-07-12 13:43 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('snippets', '0006_erratacontent'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='erratacontent', 15 | name='heading', 16 | field=models.CharField(blank=True, max_length=255, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /snippets/migrations/0008_alter_erratacontent_book_state.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-07-12 15:02 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('snippets', '0007_erratacontent_heading'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='erratacontent', 15 | name='book_state', 16 | field=models.CharField(choices=[('live', 'Live'), ('coming_soon', 'Coming soon'), ('new_edition_forthcoming', 'New edition forthcoming'), ('deprecated', 'Deprecated'), ('retired', 'Retired')], default='live', help_text='The state of the book.', max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /snippets/migrations/0009_alter_erratacontent_book_state.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-07-12 18:34 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('snippets', '0008_alter_erratacontent_book_state'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='erratacontent', 15 | name='book_state', 16 | field=models.CharField(choices=[('live', 'Live'), ('coming_soon', 'Coming soon'), ('new_edition_available', 'New edition available'), ('deprecated', 'Deprecated'), ('retired', 'Retired')], default='live', help_text='The state of the book.', max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /snippets/migrations/0011_auto_20210715_1317.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.4 on 2021-07-15 18:17 2 | 3 | from django.db import migrations 4 | from wagtail.models import BootstrapTranslatableModel 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('snippets', '0010_auto_20210715_1313'), 11 | ] 12 | 13 | operations = [ 14 | BootstrapTranslatableModel('snippets.Subject'), 15 | BootstrapTranslatableModel('snippets.FacultyResource'), 16 | BootstrapTranslatableModel('snippets.StudentResource'), 17 | BootstrapTranslatableModel('snippets.Role'), 18 | BootstrapTranslatableModel('snippets.SharedContent'), 19 | BootstrapTranslatableModel('snippets.NewsSource'), 20 | BootstrapTranslatableModel('snippets.ErrataContent'), 21 | ] 22 | -------------------------------------------------------------------------------- /snippets/migrations/0015_rename_subjectcategories_subjectcategory.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2022-01-27 13:52 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('wagtailcore', '0066_collection_management_permissions'), 10 | ('snippets', '0014_auto_20220126_1603'), 11 | ] 12 | 13 | operations = [ 14 | migrations.RenameModel( 15 | old_name='SubjectCategories', 16 | new_name='SubjectCategory', 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /snippets/migrations/0016_subject_icon.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2022-01-27 14:48 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('wagtailimages', '0023_add_choose_permissions'), 11 | ('snippets', '0015_rename_subjectcategories_subjectcategory'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='subject', 17 | name='icon', 18 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image'), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /snippets/migrations/0017_subjectcategory_description.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.9 on 2022-02-16 16:45 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('snippets', '0016_subject_icon'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='subjectcategory', 15 | name='description', 16 | field=models.TextField(default=''), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /snippets/migrations/0022_merge_0020_contentlicense_0021_blogcollection.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-05-10 15:37 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('snippets', '0020_contentlicense'), 10 | ('snippets', '0021_blogcollection'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /snippets/migrations/0023_delete_contentlicense.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.5 on 2022-05-10 21:12 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('snippets', '0022_merge_0020_contentlicense_0021_blogcollection'), 10 | ] 11 | 12 | operations = [ 13 | migrations.DeleteModel( 14 | name='ContentLicense', 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /snippets/migrations/0031_merge_20231101_1313.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.7 on 2023-11-01 18:13 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('snippets', '0030_alter_erratacontent_book_state'), 10 | ('snippets', '0030_amazonbookblurb'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /snippets/migrations/0031_merge_20231101_1438.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.7 on 2023-11-01 19:38 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('snippets', '0030_alter_erratacontent_book_state'), 10 | ('snippets', '0030_amazonbookblurb'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /snippets/migrations/0032_merge_20231117_0830.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.7 on 2023-11-17 14:30 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('snippets', '0031_merge_20231101_1313'), 10 | ('snippets', '0031_merge_20231101_1438'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /snippets/migrations/0034_delete_assignableavailable.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.7 on 2024-01-30 18:04 2 | 3 | from django.db import migrations 4 | 5 | class Migration(migrations.Migration): 6 | dependencies = [ 7 | ("snippets", "0033_promotesnippet"), 8 | ] 9 | 10 | operations = [ 11 | migrations.DeleteModel( 12 | name="AssignableAvailable", 13 | ), 14 | ] 15 | -------------------------------------------------------------------------------- /snippets/migrations/0038_alter_pagelayout_layout.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-06-28 18:00 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("snippets", "0037_pagelayout"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="pagelayout", 15 | name="layout", 16 | field=models.CharField(choices=[("Default", "default")], default="default", max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /snippets/migrations/0039_alter_pagelayout_layout.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.7 on 2024-07-15 23:29 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("snippets", "0038_alter_pagelayout_layout"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="pagelayout", 15 | name="layout", 16 | field=models.CharField(choices=[("default", "Default")], default="default", max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /snippets/migrations/0040_remove_pagelayout_background_image.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.7 on 2024-07-23 16:39 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("snippets", "0039_alter_pagelayout_layout"), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name="pagelayout", 15 | name="background_image", 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /snippets/migrations/0041_delete_pagelayout.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.7 on 2024-07-24 23:53 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("snippets", "0040_remove_pagelayout_background_image"), 10 | ] 11 | 12 | operations = [ 13 | migrations.DeleteModel( 14 | name="PageLayout", 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /snippets/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/snippets/migrations/__init__.py -------------------------------------------------------------------------------- /versions/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/versions/__init__.py -------------------------------------------------------------------------------- /versions/templates/versions.html: -------------------------------------------------------------------------------- 1 | {% extends "wagtailadmin/base.html" %} 2 | {% load i18n %} 3 | {% block titletag %}{{title}}{% endblock %} 4 | {% block content %} 5 | {% include "wagtailadmin/shared/header.html" with title=title icon="view" %} 6 | 7 |
    8 | OpenStax Webview (frontend) version: {{osweb_version}} 9 |
    10 |
    11 | OpenStax CMS (backend) version: {{cms_version}} 12 |
    13 |
    14 | OpenStax CMS AMI built with bit-deployment version: {{deployment_version}} 15 |
    16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /versions/views.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | from django.shortcuts import render 3 | 4 | from urllib.request import urlopen 5 | from urllib.error import URLError 6 | 7 | 8 | def versions(request): 9 | try: 10 | with urlopen('{}/dist/fe-version.txt'.format(settings.BASE_URL)) as connection: 11 | osweb_version = connection.read().decode('utf-8') 12 | except URLError: 13 | osweb_version = 'local' 14 | 15 | return render(request, 'versions.html', { 16 | 'cms_version': settings.RELEASE_VERSION or 'local', 17 | 'deployment_version': settings.DEPLOYMENT_VERSION or 'none', 18 | 'osweb_version': osweb_version, 19 | 'title': "OpenStax CMS Deployment Versions ({})".format(settings.ENVIRONMENT or 'local') 20 | }) 21 | -------------------------------------------------------------------------------- /versions/wagtail_hooks.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from django.urls import reverse 3 | 4 | from wagtail import hooks 5 | from wagtail.admin.menu import MenuItem 6 | 7 | from versions import views 8 | 9 | 10 | @hooks.register('register_admin_urls') 11 | def register_versions_admin_url(): 12 | return [path('versions/', views.versions, name='versions')] 13 | 14 | @hooks.register('register_admin_menu_item') 15 | def register_versions_menu_item(): 16 | return MenuItem('Versions', reverse('versions'), icon_name='view', order=10000) 17 | -------------------------------------------------------------------------------- /wagtailimportexport/__init__.py: -------------------------------------------------------------------------------- 1 | #default_app_config = 'wagtailimportexport.apps.WagtailImportExportAppConfig' -------------------------------------------------------------------------------- /wagtailimportexport/admin_urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import re_path 2 | 3 | from wagtailimportexport import views 4 | 5 | 6 | app_name = 'wagtailimportexport' 7 | urlpatterns = [ 8 | re_path(r'^import-page/$', views.import_page, name='import-page'), 9 | re_path(r'^export-page/$', views.export_page, name='export-page'), 10 | re_path(r'^$', views.index, name='index'), 11 | ] 12 | -------------------------------------------------------------------------------- /wagtailimportexport/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class WagtailImportExportAppConfig(AppConfig): 5 | name = 'wagtailimportexport' 6 | label = 'wagtailimportexport' 7 | verbose_name = "Import/Export Tool" 8 | default = True 9 | -------------------------------------------------------------------------------- /wagtailimportexport/config.py: -------------------------------------------------------------------------------- 1 | app_settings = { 2 | 'max_file_size': 20000000, # Limit max file size to 20.000.000 bytes if checkbox is selected. 3 | } -------------------------------------------------------------------------------- /wagtailimportexport/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/wagtailimportexport/migrations/__init__.py -------------------------------------------------------------------------------- /wagtailimportexport/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/wagtailimportexport/tests/__init__.py -------------------------------------------------------------------------------- /wagtailimportexport/tests/test_functions.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | from wagtailimportexport import functions 4 | 5 | 6 | class TestNullPKs(TestCase): 7 | """ 8 | Test cases for null_pks method in functions.py 9 | """ 10 | def test_null(self): 11 | pass 12 | 13 | class TestNullFKs(TestCase): 14 | """ 15 | Test cases for null_fks method in functions.py 16 | """ 17 | def test_null(self): 18 | pass 19 | 20 | class TestZipContents(TestCase): 21 | """ 22 | Test cases for zip_contents method in functions.py 23 | """ 24 | def test_null(self): 25 | pass 26 | 27 | class TestUnZipContents(TestCase): 28 | """ 29 | Test cases for unzip_contents method in functions.py 30 | """ 31 | def test_null(self): 32 | pass -------------------------------------------------------------------------------- /webinars/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/webinars/__init__.py -------------------------------------------------------------------------------- /webinars/migrations/0002_webinar_display_on_tutor_page.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.4 on 2020-12-04 19:31 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('webinars', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='webinar', 15 | name='display_on_tutor_page', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /webinars/migrations/0006_alter_webinar_spaces_remaining.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.1.1 on 2025-01-08 16:14 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("webinars", "0005_webinar_webinar_collections"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="webinar", 15 | name="spaces_remaining", 16 | field=models.PositiveIntegerField(blank=True, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /webinars/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstax/openstax-cms/f2056ae994d3758e16f73a0c2a2df1bc385aff61/webinars/migrations/__init__.py -------------------------------------------------------------------------------- /webinars/signals.py: -------------------------------------------------------------------------------- 1 | from django.db.models.signals import post_save 2 | from django.dispatch import receiver 3 | 4 | from global_settings.functions import invalidate_cloudfront_caches 5 | from .models import Webinar 6 | 7 | 8 | @receiver(post_save, sender=Webinar) 9 | def clear_cloudfront_on_webinar_save(sender, **kwargs): 10 | invalidate_cloudfront_caches('webinars') 11 | -------------------------------------------------------------------------------- /webinars/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import include, path 2 | from rest_framework import routers 3 | from . import views 4 | from .search import search 5 | 6 | router = routers.SimpleRouter() 7 | router.register(r'', views.WebinarViewSet, basename='Webinars') 8 | 9 | urlpatterns = [ 10 | path('search/', search, name='webinar_search'), 11 | path(r'', include(router.urls)), 12 | ] 13 | -------------------------------------------------------------------------------- /webinars/views.py: -------------------------------------------------------------------------------- 1 | from rest_framework import viewsets 2 | 3 | from .models import Webinar, webinar_subject_search, webinar_collection_search 4 | from .serializers import WebinarSerializer 5 | 6 | 7 | class WebinarViewSet(viewsets.ModelViewSet): 8 | serializer_class = WebinarSerializer 9 | 10 | def get_queryset(self): 11 | queryset = Webinar.objects.all().order_by('-start') 12 | subject = self.request.query_params.get('subject', None) 13 | collection = self.request.query_params.get('collection', None) 14 | if subject is not None: 15 | queryset = webinar_subject_search(subject) 16 | elif collection is not None: 17 | queryset = webinar_collection_search(collection) 18 | return queryset 19 | -------------------------------------------------------------------------------- /webinars/wagtail_hooks.py: -------------------------------------------------------------------------------- 1 | from wagtail_modeladmin.options import ModelAdmin, modeladmin_register 2 | from .models import Webinar 3 | 4 | 5 | class WebinarAdmin(ModelAdmin): 6 | model = Webinar 7 | menu_icon = 'media' 8 | menu_label = 'Webinars' 9 | menu_order = 4000 10 | list_display = ('title', 'start', 'end', 'spaces_remaining') 11 | search_fields = ('title',) # trailing comma needed to make search work 12 | 13 | 14 | modeladmin_register(WebinarAdmin) 15 | --------------------------------------------------------------------------------