Skip to content

GNIP 12 Tagging (with Migration)

ingenieroariel edited this page May 9, 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

1.2

State

Accepted and merged.

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

Ariel +1 - (This is a post-facto +1 the branch in question was already pulled into master last week)

Clone this wiki locally