Replies: 2 comments 6 replies
-
Can you provide a copy/paste of both the Django template code and the actual rendered HTML for the element with the |
Beta Was this translation helpful? Give feedback.
-
That's a much better solution than using EDIT: (btw, feel free to join us on in the #django-htmx channel of the discord server if you have future questions!) |
Beta Was this translation helpful? Give feedback.
-
Hey! Thumbs up to htmx!
I'm trying to hx-get image files in django. In development everything works fine, in production I get 404.
The request is from
example.com/page2
, the file is atexample.com/media/image.webp
Apparently it tries to get the file from
example.com/page2/media/image.webp
I resolved it specifying
hx-replace-url="/"
.Then it fetches the image successfully but the address bar then has example.com instead of example.com/page2.
What is the proper way to hx-get media files and keep the state of the address bar?
Beta Was this translation helpful? Give feedback.
All reactions