[ckan-dev] Enforcing a custom schema.

Knud Hinnerk Möller knud at datalysator.com
Wed Dec 19 11:45:31 UTC 2012


Hi Peder,

I believe the form_to_db_schema, db_to_form_schema, etc. methods in DefaultDatasetForm are where you can validate extra fields. Sean pointed me to some useful example code a while ago:

https://github.com/okfn/ckan/tree/2750-add-docs-and-examples-for-idatasetform-and-igroupform/ckanext/example_idatasetform

I haven't gone as far as writing my own validators yet, so if you manage to come up with some working examples, would you mind posting them somewhere? I'll do the same, if I get around to it!

Cheers,
Knud

On 16.12.2012, at 03:09, Peder Jakobsen <pjakobsen at gmail.com> wrote:

> Hi, I'm looking for any suggestions on how to enforce a custom metadata schema in both the UI and API.  There would be about about 10 extra fields that have to be validated for each document.   
> 
> Also, are there any documents kicking around that depicts the core model in CKAN?  (UML etc.) 
> 
> Thanks,
> 
> Peder Jakobsen
> 
> 
> 
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev





More information about the ckan-dev mailing list