Here's the solution (so far):

1) Obtain the SVN version of django-tagging.
2) Place it or link the 'tagging' directory step '1' provides you into
your $PYTHONPATH
3) python manage.py syncdb (in your 'cms' directory)

To give helpful info:
1) Obtain the SVN version of django-tagging:
run:
    svn checkout http://django-tagging.googlecode.com/svn/trunk/ NEW-
OR-EXISTING-DIRECTORY-OF-YOUR-CHOICE
Look into your target directory, the one 'of-your-choice', and find
the 'tagging' directory. That's the directory you'll need for step
'2'.
2) Place it or link the 'tagging' directory step '1' provides you into
your $PYTHONPATH
I kind of have a crazy $PYTHONPATH. Django's main site should have
more info on it. But, I run Debian Lenny and when I include this path:
    /usr/lib/python2.5/site-packages/
in my $PYTHONPATH 'syncdb' finds it. Either moving the 'tagging'
directory from the 'directory-of-your-choice' into the 'site-packages'
directory would do the trick. Or, you can link it... something like
this:
    sudo ln -s <directory-of-your-choice>/tagging /usr/lib/python2.5/
site-packages/


Once 'syncdb' finds the (svn version of the) 'tagging' directory in
the $PYTHONPATH it will do it's job.


I hope this helps. (I'm off to the book.)

-Bill


On Jul 17, 4:03 pm, LRP <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Still working my way through James Bennett's Practical Django
> Projects. Now on p. 64.
>
> I get this import error when I try to syncdb the Coltrane models.
>
>     from tagging.models import Tag
>   File "/usr/lib/python2.5/site-packages/tagging/models.py", line 9,
> in <module>    from tagging.managers import TagManager,
> TaggedItemManager
>   File "/usr/lib/python2.5/site-packages/tagging/managers.py", line 6,
> in <module>
>     from django.db.models.query import QuerySet, parse_lookup
> ImportError: cannot import name parse_lookup
>
> Googling around I find this note:
>
> While the public interface for the ORM-layer should stay the same, the
> internals have undergone massive change. So if you're relying on some
> private part of the API, you will have to check if it still works.
> Affected of this if for example the popular django-tagging app (guess
> what it does ;-)) which in its current state (r132) uses the no longer
> available django.db.models.query.parse_lookup function. A patch by
> Joes Watts is available here and seems to solve this issue. For more
> details check out this ticket on django-tagging's google code project
> page.
>
> I've never patched code before. Can some kind soul please walk me
> through the process step-by-step so I can continue on to page 65?
>
> Many thanks,
>
> Lloyd
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to