Giter VIP home page Giter VIP logo

custom-form-app's Introduction

To Use:

  1. Install with pip install -e . within this folder within the edx platform virtual environment.
  2. Add "custom_reg_form" to the "ADDL_INSTALLED_APPS" array in lms.env.json (you may have to create it if it doesn't exist.)
  3. Set "REGISTRATION_EXTENSION_FORM" to "custom_reg_form.forms.ExtraInfoForm" in lms.env.json.
  4. Run migrations.
  5. Start/restart the LMS.

custom-form-app's People

Contributors

bradenmacdonald avatar itsjeyd avatar kelketek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

custom-form-app's Issues

ImportError: No module named c

Hello,

I was trying to install this app to my Open edX Hawthorn.2 release.
I was following the steps in README file, but when I run migrations, I got this error

edxapp@edx:~/custom-form-app$ python /edx/app/edxapp/edx-platform/manage.py lms syncdb --migrate --settings=aws
Traceback (most recent call last):
File "/edx/app/edxapp/edx-platform/manage.py", line 118, in
startup.run()
File "/edx/app/edxapp/edx-platform/lms/startup.py", line 19, in run
django.setup()
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/init.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/config.py", line 94, in create
module = import_module(entry)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named c

Can you please help me to fix it?

noting is reflecting on registration page

i have followed the below process.
cd /edx/app/edxapp
sudo -u edxapp git clone https://github.com/open-craft/custom-form-app.git
sudo -u edxapp /edx/bin/pip.edxapp install custom-form-app/
In lms.env.json Added
"ADDL_INSTALLED_APPS": [ "custom_reg_form" ],
and
"REGISTRATION_EXTENSION_FORM" : "custom_reg_form.forms.ExtraInfoForm"
save and quit
Run migrations.
python /edx/app/edxapp/edx-platform/manage.py -h lms syncdb --settings=aws
python /edx/app/edxapp/edx-platform/manage.py -h cms syncdb --settings=aws

Start/restart the LMS.
sudo /edx/bin/supervisorctl restart all

Fields dose not reflects in registration form.

can any one help me out

when adding this app to LMS Django apps in the Bitnami instance and run DB migration script, Django couldn't find the module.

To whom it may concern,

I tried to use this instance in the EDX Bitnami instance and tried the following two options:
1. option with the default admin.py

when I run the DB migration script:
sudo /opt/bitnami/apps/edx/bin/python.edxapp ./manage.py lms syncdb --migrate ext_registration --settings aws

The error shows:

Traceback (most recent call last):
File "./manage.py", line 112, in
startup.run()
File "/opt/bitnami/apps/edx/edx-platform/lms/startup.py", line 52, in run
django.setup()
File "/opt/bitnami/apps/edx/venvs/edxapp/lib/python2.7/site-packages/django/init.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/opt/bitnami/apps/edx/venvs/edxapp/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/opt/bitnami/apps/edx/venvs/edxapp/lib/python2.7/site-packages/django/apps/config.py", line 86, in create
module = import_module(entry)
File "/opt/bitnami/python/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named ext_registration

option 2: update the admin.py to:

"""Django admin pages for registration form extention configuration. """
from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin

from .models import ExtraUserInfo

Register your models here.

admin.site.register(ExtraUserInfo, ConfigurationModelAdmin)

Facing the same issue and error while migrating. Could you please tell me what's the solution? Thanks!

Production setup

Thanks for this really helpful example, @bradenmacdonald and @Kelketek

Is there a way of setting up Ansible files to automate setup so the manual part of the process doesn't need to be repeated when spinning up new edxapp instances in the future?

I can add the git repo to EDXAPP_EXTRA_REQUIREMENTS, but that doesn't actually add the app to INSTALLED_APPS.

I don't see a direct way to do this in my fork of configuration, so I would think the way to automate this would be to update my edx-platform fork directly, updating the common.py file for the lms so that OPTIONAL_APPS array includes the string 'custom_form_app'.

To automate adding writing REGISTRATION_EXTENSION_FORM to lms.env.json, I think I can just add it to EDXAPP_ENV_EXTRA in my server-vars.yml

EDXAPP_ENV_EXTRA:
  REGISTRATION_EXTENSION_FORM: "custom_reg_form.forms.ExtraInfoForm"

Thanks for any thoughts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.