From 39bd8d38f7a54aab96771abeb7d9d93bd4bf9bf9 Mon Sep 17 00:00:00 2001 From: KyryloKireiev Date: Fri, 6 Sep 2024 12:14:18 +0300 Subject: [PATCH] fix: try to make code blcks visible 2 --- ...ding_custom_fields_to_the_registration.rst | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/how_tos/adding_custom_fields_to_the_registration.rst b/docs/how_tos/adding_custom_fields_to_the_registration.rst index 255de6c6f..b42c04278 100644 --- a/docs/how_tos/adding_custom_fields_to_the_registration.rst +++ b/docs/how_tos/adding_custom_fields_to_the_registration.rst @@ -20,7 +20,8 @@ You need to redefine several constants in the settings. Several methods can be u - Go to `Site configurations` in admin: {{LMS}}/admin/site_configuration/siteconfiguration/ - Add new settings to OrderedDict (create new `Site configurations` if it wasn't before): - .. code-block:: + .. code-block:: json + { "ENABLE_DYNAMIC_REGISTRATION_FIELDS": "true", "MFE_CONFIG": { @@ -45,7 +46,8 @@ You need to redefine several constants in the settings. Several methods can be u #. **For the local development or testing settings can be overriden in configuration files:** - For example, constants can be added here: `env/apps/openedx/settings/lms/development.py`: - .. code-block:: + .. code-block:: python + ENABLE_DYNAMIC_REGISTRATION_FIELDS = "true" MFE_CONFIG["ENABLE_DYNAMIC_REGISTRATION_FIELDS"] = "true" @@ -56,7 +58,8 @@ You need to redefine several constants in the settings. Several methods can be u `In total, you must redefine 3 constants using the method that is most preferable for you:` - .. code-block:: + .. code-block:: python + ENABLE_DYNAMIC_REGISTRATION_FIELD = True, MFE_CONFIG["ENABLE_DYNAMIC_REGISTRATION_FIELDS"] = True, @@ -74,21 +77,23 @@ Everything said above in instructions “**A**” is also relevant for adding fi Example: - .. code-block:: + .. code-block:: json + { "REGISTRATION_EXTENSION_FORM" = "you_application.form.ExtendedUserProfileForm", "extended_profile_fields": [ - "your_new_field_id", - "subscribe_to_emails", - "confirm_age_consent", - "something_else" + "your_new_field_id", + "subscribe_to_emails", + "confirm_age_consent", + "something_else" ] } `In total, you must migrate to DB new user profile fields and redefine 3 constants using the method that is most preferable for you:` - .. code-block:: + .. code-block:: python + ENABLE_DYNAMIC_REGISTRATION_FIELD = True, MFE_CONFIG["ENABLE_DYNAMIC_REGISTRATION_FIELDS"] = True,