Questions tagged [cs50w]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

How to disable a form from views.py .?

How do I achieve the below: @login_required def close_auction(request,listing_id): listing = Listing.objects.get(pk=listing_id) if request.method == "POST": listing....
user avatar
  • 1
0 votes
1 answer
9 views

What do we mean by "close" auction.?

In the Project, one of the objectives is: If the user is signed in and is the one who created the listing, the user should have the ability to “close” the auction from this page, which makes the ...
user avatar
  • 1
0 votes
1 answer
38 views

Big blunder while submitting CS50W Project 0

I am currently doing the CS50W course and was trying to submit Project 0 (Search). I was very confused with the submission process git and submit50. On the project page, it said Otherwise, using Git, ...
user avatar
0 votes
0 answers
15 views

Network - querySelector returning undefined

I'm working on the edit post functionality. Basically I would like to re-render the innerHTML of any given post to display a text, prefilled with the existing contents of the post. The issue I'm ...
user avatar
0 votes
0 answers
35 views

CS50 web: wiki edit NoReverseMatch

I'm working on CS50 Web's Project1. For some reason I keep getting this error message: In my interpretaion, the error message is raised because I didn't provide a required argument for the path, but ...
user avatar
0 votes
0 answers
9 views

CS50w Gradebook not updating

My submission for CS50w's 2021 Project 2(Commerce) and Project 3(Mail) have been graded but my gradebook is not updated accordingly. I have received the bot@cs50.net confirmation 1/1 scores for these ...
user avatar
0 votes
1 answer
28 views

How to access foreign key in fetch query? (CS50W Mail)

I want to access the actual ID of the sender, right now I can only access the email of the sender. This is the Javascript fetch(`/emails/${id}`) .then(response => response.json()) .then(email =&...
user avatar
0 votes
1 answer
272 views

cs50w Project 1 Wiki Search: layout.html failing to submit POST to views.py

currently working on the search function for project 1. I've updated layout.html, urls.py, and views.py, but when I input anything into the search bar layout.html does not pass the POST information to ...
user avatar
0 votes
2 answers
90 views

Header links won't align to the right (P2)

In the work of search, I wanted to deal with the header links (Image Search and Advanced Search links) not aligning to the right. As I looked into my CSS file, everything works properly except text-...
user avatar
-1 votes
2 answers
120 views

Can I just copy the Google source code to get a head start? (P1)

In CS50W 2020: Project 0, I have to make a resemblance of Google Search, and its image and advanced counterparts. I don't feel like doing much scavenging, so what I want to do is to copy the whole ...
user avatar
1 vote
1 answer
60 views

Problems with docker-compose up

To replicate problem: Download Lecture 7 source code Navigate to folder airline1 Type docker-compose up and hit enter Two errors will surface: db_1 will insist on a password, which can be fixed by ...
user avatar
0 votes
1 answer
82 views

Struggling to debug my code as I can't get print statements to work

I've been working on Project 1 from CS50W for a few days now and finally got my search bar to appear on my page! The issue I have now is I don't think the input is being pulled in from my form. I've ...
user avatar
1 vote
1 answer
508 views

CS50w 2020 project3: mail does not show new sent mail after sending

I am almost finished with project 3: mail of CS50w 2020. The only problem is that when I send a new mail to someone the sent page loads without showing the new mail I just sent. I added event....
user avatar
0 votes
1 answer
576 views

CS50W - Wiki with Django - I want to edit a wiki entry, but I don't know how to send the default value to the template if I use Django forms

I've tried to do this: class editPage(forms.Form): title = forms.CharField() textContent = forms.CharField(widget=forms.Textarea(attrs={'class' : 'textContent'})) def edit(request,name): ...
user avatar
1 vote
0 answers
43 views

cs50w Project 1: Web page running very slow

I just finished my book review page for project 1 and everything is working fine, but the site takes forever to load certain parts. When trying to log in or create a new account, or when trying to ...
user avatar
0 votes
1 answer
85 views

Please help with socketio messaging

I can't seem to get a message sent to the server and then added to my html document as a list item using socketio. I get to type in a message and click the send button, but then nothing happens. As ...
user avatar
1 vote
0 answers
2k views

sqlalchemy.exc.ArgumentError: Could not parse rfc1738 URL from string

Traceback (most recent call last): File "list.py", line 9, in engine = create_engine(os.getenv("DATABASE_URL")) File "C:\python 3.8\flask_env\env1\venv\lib\site-packages\sqlalchemy\...
user avatar
0 votes
0 answers
556 views

CS50W: "flask.cli.NoAppException" Can anyone explain this?

flask.cli.NoAppException: While importing "application", an ImportError was raised: Traceback (most recent call last): File "c:\users\hp\appdata\local\programs\python\python38\lib\site-packages\flask\...
user avatar
  • 1
0 votes
0 answers
43 views

DATABASE_URL in SQL Lecture

I am in SQL lecture. While watching the video, This is shown engine = create_engine(os.getenv("DATABASE_URL")) How does his code execute while DATABASE_URL is invalid. How do I practice while ...
user avatar
1 vote
1 answer
232 views

Instance of 'scoped_session' has no 'execute' member

Getting the following problem using flask and SQLAlchemy: "Instance of 'scoped_session' has no 'execute' member pylint(no-member)". I use Windows 10, Flask. I suppose that the problem is somehow ...
user avatar
0 votes
1 answer
117 views

CS50W Project2: communication between SocketIO and JavaScript

I'm trying to get new channel names input by the user to 1) show up on the screen in an unordered list and 2) also show up on other users' screens. I tried to closely follow the template that was used ...
user avatar
  • 63
0 votes
1 answer
54 views

goodreads api request return code 404

I have tested my function separately in python and it worked: def get_goodreads_review(isbn): return requests.get(GOOD_READ_URL, params={"key":KEY, "isbns": isbn}) if I set isbn = "...
user avatar
0 votes
1 answer
129 views

CS50w Project1: Trouble posting reviews (Row Proxy error - how to ensure a tuple)

The last bit I am struggling with on Project1 is posting a rating and review. I continually get sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) can't adapt type 'RowProxy' [SQL: INSERT ...
user avatar
  • 63
