Hot answers tagged

2 votes
Accepted

How to iterate over a list of values in a dict using jinja?

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 ...
DinoCoderSaurus's user avatar
1 vote
Accepted

expected 400 but got 200 OK?

I do not think the problem is in register function or register.html. I ran them through check50 and they passed. A little detail I missed on the initial read was "got 200 in all my apology pages", all ...
DinoCoderSaurus's user avatar
1 vote
Accepted

Final project: builtins.NameError NameError: name 'usd' is not defined

In pset7, the usd function is included in helpers.py and then you import helpers. If you want to use it here, you could simply include the function in your code: def usd(value): """Formats value as ...
curiouskiwi's user avatar
  • 18.7k
1 vote
Accepted

Jinja - for loop

the share in for share in sharesOwnedis the object itself so when u try to use something like priceNow[share] , it doesnt make sense. if you have a diff pricenow list then u can iterate both list ...
Vikrant Pradhan's user avatar
1 vote
Accepted

Why did CS50, 2017 swap from HTML/CSS to Jinja for Pset7?

This is part of the broader change from PHP to Python, which you allude to. The simple explanation for that change on CS50's Medium blog was "It’s time." Switching to Python enabled CS50 to use the ...
Peter's user avatar
  • 1,412

Only top scored, non community-wiki answers of a minimum length are eligible