#10892: ManyToManyField attribute looks up wrong name in Admin
-------------------------------------------+--------------------------------
Reporter: [email protected] | Owner: nobody
Status: new | Milestone:
Component: django.contrib.admin | Version: SVN
Resolution: | Keywords: ManyToManyField
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------------+--------------------------------
Changes (by ramiro):
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* milestone: 1.1 =>
Comment:
`"AUTH_BOOK_MAPPING"."BOOK_ID` is the FK from the intermediate table to
the Book model, right?.
I don't think Django can/should introspect the names of these Foreign Keys
at runtime. Try creating a model that represent your intermediate table
and use `Meta.db_table` plus the right Foreign Key field names (possibly
also using te `db_column` field option in a way similar to what you 've
already done in the Book and Author models). Specifiy that model in the
`through` option for the `ManyToManyField`.
--
Ticket URL: <http://code.djangoproject.com/ticket/10892#comment:1>
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
-~----------~----~----~----~------~----~------~--~---