Hi Adam, let me explain with one use case (I believe there's at least one more, but it doesn't matter for example's sake):
say you have a model Employee with two proxy models DeliveryPerson and CallCenterOperator, but only Employee has a ModelAdmin. You get to the Employee admin changelist and each instance's link is in the form of */admin/employees/employee/{pk}/*. What you would like to have sometimes is that links actually follow the structure of the proxy model they point to. So, if one Employee instance is actually a DeliveryPerson, then I may want to have its own link on the changelist to be */admin/employees/deliveryperson/{pk}/*, instead of the */admin/employees/employee/{pk}/*. Right now this is possible by overriding one of the response methods in the ModelAdmin, but I would find very useful a boolean attribute ( *"proxy_changelist_links" *maybe?) on the ModelAdmin for the same purpose. Il giorno mercoledì 20 ottobre 2021 alle 18:20:22 UTC+2 Adam Johnson ha scritto: > Hi Niccolò > > I suspect no one has replied to your thread because your use case is too > niche. Perhaps try showing the issue with more words and more visually with > a screenshot or two. > > To me it sounds like "the admin links to the wrong place for proxy models" > which sounds like a plain bug, and if that is the case you could directly > open a ticket. > > —Adam > > On Sun, 17 Oct 2021 at 16:00, Niccolò Mineo <niccol...@gmail.com> wrote: > >> Hi. >> >> When one is displaying a proxy model admin I think It could be nice to >> automatically override the default behaviour for instances in the >> changelist and have them redirect to the proxy URL, instead of the default, >> non-proxy one. >> >> What do you think? >> >> I can prepare a PR. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django developers (Contributions to Django itself)" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-develop...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-developers/26c430ca-9896-4ab7-832b-369e515afcc8n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-developers/26c430ca-9896-4ab7-832b-369e515afcc8n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/dba63126-de41-462b-8258-efdcc4caf7a4n%40googlegroups.com.