Report this

What is the reason for this report?

How to set up tinymce for django admin?

Posted on August 26, 2017

I use the default django droplet image “django on 16.04” to create the droplet. I am trying to add tinymce to admin. It worked on my local machine. But after I push it to droplet, it does not work.

The settings are the same. Not sure why it does not work.

Thanks.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

Are you seeing any errors in your console when trying to load the page? It might be either a cross-origin error or maybe the path is not correct.

I would recommend going through the official documentation here as well:

https://django-tinymce.readthedocs.io/en/latest/installation.html

Regards, Bobby

This is an old question but I will answer it anyway. I was also experiencing the same issue:

I used this command:

sudo less /var/log/nginx/error.log

and figured out nginx was looking for a tinymce.min.js file in my static folder and the file was not there. So I collected the static files again using the following django command. Remember you need to activate the virtual environment first.

python manage.py collectstatic

Then I deactivated the venv and restarted both gunicorn and nginx:

sudo systemctl restart gunicorn

sudo systemctl restart nginx

This worked for me and I am happy that for once I can give a solution instead of searching for one. Hope it works for you.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.