Django Google Search
Django Google custom search engine app.
Provides a simple tag rendering a Google Custom Search Engine input field and a view displaying search results. The product is an implementation of http://www.google.com/cse/docs/cref.html. The custom search engine definition is stored on your site, not by Google. This allows you to define a search engine in version controlled code.
Installation
Install or add django-googlesearch to your Python path.
Add googlesearch to your INSTALLED_APPS setting.
Add googlesearch url include to your project’s urls.py file:
(r'^search/', include('googlesearch.urls')),Optionally add "django.core.context_processors.request", to your TEMPLATE_CONTEXT_PROCESSORS setting, i.e.:
TEMPLATE_CONTEXT_PROCESSORS = ( "django.core.context_processors.request", ...other processors... )We need a request object when rendering the search input field and results to be able to display the search query value. This is optional and is not required for operation but is highly recommended.
Usage
Once installed you can add a Google search box to your templates by using the googlesearch_form template tag, i.e.:
{% load googlesearch_inclusion_tags %}
...some html...
{% googlesearch_form %}
...some more html...
By default search results are displayed through the view with URL named googlesearch-results, as defined in googlesearch.urls. You can create your own URL named googlesearch-results and include the googlesearch_results template tag in its template to display results, i.e.:
{% load googlesearch_inclusion_tags %}
...some html...
{% googlesearch_results %}
...some more html...
Changelog
0.2
Django 1.6 compatibility.
0.1.2
Refer to correct template tag in help text. Thanks grafyte.
0.1
Refactor to use a linked custom search engine as described at http://www.google.com/cse/docs/cref.html.
0.0.6
Packaging and test setup cleanup.
0.0.5
Refactor to not use django-preferences.
Documentation.
Metadata
Release files for django-googlesearch 0.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-googlesearch-0.2.tar.gz | 5.2 kB | Without provenance | Details for django-googlesearch-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_googlesearch-0.2-py2.7.egg | Legacy Egg format | - | - | Details for django_googlesearch-0.2-py2.7.egg |
Total release size: 13.6 kB
Release files / django-googlesearch-0.2.tar.gz
| Download URL | django-googlesearch-0.2.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0a50737df6128282c8bab4363bb5206f9bca8daf72f4dcbe8e0905725a4a991
|
|
BLAKE2b-256 checksum How to use checksums |
6506d83f6345d84be4b3bf101cab18c928e22b3a3a48141df1530a66450d3aac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_googlesearch-0.2-py2.7.egg
| Download URL | django_googlesearch-0.2-py2.7.egg |
|---|---|
| Size | 8.5 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
2786d041de9b18be00aa223d3c4abd6d6bcb102bb83eb4c0fdf785511abaabf5
|
|
BLAKE2b-256 checksum How to use checksums |
fd8677d7fa5eb9836b2f22d8f3210cdea0ab4454229c53a6ec4414b116c33219
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-googlesearch 0.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.