django-summernote: Server Error (500) with DEBUG=False
This is my first post to GitHub, so I am hopeful that I am submitting this information in the proper manner.
I could not find this in documentation anywhere, but ran into an issue and a solution. I recommend updating the documentation for this solution.
I setup Summernote in my Django3 Project. Everything looked perfect. I deployed to Heroku, but then could not access anything where Summernote was enabled. I was getting a Server Error (500). After checking quite a few different things, I realized the difference was that in my push to Heroku, my DEBUG is set to False. I changed this same setting in my dev environment and sure enough, same result.
After hours of trying to track down the problem, I decided to move on for the time being and install a different Rich Text Editor. It was during the installation of that other editor where they had one line for their documentation.
python manage.py collectstatic
I realized that some static files had caused me problems previously, causing a 500 error when Debug was set to False. I figured, why not give this a try.
Once I ran this, Summernote started working without issue.
I pushed to Heroku, and everything is working as expected. Not a bug in the application, just recommending adding one line to the documentation.
Thank you.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 25
- Comments: 18 (1 by maintainers)
Thanks. I added a step for
collectstatic
in README.md https://github.com/summernote/django-summernote/commit/90948e9f6bd8ed7f7cd46f92b0daf699a6d19c20I figured out the issue. Sometimes, we get this error because there’s something failing on our local when the project is up and running and we have debug = True. Please monitor the console carefully to see if there is any error while running the code on your local. Maybe try debug=False and run on your local to generate the error and try to fix it before deploying the project. Hope that helps!