Handle opensearch.xml for search engine registratin in browsers.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_opensearch_xml-0.4.2.tar.gz.
File metadata
- Download URL: django_opensearch_xml-0.4.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ad5048dc98f3e498cd028ee650c0f7e8106caae3b87d9e2b6e99e4e2000a64c
|
|
| MD5 |
84d0d72ef5f267a4345d3c0e671d7bad
|
|
| BLAKE2b-256 |
7de994dce3f3e9eedc415f905b330731a8ccdbe5328f401f88103046ad21698a
|
File details
Details for the file django_opensearch_xml-0.4.2-py3-none-any.whl.
File metadata
- Download URL: django_opensearch_xml-0.4.2-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef20d3e6de3a5404729f7c6b83dab13c2d609441ec9ff7ccbc1d0bf93b8b1087
|
|
| MD5 |
988a03ae67906bb4ac1ddbbaa6ee2e0e
|
|
| BLAKE2b-256 |
4213d943e0c565ce7404335873fe26d31998edeb782a4f7fcc602d24c24f362d
|