Author James Bennett has put up the source code for Second Edition of the book so you can either: check your code against that, or simply download and use his code.
However, there are two specific questions that you need to answer before further help:
which version of the book? (Second Edition covers Django 1.1, i.e. from trunk)
which version of Django are you using?
which version of python do you have (python -V
)?
If you're using the Second Edition and have svn'd Django from trunk, I can help - I have it working fine. Here's my (OS X) setup (just for working through the Second Edition of the book with Django from 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 there's the 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" //or use advanced
});
</script>
{% endblock %}
Have a look through that and let us know how you get on!