New answers tagged

1

It's not jinja syntax, it's python syntax. for movie in movies: iterates over the members (keys) of movies, thus movie is a string. Contemplate how creating movies as a list of dictionaries, one dictionary per movie, (think stock holdings in finance?) would significantly simplify the code. Also consider testing the loops/outputs in command line python3 to ...


0

I'm getting otherwise related errors, so I can't know for sure, but I think I figured it out. All I need from the data is the name of the top10 movies to use others API requests and get additional info, so I did this: def top_ten_movies(): api_key = os.environ.get("API_KEY") try: url = f"https://imdb-api.com/en/API/Top250Movies/...


1

I would like to put the data from the data list in a separate file and then get it back to python and then send it to the Html table with the existing jinja syntax and not change anything in the render template function. The data in the data list looks like csv format. If it was stored in a file, retrieving the data would become a task similar to pset6 DNA: ...


Top 50 recent answers are included