Skip to content

How to add new communities

emanueldima edited this page Apr 2, 2014 · 10 revisions
  1. Go to b2share/simplestore/lib/simplestore_model/metadata

  2. Copy an existing file (e.g. bbmri_metadata_config.py) and name it following the pattern COMMUNITY_metadata_config.py

  3. Change the content of this file according to the community requirements. The important variables are:

    1. domain will uniquely identify the community
    2. display_name is the name displayed on the deposit page; if this is missing, domain will be used instead
    3. table_name is not currently used, but should be the same as domain
    4. 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'
    5. 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.
  4. 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'])