https://htmx.org logo
I rewrote my download to the following: ```python...
# 🔥-django-htmx
b
I rewrote my download to the following:
Copy code
python
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?