[ckan-dev] Alter resource in grid view

Ben Scott bnm at benscott.co.uk
Tue Aug 20 13:56:49 UTC 2013


Hi Dominik -

Thanks for the reply! Yep, the data is in the datastore - but I don't want to change the actual source data, just alter the view of it in the grid.

The basic use case is:  the grid view shows an overview of the resource, and the user can then click through to see the full record. Ive added a controller etc., to enable viewing the full record - but I'm trying to find out how to change the data in the grid display to only show some of the fields.

Cheers,
Ben


On 20 Aug 2013, at 14:09, Dominik Moritz <dominik.moritz at okfn.org> wrote:

> Hi Ben,
> 
> That depends on where the data comes from. If the preview shows the content of a file (i.e. csv), you have to change the content of the file. If the preview shows the data from the datastore (which is unlikely, but possible), you can use the datastore_upsert action of CKAN [1].
> 
> Cheers,
> Dominik
> 
> [1] http://docs.ckan.org/dv/ckan-2.0.2/datastore-api.html#ckanext.datastore.logic.action.datastore_upsert
> 
> 
> On 20 Aug 2013, at 12:38, Ben Scott <bnm at benscott.co.uk> wrote:
> 
>> Hi -
>> 
>> I'd like to modify the data being displayed when previewing a dataset resource in the grid. What would be the best way of doing that? I've been looking into the IPackageController, but it doesn't seem to let you interact with a package's data resources?
>> 
>> Thanks very much,
>> Ben
>> 
>> 
>> _______________________________________________
>> 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
> 
> Dominik Moritz
> CKAN developer  |  skype: d.moritz  |  @doobly_doo
> The Open Knowledge Foundation
> Empowering through Open Knowledge
> http://okfn.org/  |  @okfn  |  http://ckan.org  |  @CKANproject
> 
> _______________________________________________
> 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





More information about the ckan-dev mailing list