I investigated this problem a bit further.
First, I locally installed the development release 1.5.1.dev100 of
django-tinymce in /usr/local/lib/python2.6/dist-packages/. It basically
works and fixes the import problem in a more elegant, backwards
compatible way. Besides that, the code changes are only minor. I'll
attach a diff file of the changes to the version 1.5 delivered with
Maverick.
The second problem I had was that the browser issued invalid GET
requests for various tinymce plugins. For example, instead of the
correct request:
GET /media/js/tiny_mce/plugins/table/editor_plugin.js
I got:
GET /admin/blog/article/7//plugins/table/editor_plugin.js
from a tinymce instance within the admin page of some article with ID 7.
The response of that request was finally 404. In effect, the tinymce
editor did not show up on the page at all. I tested this with Firefox
and Chromium.
This second problem exists in Maverick's version 1.5 as well as in the
newer development version. The interesting thing is that it occurs only
if django-tinymce's compressor is enabled, i.e. TINYMCE_COMPRESSOR is
set to True in settings.py. If set to False, the tinymce editor appears
on the page and works flawlessly.
I was not able to find the actual reason for this problem. The
compressor returns JavaScript code that configures the base URL of a
tinymce object. In python code, that base URL is correct. I assume that
Django 1.2 introduced some incompatibility in response processing that
neglects the effect of that base URL configuration.
The test case that comes with django-tinymce suffers from the same
problem. By default, it turns the compressor off and so the test works.
However, if the compressor is enabled it produces the same errors as my
small toy application.
So I think setting TINYMCE_COMPRESSOR to False is a practicable
workaround. For Maverick' package of django-tinymce, it may be
reasonable to switch to that development version 1.5.1.dev100. That
version also appears to be backwards compatible.
** Patch added: "Differences between version 1.5 and 1.5.1.dev100"
https://bugs.launchpad.net/ubuntu/+source/python-django-tinymce/+bug/660591/+attachment/1693564/+files/tinymce.diff
--
Invalid import from django.forms.util in widget.py
https://bugs.launchpad.net/bugs/660591
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs