Z
Z
zelsky2015-11-25 13:36:51
Django
zelsky, 2015-11-25 13:36:51

Adding Django images not working?

there is no load item when adding a picture in django ckeditor, there is only adding by link. I don't know what the problem is anymore.
installed aps

'ckeditor',
    'ckeditor_uploader',

Urli
url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps},
        name='django.contrib.sitemaps.views.sitemap'),
    url(r'^robots\.txt$', TemplateView.as_view(template_name='robots.txt',content_type='text/plain')),
    url(r'^ckeditor/', include('ckeditor_uploader.urls')),

settings file
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, '..', 'media')
CKEDITOR_JQUERY_URL = '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'
CKEDITOR_UPLOAD_PATH = "uploads/"
CKEDITOR_IMAGE_BACKEND = "pillow"

permissions on folders and subpackages
(fallout)[email protected]:/opt# namei -ml /opt/fallout/media/uploads//
f: /opt/fallout/media/uploads//
drwxr-xr-x root root /
drwxrwxr-x root root opt
drwxrwxrwx root root fallout
drwxrwxrwx root root media
drwxrwxrwx root root uploads

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
zelsky, 2015-11-26
@zelsky

Reinstalling + connecting to URLs after the admin panel helped

S
sim3x, 2015-11-25
@sim3x

drwxrwxrwx root root
facepalm. When you get hacked, don't say you weren't warned.
robots.txt is better to make it just a text file, put it in media and give it to nginx from there
Actions from here https://github.com/django-ckeditor/django-ckeditor did you do everything?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question