First of all excuse my English is really bad, but I'll try to explain as best I can.
I´m working in a blog, with django-blog-zinnia
, so far so good. Now I try to integrate CKEditor
with
Django zinnia-wysiwyg-ckeditor
I followed the steps in each of its documentation and I can't make it work.
I searched and check for errors in the console and there is nothing, probably would overlook something, because also it is the first time i´m working with Django.
So, I did was this
- I installed
zinnia-wysiwyg-ckeditor
anddjango-ckeditor
- I added apps in my
settings.py
and configureddjango-ckeditor
My settings.py
looks like this.
...
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
STATIC_ROOT = "/static_prod/"
...
INSTALLED_APPS = (
...
'ckeditor',
'ckeditor_uploader',
'zinnia',
'zinnia_ckeditor'
)
...
# ZINNIA SETTINGS
ZINNIA_ENTRY_BASE_MODEL = 'myapp.models.Video'
ZINNIA_PAGINATION = 5
# CKEDITOR SETTINGS
CKEDITOR_UPLOAD_PATH = "uploads/"
CKEDITOR_JQUERY_URL = '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'
CKEDITOR_CONFIGS = {
'default': {
'toolbar': 'Full',
},
'zinnia-content': {
'toolbar_Zinnia': [
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
['Undo', 'Redo'],
['Scayt'],
['Link', 'Unlink', 'Anchor'],
['Image', 'Table', 'HorizontalRule', 'SpecialChar'],
['Source'],
['Maximize'],
'/',
['Bold', 'Italic', 'Underline', 'Strike',
'Subscript', 'Superscript', '-', 'RemoveFormat'],
['NumberedList', 'BulletedList', '-',
'Outdent', 'Indent', '-', 'Blockquote'],
['Styles', 'Format'],
],
'toolbar': 'Zinnia',
},
}
In my urls.py
added this.
url(r'^ckeditor/', include('ckeditor_uploader.urls')),
- I ran the
collectstatic
management command:python manage.py collectstatic
and zinnia
administrator my field of content remains the same as here.