[ckan-dev] Enforcing a custom schema.

Peder Jakobsen | gmail pjakobsen at gmail.com
Wed Dec 19 13:17:33 UTC 2012


Hi Knud,

This is a very helpful tip, I'll look into that.  I think there is
also some good stuff hiding inside ckanext-odg, I'll be looking at
that today.  I'd be happy to share any information I find. Are you on
IRC by any chance  (#ckan)

Thanks,

Peder Jakobsen
Open Data Canada

On Wed, Dec 19, 2012 at 6:45 AM, Knud Hinnerk Möller
<knud at datalysator.com> wrote:
> 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
>
>
> _______________________________________________
> 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