[ckan-dev] TemplateNotFound exception ckanext-qa

Seb Bacon seb.bacon at gmail.com
Tue Feb 15 17:51:13 UTC 2011


Sorry, I'm in a bit of a hurry today & hadn't looked at your code.
Still not looked at it properly ;-) but I'll briefly note that I
needed to specify ['ckanext', 'datagm'] in the path to my templates
directory because "here" in the update_config method resolves to the
CKAN software root (not the extension root).

HTH

Seb

On 15 February 2011 17:44, Wayne Witzel III <wwitzel3 at gmail.com> wrote:
> Seb,
>
> Thanks for the reply, I am probably being dense and missing something
> obvious but I am pretty sure I've implemented the same thing within my
> plugin. Am I just doing it wrong?
>
> https://bitbucket.org/okfn/ckanext-qa/src/629c41fa972a/ckanext/qa/__init__.py
>
> Thanks,
>
> Wayne
>
> 2011/2/15 Seb Bacon <seb.bacon at gmail.com>:
>> You have to tell genshi where to look for your templates with a
>> extra_template_paths and extra_public_paths in your paster ini file --
>> or can put it in code with an IConfigurable plugin
>>
>> See something I did last week for an example of the latter:
>> https://bitbucket.org/sebbacon/ckanext-datagm/src/76f56c2cc8b6/ckanext/datagm/__init__.py
>>
>> Seb
>>
>>
>> On 15 February 2011 14:20, Wayne Witzel III <wayne.witzel at okfn.org> wrote:
>>> I've run in to a bit of a road block that I can't seem figure out.
>>> I've spent the last 2 hours trying to wrap my head around why this
>>> isn't working and I'm drawing a blank. I've followed the ckanext-stats
>>> plugin as an example. I've set the implements(IConfigurer) on my
>>> plugin class and I have the templates/ folder layout as suggested and
>>> I am still receiving a TemplateNotFound exception.
>>>
>>> Here is the stacktrace (http://paste2.org/p/1247763) and here is the
>>> test in question
>>> (https://bitbucket.org/okfn/ckanext-qa/src/629c41fa972a/tests/test_qa_extension.py).
>>> The code lives on BB at https://bitbucket.org/okfn/ckanext-qa/src
>>>
>>> Take care and thanks,
>>>
>>> Wayne
>>>
>>> _______________________________________________
>>> ckan-dev mailing list
>>> ckan-dev at lists.okfn.org
>>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>>>
>>
>>
>>
>> --
>> skype: seb.bacon
>> mobile: 07790 939224
>> land: 0207 183 9618
>> web: http://baconconsulting.co.uk
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>>
>



-- 
skype: seb.bacon
mobile: 07790 939224
land: 0207 183 9618
web: http://baconconsulting.co.uk




More information about the ckan-dev mailing list