Geonode-RNDT is a Django App to let GeoNode be able to expose the metadata compliant to the RNDT standard
Detailed information on the definition of RNDT are available at this link
-
Install the application:
- By hand in your virtual env:
pip install -e git+https://github.com/geosolutions-it/geonode-rndt@master#egg=rndt
- Or put it in your project requirements file.
- By hand in your virtual env:
-
Edit your
settings.pyfile and add "rndt" to yourINSTALLED_APPS, like this:INSTALLED_APPS += ('rndt',) -
Run migrations
You need to create/update the RNDT model by running
python manage.py migrateIn case you are running GeoNode within Docker, you need to run the
migratecommand from a shell within the container.
If you are running GeoNode via a GeoNode project, the migrations will be automatically run. -
To enable the
UUIDHandler, add the following line in thegeonode.settings.pyfile:LAYER_UUID_HANDLER = "rndt.uuidhandler.UUIDHandler" -
To customize the metadata document to be RNDT compliant, use the rndt template:
CATALOG_METADATA_TEMPLATE = 'xml/template-rndt.xml' -
To customize the XSL transformation to be aligned to the RNDT metadata format, use the provided XSL file:
CATALOG_METADATA_XSL = '/static/rndt/rndt-metadata.xsl' -
Optionally, also publish via CSW the services of the csw_services app: CSW searches only return the resource types in the GeoNode
PYCSW["FILTER"](by default, datasets only):PYCSW["FILTER"] = {"resource_type__in": ["dataset", "cswservice"]} -
Configure the thesauri
The thesauri inrndt/thesauri/are loaded bypython manage.py thesaurus autoload, which the GeoNode Docker entrypoint runs at every start. They are created hidden from the metadata editor (max=0); to show the INSPIRE/RNDT vocabularies, set them in the Thesaurus admin page (reloading keeps these settings):Identifier min max order facet 3-2-4-1_gemet-inspire-themes1 -1 10 Yes 3-2-4-2_PriorityDataset0 -1 20 Yes 3-2-4-3_SpatialScope0 -1 30 Yes 3-2-4-5_rndt-all1-fixed0 -1 40 Yes
- Custom metadata templates: replace
{% load metadata_tags %}with{% load rndt_tags %}. - Thesauri:
thesaurus autoloadidentifies them by file name (see the table above, plusConditionsApplyingToAccessAndUse,LimitationsOnPublicAccess,labels-i18n). Check the existing ones withpython manage.py thesaurus list: if they were loaded with different identifiers, rename them in the Thesaurus admin page before the first autoload, or they will be loaded twice. - Dataset uuids: datasets of groups that got their first PA before this version may lack the iPA prefix,
so they are missing from
catalogue/csw/<iPA code>. Check withpython manage.py rndt_uuids check, then fix withpython manage.py rndt_uuids fix; both accept a list of dataset ids or uuids to limit them.
catalogue/csw/<iPA code>: CSW limited to the resources of one Pubblica Amministrazioneapi/pubblica_amministrazione/: the list of the Pubbliche Amministrazioni
The tests need GeoNode installed in the current environment, but no database. From the repository root:
python -m tests.runCI runs them on every PR against GeoNode 5.1.1 and master (see .github/workflows/tests.yml).
Linting and formatting are done by ruff (configured in pyproject.toml, version pinned in the dev extra):
pip install -e ".[dev]"
ruff check .
ruff format --check .To uninstall the app, remove all the rndt functionalities (INSTALLED_APPS and context_processors) from settings.py and restart the server.
If needed made an hard refresh to let the browser reload the js/css/html files (windows: CTRL+ SHIFT+R | Mac: CMD+SHIFT+R)
