Changes between Initial Version and Version 1 of Ticket #33029


Ignore:
Timestamp:
Aug 17, 2021, 3:53:08 AM (3 years ago)
Author:
Carlton Gibson
Comment:

Hi. Thanks for the report.

I'm going to say wontfix here.

In the normal case this works as expected. I'm adding a new object for a foreign key; I click the same + button; I can't add two objects to the same FK, so the popup is replaced; meanwhile, if I click the + for a second related field a new popup is created (since I can add two different objects to two different FKs).

The case for self is more complex, since in principle I could add a chain of models for the same FK, but each on a different instance. However, without a candidate implementation it's not clear it's worth additional complexity to the popup implementation to handle that case. (You can simply build the chain in the other direction.)

Happy to reopen if you want to work on an implementation that's not too complex though! Thanks.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33029

    • Property Resolutionwontfix
    • Property Status newclosed
    • Property Summary Django Admin PopupCan't open multiple Django Admin Popups for the same related field.
  • Ticket #33029 – Description

    initial v1  
    77{{{
    88class A(models.Model):
    9 foo = models.ForeignKey('self', on_delete=models.SET_NULL,null=True,blank=True,verbose_name="If True",related_name="foo_set",)
    10 bar = models.ForeignKey('self', on_delete=models.SET_NULL,null=True,blank=True,verbose_name="If True",related_name="bar_set",)
     9    foo = models.ForeignKey('self', on_delete=models.SET_NULL,null=True,blank=True,verbose_name="If True",related_name="foo_set",)
     10    bar = models.ForeignKey('self', on_delete=models.SET_NULL,null=True,blank=True,verbose_name="If True",related_name="bar_set",)
    1111}}}
    1212
Back to Top