#12867: admin::list_editable causes failure of reverse one to many lookup -------------------------------------------+-------------------------------- Reporter: daob | Owner: nobody Status: closed | Milestone: Component: django.contrib.admin | Version: 1.1 Resolution: duplicate | Keywords: Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | -------------------------------------------+-------------------------------- Comment (by kmtracey):
The last comment in #11448 is not a particularly helpful one. The commenter did not say what exactly these additional problems are, nor if they were introduced by the proposed fix or merely other issues with the code that triggered the "cannot resolve" error. Without such specifics it seems premature to say the identified problem isn't worth fixing. And no one has made that decision -- the ticket is still open, despite that comment. If moving admin defs out of models.py did not fix the problem for your larger project, then there's likely something else triggering the same situation in your larger project's models.py. There's another ticket linked to that one, that was closed as a dupe, showing another way to trigger the same error. It too could be solved by reordering things so that all models and thus all inter-model relationships were defined before any attempt to use the models. So far as I recall no instance of this particular problem has been identified that could not be solved by simply changing the order of model/form definitions in the application. I'd expect, then, that you could do the same by some careful evaluation of what exactly is in your models.py file and moving code around to avoid using models before all inter-model relationships are defined. If in fact you have a case where more careful ordering of code can't fix the problem, that would be interesting to know, and could increase the priority of getting a fix for #11448 in. As it is now it's a problem with a known easy workaround and a vague reference to other additional problems that aren't easily fixed, so it's not exactly at the top of the priority list for fixing. (BTW admin.autodiscover() was added prior to Django 1.0, which was released nearly 1.5 years ago. I would not have thought it still qualified as "new".) -- Ticket URL: <http://code.djangoproject.com/ticket/12867#comment:5> 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 django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.