Re: InlineAdmin unable to delete object with read only primary key

2022-11-23 Thread Gagan Deep
Hi David! Thanks for double checking my work. Yes, I also see those errors in the admin. I was guessing that those were related to the primary key issue. - Gagan Deep On Tuesday, November 22, 2022 at 12:03:28 PM UTC+5:30 shang.xia...@gmail.com wrote: > Hi Gagan, > > Interesting quirk

Re: InlineAdmin unable to delete object with read only primary key

2022-11-21 Thread David Sanders
Hi Gagan, Interesting quirk you've found there, it's possible it could be a bug though further digging may be required. A couple of interesting notes I found while fiddling with your example code: - If you press "Save and continue editing" there are unspecified form errors - Setting

InlineAdmin unable to delete object with read only primary key

2022-11-21 Thread Gagan Deep
Hello everyone! In my project, I have created a model (Token) which uses a custom primary key (i.e. it uses a field defined by the model for the primary key instead of using "id"). I created an InlineAdmin class for this model and added the primary key field to InlineAdmin.readonly_fields.