跳至內容
選單
此問題已被標幟
3 回覆
5197 瀏覽次數

Hello everyone, I'm developing in Qweb and I need to make a redirection to a page when the user clicks an href tag, but the controller is not rendering the template.

This is the code:

The redirection tag:

<a t-attf-href="/index/{{kid.id}}">

The controller:

@http.route(['/index/<int:data>'], type='http', auth='user', website=True)
def user_render(self):
return http.request.render('coas_education_website.custom_coas_user_contentas', {})

The template:

<template id="custom_coas_user_contentas">
<p>HOLA</p>
</template>

Any suggestion? Thanks for reading.


頭像
捨棄

What is currently showing with this code?

Is there any error messages?

作者

Is not showing any error messages, is rendering the main template but not the one that I want to show.

I writed wome code traces in the controller but they are not printed so I assumed that is not executing this code.

Any suggestion?

作者 最佳答案

Any help?

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
7月 23
6347
1
6月 23
4346
1
4月 23
5064
1
1月 23
3261
1
11月 22
3775