Closed GoogleCodeExporter closed 9 years ago
there´s nothing else to do than what´s explained on the "using tinymce" page.
you
just have to add the javascripts to your model.
what exactly is not working?
did you add the js to your model?
are you using the right paths?
Original comment by sehmaschine
on 27 Jun 2009 at 10:28
what exactly is not working?
The TinyMCE widget isn't being displayed instead of the standard TextField's
textarea.
did you add the js to your model?
Yes.
are you using the right paths?
This must be the problem. My ADMIN_MEDIA_ROOT is /media/admin/, and I'm
referring to the scripts with
this code:
class Media:
js = ['/media/admin/tinymce/jscripts/tiny_mce/tiny_mce.js',
'/media/admin/tinymce_setup/tinymce_setup.js',]
Is there anything else that could be screwing this up?
Thanks for your help,
Chris
Original comment by christop...@odonnell.io
on 28 Jun 2009 at 7:25
first, it´s easy to see if the paths are right/wrong with either using firebug
or
entering the path/url into your browser.
that should solve the path/url-problem.
second, I can´t think of anything else that causes this issue.
btw: the attribute ADMIN_MEDIA_ROOT doesn´t exist. it´s either MEDIA_ROOT or
ADMIN_MEDIA_PREFIX.
Original comment by sehmaschine
on 29 Jun 2009 at 7:32
Yeah, sorry about the errors in my, I was tired. It actually seems that TinyMCE
isn't even working in the help
section where it's enabled by default (right?). Here's my settings.py, if that
helps, but if you can't find a
solution, don't worry.
# Django settings for icon_collection project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
("Chris O'Donnell", 'odn@me.com'),
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql',
'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME =
'/Users/Chris/Sites/Django/Projects/icon_collection/icon_collection.db'
# Or path
to database file if using sqlite3.
DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used
with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with
sqlite3.
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'America/Vancouver'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-ca'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = False
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = '/Users/Chris/Sites/Django/Projects/icon_collection/media/'
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = 'http://127.0.0.1:8000/media/'
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/admin/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = ''
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
)
TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.auth",
"django.core.context_processors.request",
"grappelli.context_processors.admin_url",
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
)
ROOT_URLCONF = 'icon_collection.urls'
TEMPLATE_DIRS = (
"/Users/Chris/Sites/Django/Projects/icon_collection/templates",
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.databrowse',
'django.contrib.flatpages',
'django.contrib.markup',
'django.contrib.comments',
'tinymce',
'grappelli',
'faq',
'icon_collection.icons',
)
Original comment by christop...@odonnell.io
on 29 Jun 2009 at 10:49
it´s really hard to help you with the information you provide. e.g., you
don´t tell
me where tinymce is installed (the path to tinymce). I have to guess that your
INSTALLED APP "tinymce" is django-tinymce (but maybe it´s not). and so on ...
the problem you´d like to solve is an easy one, but you have to understand
what´s
happening in the first place. e.g., you have to understand how to serve static
files
with and without django. you don´t even tell me if django handles your
media-files or
not.
I don´t want to be cruel, but you have to understand the basics. then you´ll
be able
to ask the right question and provide useful information in order to help. at
that
point, it´s a question of minutes to guide you to the solution.
I´m closing this issue as "invalid", because it´s way out of scope to discuss
this here.
thanks,
patrick
Original comment by sehmaschine
on 30 Jun 2009 at 8:05
I had the same exact problem (TinyMCE not showing up, not even for the default
Gappelli help section, even
though I configured everything correctly), so I tried it out on Firefox. And it
worked.
Looking into the tinymce_setup.js file, by default there's a restriction to use
Gecko browsers (ie. Firefox) only. So
I removed the line that says "browsers: "gecko"" and all was well. I also added
"safari" to the list of plugins, as
this plugin for TinyMCE includes some fixes for those on Webkit browsers.
Original comment by s5%satur...@gtempaccount.com
on 4 Feb 2010 at 11:18
[deleted comment]
This should be reopened.
The page http://code.google.com/p/django-grappelli/wiki/tinymce does not fully
describe what is required to achieve the result in the screen capture.
It should let people know that _tinymce_setup.js_ used in the example can be
found in the grappelli installation. My tinymce richedit looks nothing like the
example because I did not know that grappelli shipped a default config / skin
for tinymce.
It would also be helpful to let noobs know that /media/admin/ is served by a
middleware when using the development server and not via what is specified in
urls.conf for /media/.
Original comment by andrew%b...@gtempaccount.com
on 27 Nov 2010 at 7:57
updated the tinymce-wiki.
about the way /media/admin/ is being served: that´s definitely something a
django-user should know (when using grappelli you should at least know some of
the django basics and we can´t explain that here).
Original comment by sehmaschine
on 27 Nov 2010 at 11:28
Original issue reported on code.google.com by
christop...@odonnell.io
on 26 Jun 2009 at 10:22