I’ve added a custom fields to registration page. They have been added successfully with one issue. I’ve a foreign key field ‘company’ in the model. Adding this create following exception:
ImproperlyConfigured at /register Field type 'None' not recognized for registration extension field 'city'. Request Method: GET Request URL: http://localhost:18000/register Django Version: 2.2.16 Exception Type: ImproperlyConfigured Exception Value: Field type 'None' not recognized for registration extension field 'city'. Exception Location: /edx/app/edxapp/edx-platform/openedx/core/djangoapps/user_authn/views/registration_form.py in get_registration_form, line 399 Python Executable: /edx/app/edxapp/venvs/edxapp/bin/python
The following exception is created because foreign key field by default uses ModelChoiceField which is not included in FIELD_TYPE_MAP in /edx-platform/openedx/core/djangoapps/user_api/helpers.py
If we add this, this might resolve the issue but is there any other solution without changing the core files?