[ckan-dev] IDatasetForm: form_to_db_schema_api_create() etc

Sean Hammond sean.hammond at okfn.org
Mon Mar 18 14:08:35 UTC 2013


> > By the way, why the hack are form_to_db_schema_options' params passed to
> > it wrapped in a dict!?
> 
> that seems to be the ckan way context, data_dict etc
> otherwise we need ...(**kw) in extensions etc which feels just as unreadable

As far as I can see form_to_db_schema_options() is only called by ckan
internally, and always with the same three options type, api and context, so
unless I'm missing something there's no reason it couldn't be:

  def form_to_db_schema_options(self, type, api, context)

  form_to_db_schema_options(type='create', api=True, context={...})




More information about the ckan-dev mailing list