Handle opensearch.xml
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")), ... ]
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
- 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
Usage
Add the template tag {% opensearch_xml_meta %} into the page <head>.
{% load opensearch_xml_tags %}
<html lang="en">
<head>
<title>My title</title>
...
{% opensearch_xml_meta %}
</head>
<body>
...
</body>
</html>
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.3.2.tar.gz.
File metadata
- Download URL: django_opensearch_xml-0.3.2.tar.gz
- Upload date:
- Size: 12.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13a4ae155febc8c00bbcf6aa183a44213da21f3b12e8a1fa25844a028433e148
|
|
| MD5 |
df9dc84cba736d867b7d4f4adfee1e9b
|
|
| BLAKE2b-256 |
e0d47f85cd7fe73a3881bea062c526a346c3b2ccdc06821beae8a3fb72c82822
|
File details
Details for the file django_opensearch_xml-0.3.2-py3-none-any.whl.
File metadata
- Download URL: django_opensearch_xml-0.3.2-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2c4a7a28139a2e9ea6dbfef49c2621aa0a9ff44120f963106e42b231c4b5978
|
|
| MD5 |
67b1e296b25b9bad98eaa4f8088aaeb8
|
|
| BLAKE2b-256 |
b4b2c2d6e3734539069c95134fc387a33f6a793aa666be1c699639c891217e4d
|