[ckan-dev] IActions Interface
Toby Dacre
toby.okfn at gmail.com
Mon May 13 11:40:59 UTC 2013
Hi,
In the datastore the resource_show action is modified to add a couple
of extra fields to the resource data dict. Currently this is done by
grabbing the original action function and wrapping it in a new one and
then adding this to the actions functions. This is extremely evil
imho as we are using internal private variables to achieve this which
should not be done in core let alone in an extension.
It does seem to be a legitimate need though.
Following discussion with David it feels like the best option may be
to add a before_action(action_name, context, data_dict) and
after_action(action_name, context, data_dict) methods. It would be
easy to add these and it feels useful. This would also solve a
data.gov issue.
does anyone have a view on this?
--
Toby Dacre
The Open Knowledge Foundation
Empowering through Open Knowledge
http://okfn.org/ | @okfn
More information about the ckan-dev
mailing list