[ckan-dev] Access to pkg_dict in resource form

Pabitra Dash pkdash_reena at hotmail.com
Fri Feb 28 05:07:30 UTC 2014


Hi Khalegh,
 
I think you can access the dataset type through a helper method (get_helpers() of the ITempletHelper interface). I am using such a helper method (h.get_dataset_type()) in order to build my first form of the dataset create process to show appropriate custom dataset metadata elements depending upon the dataset type.
 
Pabitra



 
> From: khalegh at highwaythreesolutions.com
> Date: Thu, 27 Feb 2014 10:40:48 -0800
> To: ckan-dev at lists.okfn.org
> Subject: [ckan-dev] Access to pkg_dict in resource form
> 
> Hi everybody,
> 
> Does anybody know how can I have access to the value of dataset type  ( pkg_dict[‘type’]) in the resource form? I have different dataset types and when I create a dataset of a particular type, I want to know the type of dataset in the second stage(Add data) but I don’t know how to get the value of dataset type in data dictionary. I tried to use pkg_dict[’type’] in new_resource.html template but it returns nothing.
> 
> Best,
> Khalegh
> 
> 
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140227/83132ce0/attachment-0003.html>


More information about the ckan-dev mailing list