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 ...
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()
...
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 ...
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 ...
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.
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 ...
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-...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
project1 × 26cs50-web-programming-with-python × 15
cs50w × 7
django × 7
wiki × 6
cs50web × 4
cs50-web-django × 4
flask × 3
postgresql × 3
flask-sqlalchemy × 2
adminer × 2
python × 1
html × 1
web × 1
json × 1
database × 1
2020 × 1
sqlalchemy × 1
apikey × 1
session × 1