Skip to main content

OpenSearch application for django

This application provide a way to integrate the OpenSearch XML file to a django application.

[[TOC]]

Installation

Install the package pip install django-opensearch-xml

Configuration

  • Add "opensearch_xml" to settings.INSTALLED_APPS.
    INSTALLED_APPS = [
      ...,
      "opensearch_xml",
      ...
    ]
    
  • Add "opensearch_xml" to URLS
    from django.urls import path, include
    
    
    urlpatterns = [
      ...,
      path("opensearch/", include("opensearch_xml.urls")),
      ...
    ]
    

In the base template add the template tag that renders the search link. The tag might be added in the head tag.

{% load opensearch_xml_tags %}
<html lang="en">
<head>
    <title>My title</title>
    ...
    {% opensearch_xml_meta %}
</head>
<body>
...
</body>
</html>

Settings

Add OPENSEARCH_XML_<params> to the application settings

`OPENSEARCH_XML_CONTACT_EMAIL = ""`
Email address of the maintainer the application
`OPENSEARCH_XML_SHORT_NAME = ""`
Brief human-readable name of the search engine
`OPENSEARCH_XML_DESCRIPTION = ""`
Human-readable description of the search engine and its contents - **REQUIRED**
`OPENSEARCH_XML_FAVICON_WIDTH = 16`
Width of the favicon
`OPENSEARCH_XML_FAVICON_HEIGHT = 16`
Height of the favicon
`OPENSEARCH_XML_FAVICON_TYPE = "image/x-icon"`
Type of the icon
`OPENSEARCH_XML_FAVICON_FILE = ""`
File on the favicon, relative to the path referenced in STATIC_PATH
`OPENSEARCH_XML_SEARCH_URL = "search"`
Django URL name of the search. This URL will be passed to the `reverse()` function
`OPENSEARCH_XML_SEARCH_QUERYSTRING = "q="`
Querystring used to prepend the search parameters
`OPENSEARCH_XML_INPUT_ENCODING = "UTF-8"`
Encoding for the querystring

Metadata

Release files for django-opensearch-xml 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-opensearch-xml 0.4.2
File Size Uploaded
django_opensearch_xml-0.4.2.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-opensearch-xml 0.4.2
File Interpreter ABI Platform
django_opensearch_xml-0.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 kB

Release files / django_opensearch_xml-0.4.2.tar.gz

Download URL django_opensearch_xml-0.4.2.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7ad5048dc98f3e498cd028ee650c0f7e8106caae3b87d9e2b6e99e4e2000a64c
BLAKE2b-256 checksum
How to use checksums
7de994dce3f3e9eedc415f905b330731a8ccdbe5328f401f88103046ad21698a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / django_opensearch_xml-0.4.2-py3-none-any.whl

Download URL django_opensearch_xml-0.4.2-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef20d3e6de3a5404729f7c6b83dab13c2d609441ec9ff7ccbc1d0bf93b8b1087
BLAKE2b-256 checksum
How to use checksums
4213d943e0c565ce7404335873fe26d31998edeb782a4f7fcc602d24c24f362d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 release files

0.4.0

2 release files

0.3.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page