views:

27

answers:

1

Im using Tiny mce for my wysiwyg.

Im using a subdomain to serving media files

#settings.py:
MEDIA_URL = 'http://media.mydomain.com/'
ADMIN_MEDIA_PREFIX = 'http://media.mydomain.com/admin_media/'

In my textareas.js i have this code:

document.domain = 'mydomain.com';
tinyMCE.init({
..

And in my tiny_mce_popup.js I also have

document.domain = 'mydomain.com';

The tiny mce popups works fine with the document.domain code, but django own popup on raw_id_fields does not works so well. When I click on the magnifier icon (on the ForeignKey field) the popup window is displayed, but when I click the link for the object, I open the edit page for the object, instead of closing the popup window and returing to the orignal page with the ID of the object selected in the ForeignKey.

What could I do to fix this?

+1  A: 

I fixed this by putting the tiny_mce folder in my top domain.

Is there a better way to do this?

Anthrax00