[Flask] Unexpected result when running flask application

spaceman spaceman at antispaceman.com
Tue Jun 25 14:11:21 EDT 2019


Cravan wrote:
> Hi all,
> 
> I am experiencing an unexpected result
> when I try to run my flask application. The movie.html page prints out
> nothing except those in the <h1>. This appears on my webpage:

> {% for movie in movie %}
> 
>     Title: {{movie_title}}
>     Year: {{movie.year}}
>     Runtime: {{movie.runtime}}
>     ImdbID: {{movie.imdbID}}
>     ImdbRating: {{movie.imdbRating}}
> 
> {% endfor %}

That should be '{% for movie in movies %}' by my reckoning.

@app.route only allows GET by default so [1]:

    @app.route("/search", methods=['GET', 'POST'])

Regards,
spaceman

1: http://flask.pocoo.org/docs/1.0/api/#url-route-registrations


More information about the Flask mailing list