Using the Django-CMS Wymeditor for ZInnia Entries

758 views Asked by At

Is there a way to use the Django-cms WYMeditor (and all of it's plugin capabilities) as the editor for Zinnia?

The goal is to be able to upload photos/videos as content within the entries.

2

There are 2 answers

0
mcneo On

I used django-file-picker to get this to work. I had to edit the zinnia/admin/entry.py file according to http://django-file-picker.readthedocs.org/en/latest/wymeditor.html

I edited the templates/admin/base_site.html file to have these two lines added to the 'extrastyle' block:

<script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js"></script>

I had to make sure zinnia wasn't using it's own WYMeditor:

ZINNIA_WYSIWYG = None

This isn't the ideal solution because I had to actually edit the source files for zinnia, but it'll work for today. I'll look for a more elegant solution next week.

2
Fantomas42 On

You can take a look here and add this line to your project settings :

ZINNIA_ENTRY_BASE_MODEL = 'cmsplugin_zinnia.placeholder.EntryPlaceholder'