Comments (10)
Dear wuweihust, the installation looks ok, the error doesn't make much sense since the template 'resource_item.html' does exist. I have a different order on the plugins in the .ini configuration, just to test, could you put restricted as the first plugin in the ckan.plugins line? Good luck!
from ckanext-restricted.
Thank you for your rapid response. I put restricted as the first plugin in the ckan.plugins line, but it still doesn't work.
In fact, it is not that clear to me how to set up in development.ini and schema.json after all the relevant extension were installed.
Firstly, the JSON file you showed in Readme should add to which file? Is that schema.json?
Secondly, Readme says "ckanext.restricted.some_setting = some_default_value", what does this mean?
Dear wuweihust, the installation looks ok, the error doesn't make much sense since the template 'resource_item.html' does exist. I have a different order on the plugins in the .ini configuration, just to test, could you put restricted as the first plugin in the ckan.plugins line? Good luck!
from ckanext-restricted.
Hi, sorry that with ckanext.restricted.some_setting = some_default_value is part of the default README, I will remove it to avoid confusion.
On the ini file you just need to add restricted (and scheming, composite, repeating) to the plugin list as you did.
The JSON I show is the one that is used for scheming, please take a look at the documentation of that extension, it defines all the fields of your datasets.
On the ini file you write:
scheming.dataset_schemas = ckanext.envidat_theme:restricted.json
and then the presets too:
scheming.presets = ckanext.scheming:presets.json
ckanext.repeating:presets.json
ckanext.composite:presets.json
Here you have an example of such a file:
https://github.com/EnviDat/ckanext-envidat_schema/blob/master/ckanext/envidat_schema/datacite_dataset.json
Or more simple: https://github.com/ckan/ckanext-scheming/blob/master/ckanext/scheming/ckan_dataset.json
That is the JSON file you add the restricted fields to (at resource level). You need scheming working first to then use this extension.
from ckanext-restricted.
Thanks, Lucia. Very helpful directions. I'd like to ask one more question, Where should I put the schema.json? I See all the project put it under the "ckanext" folder, is that necessary? and how to quote the scheming configuration file built by ourselves?
from ckanext-restricted.
No problem, feel free to ask :)
Yes, the schema.json file should be inside a ckanext folder, that means inside an extension. In our case, we have a specific extension "envidat_theme" and we have the file in that extension. to use it, just add the following line to the ini file:
scheming.dataset_schemas = ckanext.envidat_theme:schema.json
If you want to use the default one in scheming extension, then you do:
scheming.dataset_schemas = ckanext.scheming:ckan_dataset.json
I hope it helps!
from ckanext-restricted.
Thx, it's very nice of you for the rapid reply.
Does it mean that I should build a extension first before I can make a self-defined schema json file?
Besides, I have installed ckanext-repeating from github
pip install git+https://github.com/eawag-rdm/ckanext-repeating.git@master
Should I install extension by downloading it and then running python setup.py develop
.
Maybe it will be more convenient for development?
Once I added restricted
to ckan.plugins
, the website of dataset will show "Internal server error".
And then I removed, dataset can be visited normally.
No problem, feel free to ask :)
Yes, the schema.json file should be inside a ckanext folder, that means inside an extension. In our case, we have a specific extension "envidat_theme" and we have the file in that extension. to use it, just add the following line to the ini file:
scheming.dataset_schemas = ckanext.envidat_theme:schema.json
If you want to use the default one in scheming extension, then you do:
scheming.dataset_schemas = ckanext.scheming:ckan_dataset.jsonI hope it helps!
from ckanext-restricted.
from ckanext-restricted.
Couldn't the .json be provided with the ckanext-restricted extension itself ? Seems a bit strange to require another extension to provide a default file for ckanext-restricted.
from ckanext-restricted.
from ckanext-restricted.
The json is dependent on the instance, we use a custom one if you are interested https://github.com/EnviDat/ckanext-envidat_theme/blob/master/ckanext/envidat_theme/datacite_dataset.json.
from ckanext-restricted.
Related Issues (19)
- Installing the extension HOT 14
- Enabling this extension causes an internal server error when updating groups through the UI. HOT 3
- resource view still accessible HOT 2
- Email templates are not included in the pip package HOT 1
- strange internal server error issue only if there is any attachments (resources) HOT 1
- Simplify installation HOT 5
- Access request : improve granting access workflow HOT 3
- Exception retrieving dataset for the form HOT 3
- AttributeError when submitting the request form with captcha HOT 3
- The resource link is not restricted itself. HOT 4
- Estimate to update with CKAN 2.9 ? HOT 1
- Speeding up package search requests HOT 1
- Can't install ckanext-restricted using CKAN 2.9.4 HOT 1
- Error in running ckan -c /etc/ckan/default/ckan.ini run in extension HOT 5
- ERROR[500]
- There were problems sending your request, please contact the administrator providing the information (email_to_undefined)
- CKAN 2.7 HOT 7
- 2.8 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ckanext-restricted.