[ckan-dev] Installing extensions on Czech CKAN

David Read david.read at okfn.org
Tue Oct 4 11:46:37 UTC 2011


2011/10/3 Ondřej Vadinský <ondrej.vadinsky at vse.cz>

> Hello,
>
> we'd like to have an extension for multilingual content on Czech CKAN. It
> should be provided by hrifi [1]. I derived following installing process
> from
> the documentation (didn't quite get what the documentation said):
> in /etc/ckan/cz activate pyenv: . pyenv/bin/activate
> install extension: pip install -E ./pyenv/ hg+
> http://bitbucket.org/okfn/ckan-
> hrifi
> deactivate
> add ckan.forms = package_hrifi possible with ckan.plugins = hrifi for a
> fork
> of okfn version to cz.ini
> restart the apache
> The page loads ok, though I do not see any change, when going through it.
> When
> I install exampletheme extension, the page somewhat changes, so I guess my
> installation procedure works.
> What could be the problem? Is some more configuration needed?
>

Ondrej,

The short story is: it's best not to use this extension - it is not what you
want and out of date. But you can use its principles and customise the
package edit form for storing data fields in multiple languages.

The long story:

You have installed this extension successfully with pip and the config
options look fine.

This extension is a customisation of CKAN designed for a Helsinki project.
There are some visual templates and the custom form.

The form contains particular fields twice, to provide for two languages. I
think this concept is what interests you, but you probably don't want the
rest, such as the geographic_coverage option list covering parts of
Helsinki.

The HRI form is based on FormAlchemy, which is what we used for forms up
until CKAN 1.4.1 which came out in June. You can still use these forms, but
there is a small hack required - see something similar here:
https://bitbucket.org/okfn/ckanext-exampletheme/changeset/22f74f9ecd8a

But I suggest you simply customise your form yourself. House it in a new
extension, copy the default package form HTML and NAVL schema and edit it
away, adding additional fields for translations as you see fit - maybe only
title and description need the translation. Instructions to get you started
are here:
http://readthedocs.org/docs/ckan/en/latest/forms.html There is not much here
about the navl schema, so if you get lost, do ask again and we'll gladly
help. All the best,

David


> Regards,
>
> Ondřej Vadinský
>
> [1] https://bitbucket.org/okfn/ckan-hrifi/overview
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20111004/0fba9620/attachment-0001.html>


More information about the ckan-dev mailing list