[ckan-dev] How to install ckanext-scheming
Timothy Giles
timothy.giles at slu.se
Wed Sep 21 15:34:29 UTC 2016
The .activate just ensures you are in the virtual environment that ckan dev is installed in.
You follow a very similar install process for almost all ckan extensions. Some have requirements.txt and/or dev-requirements.txt that need installing. Some extensions require supporting DB tables to be created (QA for example). Generally though, if you learn the procedure below, you can install almost all extensions without issue.
Regards Timothy
From: ckan-dev [mailto:ckan-dev-bounces at lists.okfn.org] On Behalf Of Forum
Sent: den 21 september 2016 15:53
To: CKAN Development Discussions <ckan-dev at lists.okfn.org>
Subject: Re: [ckan-dev] How to install ckanext-scheming
Dear Tim,
Thank for your help.
When I firstly install ckan, I installed it from source and I used that command during the process
. /usr/lib/ckan/default/bin/activate
I reinstalled my PC with a new Ubuntu 14.04 installation and I installed successfuly CKAN from the package. I did not needed to use the above command.
I supposed, even if I installed CKAN from package, I can use the above command and use pip?
I will try to install ckanext-scheming later or tomorrow.
Cheers
Pierre
On 9/21/16 3:38 PM, Timothy Giles wrote:
Pierre,
. /usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src
pip install -e "git+https://github.com/ckan/ckanext-scheming.git#egg=ckanext-scheming"
cd ./ckanext-scheming
pip install -r /usr/lib/ckan/default/src/ckanext-scheming/requirements.txt
· Any issues, sudo the previous command *
As the rest of the instructions say, insert scheming_datasets in to your plugins line
Add in the scheming.presets section in to your config, just under the plugins section
Add in a scheming.dataset_fallback = false
Add in a scheming.dataset_schemas = ckanext.scheming:schemaname.json
Where schemaname.json is the JSON file that describes your schema (ie. list of metadata elements). As an example, I think there is camel.json and ckan_dataset.json
Create a similar template file called dataset.json and it will load as the default 'new dataset' schema/template.
Sorry - the json files are stored in ./ckanext-scheming/ckanext/scheming/.......
Hope the above helps
Tim
_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org<mailto:ckan-dev at lists.okfn.org>
https://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160921/846f6322/attachment-0003.html>
More information about the ckan-dev
mailing list