Dear Mark,
Thanks for your suggestion.
Yes, more or less, I've been playing with the order but the models are
so complex with lots of overrides and many fields that it's hard to keep
track. Also the Python/Django backtrace is useless here.
I just find it so curious that all of this doesn't happen on the Python
debugging webserver...
Joris
op 18-05-14 21:41, Mark Phillips schreef:
Jorris,
Have you tried changing the order of imports in your model? From a
quick read of the references, that helped some folks.
Mark
On May 17, 2014 9:24 AM, "Joris" <jmailli...@promani.be
<mailto:jmailli...@promani.be>> wrote:
Dear all, please help me with this unsolved mystery.
Error: "Cannot resolve keyword u'<M2M FIELD NAME>' into field.
Choices are: <fields of the M2M model>"
1) Error in admin
In the admin it only happens when DEBUG=True. Works perfectly when
DEBUG=False.
The error occurs when opening the form view of the model that has
the M2M field.
2) In code
Here the error is also present when DEBUG=False.
The error occurs when accessing the model field, field, for
example self.my_m2m_field.all()
The error doesn't happen locally on the Django/Python debug
server. On the testing server, which is Apache2 + wsgi, it does
occur. The versions of Python (2.7) and Django (1.5.7) are the
same on both computers.
The result is that a fellow developer is accusing me of being
neglective with testing the code before uploading it :-(
There have been people with similar problems, but it has never
been solved:
https://groups.google.com/forum/#!topic/django-users/E4UVZHf6kP8
<https://groups.google.com/forum/#%21topic/django-users/E4UVZHf6kP8>
http://stackoverflow.com/questions/19145787/fielderror-cannot-resolve-keyword-xxxx-into-field
http://chase-seibert.github.io/blog/2010/04/30/django-manytomany-error-cannot-resolve-keyword-xxx-into-a-field.html
http://code.djangoproject.com/ticket/1796 (7 year old django bug
which is reported fixed but in fact is not)
So it seems to be a bug deep down in Django.
This makes the use of M2M fields impossible for my application,
which is quite a problem.
Instead of trying to find the bug in Django, would anyone have any
clue why it does work on the Python debug server and not on Apache2?
Thank you!
J
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to django-users+unsubscr...@googlegroups.com
<mailto:django-users%2bunsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/53778C68.4060102%40promani.be.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to django-users+unsubscr...@googlegroups.com
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CAEqej2Oarfwzoy7Pi%3Dk01pBD9a6TiyQnUbuSaEXSfPW8exug-Q%40mail.gmail.com
<https://groups.google.com/d/msgid/django-users/CAEqej2Oarfwzoy7Pi%3Dk01pBD9a6TiyQnUbuSaEXSfPW8exug-Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/537956B2.80809%40promani.be.
For more options, visit https://groups.google.com/d/optout.