[ckan-dev] Use existing snippet for showing latest datasets

Nigel Babu nigel.babu at okfn.org
Wed Jun 18 04:01:32 UTC 2014


Hi Henrik,

What exactly is the failure? Do you have a trackback that you could send in
a pastebin?

On Tue, Jun 17, 2014 at 03:21:04PM +0200, Henrik Aagaard Sørensen wrote:
> I've created my own extension, with an addon for getting the latest datasets in plugin.py.
>
> I would like to show this on the frontpage via an existing snippet. But using package_list or similar fails.
>
> The function for retrieving the latest datasets follows the docs on http://docs.ckan.org/en/latest/theming/templates.html, for most popular groups, just changed:
>
> toolkit.get_action('group_list')
>
> to:
>
> toolkit.get_action(package_list')
>
>
>
> and
>
> sort': 'packages desc
>
> to:
>
> sort': 'metadata_created desc
>
> This seems to return the latests datasets (packages). But using package_list snippet or similar for this results in a fail.
>
> I'm running CKAN 2.2.
>

> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev


--
Nigel Babu
Developer, Open Knowledge



More information about the ckan-dev mailing list