Problem adding new fields to registration page

352 views
Skip to first unread message

rkatao...@gmail.com

unread,
Oct 6, 2016, 3:36:07 PM10/6/16
to General Open edX discussion
Hi all,

I'm having issues to add new fields to registration fields. I followed the OpenedX guide (http://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/latest/configuration/customize_registration_page.html) using the Custom Form App (https://github.com/open-craft/custom-form-app). I also tried to create my own form, but I'm getting the same error:

raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

I've already tried to add a SECRET_KEY to python global_settings.py, but then I get a database error:

django.db.utils.ConnectionDoesNotExist: The connection read_replica doesn't exist 

I also already set a conf do my DATABASES variable, but I keep getting further errors, so I suppose I'm doing something wrong.

These are the steps I'm taking:

1. Cloning custom_form_app;
2. Pip install;
3. Copying the custom_reg_form to /edx-platform
4. Adding it to ADDL_INSTALLED_APPS on lms.env.json
5. Editting common.py to enable custom reg forms, importing it and setting REGISTRATION_EXTENSION_FORM to ExtraInfoForm

Am I missing something?

Andy Armstrong

unread,
Oct 6, 2016, 5:43:29 PM10/6/16
to edx-...@googlegroups.com
Did you update the key setting in the various auth files? This blog post has a good summary of the steps:


I hope this helps.

 - Andy

--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/95b6434c-7242-4c30-a78e-77a3e6ca8c84%40googlegroups.com.



--

Andy Armstrong

edX | UI Architect  | an...@edx.org  

141 Portland Street, 9th floor

Cambridge, MA 02139

http://www.edx.org

http://www.e-learn.nl/media/blogs/e-learn/edX_Logo_Col_RGB_FINAL.jpg?mtime=1336074566

rkatao...@gmail.com

unread,
Oct 6, 2016, 6:20:58 PM10/6/16
to General Open edX discussion
Hi Andy, thanks for replying.

I've taken the steps on the blog, but I get the same error.

I don't know if SECRET_KEYS is directly related to my issue, because when I alter it on edxapp/local/lib/python2.7/site-packages/django/conf/global_settings.py, it accomplishes that step, but I keep getting other errors.

I've noticed this error occurs whenever I try to import a model to use in a form. For instance:

  File "/edx/app/edxapp/edx-platform/lms/envs/common.py", line 51, in <module>
    from custom_reg_form.forms import ExtraInfoForm
  File "/edx/app/edxapp/edx-platform/custom_reg_form/forms.py", line 1, in <module>
    from .models import ExtraInfo
  File "/edx/app/edxapp/edx-platform/custom_reg_form/models.py", line 5, in <module>
    USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in __getattr__
    self._setup(name)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 113, in __init__

Andy Armstrong

unread,
Oct 7, 2016, 9:24:18 AM10/7/16
to edx-...@googlegroups.com
At this point I recommend asking this in the openedx-ops channel:


Good luck!

 - Andy

Reply all
Reply to author
Forward
0 new messages