Questions tagged [cs50w]

The tag has no usage guidance.

26 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
1answer
253 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....
1
vote
0answers
33 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 ...
1
vote
0answers
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\...
0
votes
0answers
25 views

“I'm Feeling Lucky” button only work if it's a definate keyword

I'm taking the CS50W course and in project0 the instructions is to make an "I'm Feeling Lucky" button that redirects you to the first page like the original does. after monitoring urls and ...
0
votes
1answer
10 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 =&...
0
votes
0answers
29 views

sass: command not found - Mac

I'm trying to follow the first lesson and when I execute sass variables.scss:variables.css, the console display : sass: command not found, but it is already installed. I have a Mac.
0
votes
0answers
81 views

cs50w Wiki Edit Function: successful edit but NoReverseMatch for edit thrown

My edit function throws a NoReverseMatch (Reverse for 'editpage' with arguments '('',)' not found. 1 pattern(s) tried: ['editpage/(?P[^/]+)/$']) when I try and submit edits on the page. However, when ...
0
votes
1answer
96 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 ...
0
votes
0answers
18 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 ...
0
votes
0answers
61 views

CS50W Project 4 / Network - NoReverseMatch

I'm currently on the last project for CS50 Web called Network and am stuck on the Follower spec. I'm trying to get the url in the Following tab to bring you to the profile of the specific user that's ...
0
votes
0answers
22 views

Django not accepting url arguments

my views.py contains def greet(request, name="World"): return HttpResponse(f"Hello, {name}!") and for this the urls.py for the app has url(r"^<str:name>/$", ...
0
votes
1answer
419 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): ...
0
votes
0answers
11 views

CS50w flack (chat) project: channel user list stops updating after a while, can't understand why

This is a weird one, so I've recorded a short video to better illustrate the problem. As an additional feature to my chat app I have a panel on the right that displays the users currently on the ...
0
votes
0answers
25 views

Session issue on CS50s project 1 Book Review

I need to learn more about session. I have book route which goes to a book page stating the description of the book, reviews from other users and write a review. I create a form in html and submit my ...
0
votes
0answers
26 views

CS50W Project 3 Order?

Hope you all are doing well during tough times. Okay, I am doing project 3 currently. I have completed the "Menu, Adding Items, and Registration/Login/Logout" parts of the assignment. Could anyone ...
0
votes
0answers
94 views

Problem with Flask Flashing message - messages appears twice

I'm newbie at Flask. I am trying to manage the flash alerts to appear where I want them. When I write the code get_flashed_messages() in the .html module the messages appears twice, without this code ...
0
votes
1answer
64 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 ...
0
votes
0answers
53 views

CS50W Project 2: socket.io is not working for me

I am trying to create the channels real time so they can be broadcasted and i save them in a list on the backend. I will later make sure that all the channels in the list are also put in the list but ...
0
votes
0answers
285 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\...
0
votes
0answers
31 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 ...
0
votes
1answer
106 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 ...
0
votes
1answer
50 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 = "...
0
votes
1answer
47 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. ...
0
votes
1answer
17 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 ...
0
votes
1answer
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 ...
0
votes
0answers
87 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 ...