diff --git a/changelog.d/20250324_230121_danyal.faheem_remove_site_configuration_script.md b/changelog.d/20250324_230121_danyal.faheem_remove_site_configuration_script.md new file mode 100644 index 0000000..2946df6 --- /dev/null +++ b/changelog.d/20250324_230121_danyal.faheem_remove_site_configuration_script.md @@ -0,0 +1 @@ +- [Improvement] Replace site-configuration script with create_or_update_site_configuration management command in the init task. (by @Danyal-Faheem) diff --git a/tutordiscovery/templates/discovery/tasks/lms/init b/tutordiscovery/templates/discovery/tasks/lms/init index 16db4f9..64039ae 100644 --- a/tutordiscovery/templates/discovery/tasks/lms/init +++ b/tutordiscovery/templates/discovery/tasks/lms/init @@ -62,5 +62,5 @@ # configuration -- which means that it takes different values for different # sites. This is important because the programs and courses returned for each # site will differ. -site-configuration set -d {{ LMS_HOST }} COURSE_CATALOG_API_URL {% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ DISCOVERY_HOST }}/api/v1 -site-configuration set -d {{ LMS_HOST }}:8000 COURSE_CATALOG_API_URL http://{{ DISCOVERY_HOST }}:8381/api/v1 +./manage.py lms create_or_update_site_configuration {{ LMS_HOST }} --configuration '{"COURSE_CATALOG_API_URL": "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ DISCOVERY_HOST }}/api/v1"}' --enabled +./manage.py lms create_or_update_site_configuration {{ LMS_HOST }}:8000 --configuration '{"COURSE_CATALOG_API_URL": "http://{{ DISCOVERY_HOST }}:8381/api/v1"}' --enabled