Questions tagged [cs50-web-programming-with-python]

Filter by
Sorted by
Tagged with
0 votes
0 answers
45 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 ...
  • 101
0 votes
1 answer
5 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 (...
  • 3
0 votes
0 answers
9 views

How can I disable the preview page?

Wassap, So, context. I am trying to make a CS50 Finance like app for my final project. For the app I want you to be able to register online and sign in on the app and vice versa. So, I figured the ...
0 votes
1 answer
72 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
0 answers
9 views

CS50 Web Project 4 network : How to join three tables with django orm

I'm working on CS50Web Project4 Network, and stuck at implementing Following page. I'd like to combine User, Post, Follower tables together to extract posts written by writers whom current user ...
0 votes
1 answer
260 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
0 answers
13 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....
  • 1
0 votes
0 answers
6 views

Tips for entering the world of CS50 Beta?

What windows and what advice do you currently recommend for this 2022?
0 votes
1 answer
189 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> ...
  • 1
0 votes
0 answers
19 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 ...
0 votes
1 answer
224 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
45 views

problem to submit CS50 project0 to github

I create a new branche web50/projects/2020/x/search to my CS50 repository github.com/me50/myname. I didn´t know what happen another project was pushed to this branche and the branche is set as default ...
  • 1
0 votes
0 answers
39 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
0 answers
36 views

Search: Getting redirect notice for I'm Feeling Lucky

I'm getting a redirect notice when implementing I'm Feeling Lucky, similar to the below: Is there some way to bypass this notice? or is this acceptable for the purposes of this problem set?
0 votes
1 answer
271 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
36 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
42 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.
  • 3
0 votes
1 answer
138 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
12 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 ...
  • 1
0 votes
1 answer
176 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
2 answers
786 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
534 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. ...
  • 3
0 votes
1 answer
577 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
319 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
471 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
2 answers
562 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
515 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
203 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
169 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
87 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
388 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
725 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
264 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
138 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
136 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
151 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 ...
  • 5
1 vote
0 answers
479 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
227 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
  • 1
0 votes
2 answers
756 views

CS50W - Wiki w/ Django - Search Bar

I cannot for the life of me get the HTML form to transfer the user's search into my search function within views.py. I've tried this a number of different ways and I either just get no movement (as I ...
0 votes
1 answer
187 views

Help please: I keep getting - TypeError: unhashable type: 'dict'

I keep getting - TypeError: unhashable type: 'dict' at line: return HttpResponseRedirect (reverse("encyclopedia:index", { "entries": util.save_entry(title, content) })) My code is ...
  • 1
1 vote
1 answer
995 views

CS50W - Project 0 - "I'm Feeling Lucky"

For the "I'm Feeling Lucky" part, I'm getting a redirect notice (like this: https://images.app.goo.gl/Mgk6knNBYHfe5YKB7). How do I bypass this? Thank you!
0 votes
1 answer
609 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
0 answers
3k views

raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@app.route('/api/<string:isbn>', methods = ['GET']) def isbn(isbn): #import api from Goodreads (stats) book_data = db.execute("SELECT * FROM books WHERE isbn=:isbn",{'isbn':isbn})....
  • 1
0 votes
0 answers
145 views

How do I create an advanced query page using HTML and CSS? Should I use any other langauges to make it a faster process?

How do I create an advanced query in HTML and CSS? I have to create a front end similar to Google and have already outfitted the first two pages, it's the 3rd page, the advanced query page that I need ...
1 vote
0 answers
227 views

decoding to str: need a bytes-like object, HttpResponse found

While converting markdown to html i am getting this error def title(request, title): global mdValue mdValue = util.get_entry(title) htmlValue = m.convert(mdValue) # error occurs on this ...
1 vote
1 answer
233 views

CS50 Web Programming Mail Pset - DOM reloading on every form submission

On the mail pset the inbox page loads as default whenever the DOM is loaded. Whenever I submit my form to send an email the DOM is reloaded and inbox pops up. I'm trying to get the sent mailbox to pop ...
1 vote
0 answers
45 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
1 answer
88 views

Can't import books.csv using import.py

I'm on a project1, here is the link to it: https://docs.cs50.net/ocw/web/projects/1/project1.html I've successfully made a Table books using my Python script, however when I try to import the "books....
2 votes
1 answer
2k views

Flask Sessions Not Working

I'm using VS Code and following along Brian's Flask class in Web50. I have copied his notes program word for word, and somehow I get different results. I've downloaded Flask and Sessions, so that's ...
  • 23
0 votes
0 answers
52 views

Trying to flask run the task session on the CS50 web Lecture DATABASE issue

I had a great time learning about HTML and CSS. Then came this intimidating flask feature. I was able to create a session["username"] to login and logout. I'm trying to use session to create a todo ...