[ckan-discuss] Function that controls which fields to be posted

Yanning(Yu) Chen cheny18 at rpi.edu
Tue Mar 12 15:19:20 GMT 2013


Just a kind reminder that we also need to implement 

def form_to_db_schema_api_update(self):

otherwise the fields won't save once we went back and made any changes. It does the same thing with form_to_db_schema. 

Thanks!

Yu

On Mar 12, 2013, at 10:51 AM, Yanning(Yu) Chen <cheny18 at rpi.edu> wrote:

> Fantastic! That works perfectly for me now. Thanks!
> 
> Yu
> On Mar 12, 2013, at 9:06 AM, Ian Ward <ian at excess.org> wrote:
> 
>> Working with Toby on IRC I found out that the cause of this problem
>> was my IDatasetForm plugin not implementing
>> form_to_db_schema_api_create().  Adding that method solved the problem
>> for me.
>> 
>> See: https://github.com/okfn/ckan/blob/master/ckan/lib/plugins.py#L245
>> 
>> In my case it does the same thing my form_to_db_schema method does.
>> 
>> I've opened a new issue: https://github.com/okfn/ckan/issues/608
>> 
>> On Tue, Mar 12, 2013 at 8:01 AM, Ian Ward <ian at excess.org> wrote:
>>> This issue sounds the same as https://github.com/okfn/ckan/issues/569
>>> 
>>> This issue is blocking us right now.
>>> 
>>> On Mon, Mar 11, 2013 at 11:27 PM, Yanning(Yu) Chen <cheny18 at rpi.edu> wrote:
>>>> Hi folks,
>>>> 
>>>> I've been working on an extension to customize the field when user is registering a dataset. Unlike the example extension, I want to add a field at the 1/3 phase where user are asked to fill in some basic info. The related html should be package_basic_fields.html. I initially follow the tutorial on customizing the field and successfully stored the field added in new_package_metadata.html, but can't get the fields in the 1/3 phase stored. When I look into the _parsed_post_vars from the WSGI variables, my customized fields is not being posted.
>>>> 
>>>> So my question is in which file can I configure the filter/validator on which fields to be posted and stored? I don't quite understand why it works on the "adding metadata" section but not on "adding basic data section"?
>>>> 
>>>> Thanks!
>>>> 
>>>> Cheers
>>>> Yu
>>>> _______________________________________________
>>>> ckan-discuss mailing list
>>>> ckan-discuss at lists.okfn.org
>>>> http://lists.okfn.org/mailman/listinfo/ckan-discuss
>>>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-discuss
>> 
> 
> 
> _______________________________________________
> ckan-discuss mailing list
> ckan-discuss at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-discuss
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-discuss
> 




More information about the ckan-discuss mailing list