blue-gold-89534
10/27/2022, 5:35 PMpython
def download(request, pk):
if request.htmx:
link = f"""download/{pk}" """
tmp = f"""hx-trigger="load" hx-redirect="{static(link)}" """
return HttpResponse(format_html(f"""<img {tmp} src="{static('images/startl.svg')}">"""))
else:
return FileResponse(open() ...)
I hoped I can directly load an Htmx indication ICON, and put a redirect on the file on it ... not soo smart?