Skip to main content
2 votes
Accepted

CS50W Project Wiki search function

I know this is late but if it helps somebody. The issue in your code is indentation. The moment the loop find the first matching substring it renders the page. Left indenting it by two levels should ...
Dineth Hettiarachchi's user avatar
2 votes
Accepted

Cs50 Web Programming - How to autocomplete - Project 1

You don't have to 'autocomplete' as per, you can execute a 'LIKE' query on the database with the input entered by the user, like the following: book = ("%" + request.form.get("book") + "%").title() ...
Shrey Tripathi's user avatar
1 vote

What are the challenges when setting up your dev enviroment for Project 1 (MacOS)?

Here are the stumbling blocks I faced: SQLAlchemy Dependencey Issues: Postgres path not set I have written about this in another question (see link), but in a nutshell you need to add the path to ...
user1615102's user avatar
1 vote
Accepted

Edit Function Help - CS50 Web Project1 Wiki

In the entry page, at the end you are specifying a url which should take you to the edit page. But instead it reloads the entry page as the path is 'entry' not 'edit'. If you do this small change then ...
Vsjain's user avatar
  • 1,016
1 vote

Help with Search Bar - Wiki Project1 CS50 Web Django

Nevermind, I have been able to figure it out. I had to use a GET request.
user14567126's user avatar
1 vote

How to get markdown info to HTML

A possible method has been mentioned in the Hints part. By default, when substituting a value in a Django template, Django HTML-escapes the value to avoid outputting unintended HTML. If you want to ...
Vsjain's user avatar
  • 1,016
1 vote

CS50W Django Project1 Wiki - Textarea issue

I hit the same issue and found the solution. I thought I'd post it here in case others hit the same problem. The solution is here: https://stackoverflow.com/questions/62903909/django-contentfile-...
Doug F's user avatar
  • 11
1 vote
Accepted

CS50W Project1: Type error cannot pickle _thread._local object

My assumption is you are not using CS50's SQL class. Therefore, this db.execute("INSERT INTO users (username, hash) VALUES (:username, :hash)", {"username": username1, "hash": hashedpass}) does not ...
DinoCoderSaurus's user avatar
1 vote

Problem with commas in psql

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 ...
Cliff B's user avatar
  • 69.2k
1 vote
Accepted

CS50's Web Programming - Unable to import books.csv file into database

Interesting output: invalid input syntax for integer: "080213825X" ISBN are not always numeric, at least not their check digit. The result of some calculation is taken mod 11, resulting in a number ...
Blauelf's user avatar
  • 21k

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