Skip to content

Django-tinymce and django-filebrowser doesn't comunicate #364

@MaxDragonheart

Description

@MaxDragonheart

I think this is not a bug but my misunderstaning about the setting up between this package and django-filebrowser.

I'm using:

  • django-tinymce 3.3.0
  • django-filebrowser 3.14.1

In settings.py I've this:

INSTALLED_APPS = [
    'grappelli',
    'filebrowser',
    'tinymce',
    'corsheaders',

    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sitemaps',
    'django.contrib.gis',
    'django.contrib.sites',
    'django.contrib.flatpages',
   .
   .
   .
]

TINYMCE_DEFAULT_CONFIG = {
    "height": "800",
    "menubar": "file edit view insert format tools table help",
    "plugins": "advlist autolink lists link image charmap print preview anchor searchreplace visualblocks code "
                "fullscreen insertdatetime media table paste code help wordcount spellchecker",
    "toolbar": "undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft "
                "aligncenter alignright alignjustify | outdent indent |  numlist bullist checklist | forecolor "
                "backcolor casechange permanentpen formatpainter removeformat | pagebreak | charmap emoticons | "
                "fullscreen  preview save print | insertfile image media pageembed template link anchor codesample | "
                "a11ycheck ltr rtl | showcomments addcomment code",
    "custom_undo_redo_levels": 10,
}
TINYMCE_SPELLCHECKER = False
TINYMCE_FILEBROWSER = True

In urls.py I've this:

from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path

from filebrowser.sites import site

urlpatterns = [
    path('admin-site/', include([
        path('filebrowser/', site.urls),
        path('grappelli/', include('grappelli.urls')),
        path('', admin.site.urls),
        path('tinymce/', include('tinymce.urls')),
    ])),
    .
    .
    .
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

I'm be able to use Tinymce as you can see on the image below
Screenshot from 2021-07-04 09-37-11

But I can't use django-filebrowser.
Screenshot from 2021-07-04 09-37-39

I've created an image field that use django-filebrowser and it is possible to add media without problems.
Screenshot from 2021-07-04 09-38-29

Probably I'm forgot something, but what?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions