Hot answers tagged

4 votes
Accepted

Does anyone know how to use Django on CS50 IDE?

Type python manage.py runserver 0.0.0.0:8080 and start the server. Then click the web server option in the IDE. After going to the site, remove the -beta from the url and press enter. It will show ...
user avatar
  • 992
1 vote

CS50W Project Wiki search function

I know this is late but if it helps somebody. The issue in your code is indentation. The moment the loop find the first matching substring it renders the page. Left indenting it by two levels should ...
user avatar
1 vote
Accepted

How do we delete existing flight in sqlite via Django?

I was having the same problem. What worked for me was going back into Django shell and entering the following command. Flight.objects.filter(id=1).delete() Of course if there is more than one flight ...
user avatar
1 vote
Accepted

Edit Function Help - CS50 Web Project1 Wiki

In the entry page, at the end you are specifying a url which should take you to the edit page. But instead it reloads the entry page as the path is 'entry' not 'edit'. If you do this small change then ...
user avatar
  • 992
1 vote

Help with Search Bar - Wiki Project1 CS50 Web Django

Nevermind, I have been able to figure it out. I had to use a GET request.
user avatar
1 vote

How to get markdown info to HTML

A possible method has been mentioned in the Hints part. By default, when substituting a value in a Django template, Django HTML-escapes the value to avoid outputting unintended HTML. If you want to ...
user avatar
  • 992
1 vote
Accepted

Django 127.0.0.1 refused to connect for the default Django Webpage

Type python manage.py runserver 127.0.0.1:8080 in the terminal. At the top right corner of the terminal, you will see a link. Click on that. Copy the link. Then in the settings.py file of the app, go ...
user avatar
  • 992

Only top scored, non community-wiki answers of a minimum length are eligible