big-engine-22348
10/21/2022, 5:39 PMbig-engine-22348
10/21/2022, 5:40 PMbig-engine-22348
10/21/2022, 5:41 PMmysterious-toddler-20573
10/21/2022, 5:55 PMbig-engine-22348
10/21/2022, 6:10 PMlittle-advantage-56932
10/21/2022, 6:32 PMmammoth-family-48524
10/22/2022, 9:10 AMicy-analyst-57034
10/24/2022, 9:39 AM{% if forloop.first %} autofocus{% endif %}
or whatever other condition you pass in your context to know when field to focus onbreezy-minister-64652
10/24/2022, 10:00 AMbreezy-minister-64652
10/24/2022, 10:00 AMbreezy-minister-64652
10/24/2022, 10:02 AMtall-dinner-62086
10/24/2022, 10:03 AMtall-dinner-62086
10/24/2022, 10:04 AMtall-dinner-62086
10/24/2022, 10:04 AMtall-dinner-62086
10/24/2022, 10:05 AM/users
your server could just create a new entry on the orders
table. But that's not really what any reasonable person would expect.breezy-minister-64652
10/24/2022, 10:07 AMbreezy-minister-64652
10/24/2022, 10:08 AMtall-dinner-62086
10/24/2022, 10:13 AMtall-dinner-62086
10/24/2022, 10:13 AMbreezy-minister-64652
10/24/2022, 10:15 AMhundreds-camera-24900
10/24/2022, 4:09 PMhundreds-camera-24900
10/24/2022, 4:09 PMblue-gold-89534
10/26/2022, 1:49 PMpython
def start_dl(request, pk):
o = Model.objects.get(pk = pk)
try:
return FileResponse(open(o.file), 'rb'), as_attachment = True)
except Model.DoesNotExist:
m = f"""<img src="{static('images/alert.svg')}" hx-swap-oob="true" hx-targt="download-{o.pk}"> """
return HttpResponse(format_html(m))
html
<a href="{% url 'download' something.pk %}">
<img src="{% static 'images/dl.svg' %}" id="download-{{object.pk}}">Download
</a>
Everything works so far but after a click on Download I always get a new site instead of only the new icon in place? Is it, because I am not using an hx-get but a dred-france-69804
10/26/2022, 2:22 PMgreen-activity-6102
10/26/2022, 3:45 PMblue-gold-89534
10/26/2022, 6:06 PMgreen-activity-6102
10/26/2022, 7:58 PMgreen-activity-6102
10/26/2022, 7:59 PMred-france-69804
10/27/2022, 8:01 AMCreateItemView
and DetailItemView
. At the end of the CreateItemView
, how do you manage to use the DetailItemView
, without a redirect?
āØāØ This seems to be a very common need, so I guess the pattern is well known. ⨠Thank you!few-vegetable-15970
10/27/2022, 11:03 AM