0 votes
1 answer
53 views

How to keep track of current user and book in project 1

I am now doing CS50W project 1. After letting user login and having enabled the user to do the book search, I need a way to keep track of the user when he or she is browsing from one page to another. ...
user avatar
0 votes
2 answers
60 views

CS50W Project1: ISBN too short, csv file does not provide correct ISBNs?

I was having an requests.exceptions.HTTPError: 404 Client Error: Not Found for url: error. I noticed after reading some of the documentation on Goodreads that we can use either 10-digit ISBNs or 13-...
user avatar
  • 63
0 votes
1 answer
103 views

CS50W Project1: how to access specific part of json object

I am working on the part of the project where people can click on a book from the search results page, which will then take them to the specific book's page. I am getting this error: json.decoder....
user avatar
  • 63
0 votes
2 answers
546 views

CS50W Project1: Type error cannot pickle _thread._local object

Currently working on CS50W's Project1, working with the GoodReads API. I thought the Register/Login/Logout requirements would be easy and quick for me to complete since I did it already with the CS50 ...
user avatar
  • 63
0 votes
1 answer
20 views

CS50Web Project 0 Center an unorder list when we create a box around

In the CSS style I used this: div{ background-color: darksalmon ; width: 400px; height: 100px; margin: 50px; padding: 20px; } but still, even if I place text-centered it doesn't ...
user avatar
1 vote
1 answer
308 views

cs50web switch from submit50 to me50?

I started with cs50 web earlier this year, completed the first 3 assignments and then submitted by pushing them to the relevant branch of the submit50/USERNAME.git repository, and got a grading email ...
user avatar
  • 113
0 votes
1 answer
2k views

socket.io won't connect BAD REQUEST "POST /socket.io/?EIO=3&transport=polling&t=1554987462099-61&sid=9e90c33eadea427db79c14a251130c15 HTTP/1.1" 400 -

I am trying to finish cs50w project 2 but I can't get socket.io to connect (at least i think that is the problem) I went into the source file and tried to recreate their example from vote1. This is ...
user avatar
  • 13
0 votes
0 answers
92 views

Issue with CS50W's Project2 - submitted text not passed to chat window

I have a problem regarding passing posted messages into the proper field and presenting them to the user. The app is supposed to transfer the text submitted in "messenger" into the "messages" so to ...
user avatar