mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-08 03:08:29 +02:00

* 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>
19 lines
497 B
Python
19 lines
497 B
Python
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,
|
|
)
|