Thanks for replying, Joost,
I tried changing my settings to mirror the settings of someone else in
a previous tiny mce post:

So I moved the files.  In the "mycode" directory, which contains my
project "mysite" dir, as well as one I created called "static_media"
which has js/tiny_mce, etc.  in that, and used these settings on the
mysite/settings.py file:

import os
USER_STATIC_MEDIA = os.path.abspath('../static_media/')
USER_STATIC_MEDIA_URL = '/static_media/'
TINYMCE_JS_URL_BASE = USER_STATIC_MEDIA_URL + 'js/tiny_mce/'
TINYMCE_JS_URL = TINYMCE_JS_URL_BASE + 'tiny_mce.js'
TINYMCE_JS_ROOT = USER_STATIC_MEDIA + '/js/tiny_mce'
TINYMCE_FILEBROWSER = False

Then in the admin.py file for films, which lives inside of mysite, I
added the media subclass, which I was told to do by some other helpful
person on the list, I used the absolute path, on my mac, which is the
one that shows in the browser:

class FilmAdmin(admin.ModelAdmin):
    filter_horizontal = ('filmmakers','topic',)
    class Media:
        js=('/Users/wendy/mycode/static_media/js/tiny_mce/tiny_mce.js', '/
Users/wendy/mycode/static_media/js/tiny_mce/textareas.js',)


So when I go to the page with the textarea, this is what I see:
[22/Aug/2009 19:24:25] "GET /admin/films/film/3/ HTTP/1.1" 200 9344
[22/Aug/2009 19:24:25] "GET /admin/jsi18n/ HTTP/1.1" 200 803
[22/Aug/2009 19:24:25] "GET /Users/wendy/mycode/static_media/js/
tiny_mce/tiny_mce.js HTTP/1.1" 404 2149
[22/Aug/2009 19:24:25] "GET /Users/wendy/mycode/static_media/js/
tiny_mce/textareas.js HTTP/1.1" 404 2152
[22/Aug/2009 19:24:25] "GET /static_media/js/tiny_mce/tiny_mce.js HTTP/
1.1" 404 2092


and in firebug, it just tells me tinyMCE is not defined on the init
call:

<script type="text/javascript">tinyMCE.init({"relative_urls": false,
"spellchecker_languages":
"Arabic=ar,Bengali=bn,Bulgarian=bg,Catalan=ca,Czech=cs,Welsh=cy,Danish=da,German=de,Greek=el,
+English=en,Spanish / Argentinean
Spanish=es,Estonian=et,Basque=eu,Persian=fa,Finnish=fi,French=fr,Irish=ga,Galician=gl,Hungarian=hu,Hebrew=he,Hindi=hi,Croatian=hr,Icelandic=is,Italian=it,Japanese=ja,Georgian=ka,Korean=ko,Khmer=km,Kannada=kn,Latvian=lv,Lithuanian=lt,Macedonian=mk,Dutch=nl,Norwegian=no,Polish=pl,Portuguese
 /
Brazilian
Portuguese=pt,Romanian=ro,Russian=ru,Slovak=sk,Slovenian=sl,Serbian=sr,Swedish=sv,Tamil=ta,Telugu=te,Thai=th,Turkish=tr,Ukrainian=uk,Simplified
Chinese / Traditional Chinese=zh", "elements": "id_desc", "language":
"en", "directionality": "ltr", "theme": "simple",
"strict_loading_mode": 1, "mode": "exact"})</script>

So it is getting some more information that I'm giving it (all the
lang stuff), but still doesn't know tinyMCE

But I do see these urls in the browser:
/Users/wendy/mycode/static_media/js/tiny_mce/textareas.js
which just contains:
tinyMCE.init({
        mode : "textareas",
        theme : "simple"
});

and

/Users/wendy/mycode/static_media/js/tiny_mce/tiny_mce.js
which is the whole shebang.

I'm not quite sure why I'm seeing a 404 after these absolute urls when
I can see them in the browser, and not sure how I can test the
relative urls.

I am very new to django, so any help would be greatly appreciated.
The good thing is, that this line:
desc = tinymce_models.HTMLField(max_length=1000,
verbose_name='description')

is not breaking the admin, it's just displaying as a regular textarea,
so I can still work on what I'm working on while I get this sorted
out.  Maybe there's a clue there.  It's very likely that there's
something elementary that I'm overlooking!

So my directory structure looks like this:
Wendy
  mycode
      static_media
      mysite
          settings.py contains settings above
          films
            models.py contains class Film above
            admin.py contains media subclass


I hope the indenting holds and that makes sense.

Thanks,
Wendy







On Aug 21, 10:20 pm, Joost Cassee <jo...@cassee.net> wrote:
> Hi Wendy,
>
> On 20 aug, 20:29, zignorp <zign...@gmail.com> wrote:
>
> > MEDIA_ROOT = '/Users/...media/'
>
> > MEDIA_URL = '/Users/...media/'
> > (I had to change this to get it to write the path below, before it was
> > looking for tinymce in my project directory)
>
> > ADMIN_MEDIA_PREFIX = '/media/'
>
> Your MEDIA_URL looks strange to me. I usually use something like
> MEDIA_URL = '/media/' and ADMIN_MEDIA_URL = '/media/admin/'. If that
> doesn't work in your set-up that probably means your problem is
> serving static media. See the section about static media in the Django
> docs.
>
> > /Users/.../media/js/tiny_mce/tiny_mce.js
> > gets this error HTTP/1.1" 404 2260 in the terminal window when I load
> > my admin page
>
> > If I paste this same url into my browser I get the tiny_mce.js file
>
> So the same URL works in your browser, but not when used as a
> Javascript script location? That would be really strange. Maybe you
> could check what your browser is doing by looking at the HTML or using
> Firebug?
>
> Regards,
>
> Joost
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to