alex/django-taggit — Issue #85: AttributeError: 'TaggableManager' object has no attribute 'get_prep_lookup'
Author: jordic
Created: 2011-10-12 09:13:37+00:00
State: open

Hello Alex,
With, your latest version and Django 1.2 it not works, I see in your commit a Closed issue with this error.
I checkt out tag 0.8.0 and now it works again. I diff the managers.py, and see a lot of changes since,
the commit that solves the error.

Perhaps something simple?

File "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/base.py", line 101, in get_response
response = callback(request, *callback_args, **callback_kwargs)

File "/opt/python2.6/lib/python2.6/site-packages/django/contrib/admin/options.py", line 238, in wrapper
return self.admin_site.admin_view(view)(*args, **kwargs)

File "/opt/python2.6/lib/python2.6/site-packages/django/utils/decorators.py", line 36, in __call__
return self.decorator(self.func)(*args, **kwargs)

File "/opt/python2.6/lib/python2.6/site-packages/django/utils/decorators.py", line 86, in _wrapped_view
response = view_func(request, *args, **kwargs)

File "/opt/python2.6/lib/python2.6/site-packages/django/utils/decorators.py", line 36, in __call__
return self.decorator(self.func)(*args, **kwargs)

File "/opt/python2.6/lib/python2.6/site-packages/django/views/decorators/cache.py", line 70, in _wrapped_view_func
response = view_func(request, *args, **kwargs)

File "/opt/python2.6/lib/python2.6/site-packages/django/contrib/admin/sites.py", line 190, in inner
return view(request, *args, **kwargs)

File "/opt/python2.6/lib/python2.6/site-packages/django/utils/decorators.py", line 86, in _wrapped_view
response = view_func(request, *args, **kwargs)

File "/opt/python2.6/lib/python2.6/site-packages/django/contrib/admin/options.py", line 977, in changelist_view
response = self.response_action(request, queryset=cl.get_query_set())

File "/opt/python2.6/lib/python2.6/site-packages/django/contrib/admin/options.py", line 744, in response_action
response = func(self, request, queryset)

File "/opt/python2.6/lib/python2.6/site-packages/django/contrib/admin/actions.py", line 59, in delete_selected
queryset.delete()

File "/opt/python2.6/lib/python2.6/site-packages/django/db/models/query.py", line 440, in delete
delete_objects(seen_objs, del_query.db)

File "/opt/python2.6/lib/python2.6/site-packages/django/db/models/query.py", line 1275, in delete_objects
del_query.delete_batch_related(pk_list, using=using)

File "/opt/python2.6/lib/python2.6/site-packages/django/db/models/sql/subqueries.py", line 66, in delete_batch_related
AND)

File "/opt/python2.6/lib/python2.6/site-packages/django/db/models/sql/where.py", line 66, in add
value = obj.prepare(lookup_type, value)

File "/opt/python2.6/lib/python2.6/site-packages/django/db/models/sql/where.py", line 267, in prepare
return self.field.get_prep_lookup(lookup_type, value)

AttributeError: 'TaggableManager' object has no attribute 'get_prep_lookup'