Opened 18 years ago

Closed 17 years ago

#1470 closed defect (duplicate)

Update all fields related to the same model when adding an item

Reported by: anonymous Owned by: nobody
Component: contrib.admin Version: dev
Severity: minor Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I have two manytomany fields in my model, with both pointing to the same model.
in the admin interface when i add an item from within this model, the second combo box doesn't update without refreshing the page.

Change History (3)

comment:1 by anonymous, 18 years ago

I've noticed this, too.

It seems only to happen when the target of the ManyToManyField (i.e. the class provided as the first positional argument) contains a non-default primary key.

So, as a temporary workaround, you could try ensuring that:

primary_key=True

isn't present in the constructors for any of the fields in the many-to-many target class. This works for me.

comment:2 by Gary Wilson <gary.wilson@…>, 17 years ago

Summary: Update Multiple ManytoMany Fields AdminUpdate all fields related to the same model when adding an item
Triage Stage: UnreviewedAccepted
Version: magic-removalSVN

This would require some javascript help, and doesn't just happen for ManyToManyFields. This is something that comes up often enough that I am going to mark accepted.

comment:3 by James Bennett, 17 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #562.

Note: See TracTickets for help on using tickets.
Back to Top