Thursday, July 16, 2009

Practical Django Projects, coltrane weblog app and django-tagging

I'm working through Practical Django Projects 2nd Edition.

There is a problem with Chapter 4's weblog application, "coltrane." I won't go into detail about the coltrane app, but in the event that you encounter the same problem I've posted a solution.

I downloaded django-tagging. The current version was 0.2.1.

I created a symlink from my projects directory to the downloaded directory.

I added "'taggigng'" to "INSTALLED_APPS" and tried to start the server. I got the following :
Validating models...
Unhandled exception in thread started by <function inner_run at 0x652c30>
Traceback (most recent call last):
File "/Library/Python/2.5/site-packages/django/core/management/commands/", line 48, in inner_run
File "/Library/Python/2.5/site-packages/django/core/management/", line 246, in validate
num_errors = get_validation_errors(s, app)
File "/Library/Python/2.5/site-packages/django/core/management/", line 28, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/Library/Python/2.5/site-packages/django/db/models/", line 128, in get_app_errors
File "/Library/Python/2.5/site-packages/django/db/models/", line 57, in _populate
self.load_app(app_name, True)
File "/Library/Python/2.5/site-packages/django/db/models/", line 72, in load_app
mod = __import__(app_name, {}, {}, ['models'])
File "/[path to django projects]/coltrane/", line 6, in <module>
from tagging.fields import TagField
File "/[path to django projects]/tagging/", line 10, in <module>
File "/[path to django projects]/tagging/", line 9, in <module>
File "/[path to django projects]/tagging/", line 6, in <module>
ImportError: cannot import name parse_lookup

Turns out a lot of people have had this problem.

I checked out the current version from svn and recreated the symlink. All was well.

No comments: