Questions tagged [django]

The tag has no usage guidance.

16 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
1answer
13 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
1answer
147 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
0answers
199 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
21 views

MultiValueDictKeyError when using dropdown list with Pagination

I am working on CS50W project 2 -- Commerce -- I have decided to use Pagination in my app and it works in showing Active Listing page by page of 5 per page. problem occurs when i try the pagination ...
0
votes
0answers
8 views

what is the difference between the 'wiki' vs. 'encylopedia' folder is project 1 django?

In the starter code there is a folder called encyclopedia and another folder called wiki. I know there's only one app according to the instructions, and that is encyclopedia. Is wiki suppose to be an ...
0
votes
0answers
14 views

cs50w: how to open a new page with a unique name for wiki/PAGE_NAME?

Project1: "Entry Page: Visiting /wiki/TITLE, where TITLE is the title of an encyclopedia entry, should render a page that displays the contents of that encyclopedia entry." I am having ...
0
votes
1answer
5 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
0answers
141 views

Mail Project 3 CS50W - Cannot Send Mail

I am stuck on CS50W's Project 3 Mail. I'm very new to JavaScript so I think I'm probably missing something obvious but I cannot get it to send an email. When I go to the admin section there's nothing ...
0
votes
0answers
59 views

Does anyone know how to use Django with minimal setup? Perhaps in a cloud environment or some IDE?

I can't seem to set up Django on my computer. As for running on my computer, I have just installed python and I think pip comes along with it? So I checked if I had pip installed using the command &...
0
votes
0answers
150 views

cs50w Wiki Edit Function: successful edit but NoReverseMatch for edit thrown

My edit function throws a NoReverseMatch (Reverse for 'editpage' with arguments '('',)' not found. 1 pattern(s) tried: ['editpage/(?P[^/]+)/$']) when I try and submit edits on the page. However, when ...
0
votes
0answers
27 views

Django - [Errno 2] No such file or directory error: when attempting to save an uploaded file to a dynamic url

Models.py: class Enterprise(models.Model): name = models.CharField(max_length = 100) def __str__(self): return f"{self.id}_{self.name}" class Client(models.Model): name =...
0
votes
0answers
125 views

Running web applications (Django and/or Flask) on CS50 IDE

Hope you all are doing great. Had a quick question about the CS50 IDE and running web applications on it. One thing I noticed when running my web applications on CS50 IDE either by using "python ...
0
votes
1answer
179 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
1answer
311 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
391 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
91 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'...