Tiny MCE popups blank in Django admin

前端 未结 10 982
再見小時候
再見小時候 2020-12-06 00:45

I have got tinyMCE working in the django admin, but all the popups are blank (eg. edit HTML, add image)

The paths to the popup html pages all exist in the right plac

10条回答
  •  鱼传尺愫
    2020-12-06 01:24

    I ran into this problem with running my django App on Heroku and using Rackspace CDN. My static file settings were all set to use rackspace CDN to share files

    • the solution was to use normal static file serving for the specific tinymce files:

      class Media:
      js = [
          '/static/grappelli/tinymce/jscripts/tiny_mce/tiny_mce.js',
          '/static/grappelli/tinymce_setup/tinymce_setup.js',
      ]
      

    In my url conf:

    urlpatterns += patterns('',
        url(r'^static/(?P.*)$', 'django.views.static.serve', {
            'document_root': settings.STATIC_ROOT,
        }),
    

    )

    The static.serve function allows you to serve static files outside of your standard static settings. You can change static in url conf to whatever you want.

提交回复
热议问题