[ckan-dev] new_resource template has no pkg_dict

Adrià Mercader adria.mercader at okfn.org
Tue Sep 20 10:27:33 UTC 2016


Hi Jared,

`pkg_dict` is available for me in the main template
(`new_resource_not_draft.html`). Perhaps you are trying to access it
from the another lower level snippet like resource_form.html? In this
cases the extra vars are not available and you need to pass them as a
parameter in here:

https://github.com/ckan/ckan/blob/master/ckan/templates/package/new_resource_not_draft.html#L12

Adrià

On 20 September 2016 at 00:29, Jared Smith
<jared at highwaythreesolutions.com> wrote:
> Hello,
>
> It seems that '/dataset/new_resource/{id}' doesn't have 'pkg_dict', even
> though in my default ckan env 'pkg_dict' is being added to the 'extra_vars'
> on the render function. Am I missing something or is this a bug for anyone
> else?
>
> _______________________________________________
> 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



More information about the ckan-dev mailing list