Re: TinyMCE in Admin (Practical Django Projects book)

2009-09-28 Thread Alex Robbins

If you use the net tab of firebug[1] you can tell when url/file paths
are messed up. That is the only way I ever get tinymce running.

[1]http://getfirebug.com/

On Sep 27, 7:29 am, Erik Kronberg  wrote:
> On Sun, Sep 27, 2009 at 1:54 PM, James Bennett wrote:
>
>
>
>
>
> > On Sun, Sep 27, 2009 at 6:48 AM, Erik Kronberg  wrote:
> > > I'm on chapter 3 of James Bennett's Practical Django Projects. My
> > > problem is that TinyMCE isn't showing up in the Admin -> New Flatpage
> > > text area. Using Linux (Ubuntu 9.04)
>
> > First thing I'd recommend is checking it against the version here:
>
> >http://bitbucket.org/ubernostrum/practical-django-projects/src/tip/cms/
>
> > (about the first four chapters' worth of code are in the repo, the
> > rest is trickling in as I have time to fill it out)
>
> > --
> > "Bureaucrat Conrad, you are technically correct -- the best kind of
> > correct."
>
> What is the whole path to the .js file for your project? I think I'm messing
> it up somewhere along the line, I want to be sure.
>
> My document root in urls.py is /home/erik/tiny_mce/
> And the path in change_form.html is /tiny_mce/tiny_mce.js
>
> The .js file is in /home/erik/tiny_mce/tiny_mce.js
>
> Thank you for responding so fast! Liking your book so far =) (I never get
> things right the first time, it's not a reflection on your book)
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: TinyMCE in Admin (Practical Django Projects book)

2009-09-27 Thread Erik Kronberg
On Sun, Sep 27, 2009 at 1:54 PM, James Bennett wrote:

>
> On Sun, Sep 27, 2009 at 6:48 AM, Erik Kronberg  wrote:
> > I'm on chapter 3 of James Bennett's Practical Django Projects. My
> > problem is that TinyMCE isn't showing up in the Admin -> New Flatpage
> > text area. Using Linux (Ubuntu 9.04)
>
> First thing I'd recommend is checking it against the version here:
>
> http://bitbucket.org/ubernostrum/practical-django-projects/src/tip/cms/
>
> (about the first four chapters' worth of code are in the repo, the
> rest is trickling in as I have time to fill it out)
>
>
> --
> "Bureaucrat Conrad, you are technically correct -- the best kind of
> correct."
>
>
What is the whole path to the .js file for your project? I think I'm messing
it up somewhere along the line, I want to be sure.

My document root in urls.py is /home/erik/tiny_mce/
And the path in change_form.html is /tiny_mce/tiny_mce.js

The .js file is in /home/erik/tiny_mce/tiny_mce.js

Thank you for responding so fast! Liking your book so far =) (I never get
things right the first time, it's not a reflection on your book)

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: TinyMCE in Admin (Practical Django Projects book)

2009-09-27 Thread James Bennett

On Sun, Sep 27, 2009 at 6:48 AM, Erik Kronberg  wrote:
> I'm on chapter 3 of James Bennett's Practical Django Projects. My
> problem is that TinyMCE isn't showing up in the Admin -> New Flatpage
> text area. Using Linux (Ubuntu 9.04)

First thing I'd recommend is checking it against the version here:

http://bitbucket.org/ubernostrum/practical-django-projects/src/tip/cms/

(about the first four chapters' worth of code are in the repo, the
rest is trickling in as I have time to fill it out)


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



TinyMCE in Admin (Practical Django Projects book)

2009-09-27 Thread Erik Kronberg

Hello!

I'm completely stuck, double checked spelling and tried a couple of
different things. I am really new at Django and just know a bit of
Python, so don't expect me to understand any complicated terminology!

I'm on chapter 3 of James Bennett's Practical Django Projects. My
problem is that TinyMCE isn't showing up in the Admin -> New Flatpage
text area. Using Linux (Ubuntu 9.04)

>>> django.VERSION
(1, 1, 0, 'final', 0)

Latest stable TinyMCE

tiny_mce.js location  ~/tinymce/jscripts/tiny_mce/
change_form.html location~/templates/admin/flatpages/flatpage/
project location~/cms/


Following copy pastes--

urls.py

from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
# Example:
# (r'^cms/', include('cms.foo.urls')),

# Uncomment the admin/doc line below and add
'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
(r'', include('django.contrib.flatpages.urls')),
(r'^tiny_mce/(?P.*)$', 'django.views.static.serve',
{ 'document_root': '/home/erik/tinymce/jscripts/tiny_mce/' }),
)

---

change_form.html (only the first part)
---

{% extends "admin/base_site.html" %}
{% load i18n admin_modify adminmedia %}

{% block extrahead %}{{ block.super }}


 tinyMCE.init({
mode: "textareas",
theme: "simple"
});


---

Thank you for reading! I'm sorry if I forgot anything important, I'll
add it asap

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---