2

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() results = db.execute("""SELECT * FROM books WHERE "ISBN" LIKE (:book) OR "Title" LIKE (:book) OR "Author" LIKE (:book)""", {"book" : book}) Here, the first ...


1

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 postgres binaries otherwise SQLAlchemy will not install properly. psycopg2 has issues on my version of MacOS, and by issues I mean it would not install via pip - ...


1

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 your code should work. Hope this helps. If it does please check the tickmark


1

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


1

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 allow for an HTML string to be outputted, you can do so with the safe filter (as by adding |safe after the variable name you’re substituting). safe filter : ...


1

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 return the last inserted id. The CS50 SQL class does a lot of hard work for you. So new_user_id is an object (eg in sqlite a cursor object). So something like ...


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

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 between 0 and 10 (both inclusive), the extra digit is the letter X. The import you wrote complains that you use an integer field to store a non-numeric ISBN. Use ...


1

I am also having issues with logging into Adminer. There are also individuals with the same problem within this Reddit: https://www.reddit.com/r/cs50/comments/gjqnqy/adminer_login_session_expired_please_login_again/ And I also created a new post here: adminer.cs50.net giving "Session expired, please login again." error when attempting to login ...


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