[ckan-dev] new resource plugin trouble
Adrià Mercader
adria.mercader at okfn.org
Wed Sep 17 12:42:22 UTC 2014
Hi Maurizio,
The way of registering your action is correct. The max recursion issue
is a bug that was fixed a while ago [1]
If you are using CKAN 2.2, switch to the latest 2.2.1 branch, which has the fix.
See your separate email for comments on IResourceUpload
Adrià
[1] https://github.com/ckan/ckan/pull/1583
On 16 September 2014 17:05, Maurizio "Graffio" Mazzoneschi
<graffio at lynxlab.com> wrote:
> Hello all,
> I'm writing a plugin to modify the behaviour of "add resource" function,
> in order to apply some transformation to the uploaded file.
>
> I'm having some trouble. Any help is welcome!
>
> I've used get_actions and logic.get_action('resource_create')(context,
> data_dict)
>
> but ckan give back this error message:
> RuntimeError: maximum recursion depth exceeded
>
> I've tried also to use after_upload method , but CKAN seems ignore the
> method
>
> Someone can help me?
>
>
> This is my code:
>
> def get_actions(self):
> return {
> 'resource_create': resource_create_FN
> }
>
> def resource_create_FN(context, data_dict):
> #do somethings
> return logic.get_action('resource_create')(context, data_dict)
>
> --
> maurizio "graffio" mazzoneschi
> Lynx s.r.l.
> http://www.lynxlab.com
> http://www.scoop.it/t/graffio
> skype: graffio_m
>
>
> _______________________________________________
> 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
More information about the ckan-dev
mailing list