2
votes
Accepted
Lab 9: Birthdays - odd behaviour from delete button
Have you validated the HTML? (see Week 8 Lecture, starting at minute 54). The problem is identified in the spoiler, but you might want to take your generated HTML through the Direct Input tab at ...
2
votes
Check50 marks my "Quote" as if not functioning properly despite looking identical to the staffs solution
If the price is "even dollars" (ie no cents) like 28.00, quoted.html will display as $28.0. Consider using usd to transform price, either in the buy function or quoted.html.
1
vote
Accepted
CS50 pset9: Why does 'SELECT last_insert_rowid()' return 0 instead of the expected value when using CS50 SQL library in Flask?
You're not doing anything wrong; it is a function of CS50's sql wrapper. There is a solution. From the spec hints:
If str is an INSERT, and the table into which data was inserted contains an ...
1
vote
Accepted
my cs50 finance buy do not update in in the portfolio
Assuming the transactions table is the portfolio and assuming the program indenting is as shown:
if cash < total_price:
return apology("not enough cash")
db.execute("UPDATE ...
1
vote
Accepted
ValueError: UNIQUE constraint failed: on finance pset9, could someone point me in the right direction on which values should be UNIQUE from my table?
The error is on compras.id, which implies it is defined as UNIQUE. (Perhaps edit the compras schema into the question). The INSERT into compras is setting id to user_id, which would allow one purchase ...
Only top scored, non community-wiki answers of a minimum length are eligible