.. You should enable this project on travis-ci.org and coveralls.io to make
these badges work. The necessary Travis and Coverage config files have been
generated for you.
.. image:: https://travis-ci.org/jiankaiwang/ckanext-cdcmainlib.svg?branch=master
:target: https://travis-ci.org/jiankaiwang/ckanext-cdcmainlib
=============
ckanext-cdcmainlib
The extension is the base library for all ckanexts on TCDC open data portal.
Requirements
- Developed on CKAN 2.5.x
- Require external packages
- psycopg2 : https://pypi.python.org/pypi/psycopg2
- py2psql : https://github.com/jiankaiwang/seed/blob/master/python/py2psql.py
Installation
To install ckanext-cdcmainlib:
Activate your CKAN virtual environment, for example::
. /usr/lib/ckan/default/bin/activate
Clone the ckanext-cdcmainlib from github, for example::
cd /usr/lib/ckan/default/src/
git clone https://github.com/jiankaiwang/ckanext-cdcmainlib.git
Install the ckanext-cdcmainlib Python package into your virtual environment::
cd /usr/lib/ckan/default/src/ckanext-cdcmainlib
pip install .
Add cdcmainlib to the ckan.plugins setting in your CKAN
config file (by default the config file is located at
/etc/ckan/default/production.ini).
Restart CKAN. For example if you’ve deployed CKAN with Apache on Ubuntu::
sudo service apache2 reload
If you’ve deployed CKAN with uwsgi::
uwsgi –ini-paste /etc/ckan/default/production.ini
If you’ve create a ckan.service::
sudo systemctl restart ckan.service
Config Settings
Make sure adding cdcmainlib to the ckan.plugins. For example::
ckan.plugins = cdcmainlib
postgresql url to query the database information::
ckan.cdcmainlib.psqlUrl = postgresql://(dbuser):(dbpass)@(dbhost)/(dbname)
Development Installation
T