Hi I would like to send a html as a popup in django admin

Admin is not sending the html page in the form of popup its displaying in window
admin.py

def RESTORE(self,obj):
    url = f'/system/displayer/'
    opensrt = f"window.open({url},'width=600,height=400')"
return format_html('<a href="{url}"onclick="{opensrt}">RESTORE</a>', opensrt=opensrt,url=url)

views.py
def display(request):
    if request.method=='POST':
        print("HI POST")
        output=request.POST.get('output')
        if output=='YES':
            pass
    return render(request, "abc.html",{'form':UserForm})
Back to Top