Closed dnxjcui closed 1 year ago
This is not a complete application that I can run, so I do not really know. If I may make a suggestion, this repository has a few examples that use render_template()
and do not have any issues with it. Why don't you study these and then adapt one of them to your own needs?
I've uploaded the files to my github as Test-Website, but I'm not sure if I added the folders correctly.
@dnxjcui Have you tried the examples? As I said, these are all fully working, and are there to help developers get started with a project.
Yes, I used the load example and have been trying to integrate a few of my own things, but I’ve found that the render_template won’t work within POST methods~On Sep 23, 2022, at 10:25, Miguel Grinberg @.***> wrote: @dnxjcui Have you tried the examples? As I said, these are all fully working, and are there to help developers get started with a project.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
@dnxjcui The "todos" example has POST requests that render templates. Example: https://github.com/miguelgrinberg/turbo-flask/blob/main/examples/todos/app.py#L18-L29
I've tried using the example you've linked to render the template, but it still won't work. For some reason it just stays on the same template, no matter what I do. I still think it has something to do with POST and flask's render_template, but I'll just figure something out. I appreciate the help you've provided and thank you for everything
Removing the
turbo = Turbo(app)
makes the code work again.Here's the full code: