django-summernote
django-summernote copied to clipboard
ModuleNotFoundError: No module named 'django-summernote' in django 4+
i am getting the below error while doing makemigrations ModuleNotFoundError: No module named 'django-summernote
'
Hi, I'm using django 4.0.3, and the migrations worked correctly.
Hello, can you check the Django version with Python Shell? "Django.VERSION" or "import Django"
haha, same issue. "django_summernote" not "django-summernote" in your setting file.
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?
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
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?
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
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.
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
@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
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.
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.
@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
I'll try that. When I ran the migration that's when I found out that I got this error. I think something changed with the newest version of Django but I'm not finding the fix for it, if there is any.
From: Luís Gustavo @.> Sent: Thursday, June 23, 2022 12:19 PM To: summernote/django-summernote @.> Cc: FONG, EDWARD @.>; Mention @.> Subject: Re: [summernote/django-summernote] ModuleNotFoundError: No module named 'django-summernote' in django 4+ (Issue #473)
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
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/summernote/django-summernote/issues/473*issuecomment-1164728702__;Iw!!KGOTntw!XDGt5Gqs260ZVgNW_x6nklZn6MtssYsHWiWNCaACj17UgzUyaA14zeoyqHUMW35nkwicV5JWfVWL11Yl5plwgQ$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/APUVPGLLLM5X4QTLG54J6EDVQSTDTANCNFSM5QDJGGXQ__;!!KGOTntw!XDGt5Gqs260ZVgNW_x6nklZn6MtssYsHWiWNCaACj17UgzUyaA14zeoyqHUMW35nkwicV5JWfVWL11YosrPzZQ$. You are receiving this because you were mentioned.Message ID: @.***>
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/
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?
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.
Good morning Luís,
Yes I have added django_summernote into my installed apps in the settings.py file, however it doesn’t pop up when I try to call it in my admin.py file. I am working within my virtual environment and it is there in the venv library and when I do the pip requirement.txt Django_summernote is acknowledged. Do you think I should uninstall and reinstall? Thank you for responding. I truly appreciate it!
On Mon, 15 Jan 2024 at 4:59 AM Luís Gustavo @.***> wrote:
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.
— Reply to this email directly, view it on GitHub https://github.com/summernote/django-summernote/issues/473#issuecomment-1891904762, or unsubscribe https://github.com/notifications/unsubscribe-auth/BA4JRZMCV5JR3XCU2P2IJ5LYOUDXPAVCNFSM5QDJGGX2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBZGE4TANBXGYZA . You are receiving this because you commented.Message ID: @.***>
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?
Hi, unfortunately my project is not open sourced, but I have set media url and media with the attachments from the README in the repository. Debug is set to true and I have added the patterns and imports inside the main url.py file. I made the migrations and did collected the static files —- I believe it made a new folder named static with all of the files.
I will try removing the venv and reinstalling and see if that works.
On Mon, 15 Jan 2024 at 7:55 AM Luís Gustavo @.***> wrote:
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?
What is the version of python?
— Reply to this email directly, view it on GitHub https://github.com/summernote/django-summernote/issues/473#issuecomment-1892222696, or unsubscribe https://github.com/notifications/unsubscribe-auth/BA4JRZM57CSUHQMFMC32GELYOUYOPAVCNFSM5QDJGGX2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBZGIZDEMRWHE3A . You are receiving this because you commented.Message ID: @.***>