[ckan-dev] Customized Dataset creation form

Pabitra Dash pkdash_reena at hotmail.com
Wed Jan 29 20:32:09 UTC 2014


Khalegh - I have implemented the IRoutes interface in my plugin.py  as shown here:
 
 
   
Previously I had the action named as 'select_dataset_types_form' and after seeing your email I though I will try changing it to 'new' to see if it would make any difference. But I still have the same problem. I know the controller routing working as I can see the new() method of my controller gets called when the user selects the Add Dataset button. But it never shows the page the new() method renders. After my controller new() method gets called, it ends up in the new() method of the package.py (CKAN controller) which renders the new.html template.
 
Pabitra


 
From: khalegh at highwaythreesolutions.com
Date: Wed, 29 Jan 2014 12:02:18 -0800
To: ckan-dev at lists.okfn.org
Subject: Re: [ckan-dev] Customized Dataset creation form

Thanks Pabitra for sharing your experience. Don’t you need to map the ‘new' action to your customized controller class by implementing IRoutes interface?
-Khalegh
On Jan 29, 2014, at 11:48 AM, Pabitra Dash <pkdash_reena at hotmail.com> wrote:Well I am working on a similar problem. I though it would be easier to have a separate page displayed with list of dataset types when the user clicks the Add Dataset button. Then when the user selects a specific dataset, then I will show the new.html page. I have overridden the package/search.html as shown here:

 
 <code.png>  
For some reason the select_dataset_types_form does not get displayed when the user selects the Add Dataset button even if I can see the in the debug mode that the controller is rendering this template file. It directly goes to the new.html file. I am stuck at figuring out how is the new() action method of the package.py controller gets invoked if this action is not in the search.html template.
 
Sorry I am not providing any solution to your problem. I thought I should share it since we are trying to solve the same overall problem.
 
Thanks,
Pabitra
Utah State University
Logan, UT-84341, USA
pkdash_reena at hotmail.com

 
> From: khalegh at highwaythreesolutions.com
> Date: Wed, 29 Jan 2014 11:25:37 -0800
> To: ckan-dev at lists.okfn.org
> Subject: [ckan-dev] Customized Dataset creation form
> 
> Hi CKAN Community,
> 
> I am new to ckan. I am trying to add an extra stage (and corresponding form) to the default 3-stage dataset creation form. What I want is to have an extra form right before the 'create dataset' form to give the user to choose the dataset type first (the user will choose the type from a drop-down list) and then based on the dataset type the dataset creation form should appear in the next stage with customized fields depending on the type of dataset. I would appreciate if anyone could help me know how to do that.
> 
> Thanks,
> 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
_______________________________________________
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

_______________________________________________
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/20140129/8621c4f3/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: code2.png
Type: image/png
Size: 13237 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140129/8621c4f3/attachment-0003.png>


More information about the ckan-dev mailing list