[ckan-dev] Learning about actions

Ryan Clark ryan.clark at azgs.az.gov
Tue Jan 22 20:47:42 UTC 2013


On Jan 21, 2013, at 10:37 AM, Ryan Clark <ryan.clark at azgs.az.gov> wrote:

> What are the advantages of making new actions vs. just using IRoutes to map a URL to a python function?

I've kind of answered my own question by actually playing around with building an action. However, there's still a lot to be curious about.

- Is there any documentation of "best-practices" for the function that controls a custom action? 
- It was interesting to find that the action responses were automatically generated, and that the __doc__ was used as "help", allowing some self-documentation of the API
- What do you have to do to make a response "success": "false"? Is there a preferred method for returning a 400 when a request is malformed?


Thanks!
Ryan



____________________

Ryan Clark
ryan.clark at azgs.az.gov
(520) 302-4871







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130122/a8c284f9/attachment-0001.html>


More information about the ckan-dev mailing list