Home > Software engineering >  Django error: "ModuleNotFoundError: No module named 'classroom' "
Django error: "ModuleNotFoundError: No module named 'classroom' "

Time:10-18

I have been working on this project for the last month and this is the first time I have encountered this error: ModuleNotFoundError: No module named 'classroom' in countless times of running manage.py check on the app. The last change I remember making was commenting out some deprecated views and models, in preparation for removal, but I believe I have restored the code to the last known working version, however I am still receiving this error.

"classroom" is the main application underneath the project. Here is the main directory structure:

codex/
|--- codex
|    |--- classroom
|    |    |--- migrations
|    |    |--- templates
|    |    |--- templatetags
|    |    |--- views
|    |    |--- __init__.py
|    |    |--- admin.py
|    |    |--- apps.py
|    |    |--- decorators.py
|    |    |--- forms.py
|    |    |--- models.py
|    |    |--- tests.py
|    |    |--- urls.py
|    |--- __init__.py
|    |--- asgi.py
|    |--- settings.py
|    |--- urls.py
|    |--- wsgi.pyt
|--- manage.py

The "classroom" urls are included in the "codex" urls.py The INSTALLED_APPS in settings.py looks like this:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'crispy_forms',
    'ckeditor',
    'classroom',
]

"ckeditor" is a third party RTF editor for extended text entries required in the app.

At this point, I'm not quite sure where I should be looking for the error. Nor what further information is required to solve the problem.

CodePudding user response:

you have to move classroom folder to root of project beside manage.py or use codex.classroom instead of classroom

  • Related