diff --git a/README.md b/README.md
index e34e292..5191b66 100644
--- a/README.md
+++ b/README.md
@@ -54,6 +54,21 @@ APIS_BIBSONOMY_FIELDS = ['name', 'first_name', 'profession']
Restart your server and you are good to go.
+### htmx
+
+APIS Bibsonomy uses htmx. The delete buttons for references trigger deletion
+via the API delete route which give an empty response on success. HTMX needs to
+be [configured to swap the content even if the response is empty](https://github.com/bigskysoftware/htmx/issues/199):
+```
+document.body.addEventListener('htmx:beforeSwap', function(event) {
+ if (event.detail.xhr.status === 204) {
+ // Swap content even when the response is empty.
+ event.detail.shouldSwap = true;
+ }
+});
+```
+
+
## Usage
*not needed if you are using standard APIS templates*
diff --git a/apis_bibsonomy/templates/apis_bibsonomy/partials/reference_list.html b/apis_bibsonomy/templates/apis_bibsonomy/partials/reference_list.html
index 0ec64a5..cbe378d 100644
--- a/apis_bibsonomy/templates/apis_bibsonomy/partials/reference_list.html
+++ b/apis_bibsonomy/templates/apis_bibsonomy/partials/reference_list.html
@@ -5,7 +5,7 @@
{% if request.user.is_authenticated %}
{{ reference }} ({{ reference.id }})
Delete
diff --git a/apis_bibsonomy/views.py b/apis_bibsonomy/views.py
index 522548b..a7f2ff0 100644
--- a/apis_bibsonomy/views.py
+++ b/apis_bibsonomy/views.py
@@ -28,13 +28,6 @@ def get_success_url(self):
)
return red
- def delete(self, request, *args, **kwargs):
- resp = super().delete(request, *args, **kwargs)
- # we set the status code to 200 for HTMX requests, so they don't get redirected
- if "HX-Request" in request.headers:
- resp.status_code = 200
- return resp
-
class ReferenceListView(ListView):
model = Reference