class ProjectExtension(http.Controller):
@http.route('/project_extension/project_extension/', auth='public', website=True) def index(self, **kw):
Projects = http.request.env['project.project'] return http.request.render('project_extension.index', { 'projects': Projects.search([]) })
@http.route('/project_extension/a/', auth='public', website=True)def task(self, project):
return http.request.render('project.project', { "project" : project })
Hello
I'm trying to display some information on the website for a client.
I have a module, project_extension, which expend the Project module.
The first part of my code display a liste of project and the second part should display the tasks linked to this project, but at list I would like juse to have a page. Because actually I juste have a
404: Page not found!
error when clinking on a link.
I build the link like this :
<t t-foreach="projects" t-as="project">
<p><a t-attf-href="/project_extension/{{ slug(project) }}">
<t t-esc="project.name"/></a>
</p>
</t>
I hope someone can help me.
I tried to follow the Building a website tutorial (and my little module is working, I can display a teacher and click on it to display his biography)
Thx for your help
Célia