Skip to content

Latest commit

 

History

History
78 lines (49 loc) · 2.31 KB

README.md

File metadata and controls

78 lines (49 loc) · 2.31 KB

ckanext-switzerland

CKAN extension for DCAT-AP Switzerland, templates and different plugins for opendata.swiss.

Requirements

  • CKAN 2.4+
  • ckanext-scheming
  • ckanext-fluent

Update translations

To generate a new ckanext-switzerland.pot file use the following command::

vagrant ssh
source /home/vagrant/pyenv/bin/activate
cd /var/www/ckanext/ckanext-switzerland/
python setup.py extract_messages --mapping-file babel.cfg --output i18n/ckanext-switzerland.pot

Or follow the official CKAN guide at https://github.com/ckan/ckan/wiki/Translations-and-Extensions

All translations are done via Transifex. To compile the po files use the following command:

Command

This extension currently provides one paster command, to 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-switzerland ogdch cleanup_datastore -c /var/www/ckan/development.ini

Installation

To install ckanext-switzerland:

  1. Activate your CKAN virtual environment, for example::

    . /usr/lib/ckan/default/bin/activate

  2. Install the ckanext-switzerland Python package into your virtual environment::

    pip install ckanext-switzerland

  3. Add switzerland to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/production.ini).

  4. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu::

    sudo service apache2 reload

Config Settings

This extension uses the following config options (.ini file)

# the URL of the WordPress AJAX interface
ckanext.switzerland.wp_ajax_url = https://opendata.swiss/cms/wp-admin/admin-ajax.php

# piwik config
piwik.site_id = 1
piwik.url = piwik.opendata.swiss

Development Installation

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

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