Questions tagged [cs50-web-programming-with-python]
The cs50-web-programming-with-python tag has no usage guidance.
99
questions
0
votes
0
answers
7
views
CS50W Mail sent email not showing
I have tried sending the mail and the console of the Chrome DevTools has shown "Email sent successfully" but it is not reflecting in the mailbox.
This is function for loading the mailbox;
// ...
1
vote
0
answers
65
views
I am trying to solve my Einstein Code
I have written the following code and no matter what I try, the check always fails.
Here is my code:
user_input=int(input("Give Your Mass in KG to Find E=mc^2 = "))
c = 300000000
d= int (...
0
votes
0
answers
17
views
had the wrong file stucture
I accidentally submitted Project 0 to the wrong file structure and received an email notifying me of the mistake. To rectify the situation, I resubmitted it using submit50. Subsequently, I completed ...
0
votes
0
answers
129
views
How can I run a unit test effectively on CS50P pset 5 (test fuel.py)
fail to spot what is wrong on this code yet pytest runs succesfully but I get error messages when CS50 test my code.
I expect my code to raise ValuError, TypeError.Exceptions and be testable meet all ...
0
votes
0
answers
6
views
Why its giving output Not ok, even if it is a Alppha string?
Why its giving output Not ok, even if it is a Alppha string?
0
votes
0
answers
53
views
Reverse for 'entry' with no arguments not found. 1 pattern(s) tried: ['(?P<title>[^/]+)\\Z']
I'm getting this error from Django project and here is my code
in urls.py
urlpatterns = [
path("", views.index, name="index"),
path("<str:title>", views....
0
votes
0
answers
5
views
Issue with check50
I tested the output from my computer , Everything look oke, but i have 2/8 for this code.
any one facing this before.
0
votes
0
answers
113
views
Can't execute submit50
I am trying to execute submit50, but I keep getting the same error:
You might be using your GitHub password to log in, but that's no longer possible. But you can still use check50 and submit50! ...
0
votes
0
answers
17
views
Confused regarding this mini lab
I am running into a bit of a snag here. I have created the code that is required for the lab submission and I sincerely believe that its coded right. This works great in Pycharm for beta testing ...
0
votes
0
answers
90
views
CS50W - Mail : JavaScript function only working on Chrome
I have an issue with my compose_email function :
function compose_email() {
// Show compose view and hide other views
document.querySelector('#emails-view').style.display = 'none';
document....
0
votes
0
answers
35
views
CS50 Web Wiki Pset Logic for Edit Function
I'm almost done with the Wiki Pset - just need to finish the edit function and I'm struggling a bit with the logic. How can my edit() function "know" what entry to edit?
Right now I have the ...
0
votes
1
answer
22
views
Output not as expected
Why in output Twitter is getting printed, only twwtr should be printed as per my understanding.
0
votes
0
answers
209
views
PS8 Shirtificate
the assignment asked to create a PDF file. i don't know how to but somehow a shirtificate.png was saved in my shirtificate folder already. However, even i tried to use the simplest code to start with ...
0
votes
1
answer
19
views
What's the issue
my code is giving output as per expectation.
0
votes
1
answer
21
views
please clear the basic doubt
Why OK is displayed when i entered the integer 45 ?
0
votes
0
answers
36
views
Problems with WIki Pset
I'm working on the Wiki Pset for CS50 Web. I'm running into a couple of problems that I think might be related to my url routing?
When I load the site and click on "Create Page" on the left ...
0
votes
1
answer
285
views
CS50 2023 Finance Check50 issue
There is no way to get rid of the following check50 error:
:( logging in as registered user succeeds
application raised an exception (see the log for more details)
I found through googling that in ...
1
vote
1
answer
548
views
(Edited) CS50P - PSET 4 - LITTLE PROFESSOR
I've made some corrections, the answers for CHECK 50 are the same though. I'm not getting it, the workability of the code is fine (working as expected, even when testing by 'How to Test' section).
I ...
1
vote
1
answer
83
views
CS50W Capstone Project: Tools I Am Allowed to Use
It is mandatory in the project description to use django for the backend and Javascript in the frontend of my project. The course lessons introduce us to React and Bootstrap libraries.
Can I also use ...
2
votes
0
answers
1k
views
README.md does not contain all of the required information
I am doing CS50W course, Web Development with Python and JS. The Capstone project requires a README.md file. Requirements defined here: CS50W Capstone Requirements
I have changed and submitted my ...
0
votes
1
answer
8
views
Finance - Quote: Toggle visibility between submit button and table
I'm happy that my finance website finally works properly!!!
The thing is that I'm trying to make it look like the staff's solution website and I can't seem to get quote.html to behave like theirs (...
0
votes
1
answer
182
views
Cs50 web programming project 1 wiki (django) runserver connection refused error
I am using Django for the first time. like the lecture said I tried python manage.py runserver but on clicking the link it doesn't show django default page. instead I see this
This site can’t be ...
0
votes
1
answer
835
views
CS50P project6 shirt.py
question.. on CS50P project 6: shirt.py, I got an error message. I believe my error is on resizing the Moppest image but I don't know what else to do. I did what the instructions said but still having ...
0
votes
1
answer
478
views
Unable to solve "can't check until a frown turns upside down"
I was doing the Cash problem. I entered all the possible output given in the question yet its showing error. Please help, here is my code below
.
.
.
.
#include <cs50.h>
#include <stdio.h>
...
0
votes
1
answer
603
views
CS50W Project Wiki search function
I am trying to write the search function where the user submits a wiki search. If the query is in the given list of entries, the user should be redirected to related entry's page.
If the query doesn't ...
0
votes
0
answers
148
views
cs50web project 4 network - "Edit" feature - how to execute two fetch() without the need to create a time delay?
Working on "Edit" feature for project4 network.
I wrote a javascript function with two fetch. First one to update the post. Second one to retrieve the now updated post and show it on page (...
0
votes
1
answer
881
views
PSET9 / can't check until a frown turns upside down
I am getting this message in the following checks
:| sell page has all required elements/
:| sell handles invalid number of shares
:| sell handles valid sale
I guess the problem is in by sell or buy ...
1
vote
1
answer
63
views
cs50 web programming, wiki: extend function not working
I'm currently on project 1 wiki in cs50 web. The distribution code already gave me the blocks on layout.html and extend functions on index.html. For some reason, the code I put in the blocks in index....
0
votes
1
answer
64
views
Specification imposes a 5-minute length limit on videos
I have made a youtube video on Commerce project which exceed 5 minutes. For this cause, my Project2: Commerce submission grading failed.
How can I submit the project again.
Please help me anybody.
0
votes
1
answer
205
views
CS50 web - problem 1, Wiki. Python syntax error
I'm just getting started with CS50 Web's problem 1 (wiki). I've got the code and I'm trying to run the Django server for the first time to see what the source code gives me.
I have made no edits to ...
0
votes
1
answer
18
views
default relative Imports in Django wiki failing
In views.py, when initially running the pregenerated line
from . import util
failed with relative import error. The standard
from .dir import package
also failed. Deleting __init.py__ also has no ...
0
votes
1
answer
327
views
CS50Web - Not Sending Emails
I just started with the Mail project for CS50Web and came across a really strange problem.
Currently, I'm working on the part where I need to send an email. My algorithm for this is simple:
Add event ...
0
votes
1
answer
1k
views
Mail CS50 Web - How to Send Email (API not working)
I'm very new to Javascript and working on mail, project 3 for CS50 web.
I've been working on just sending the email initially, for about a week and I'm getting very discouraged. I can't seem to get ...
0
votes
1
answer
932
views
CS50 (2021) - Finance. :( registration rejects duplicate username - expected status code 200, but got 400
I´ve been struggling to complete the Pset9 - Finance, version from 2021. After reading multiple threads I decided to post here the issue, looking for some guidance so I can move forward in the course.
...
0
votes
1
answer
639
views
Does anyone know how to use Django on CS50 IDE?
I can’t seem to run Django on CS50 IDE.
I downloaded Django without a problem. I can create a Django app without a problem using "python manage.py startapp hello". But the problem comes when ...
0
votes
1
answer
371
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
1
answer
678
views
Edit Function Help - CS50 Web Project1 Wiki
I've been having trouble with the edit function for the wiki project1. So far I've tried many different approaches but nothing has worked. I have the "edit" button on every entry page of the ...
1
vote
3
answers
728
views
Help with Search Bar - Wiki Project1 CS50 Web Django
For the Wiki project I'm having trouble implementing the search bar. I have spent about 2 days researching search bars in Django, but so far everything I've tried yields the same result:
No matter ...
0
votes
1
answer
680
views
CS50W Django Project1 Wiki - Textarea issue
I got stuck at completing Wiki assignment because of strange behaviour of textarea in form, needed for creating and editing entries. Everytime user saves the entry, for each line of entered text there ...
0
votes
1
answer
279
views
CS50Web: Project1 Wiki - Error loading markdown2 module
I've tried to import the markdown2 module in my views.py file but I get an error ModuleNotFoundError: No module named 'markdown2'. I've tried restarting my machine, uninstalling and reinstalling the ...
0
votes
1
answer
222
views
cs50 web programming with python & javascript. Entry not saving and I can't figure out why
I am a newbie coder and I just started the cs50 web programming course on edEX. I seemingly cannot get my code to save a .md (markdown file) in a directory. For now I am just trying to save the .md ...
0
votes
1
answer
113
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
1
answer
664
views
Django model default value not working
For some reason, the default value for a Django model field I have doesn't work. As in, if the value is left blank by the user when creating an object for that model, then when the value is used in a ...
0
votes
1
answer
804
views
CS50 Web Python Project 1 Wiki: entry method causes search method to break
I'm working on Project 1 Wiki.
I've independently got the entry and search functions to work, entry works by itself and search works by itself. If un-comment the code related to entry, search breaks. ...
1
vote
3
answers
285
views
CS50W - Mail - Python Timestamp Error?
Per the problem set, I've not changed any of the Python that's included within the problem set for 'Mail'. I've only been tweaking with the JS and the HTML thus far. That's not to say my JS is ...
0
votes
1
answer
164
views
PSET8 Finance Buy. SQL query not executing
My buy function is crashing at the SQL query where I'm trying to insert data from the transaction into a transactions table. The types of each column are transaction_id(integer, primary key), user_id(...
0
votes
1
answer
170
views
CS50W - Django Forms vs HTML Forms
CS50W 2020 - Project 2 - Commerce
How come in lecture 3 (https://cs50.harvard.edu/web/2020/notes/3/#django-forms) Django forms are used, but in lecture 4 (like here: https://cs50.harvard.edu/web/2020/...
0
votes
1
answer
206
views
CASH NOT UPDATING - FINANCE SELL
so everything I have so far is working except the part where I need to update the cash right after I sell a stock. As you can see in the table below what's happening is that everytime I sell a stock ...
1
vote
0
answers
650
views
CS50 Web 2020, Project 1 - Wiki, CSS not working
I'm currently using Django as explained in cs50w 2020 lecture 3. Under the static folder inside encyclopedia directory is the styles.css. This was in the distro code and there is already some styles ...
0
votes
1
answer
311
views
CS50Web python. I can't get a new entry to save and show on the homepage of my wiki project. I am using Django with python
I can't get my code to save a new entry and return an error message if entry already existed. its just the views.py I can't figure out help please. code below