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

Dave Caraway dave at fogmine.com
Sun Sep 8 20:53:17 UTC 2013


Awesome, will take a look. Thanks Pabitra!

On Sep 8, 2013, at 4:50 PM, Pabitra Dash <pkdash_reena at hotmail.com> wrote:



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 Caraway
Owner
Fog Mine
dave at fogmine.com
Cell: (937) 985-0867
Fax: (866) 238-3120

_______________________________________________ ckan-dev mailing list
ckan-dev at lists.okfn.org
http://lists.okfn.org/mailman/listinfo/ckan-devUnsubscribe:
http://lists.okfn.org/mailman/options/ckan-dev

_______________________________________________
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/18d6f04f/attachment-0002.html>


More information about the ckan-dev mailing list