Author James Bennett delivered the source code for the second edition of the book so you can either check your code, or simply download and use its code.
However, there are two specific questions that you need to answer before further assistance:
what version of the book? (The second edition covers Django 1.1, i.e. from the trunk)
What version of Django are you using?
what version of python do you have ( python -V )?
If you use the second edition and have svn'd Django from the trunk, I can help - everything works fine for me. Here's my (OS X) setup (only for working through the Second Edition of the book with Django from the trunk):
in settings.py :
TEMPLATE_DIRS = ( '/Users/[myhome]/Sites/django-templates/cms/', )
in urls.py:
(r'^tiny_mce/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': '/Users/[myhome]/djangocode/cms/jscripts/tiny_mce/' }),
Then a copy of change_form.html duplicated from the django directory and copied to:
/django-templates/cms/admin/flatpages/flatpage/
which includes:
{{ media }} <script type="text/javascript" src="/tiny_mce/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ mode: "textareas", theme: "simple" </script> {% endblock %}
Take a look at this and let us know how you deal!
source share