Skip to main content

Tests

ckanext-search-autocomplete

This extension provides an autocomplete for /datasets page search. Autocomplete search by dataset titles and facets.

The default facets:

{
    'organization': _('Organisations'),
    'tags': ('Tags'),
    'res_format': _('Formats'),
}

You can redefine this by implementing the ISearchAutocomplete interface.

Requirements

Compatibility with core CKAN versions:

CKAN version Compatible?
2.6 and earlier not tested
2.7 not tested
2.8 not tested
2.9 yes
2.10 yes

Installation

To install ckanext-search-autocomplete:

  1. Clone the source and install it on the virtualenv

    git clone https://github.com/mutantsan/ckanext-search-autocomplete.git cd ckanext-search-autocomplete pip install -e . pip install -r requirements.txt

  2. Add search_autocomplete to the ckan.plugins setting in your CKAN config file.

Config settings

TODO:

# The item limit to show
# (optional, default: 6).
ckanext.search_autocomplete.autocomplete_limit = 10


# Enable basic(example) template with the autocomplete widget.
# You can use it for testing, but it's better to implement your own template,
# because basic one is neither configurable, nor fancy-looking
# (optional, default: false).
ckanext.search_autocomplete.enable_default_implementation = yes

# Space-separated list of CKAN endpoints(Flask endpoints in form `blueprint.view`).
# It can be used if you want to enable autocomplete for non-standard dataset types, or on
# the organization/group page.
# (optional, default: dataset.search group.read organization.read).
ckanext.search_autocomplete.dataset_search_endpoints = dataset.search custom_dataset_type.search

Developer installation

To install ckanext-search-autocomplete for development, activate your CKAN virtualenv and do:

git clone https://github.com/mutantsan/ckanext-search-autocomplete.git
cd ckanext-search-autocomplete
python setup.py develop
pip install -r dev-requirements.txt

Tests

To run the tests, do:

pytest --ckan-ini=test.ini

License

AGPL

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ckanext_search_autocomplete-0.1.0.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ckanext_search_autocomplete-0.1.0-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file ckanext_search_autocomplete-0.1.0.tar.gz.

File metadata

File hashes

Hashes for ckanext_search_autocomplete-0.1.0.tar.gz
Algorithm Hash digest
SHA256 904b149e524f6268cdc7546ad5092b4d27bf78845df82114bda51ad5b500d60b
MD5 1908607e013c33cc1f701c20cdf95045
BLAKE2b-256 54fac890cdf873518ea312c5c92e3be79a5062bdcdc2425ff30d9411c735b3ae

See more details on using hashes here.

File details

Details for the file ckanext_search_autocomplete-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ckanext_search_autocomplete-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20efac2e002e7d5b578bbbc8b6380f6d4b87155fa2a4a61ff50cf48be5a9b369
MD5 f44015e57b2aaad3a4010b91896e765d
BLAKE2b-256 cb9d3bf74e659bf688d9462d03cc3318f8c3a0cc67ab6e52348ea736c95b744a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page