django-tinymce not appearing in admin

21 views
Skip to first unread message

diogobaeder

unread,
Aug 12, 2009, 1:38:55 AM8/12/09
to Django users
Hi,

I configured django-tinymce extension to work with a model field; It
loads all the JavaScript correctly, right after the field, in a script
tag, passing the right element ID, but the editor simply doesn't show,
only the original textarea is present. Here is a piece of my project
where TinyMCE configuration should be entered:

http://dpaste.com/hold/78621/

Anything wrong in here?

Thanks,

Diogo

Kenneth Gonsalves

unread,
Aug 12, 2009, 1:45:00 AM8/12/09
to django...@googlegroups.com

you have not specified which django version you are using. If it is trunk, I am
under the impression that you need a Media subclass to your model.Admin class
in admin.py to hold the tiny_mce settings. In older versions of django this
was in the Admin subclass. btw, in a mailing list it is not advisable to paste
in dpaste as that will vanish and b0rk the archives.
--
regards
kg
http://lawgon.livejournal.com

diogobaeder

unread,
Aug 12, 2009, 12:05:30 PM8/12/09
to Django users
Oops, sorry... it's version 1.1 final.

I'll try to create the Media subclass with the media, then, although
it's not specified in the django-tinymce use documentation.

About dpaste, I'm confused, because in another post I pasted exception
content and someone advised me to use dpaste to make the thread more
readable. Are you really sure this is a recommendation for this list?

Thanks, Kenneth,

Diogo

Karen Tracey

unread,
Aug 12, 2009, 12:42:32 PM8/12/09
to django...@googlegroups.com
On Wed, Aug 12, 2009 at 12:05 PM, diogobaeder <diogo...@gmail.com> wrote:

Oops, sorry... it's version 1.1 final.

I'll try to create the Media subclass with the media, then, although
it's not specified in the django-tinymce use documentation.

About dpaste, I'm confused, because in another post I pasted exception
content and someone advised me to use dpaste to make the thread more
readable. Are you really sure this is a recommendation for this list?

If it's going to be unreadable in email, definitely put it somewhere else and point to it.  Expecting people to wade through pages of badly wrapped Python code (not that you did that) is a bit much.  Personally I'd rather see single exception tracebacks inline than linked; even though they tend to wrap poorly it's easy enough to focus on the important bits. 

It's a judgment call for what is better linked vs. inline.  Not every thread is going to be useful for searching and finding solutions to similar problems.  Moving the details out of line makes a thread less likely to be useful for that, but there are enough re-occurrances of the common errors that likely they get covered by inline mentions soon enough. 

Karen

Kenneth Gonsalves

unread,
Aug 12, 2009, 8:27:27 PM8/12/09
to django...@googlegroups.com
On Wednesday 12 Aug 2009 9:35:30 pm diogobaeder wrote:
> Oops, sorry... it's version 1.1 final.
>
> I'll try to create the Media subclass with the media, then, although
> it's not specified in the django-tinymce use documentation.
>
> About dpaste, I'm confused, because in another post I pasted exception
> content and someone advised me to use dpaste to make the thread more
> readable. Are you really sure this is a recommendation for this list?

it is not a recommendation - it is my personal opinion. I have been flamed in
the past for both not posting enough of the error traceback and also for
posting too much of the error traceback. I have also been bitten in the
archives where the dpaste has expired. I suppose the best way would be to
paste the relevant lines of the traceback inline and the full traceback
somewhere else. But then one has to know which lines are relevant - and if one
does know that, usually one can solve the problem himself.

diogobaeder

unread,
Aug 13, 2009, 4:28:10 AM8/13/09
to Django users
Hehehehe... indeed, it's a curious problem...

Well, I'll try to stick to your posting suggestions, then. About the
TinyMCE, I'm getting some errors, but it must be some typo
somewhere... I'll post the results here when I make the changes.

Thanks!

Diogo

diogobaeder

unread,
Aug 14, 2009, 6:15:46 PM8/14/09
to Django users
Kenneth,

Setting the Media nested class with the TinyMCE media worked! :-)

Thanks for the help, and sorry for the delay to answer your last post.

Diogo

zignorp

unread,
Aug 20, 2009, 12:12:33 AM8/20/09
to Django users
Hello,
Can you post the example of Setting the Media nested class with the
TinyMCE media?
I'm in exactly the same place,
Thanks,
Wendy

Kenneth Gonsalves

unread,
Aug 20, 2009, 12:22:20 AM8/20/09
to django...@googlegroups.com
On Thursday 20 Aug 2009 9:42:33 am zignorp wrote:
> Can you post the example of Setting the Media nested class with the
> TinyMCE media?
> I'm in exactly the same place,

class ReportAdmin(admin.ModelAdmin):
list_display = ['title','approved']
class Media:
js = ('/sitemedia/js/tiny_mce/jscripts/tiny_mce/tiny_mce.js',
'/sitemedia/js/tiny_mce/jscripts/tiny_mce/textareas.js',)

zignorp

unread,
Aug 20, 2009, 3:44:11 PM8/20/09
to Django users
Thanks so much, Kenneth,
Wendy
Reply all
Reply to author
Forward
0 new messages