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

ModuleNotFoundError: No module named 'django-summernote' in django 4+ #473

Open
meera-qa03 opened this issue Mar 7, 2022 · 20 comments
Open

Comments

@meera-qa03
Copy link

i am getting the below error while doing makemigrations ModuleNotFoundError: No module named 'django-summernote
Screenshot 2022-03-07 at 6 55 47 PM
'

@luisgs7
Copy link

luisgs7 commented Mar 9, 2022

Hi, I'm using django 4.0.3, and the migrations worked correctly.

@gavinhaa
Copy link

Hello, can you check the Django version with Python Shell? "Django.VERSION" or "import Django"

@ShinMin-a
Copy link

haha, same issue. "django_summernote" not "django-summernote" in your setting file.

@efong505
Copy link

I got the same error message as above. Seems like this has to do with new versions of Django, although, @luisgs7 was able to make it work fine. Are there any additional configuration steps needed to be done for Django to see the installed django-summernote?

@luisgs7
Copy link

luisgs7 commented Jun 23, 2022

Hello @efong505, I'm using it in production, and it's working perfectly fine.
In the case of the question's error message, I believe the error occurred due to adding the summernote configuration like this: "django**-summernote", but the correct way would be "django_**summernote"".

I followed the library documentation to get it working correctly, if you have any errors please add a message so we can help.
Luís

@efong505
Copy link

Thanks @luisgs7 for your quick response. Do you have the link to the library documentation? And on the configuration, are you referring to the Installed_Apps settings in Setting.py file?

@luisgs7
Copy link

luisgs7 commented Jun 23, 2022

No problems.
That's right, I'm referring to Installed_Apps, regarding the documentation it's on the project's homepage on github, I followed the step by step and it worked correctly: https://github.com/summernote/django-summernote

@efong505
Copy link

Okay got it @luisgs7. So you're adding django_**summernote" instead of django_summernote to the installed apps of settings.py? I added django_summernote and that's where I got the error that no module named django_summernote found. The reference in the link takes you to django vs 3.0 but I'm using 4.0.5 so I'm wondering if it has to do with the version. I followed the steps multiple times but still get he error.

@luisgs7
Copy link

luisgs7 commented Jun 23, 2022

OK.
In this case I added the 'django_summernote', in the INSTALLED_APPS.
Regarding the Django version I'm using 4.0.3, if possible try installing this version to see if it works.

pip install django==4.0.3

Check if you can perform django_summernote migrations on the database after installing and configuring the INSTALLED_APPS.

python manage.py migrate

Luís

@luisgs7
Copy link

luisgs7 commented Jun 23, 2022

@efong505
I developed a project using Django version 4.0.5, and also using Django summernote, I added a commit with all the settings I made to add django_summernote.

https://github.com/luisgs7/app-django-summernote

Any doubt I am available.

Luís

@efong505
Copy link

Thanks @luisgs7! Do you have this version of the app in a project? Everything is pretty much the same as what you have on the app side.

@efong505
Copy link

efong505 commented Jun 23, 2022

With a little tinkering, Django wants to be picky on how it does things. I wasn't running my project in a virtual environment. pip installed the django vs. 4.0.3 and it worked. reinstalled with 4.0.5 and it still worked. However, when I was not in the virtutal environment I got the message error message, "No module named django_summernote".

So, after messing with this, I tried py -m manage.py migrate and it complained to use manage instead of manage.py. I ran py -m manage migrate and guess what? It worked. Thanks @luisgs7, again for your help. Hope this helps someone that had the same issue.

@luisgs7
Copy link

luisgs7 commented Jun 23, 2022

@efong505

Glad it worked, I figured you were already using virtual environments.

Any questions I'm at your disposal, have a great day.

Luís

@efong505
Copy link

efong505 commented Oct 11, 2022 via email

@luisgs7
Copy link

luisgs7 commented Oct 13, 2022

Hello @efong505

I'm using this library in a Django project, using the LTS version of Django, which is even recommended for commercial projects.

The LTS version is: Django==3.2.15

link for more information about Django versions: https://www.djangoproject.com/download/

@techiemia
Copy link

Hello. I am using the latest version of Django (5.0.1) and have followed the steps to configure for Summernote. I am working in my virtual env, my venv library has django_summernote in there however when I try to call it in my admin.py file (from django_summernote.admin import SummernoteModelAdmin) as the repository suggested, I still am facing the module not found error. I even tried uninstalling Django 5.0.1 and installing Django 4.0.3 as luisgs7 advised and I am still facing this error. Any suggestions?

@luisgs7
Copy link

luisgs7 commented Jan 15, 2024

Hello, one question, did you add django_summernote to the installed apps in settings, as this error occurs when the project's manage.py does not find the installed module record.

@techiemia
Copy link

techiemia commented Jan 15, 2024 via email

@luisgs7
Copy link

luisgs7 commented Jan 15, 2024

Good morning.

Really quite strange, do the following, remove the virtual environment, create a new one, and install the dependencies again, there may be a problem installing the libs.

If your project is open source, send the repository link, if not, no problem.

Did you complete this complete step-by-step guide, perform the migrations, the static files part: https://github.com/summernote/django-summernote

What is the version of python?

@techiemia
Copy link

techiemia commented Jan 15, 2024 via email

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

6 participants