Opened 14 years ago
Closed 14 years ago
#13644 closed (invalid)
"Add another" link doesn't appear in Inlines with many-to-many
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | 1.2 |
Severity: | Keywords: | admin inline | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I have created a model Offer with one-to-many Option fields (ie. Option model has ForeignKey to Offer). Option contained a ForeignKey to Accomodation. Then, I made the Admin for Offer with inline of Option. Everything worked fine and the "Add another" link appeared.
Then, I had a note from my customer, who asked me to make Accomodation as many-to-many with Option. But then, the "Add another" disappeared".
Change History (3)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Component: | Uncategorized → django.contrib.admin |
---|
This sounds like #13407, which is fixed. Are you definitely on a released 1.2 version? Can you attach sample models.py and admin.py that show the symptom?
comment:3 by , 14 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Ah, turned out to be my misinterpretation of related_name field, which I added when changing to the ManyToManyField. It had a white space in it, and admin seems to use it in the id of the tag. It made the jQuery unable to find the rows. Thanks for your interest, though!
What if I want to try to fix this?