[ckan-dev] new_resource template has no pkg_dict

Ian Ward ian at excess.org
Tue Sep 20 16:52:01 UTC 2016


I'm pretty sure I ran into this bug and worked around it by overriding
a template recently. Please submit this as an issue (or better yet a
pull request! :-)

On Tue, Sep 20, 2016 at 12:36 PM, Jared Smith
<jared at highwaythreesolutions.com> wrote:
> This is happening in the `package/new_resource.html` template in both the
> bcgov ext and default ckan when creating a new dataset.
>
>
>
> On 2016-09-20 3:27 AM, Adrià Mercader wrote:
>>
>> 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
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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