[ckan-dev] Adding custom metadata in stage 3 (IDatasetForm)

Ian Ward ian at excess.org
Fri May 10 14:25:09 UTC 2013


On Fri, May 10, 2013 at 8:08 AM, Sean Hammond <sean.hammond at okfn.org> wrote:
>> Is there really no way to add custom optional metadata in stage
>> 3?
>
> Yes, example_idatasetform does do this, it adds a field called
> country_code to stage 3 of the dataset form. It uses convert_to_tags
> though, not convert_to_extras, so I wonder if the problem you're having
> only happens with convert_to_extras.

We're using extras on stage 3.  Sean fixed this a better way in
release-v2.0, but I see we're still running with my old patch, so try
it and see if it makes a difference (it shouldn't):

https://github.com/okfn/ckan/commit/22572da4

Other than that you can look at our schema, but be warned, it is
pretty complicated.

https://github.com/open-data/ckanext-canada/blob/master/ckanext/canada/navl_schema.py

The result is that extras on stage 3 have validators like:
[ignore_missing, unicode, convert_to_extras]

Ian




More information about the ckan-dev mailing list