mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-11 04:37:54 +02:00
Add opensearch declaration (#1058)
* feat: Add opensearch declaration * cleanup --------- Co-authored-by: Johannes Zorn <johannes.zorn@zollsoft.com> Co-authored-by: Sascha Ißbrücker <sascha.issbruecker@gmail.com>
This commit is contained in:
18
bookmarks/views/opensearch.py
Normal file
18
bookmarks/views/opensearch.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from django.urls import reverse
|
||||
from django.shortcuts import render
|
||||
|
||||
|
||||
def opensearch(request):
|
||||
base_url = request.build_absolute_uri(reverse("linkding:root"))
|
||||
bookmarks_url = request.build_absolute_uri(reverse("linkding:bookmarks.index"))
|
||||
|
||||
return render(
|
||||
request,
|
||||
"opensearch.xml",
|
||||
{
|
||||
"base_url": base_url,
|
||||
"bookmarks_url": bookmarks_url,
|
||||
},
|
||||
content_type="application/opensearchdescription+xml",
|
||||
status=200,
|
||||
)
|
Reference in New Issue
Block a user