#13155: Iteration of a Many To Many Relationship raises Field Error ------------------------------------------+--------------------------------- Reporter: callen | Owner: nobody Status: new | Milestone: Component: Database layer (models, ORM) | Version: 1.1 Keywords: m2m, orm, field error | Stage: Unreviewed Has_patch: 0 | ------------------------------------------+--------------------------------- As seen here: http://gist.github.com/337546
Cannot resolve keyword 'bimport' into field. Choices are: archive_column, archive_order, article, construct, day, edition, frequency, frequency_text, from_email, html_template, id, is_public, list_name, name, newsletterarticle, newsletterarticles, slug, subject, subject_type, subscription, text_template, time # Caused by # this is a many-to-many relationship for nl in bimport.newsletters.all(): # Here's the trace: for nl in bimport.newsletters.all(): File "/Library/Python/2.5/site-packages/django/db/models/manager.py", line 105, in all return self.get_query_set() File "/Library/Python/2.5/site- packages/django/db/models/fields/related.py", line 424, in get_query_set return superclass.get_query_set(self)._next_is_sticky().filter(**(self.core_filters)) File "/Library/Python/2.5/site-packages/django/db/models/query.py", line 498, in filter return self._filter_or_exclude(False, *args, **kwargs) File "/Library/Python/2.5/site-packages/django/db/models/query.py", line 516, in _filter_or_exclude clone.query.add_q(Q(*args, **kwargs)) File "/Library/Python/2.5/site-packages/django/db/models/sql/query.py", line 1675, in add_q can_reuse=used_aliases) File "/Library/Python/2.5/site-packages/django/db/models/sql/query.py", line 1569, in add_filter negate=negate, process_extras=process_extras) File "/Library/Python/2.5/site-packages/django/db/models/sql/query.py", line 1737, in setup_joins "Choices are: %s" % (name, ", ".join(names))) -- Ticket URL: <http://code.djangoproject.com/ticket/13155> Django <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.
