#1796: [patch] "Cannot resolve keyword ___ into field" error when working with
ManyToMany relation
-------------------------+--------------------------------------------------
   Reporter:  anonymous  |                Owner:  mtredinnick     
     Status:  reopened   |            Component:  Database wrapper
    Version:  SVN        |           Resolution:                  
   Keywords:             |                Stage:  Accepted        
  Has_patch:  1          |           Needs_docs:  0               
Needs_tests:  0          |   Needs_better_patch:  0               
-------------------------+--------------------------------------------------
Changes (by anonymous):

 * cc: [EMAIL PROTECTED] (added)

Comment:

 Got bitten here to, in my case with Ivan's great tagging app.
 (Also got a report from a user that adding a User failed at one time.)
 
 Traceback is very similar to the one posted above,
 {{{
 Traceback (most recent call last):
 
           File "/usr/lib/python2.4/site-
 packages/django/core/handlers/base.py", line 77, in get_response
             response = callback(request, *callback_args,
 **callback_kwargs)
 
           File "/usr/lib/python2.4/site-
 packages/django/contrib/admin/views/decorators.py", line 55, in
 _checklogin
             return view_func(request, *args, **kwargs)
 
           File "/usr/lib/python2.4/site-
 packages/django/views/decorators/cache.py", line 39, in _wrapped_view_func
             response = view_func(request, *args, **kwargs)
 
           File "/usr/lib/python2.4/site-
 packages/django/contrib/admin/views/main.py", line 363, in change_stage
             new_data = manipulator.flatten_data()
 
           File "/usr/lib/python2.4/site-
 packages/django/db/models/manipulators.py", line 248, in flatten_data
             new_data.update(f.flatten_data(fol, obj))
 
           File "/srv/site/src/tags/fields.py", line 77, in flatten_data
             new_data[self.name] = [int(instance.id) for instance in
 getattr(obj, self.name).all()]
 
           File "/usr/lib/python2.4/site-
 packages/django/db/models/query.py", line 108, in __iter__
             return iter(self._get_data())
 
           File "/usr/lib/python2.4/site-
 packages/django/db/models/query.py", line 468, in _get_data
             self._result_cache = list(self.iterator())
 
           File "/usr/lib/python2.4/site-
 packages/django/db/models/query.py", line 172, in iterator
             select, sql, params = self._get_sql_clause()
 
           File "/usr/lib/python2.4/site-
 packages/django/db/models/query.py", line 482, in _get_sql_clause
             joins2, where2, params2 = self._filters.get_sql(opts)
 
           File "/usr/lib/python2.4/site-
 packages/django/db/models/query.py", line 646, in get_sql
             joins2, where2, params2 = val.get_sql(opts)
 
           File "/usr/lib/python2.4/site-
 packages/django/db/models/query.py", line 697, in get_sql
             return parse_lookup(self.kwargs.items(), opts)
 
           File "/usr/lib/python2.4/site-
 packages/django/db/models/query.py", line 829, in parse_lookup
             joins2, where2, params2 = lookup_inner(path, lookup_type,
 value, opts, opts.db_table, None)
 
           File "/usr/lib/python2.4/site-
 packages/django/db/models/query.py", line 936, in lookup_inner
             raise TypeError, "Cannot resolve keyword '%s' into field" %
 name
 
         TypeError: Cannot resolve keyword 'article' into field
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/1796#comment:49>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to