browser shows page that I dont have

I am just flummoxed. I started the web having just 1 single view in my 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 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.


it turned out to be that you need to restart gunicorn to see the changes. At least that was what held me up.

The problem may come from several places. You may have incorrectly configured. My video tutorials may help you (English subtitles):

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.


It sounds like that you might be editing the files in another document root. Can you share your Nginx config file here and also confirm the path to the file that you are editing?

Also do you have multiple server blocks in your Nginx? If so you could share them here so that I could try to advise you further.

Regards, Bobby


Thank you.

What it turned out to be is that gunicorn stays with the latest look of the website until you restart it. So no matter what I did, everything stayed like when I last left it on the 4th of November. When I restarted it, then I could see changes.

But I imagine this is not the way it is supposed to be. As far as I know, systemd should take care of enforcing the changes at runtime.

If I work on my laptop, push my changes to github, what follows?

a) are the server and github so connected that the changes are pulled from the server?

b) do I have to manually pull them from the server?