#2536: Mutually referential many-to-one relationship AddManipulator fails.
------------------------------+---------------------------------------------
Reporter: anonymous | Owner: adrian
Type: defect | Status: new
Priority: normal | Milestone:
Component: Database wrapper | Version:
Severity: normal | Resolution:
Keywords: |
------------------------------+---------------------------------------------
Changes (by [EMAIL PROTECTED]):
* summary: 'manipulators' module: API test failed => Mutually
referential many-to-one relationship
AddManipulator fails.
Comment:
First of all, I'm an idiot. The unit tests do pass. I was doing a little
"printf" debugging (I guess it's just "print" debugging with Python), and
left my print statements in the code when I ran the unit tests, and they
didn't like the extra output and failed. I took the print statments back
out, and they didn't fail. My apologies.
So, in summary, the unit tests all pass, and it *isn't* one of /those/
kinds of problems.
My AddManipulator problem is still there. The print statements are
starting to enlighten me, but this being my first big forray into the
django source, and being pretty new to python (and being an idiot, as
we've seen) it's slow going. I don't think I can articulate what I've
learned yet, the behavior is slightly different with my models versus the
example Parent and Child models, but it has to do with the dict named
'follow' in the AutomaticManipulator constructor. I haven't quite traced
where that comes from yet. Probably the easiest way to reproduce this is
to change django_src/tests/modeltests/mutually_referential/models.py to
have these additional test lines before the q.delete():
{{{
# test AddManipulator for both()
>>> Parent.AddManipulator()
>>> Child.AddManipulator()
}}}
In case anyone else is interested in reproducing it.
While I'm disclosing my idiocy, I should also point out that the
documentation for the Mutually referential many-to-one relationship is in
fact using the latest magic-removal style, just a little differently than
the example in the tutorial. Phew, there, that feels better. Hmmm, how
else can I make this ticket long and obnoxious?
--
Ticket URL: <http://code.djangoproject.com/ticket/2536>
Django <http://code.djangoproject.org/>
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
-~----------~----~----~----~------~----~------~--~---