0

I have a popup that redirects to an admin page where a user can edit some contact details. I want the popup to close when the save button is pressed

class ContactInline(admin.TabularInline):
    def Edit(self,emp):
           w=emp.personnel_id
           url='/admin/KUDZU/logmcontactinfodetails/'+str(w)
           z= format_html(u'<a href="{}" onclick="return showRelatedObjectLookupPopup(this);">Edit</a>', url)
    return (z)


model = LogContactinfo
fields = ('personnel','Edit','Phone','role','contact','note')

I've seen Closing a django admin add related object popup window on save - where exactly do I need to override response_change?

Community
  • 1
  • 1
user2872147
  • 209
  • 1
  • 3
  • 11

1 Answers1

1

response_change is a ModelAdmin method so you have to override it in your admin class (or Inline class in your case).

argaen
  • 4,145
  • 24
  • 28