Answer the question
In order to leave comments, you need to log in
Why doesn't the image upload button appear in Django's ckeditor?
Hello.
I put ckeditor in django - it appeared, everything works, everything is super. I decided to add image loading, I did everything according to the instructions: https://github.com/django-ckeditor/django-ckeditor... , but we poke on the image icon in ckeditor and there is neither a tab nor a download button.
What I did:
1) Installed via pip and added to applications
INSTALLED_APPS = [
'ckeditor',
'ckeditor_uploader',
]
# Ckeditor_Jquery
CKEDITOR_JQUERY_URL = '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'
# Ckeditor_Upload_files
CKEDITOR_UPLOAD_PATH = "uploads/"
CKEDITOR_IMAGE_BACKEND = 'pillow'
# Ckeditor_config
CKEDITOR_CONFIGS = {
'default': {
'width': '100%',
'height': 200,
"removePlugins": "stylesheetparser",
'toolbar': 'Custom',
'toolbar_Custom': [
['Bold', '-', 'Italic', '-', 'Underline', '-', 'Blockquote'],
]
},
'admin_panel': {
'width': 800,
'height': 500,
'toolbar': 'Custom',
'toolbar_Custom': [
['Bold', 'Italic', 'Underline'],
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Format', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Link', 'Unlink', 'Blockquote', 'Image',],
['RemoveFormat', 'Source']
]
}
}
STATIC_URL = '/static/'
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),)
STATIC_ROOT = os.path.join(BASE_DIR, "/static/")
MEDIA_ROOT = '/faceset/media/'
MEDIA_URL = '/media/'
urlpatterns = [
...
url(r'^ckeditor/', include('ckeditor_uploader.urls')), #загрузка в editor
...
]
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
STATIC_ROOT = os.path.join(BASE_DIR, "static")
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
STATICFILES_DIRS = (
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question