Questions tagged [django]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
25 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
0answers
22 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
1answer
21 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
0answers
17 views

Django form does not render in html template

so I've been trying to render a django form in an html template for about two hours now and I can't seem to get it to work. Any one with an idea or solution to this should kindly share, thanks :) Here'...
0
votes
1answer
26 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
1answer
32 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, ...
0
votes
0answers
7 views

I'm wondering how to import Django through my Powershell and how to active Django in my PythonPath

I'm trying to import and active Django in my pythonpath, but I still have this message show up in my manage.py tab on VSCode (I'm using Windows 10 and am finding a lot of Linux inputs): ""&...
0
votes
0answers
17 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>/$", ...
0
votes
0answers
81 views

how do I perform a search

This is project one for wiki and I am stuck this is my last thing to do. below are screenshots of the views.py, util.py and template. We are suppose to use the functions from util.py(This is the last ...
0
votes
0answers
20 views

I keep getting invalid syntax at else. I am trying to redirect a page

here is the code. I keep getting invalid syntax at else. Can someone explain why and help please.
0
votes
0answers
28 views

I keep getting - TypeError: unhashable typ

can't get page to redirect please help. I keep getting the error TypeError: unhashable type: 'dict' at line: return HttpResponseRedirect (reverse("encyclopedia:index", { "entries":...
0
votes
0answers
51 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 ...
0
votes
0answers
23 views

Why I get a MultiValueDictKeyError when getting data from POST request?

I'm currently learning in Django, and in this fetch request, I always get the same error: topup.html let data = new FormData(); data.append('amount', document.getElementById(...