Question
browser shows page that I dont have
I am just flummoxed.
I started the web having just 1 single view in my views.py page, with one line to see if everything was working, namely:
from django.http import HttpResponse
def home(request):
return HttpResponse(‘Hello, World!’)
so a few days after I return, I delete that code and paste a different one
def home(request):
return render(request, 'home.html’, name='home’)
and now that home.html page is located in a directory called templates, and has just an html table and yes, I have modified settings.py to indicate where that templates directory is
DIRS’: [
os.path.join(BASE_DIR, 'templates’)
],
Well, when I go the webpage,I am still seeing the hello world, and is a code that does not exist anymore.
Of course, nothing to do with cookies or browser cache, because apart from having deleted all browsing data, I tried different computers, different browsers, I even shot up Tor that I had never used before.
I am still seeing the hello world. This is incredible.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
The problem may come from several places. You may have urls.py incorrectly configured. My video tutorials may help you (English subtitles):
https://www.youtube.com/channel/UCwH_HDL-Ii5NDnYp1EZVvYw?view_as=subscriber
it turned out to be that you need to restart gunicorn to see the changes. At least that was what held me up.