-
Notifications
You must be signed in to change notification settings - Fork 33
How to add new communities
emanueldima edited this page Apr 2, 2014
·
10 revisions
-
Go to
b2share/simplestore/lib/simplestore_model/metadata
-
Copy an existing file (e.g.
bbmri_metadata_config.py
) and name it following the patternCOMMUNITY_metadata_config.py
-
Change the content of this file according to the community requirements. The important variables are:
-
domain
will uniquely identify the community -
display_name
is the name displayed on the deposit page; if this is missing,domain
will be used instead -
table_name
is not currently used, but should be the same asdomain
-
kind
is not used anymore; it can be set to either 'domain' or 'project'. In the case of a community, it's better to set it to 'project' -
image
is the image name, located in the image folder (/opt/invenio/var/www/img
). The image should be less than 64px wide, but test and change it to make it look better.
-
-
Change the
fields
vector to contain the metadata fields appropriate for the community.-
name
: the field name -
col_type
: the data type -
display_text
: what the user will see -
description
: helpful tooltip for the field -
required
: True or False, whether the field is absolutely required or not - autocomplete suggestions for text fields can be added by setting:
-
data_provide
:typeahead
- and
data_source
to a json list of accepted values (expressed in Python:json.dumps(['value1', 'value2'])
-
-
-
Add the new domain to the list of configured domains, in invenio-local.conf (https://github.com/B2SHARE/invenio-scripts)