Questions tagged [django]
The django tag has no usage guidance.
20
questions
0
votes
0
answers
42
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
13
views
How can prepare vscode erd extension diagram preview?
I'm in Capstone of CS50w.
In this guide, noted:
Make sure the extension can find the "erd" and "dot" program.
Where is erd and dot program for download and installation?
My ...
0
votes
0
answers
33
views
Project 1 Wiki, Correct directory or venv path
This is probably too simple a problem, but I keep getting stuck, so here I am.
Prior to project one, in lecture 3 for Django, I followed along with the lecture and was able to overcome any hiccups ...
0
votes
1
answer
40
views
CS50W Project 2 Commerce - Missing Button
I'm currently working on the commerce project for CS50W. I'm working on the page to create a listing and i've set up my form. However for some reason the code I'm using to display the category is ...
0
votes
1
answer
46
views
cs50w project 1 wiki search issues
There are issues with my search code.
Example: If the query does not match the name of an encyclopedia entry, the user should instead be taken to a search results page that displays a list of all ...
0
votes
1
answer
168
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
555
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 ...
1
vote
1
answer
59
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....
1
vote
1
answer
27
views
How do we delete existing flight in sqlite via Django?
In the notes for the SQLITE section, week 3,
https://cs50.harvard.edu/web/2020/notes/4/#:~:text=delete%20your%20existing%20flight%20from%20New%20York%20to%20London
It states:
Every time we make ...
0
votes
1
answer
17
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
630
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
640
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
699
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 ...
1
vote
2
answers
251
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 ...
0
votes
1
answer
420
views
CS50W Project 4 / Network - like counter not always saving to database
I was able to implement a like counter where it keeps track of all the likes. For some reason though, it randomly doesn't save the counter to the database when I submit the PUT request. I can't figure ...
0
votes
1
answer
654
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 ...
1
vote
1
answer
2k
views
Django 127.0.0.1 refused to connect for the default Django Webpage
I am taking "CS50’s Web Programming with Python and JavaScript" and I have reached lecture 3 - Django. I am using the CS50 IDE for my program and I have done every step to start the basic ...
0
votes
1
answer
105
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 ...
1
vote
1
answer
329
views
How do correct I correct the pylint(no-member) error I get in the Web Flight lesson
Class Flight(models.Model):
origin = models.ForeignKey(Airport, on_delete=models.CASCADE, related_name="departure")
destination = models.ForeignKey(Airport, on_delete=models.CASCADE, ...
1
vote
0
answers
292
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 ...