[pycsw-devel] pycsw django working example
Tom Kralidis
tomkralidis at hotmail.com
Thu Jun 14 04:47:52 PDT 2012
https://github.com/tomkralidis/Open-Data-Catalog/tree/csw
This ODC branch exemplifies deploying pycsw with the ODC django codebase, against a local django model.
Notes:
- installs pycsw via pip as part of the build (https://github.com/tomkralidis/Open-Data-Catalog/blob/csw/requirements.txt#L22)
- sets pycsw configuration in settings.py (https://github.com/tomkralidis/Open-Data-Catalog/blob/csw/OpenDataCatalog/settings.py#L189)
- extends opendata.models.Resource with attributes specific to pycsw (https://github.com/tomkralidis/Open-Data-Catalog/blob/csw/OpenDataCatalog/opendata/models.py#L64). For now I've put them as @property's, but they could be true methods just the same, and a few should be post save signals (see TODO markers in code)
- sets the django<->pycsw model mappings (https://github.com/tomkralidis/Open-Data-Catalog/blob/csw/OpenDataCatalog/csw/mappings.py)
- creates a view https://github.com/tomkralidis/Open-Data-Catalog/blob/csw/OpenDataCatalog/csw/views.py which communicates directly with pycsw as a lib
Thanks to Adam for the initial skeleton!
..Tom
More information about the pycsw-devel
mailing list