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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_opensearch_xml-0.4.2.tar.gz | 4.5 kB | Without provenance | Details for django_opensearch_xml-0.4.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_opensearch_xml-0.4.2-py3-none-any.whl | Python 3 | none | any | Details for django_opensearch_xml-0.4.2-py3-none-any.whl |
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}
|
Security for django-opensearch-xml 0.4.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.