City of Surrey CKAN extension
CKAN extension development for the implementation of the City of Surrey
The extension contains the following features:
- Add a custom CSS file
- Add custom pages (contact & suggest dataset forms + follow page) with implementation of iRoutes
- Add public file (images)
- Add custom licence
- Add predefined extra fields at the dataset level
- Support custom templates
- Remove ‘organization’ from the facet list and various other places
- Allows data managers to designate datasets as public, public w/ limited access to resources, private to organizational users
More documentation available in ckanext/surrey/docs/customization.md
Prerequisite
This extension needs the stats extension to be activated with the tracking options. Some links (in the footer), also need the ckanext-page extension. So install ckanext-page
pip install -e git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages
Then configure the plugins in the .ini file:
ckan.plugins = ... stats pages...
ckan.tracking_enabled = true
The template need the follow pages to be created:
- faq
- glossary
- open-government-licence
- city-of-surrey-open-data-api
In order to refresh the most popular dataset values on the landing page, make sure to set up the cron jobs (see below).
The extension has been developed and tested to run with CKAN 2.2.
Installation
Activate your pyenv and go to the CKAN root, for example:
cd /usr/lib/ckan/default/
source bin/activate
cd src/ckan
Install the extension from GitHub:
pip install -e git+git://github.com/CityofSurrey/ckanext-surrey.git#egg=ckanext-surrey
To access a specific release, for example release-1.0:
pip install -e git+git://github.com/CityofSurrey/ckanext-surrey.git@release-1.0#egg=ckanext-surrey
Add the extension in the configuration file. surrey does mos