Skip to Content
Menu
This question has been flagged
1 Reply
2617 Views

Hi all,
How I will capture data in realtime which is send through webhook and modify the template content.

I have created public type controller in python and I can see data is coming to the controller but I am not sure how I will send that data to website template.
Avatar
Discard
Best Answer

Hi,

If you are getting the required data in the controller, then you can render the template using this data.

In the controller

return request.render('module_name.template_name',
{'news_feeds': news_feeds})

In the template, you can display the data like this

<div class="news_feed">
<t t-foreach="news_feeds" t-as="news">
<marquee direction="left">
<p><t t-esc="news.news_feeds"/></p>
</marquee>
</t>
</div>

Thanks


Avatar
Discard