Thursday, August 2, 2012

Re: TinyMCE config

Thanks for the responses, but I'm still stuck. For now, I'm just trying to add TinyMCE to FlatPages within the Django admin app. When I visit http://127.0.0.1:8000/admin/flatpages/flatpage/add/ the 'content' textarea is rendered without the WYSiWYG, and I don't see any 404s in the terminal looking for JS files. 

Here is the current setup:
local_settings.py http://pastebin.com/m78ZC2Z7

As you'll see, I installed the app, included the URLs, configured static and media for local development and then followed the instructions on https://github.com/jondbaker/django-tinymce/blob/master/docs/usage.rst to use the TinyMCE widget on the 'content' field of the FlatPages form in the admin.


On Thu, Aug 2, 2012 at 1:11 AM, Aljoša Mohorović <aljosa.mohorovic@gmail.com> wrote:
On Thu, Aug 2, 2012 at 3:19 AM, jondbaker <jonathandavidbaker@gmail.com> wrote:
> TINYMCE_JS_URL = os.path.join(PROJECT_ROOT,
> 'templates/static/js/tiny_mce/tiny_mce.js')
> TINYMCE_JS_ROOT = os.path.join(PROJECT_ROOT, 'templates/static/js/tiny_mce')

You don't need to set TINYMCE_JS_URL/TINYMCE_JS_ROOT because it is set
automatically based on staticfiles settings.
It's available as configuration option if you need to override default setup.
When you "pip install django-tinymce" all required files are copied so
you can skip step 4 as described in docs, you just need to set
STATIC_ROOT/STATIC_URL.

basically, if you have tinymce in INSTALLED_APPS and urlpatterns and
django has staticfiles properly configured it will work as expected.

let me know if you're still having issues w/ setup and feel free to
contact me if you have any questions.

Aljosa
--
https://twitter.com/maljosa
https://github.com/aljosa

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
Jonathan D. Baker
Developer
http://jonathandbaker.com

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment