Questions tagged [cs50-web-django]

The tag has no usage guidance.

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

CS50 Web Wiki Project Search function

I need help for search function, it doesn´t work and I can not find what is the problem... layout.html {% load static %} <!DOCTYPE html> <html lang="en"> <head> ...
user avatar
  • 1
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
0 answers
12 views

My CS50 Web Project 1 Edit page is not updating entries

My edit function is shown below: def edit(request,entry): if request.method =="GET": text = util.get_entry(entry) return render(request, "encyclopedia/edit.html", { ...
user avatar
  • 1
0 votes
0 answers
26 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 (...
user avatar
0 votes
0 answers
30 views

CS50 Web: How to redirect after creating a new entry?

I am stuck at wiki, problem 1 of the CS50 Web. I can't figure out how i should redirect the user after registering his new entry. I am trying to redirect to another page but it remains on the same &...
user avatar
0 votes
0 answers
19 views

CS50 Web Wiki Edit Form. Form is returning empty in the edit function

I am having issues with an empty form being provided in the edit function. Everything works well but when I try to edit an entry I get a Value Error saying the HTTPResponse is None and that the ...
user avatar
0 votes
0 answers
50 views

CS50W-NoReverseMatch Error?

Web Programming Project 1. I can't figure out what is causing this error. Tried searching for an answer everywhere. Error Message Reverse for 'edit' with no arguments not found. 1 pattern(s) tried: [...
user avatar
0 votes
0 answers
12 views

How can I receive POST data sent from the React frontend in Django Rest Framework using serializer?

As you can see when I print the serializer by print(serializer) statement, the output there is = AddCompanySerializer(data={'name': 'Nestle', 'est': '1866', 'org': 'Switzerland'}): name = CharField(...
user avatar
0 votes
1 answer
54 views

CS50 web - Problem 1, wiki

I'm confused by paths in Django. In the source code for the 'Wiki' problem, the file "wiki/urls.py" has this code (1) in it: urlpatterns = [ path('admin/', admin.site.urls), path('', ...
user avatar
0 votes
1 answer
402 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 ...
user avatar
1 vote
2 answers
122 views

How to get markdown info to HTML

Question from Project 1 in CS50W I'm stuck trying to get the markdown info from files to my HTML. I manage to get the markdown info into a HTML string, but when I input it to my HTML I get the same ...
user avatar
0 votes
1 answer
447 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 ...
user avatar
1 vote
0 answers
447 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 ...
user avatar
0 votes
1 answer
186 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
user avatar
  • 1