[ckan-dev] new_resource template has no pkg_dict

Jared Smith jared at highwaythreesolutions.com
Tue Sep 20 17:50:16 UTC 2016


I believe I found the cause of the issue, and I've submitted a PR: 
https://github.com/ckan/ckan/pull/3252


On 2016-09-20 9:52 AM, Ian Ward wrote:
> 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
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160920/62ad4c9c/attachment-0003.html>


More information about the ckan-dev mailing list