Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
5194 Lượt xem

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.


Ảnh đại diện
Huỷ bỏ

What is currently showing with this code?

Is there any error messages?

Tác giả

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?

Tác giả Câu trả lời hay nhất

Any help?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 23
6343
1
thg 6 23
4345
1
thg 4 23
5063
1
thg 1 23
3253
1
thg 11 22
3772