Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
warrenchen968 opened this issue Jun 16, 2018 · 1 comment

Comments

@warrenchen968
Copy link

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!

@bradenmacdonald
Copy link
Member

@warrenchen968 Sorry for the delay. It appears that none of us were watching for bug reports on this repository.

The name of this package is custom_reg_form not ext_registration. Please make sure it is installed in the correct edxapp virtual environment (so if you run python and then type import custom_reg_form it works), and then try again. As long as you have added this to ADDL_INSTALLED_APPS according to the README, you do not need to specify any package name when you run the migrate command, so change your command to just sudo /opt/bitnami/apps/edx/bin/python.edxapp ./manage.py lms syncdb --migrate --settings aws

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants