Questions tagged [cs50w]

The tag has no usage guidance.

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

cs50w problem with pro 1 how to use markdown2

how can i use markdown in this project i used def opening(request, title): if request.method == "GET": if title in entries: txt1 = markdown2.markdown(util.get_entry(...
0
votes
0answers
28 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
11 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
2answers
34 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-...
-1
votes
2answers
68 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 ...
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
1answer
39 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 ...
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>/$", ...
1
vote
1answer
256 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....
0
votes
1answer
420 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 ...
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 ...
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 ...
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
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
288 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 ...
1
vote
1answer
170 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 ...
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
89 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 ...
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
2answers
41 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-...
0
votes
1answer
86 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....
0
votes
2answers
463 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 ...
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 ...
1
vote
1answer
269 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 ...
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 ...