[CKAN-support] [Open Knowledge Foundation] Assignment: How to store custom value in the same way tags are stored?

Adam McGreggor notifications-support at okfn.zendesk.com
Fri Mar 21 16:04:04 UTC 2014


##- Please type your reply above this line -##

[Open Knowledge Foundation] Assignment: How to store custom value in the same way tags are stored?

You have been assigned to this ticket (#218).

----------------------------------------------

Carlos Quiros, Mar 21 14:50

Hi,

I would like to store "Regions" in the same way Tags are stored so I can 
use it in IFacets. Currently I am storing it as a value separated by 
coma using:

def _add_custom_metadata_to_schema(self, schema):
   schema.update({'ILRI_actyregions': 
[toolkit.get_validator('ignore_missing'),toolkit.get_converter('convert_to_extras')]})

But if I use it like that (coma separated) IFacets show for example 
"Kenya,Tanzania" and not Kenya and Tanzania separated.

So I guess I need to store Regions in the same way Tags are stored. How 
can I do this?

Thanks,
Carlos

--------------------------------
This email is a service from Open Knowledge Foundation.









[0172-SG40]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.okfn.org/mailman/private/ckan-support/attachments/20140321/c0201cef/attachment-0002.html>


More information about the ckan-support mailing list