Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
3 Vastaukset
5281 Näkymät

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.


Avatar
Hylkää

What is currently showing with this code?

Is there any error messages?

Tekijä

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?

Tekijä Paras vastaus

Any help?

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
heinäk. 23
6491
1
kesäk. 23
4407
1
huhtik. 23
5136
1
tammik. 23
3321
1
marrask. 22
3850