[ckan-dev] template helper function problem

Nigel Babu nigel.babu at okfn.org
Tue Jan 28 06:39:42 UTC 2014


I think what you're doing wrong is using h.flash_notice (I'm not sure) when
the template already has flash messages printed once. You should probably
just use alert directly<https://github.com/okfn/ckanext-demo/blob/warning/ckanext/demo/templates/header.html>
.

Nigel Babu

Developer  |  @nigelbabu <https://twitter.com/nigelbabu>

The Open Knowledge Foundation <http://okfn.org/>

Empowering through Open Knowledge

http://okfn.org/  |  @okfn <http://twitter.com/OKFN>  |  OKF on
Facebook<https://www.facebook.com/OKFNetwork> |
Blog <http://blog.okfn.org/>  |  Newsletter<http://okfn.org/about/newsletter>

 CKAN | http://ckan.org/ | @CKANproject
<http://twitter.com/CKANproject> |the world’s leading open-source data
portal platform


On 28 January 2014 03:10, Koebrick, Andrew (MNIT) <
andrew.koebrick at state.mn.us> wrote:

> I have added this line to my index.html template just after {% block
> content %}:
>
> {{ h.flash_notice('<b>Note</b>: This site is in development and is
> intended for evaluation purposes only. Data found here should be considered
> test data only!', allow_html=True) }}
>
> Although it works successfully, it also injects the word "None" into my
> HTML:
>
> <header class="masthead">
> +<div class="container">
> </header>
> None
> <div class="hero" role="main">
> +<div id="content" class="container">
> </div>
>
> Any thoughts on what I am doing wrong?
>
> Thanks,
>
> Andrew Koebrick
>
> _______________________________________________
> 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/20140128/1dd2011a/attachment-0003.html>


More information about the ckan-dev mailing list