Hot answers tagged

2

Try setting the first conditional in your index function to: if session.get("notes") is None: This way you will only reset the session's collection of notes when it actually did not yet exist. At the moment you posted your code, you probably had set: session["notes"] = "value" earlier on, this resulted in the first conditional always evaluating to 'True'...


2

You're correct that the submission process changed in late July. All of your old submissions can be seen here: http://legacy.cs50.me and new submissions here: http://submit.cs50.io Both groups of submissions are used for grading, so you should see the progress here: http://cs50.me/cs50w


1

Nevermind, I have been able to figure it out. I had to use a GET request.


1

If a comma appears, it defines a separation between values. However, if a string is contained in quotes, any commas inside the string is treated as part of the string and not as a delimiter. Try putting double quotes around the title before putting it in the :title variable.


1

passengers is a list of Passenger objects, therefore print(self.passengers) is printing a list of Passenger objects. This print(self.passengers.flight_id) would fail because self.passengers is a list and the list has no flight_id attribute. Program needs to iterate through passengers list to get the attributes (e.g. flight_id, name) of each Passenger object. ...


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