[ckan-dev] ckan-admin/trash

Nigel Babu nigel.babu at okfn.org
Thu May 8 04:26:00 UTC 2014


Perhaps you should do an {% if package.tracking_summary %} or some such.
The trash page probably doesn't have it added.

Nigel Babu
Developer, Open Knowledge


On 7 May 2014 22:21, Fabrizio Fornari <ckanappoggio at gmail.com> wrote:

> I found the problem, since I wanted to display the number of views per
> dataset, i modified /templates/snippets/package_item adding this line:
> "<div>{{ _('Views: ')}}{{ package.tracking_summary.total }}</div>"
>
> Everything works fine and I can see the views but if I do so, i cannot
> access to  /ckan-admin/trash and the error is the one that I have already
> reported:
>
>
> Error - <class 'jinja2.exceptions.UndefinedError'>: 'dict object' has no attribute 'tracking_summary'"
>
>
>
> On Wed, May 7, 2014 at 9:07 AM, Fabrizio Fornari <ckanappoggio at gmail.com>wrote:
>
>> It displays only:
>>
>> Server Error
>> An internal server error occurred
>>
>> On the tab: Error 500
>>
>>
>> On Wed, May 7, 2014 at 7:17 AM, Nigel Babu <nigel.babu at okfn.org> wrote:
>>
>>> Nothing there indicates an error. What does your browser show? A blank
>>> page?
>>>
>>> Nigel Babu
>>> Developer, Open Knowledge
>>>
>>>
>>> On 6 May 2014 17:46, Fabrizio Fornari <ckanappoggio at gmail.com> wrote:
>>>
>>>> I get only this:
>>>>
>>>> [Tue May 06 14:15:00 2014] [error] [client 127.0.0.1] Error - <class 'jinja2.exceptions.UndefinedError'>: 'dict object' has no attribute 'tracking_summary'
>>>> [Tue May 06 14:15:00 2014] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 0 to 2 : URL /favicon.ico
>>>> [Tue May 06 14:15:02 2014] [error] 2014-05-06 14:15:02,586 INFO  [ckan.lib.base]  /ckan-admin/trash render time 2.159 seconds
>>>> [Tue May 06 14:15:02 2014] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 12924 to 3568 : URL /ckan-admin/trash
>>>> [Tue May 06 14:15:03 2014] [error] 2014-05-06 14:15:03,362 INFO  [ckan.lib.base]  /api/i18n/it render time 0.012 seconds
>>>> [Tue May 06 14:15:03 2014] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 0 to 2 : URL /_tracking, referer
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, May 6, 2014 at 1:50 PM, Nigel Babu <nigel.babu at okfn.org> wrote:
>>>>
>>>>> Do you get an error or something? Is there a traceback on the screen
>>>>> or elsewhere?
>>>>>
>>>>> Nigel Babu
>>>>> Developer, Open Knowledge
>>>>>
>>>>>
>>>>> On 6 May 2014 17:19, Fabrizio Fornari <ckanappoggio at gmail.com> wrote:
>>>>>
>>>>>> I see, but actually it was working before. Now I noticed that if
>>>>>> there are no deleted datasets I can access to the page, so I am wondering
>>>>>> if it is possible that adding some custom fields to the dataset requires
>>>>>> also some changes to make the trash work properly.
>>>>>>
>>>>>>
>>>>>> On Tue, May 6, 2014 at 12:47 PM, Nigel Babu <nigel.babu at okfn.org>wrote:
>>>>>>
>>>>>>> Hi Fabrizio,
>>>>>>>
>>>>>>> That page needs quite a lot work. I've started off some work in a
>>>>>>> pull request that's not yet merged, so I'm not sure if the existing pages
>>>>>>> will work.
>>>>>>>
>>>>>>> Nigel Babu
>>>>>>> Developer, Open Knowledge
>>>>>>>
>>>>>>>
>>>>>>> On 6 May 2014 15:57, Fabrizio Fornari <ckanappoggio at gmail.com>wrote:
>>>>>>>
>>>>>>>> Hi guys,
>>>>>>>>
>>>>>>>> I am having this error trying to access ckan-admin/trash:
>>>>>>>>
>>>>>>>> "[Tue May 06 12:16:08 2014] [error] [client 127.0.0.1] Error - <class 'jinja2.exceptions.UndefinedError'>: 'dict object' has no attribute 'tracking_summary'"
>>>>>>>>
>>>>>>>> I am logged as a ckan admin but I can't access the page. Can you tell me where may be the error? I don't know where should I look for it.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Thank you!
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> 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
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> 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/20140508/d0631f02/attachment-0003.html>


More information about the ckan-dev mailing list