[ckan-dev] Querying dataset custom form fields (extras) ?

Pabitra Dash pkdash_reena at hotmail.com
Sun Sep 8 20:34:15 UTC 2013



I think you can get a list of datatsets for a specified organization using the tollkit.get_action('package_search') action method and passing a data_dict object that has the query filter set to the 'owner_org':{id of the organization}. You can see how this action method is used in package.py.
 
Pabitra
 
Date: Sun, 8 Sep 2013 08:34:57 -0400
From: dave at fogmine.com
To: ckan-dev at lists.okfn.org
Subject: [ckan-dev] Querying dataset custom form fields (extras) ?

Hi all,
I've added some custom form fields for dataset creation for an extension that I'm developing. One of the fields is a Unique ID, so I have to ensure that it doesn't already exist for any other datasets within an Organization.

I'm new to sqlalchemy, but when I looked at ckan.ckan.model.package.py, I didn't see such a method.
Are there already any convenience methods that already exist for filtering by organization and then by extra field value? 

Thanks!-Dave
-- 
Dave CarawayOwnerFog Mine
dave at fogmine.comCell: (937) 985-0867
Fax: (866) 238-3120


_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org
http://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130908/4501b74f/attachment-0001.html>


More information about the ckan-dev mailing list