CKAN theme for the City of Zurich | Read-only mirror of https://github.com/opendatazurich/ckanext-stadtzh-theme — Stadt Zürich. Issues & pull requests at the source.
  • Python 49.5%
  • HTML 35.4%
  • JavaScript 9.7%
  • CSS 5.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Stefanie Taepke b5d7edbd51
Merge pull request #193 from opendatazurich/fix/pass-package-slug
fix: make sure we set the package_name/slug
2026-02-25 12:01:08 +01:00
.github/workflows tests: Update db init method 2025-09-23 10:38:06 +02:00
ckanext style: fix code-style 2026-02-25 11:57:22 +01:00
.gitignore feat: Commit compiled translations to version control 2023-11-06 13:54:05 +01:00
.isort.cfg style: Run black and isort 2023-08-30 19:10:30 +02:00
__init__.py add dcat-profile 2016-07-04 08:57:18 +02:00
dev-requirements.txt feat: Update dependencies 2025-09-23 10:14:36 +02:00
LICENSE Add license and readme 2015-06-25 19:30:13 +02:00
pip-requirements.txt feat: Update dependencies 2025-09-23 10:14:36 +02:00
publiccode.yml fix: remove misleading reference to ckanext-scheming 2025-12-09 15:31:10 +01:00
README.md Add repo status badge 2023-06-28 17:21:14 +02:00
setup.cfg tests: Allow running flake8 on tests 2023-12-01 22:50:06 +01:00
setup.py feat: use a compatible license to the deprecated license that was in use before 2025-12-04 14:36:11 +01:00
test.ini tests: Update test.ini to work with github actions test environment 2022-12-06 13:13:05 +01:00

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

ckanext-stadtzh-theme

Theme for the Open Data Portal for the City of Zurich.

Command

This extension currently provides the following paster commands for cleanups:

Cleanup the datastore database.

Datastore currently does not delete tables when the corresponding resource is deleted. This command finds these orphaned tables and deletes its rows to free the space in the database. It is meant to be run regularly by a cronjob.

paster --plugin=ckanext-stadtzh-theme stadtzhtheme cleanup_datastore -c /etc/ckan/default/development.ini

Cleanup the file storage.

CKAN currently does not cleanup file storage when the corresponding resource is deleted. This command finds these orphaned storage files and deletes them along with the orphaned storage directories. It is meant to be run regularly by a cronjob.

paster --plugin=ckanext-stadtzh-theme stadtzhtheme cleanup_filestore -c /etc/ckan/default/development.ini

Logic for Autosuggestion

This extension currently provides one action to collect autosuggestions from the solr handler /suggest: The action is ogdzh_autosuggest with the paramters:

  • q: the search term
  • cfq: the context: possible context are all facet names. They can be added using AND.

Here are some examples for api calls to get the autosuggestions:

http://stadtzh.lo/api/3/action/ogdzh_autosuggest?q=velo&cfq=geodaten AND csv
http://stadtzh.lo/api/3/action/ogdzh_autosuggest?q=velo&cfq=geodaten
http://stadtzh.lo/api/3/action/ogdzh_autosuggest?q=velo&cfq=jpeg

The logic will only work if solr has generated autosuggestions. This can be tested with the command:

http://stadtzh.lo:8983/solr/ckan/suggest?wt=json&suggest.count=100&suggest.q=velo

Remarks

  • When facets are added in the future autocomplete-ogdzh-facet-search.js must be adapted to filter for these facets in its context search.