Skip to content

GNIP 12 Tagging (with Migration)

jj0hns0n edited this page Jan 10, 2012 · 3 revisions

GNIP 12 - Tagging (with Migration)

Overview

It is proposed to migrate the current keywords implementation in the python (django) portion of GeoNode to use django-taggit in order to allow for tagging of _any_ model object used in the system in a flexible and extensible way and to allow for inspection of the entire set of tags as whole rather than scatted across models/tables.

Initial work has been done under this proposal by Eldarion.

https://github.com/eldarion/geonode/tree/add-tagging

Proposed By

Jeffrey Johnson

Assigned to Release

TBD

State

For Review and Comment

Motivation

Currently GeoNode handles keywords or tags for the Layer model with a TextField https://github.com/GeoNode/geonode/blob/master/src/GeoNodePy/geonode/maps/models.py#L691 ... These keywords are parsed and synchronized with GeoServer and the CSW backend (currently GeoNetwork). The keywords are stored in the database as a comma or space separated list and its not easy to query them. Other model classes like the Map do not currently have keywords, but this kind of functionality has been requested many times.

Proposal

It is proposed to use django-taggit [1] to provide flexible tagging functionality inside GeoNodePy and to add TagFields to the Layer, Map and Profile classes and to provide a way of migrating sites using the old implementation to the new one.

[1] https://github.com/alex/django-taggit

Issues

Migrations (See GNIP 19) ...

The new implementation must still properly sync the tags to GeoServer and GeoNetwork (or other csw backend) which requires that the existing code that does this be tested to make sure that it still works.

Testing

Existing tests that test the keyword synchronization must pass and any new tests necessary to demonstrate that the new implementation works should be added to either/or the unit test or integration test suites.

Alternatives

Do nothing. GeoNodes current keyword implementation works as is.

Feedback

See discussion on the geonode-dev list here.

https://groups.google.com/a/opengeo.org/group/geonode-dev/browse_thread/thread/682c77437f996e0a

Voting

Clone this wiki locally